head	1.15;
access;
symbols
	core-8-5-9:1.13
	core-8-5-8:1.13
	macosx-cocoa-merge:1.15
	macosx-cocoa-premerge:1.15
	macosx-carbon-freeze:1.15
	core-8-5-7:1.13
	core-8-5-6:1.13
	core-8-6-b1:1.15
	core-8-6-a3:1.14
	core-8-5-5:1.13
	core-8-6-a2:1.14
	core-8-5-4:1.13
	core-8-5-3:1.13
	core-8-6-a1:1.13
	core-8-4-19:1.5
	core-8-5-branch:1.13.0.2
	core-8-5-2:1.13
	core-8-4-18:1.5
	core-8-5-1:1.13
	core-8-4-17:1.5
	core-8-5-0:1.13
	core-8-5-b3:1.12
	core-8-5-b2:1.11
	core-8-4-16:1.5
	core-8-5-b1:1.9
	core-stablilizer-merge:1.9
	core-stabilizer-branch:1.9.0.2
	core-stabilizer-merge:1.13
	core-8-4-15:1.5
	core-8-5-a6:1.9
	core-8-5-a5:1.8
	core-8-4-14:1.5
	core-8-5-a4:1.8
	core-8-4-13:1.5
	core-8-4-12:1.5
	core-8-4-11:1.5
	core-8-5-a3:1.8
	core-8-4-10:1.5
	core-8-4-9-branch:1.5.0.6
	core-8-5-a2:1.7
	core-8-4-9:1.5
	core-8-4-8:1.5
	core-8-4-7:1.5
	core-8-5-a1:1.5
	core-8-4-6:1.5
	core-8-4-5:1.5
	mistachkin-dev-branch:1.5.0.4
	core-8-4-4:1.5
	core-8-4-3:1.5
	core-8-4-branch:1.5.0.2
	core-8-4-2:1.5
	core-8-4-1:1.5
	core-8-3-5:1.4
	core-8-4-0:1.5
	macosx-8-4-merge-2002-08-31-trunk:1.5
	macosx-8-4-premerge-2002-08-31-branch:1.4.8.1
	macosx-8-4-premerge-2002-08-31-trunk:1.5
	macosx-8-4-merge-2002-08-30-branch:1.4.8.1
	macosx-8-4-merge-2002-08-30-trunk:1.5
	macosx-8-4-merge-2002-08-20-branch:1.4.8.1
	macosx-8-4-merge-2002-08-20-trunk:1.5
	core-8-4-b2:1.5
	core-8-4-b1:1.4
	macosx-premerge-6-9-02:1.4
	core-8-4-a4:1.4
	core-8-3-4:1.4
	macosx-8-4-branch:1.4.0.8
	macosx-8-4-branchpoint:1.4
	core-8-4-a3:1.4
	core-8-3-3:1.4
	dgp-privates-into-namespace:1.4.0.6
	tclpro-1-5-0:1.4
	core-8-4-win-speedup:1.4.0.4
	core-8-4-a2:1.4
	tclpro-1-4-1:1.4
	tclpro-1-4-0:1.4
	core-8-3-2:1.4
	ajuba-ajuba2-2-1-base:1.4
	ajuba-ajuba2-2-0:1.4
	core-8-4-a1:1.4
	core-8-3-1-branch:1.4.0.2
	core-8-3-1:1.4
	scriptics-sc-2-0-b5:1.4
	scriptics-sc-2-0-fixed:1.4
	scriptics-sc-2-0-b2:1.4
	scriptics-sc-2-0-b1:1.4
	core-8-3-0:1.4
	core-8-3-b2:1.4
	core-8-3-b1:1.4
	scriptics-sc-1-1:1.3
	scriptics-sc-1-1-b1:1.3
	core-8-2-3:1.3
	scriptics-sc-1-1-branch:1.3.0.10
	scriptics-sc-1-1-base:1.3
	scriptics-sc-1-0:1.3
	scriptics-sc-1-0-branch:1.3.0.8
	scriptics-sc-1-0-base:1.3
	core-8-2-2:1.3
	core-8-2-1:1.3
	scriptics-bc-1-0-b1:1.3
	core-8-2-1-branch:1.3.0.6
	scriptics-tclpro-1-3-0:1.3
	core-8-2-0:1.3
	core-8-2-b3-branch:1.3.0.4
	core-8-2-b3-base:1.3
	scriptics-tclpro-1-3-b4:1.3
	core-8-2-b2:1.3
	scriptics-tclpro-1-3-b3:1.3
	core-8-2-b1:1.3
	scriptics-tclpro-1-3-b2:1.3
	merge-to-mainline-5/21/99:1.3
	scriptics-tclpro-1-3-b2-branch:1.3.0.2
	core-8-1-1:1.3
	scriptics-tclpro-1-3-b1:1.3
	core-8-1-1-base:1.3
	core-8-1-0:1.3
	merge-to-mainline-4-29-99:1.3
	merge-to-mainline-4-23-99:1.3
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.2
	core-8-1-b2:1.1.4.2
	dev-8-1-stubs-branch:1.1.4.2.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.2
	core-8-0-4:1.2
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.15
date	2008.11.05.22.58.29;	author nijtmans;	state Exp;
branches;
next	1.14;

1.14
date	2008.06.30.22.57.01;	author dkf;	state Exp;
branches;
next	1.13;

1.13
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.12;

1.12
date	2007.10.29.16.04.12;	author dkf;	state Exp;
branches;
next	1.11;

1.11
date	2007.10.26.20.13.22;	author dgp;	state Exp;
branches;
next	1.10;

1.10
date	2007.10.24.14.32.57;	author dkf;	state Exp;
branches;
next	1.9;

1.9
date	2007.01.05.00.00.48;	author nijtmans;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2005.04.06.21.11.54;	author dkf;	state Exp;
branches;
next	1.7;

1.7
date	2004.09.19.16.05.36;	author dkf;	state Exp;
branches;
next	1.6;

1.6
date	2004.08.22.15.43.20;	author dkf;	state Exp;
branches;
next	1.5;

1.5
date	2002.08.05.04.30.38;	author dgp;	state Exp;
branches;
next	1.4;

1.4
date	99.12.16.21.57.11;	author hobbs;	state Exp;
branches
	1.4.8.1;
next	1.3;

1.3
date	99.04.16.01.51.08;	author stanton;	state Exp;
branches;
next	1.2;

1.2
date	98.09.14.18.22.49;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.40.04;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.29.00.25.08;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.15.54;	author stanton;	state Exp;
branches;
next	;

1.4.8.1
date	2002.08.20.20.27.00;	author das;	state Exp;
branches;
next	;

1.9.2.1
date	2007.11.01.16.37.12;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.15
log
@fix [Bug 1866774 ] Remove X10 references from docs
@
text
@'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: GetCursor.3,v 1.14 2008/06/30 22:57:01 dkf Exp $
'\" 
.so man.macros
.TH Tk_AllocCursorFromObj 3 8.1 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_AllocCursorFromObj, Tk_GetCursor, Tk_GetCursorFromObj, Tk_GetCursorFromData, Tk_NameOfCursor, Tk_FreeCursorFromObj, Tk_FreeCursor \- maintain database of cursors
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
Tk_Cursor
\fBTk_AllocCursorFromObj(\fIinterp, tkwin, objPtr\fB)\fR
.sp
Tk_Cursor
\fBTk_GetCursor(\fIinterp, tkwin, name\fB)\fR
.sp
Tk_Cursor
\fBTk_GetCursorFromObj(\fItkwin, objPtr\fB)\fR
.sp
Tk_Cursor
\fBTk_GetCursorFromData(\fIinterp, tkwin, source, mask, width, height, xHot, yHot, fg, bg\fB)\fR
.sp
const char *
\fBTk_NameOfCursor(\fIdisplay, cursor\fB)\fR
.sp
\fBTk_FreeCursorFromObj(\fItkwin, objPtr\fB)\fR
.sp
\fBTk_FreeCursor(\fIdisplay, cursor\fB)\fR
.SH ARGUMENTS
.AS "unsigned long" *pixelPtr
.AP Tcl_Interp *interp in
Interpreter to use for error reporting.
.AP Tk_Window tkwin in
Token for window in which the cursor will be used.
.AP Tcl_Obj *objPtr in/out
Description of cursor;  see below for possible values.  Internal rep will be
modified to cache pointer to corresponding Tk_Cursor.
.AP char *name in
Same as \fIobjPtr\fR except description of cursor is passed as a string and
resulting Tk_Cursor is not cached.
.AP "const char" *source in
Data for cursor cursor, in standard cursor format.
.AP "const char" *mask in
Data for mask cursor, in standard cursor format.
.AP "int" width in
Width of \fIsource\fR and \fImask\fR.
.AP "int" height in
Height of \fIsource\fR and \fImask\fR.
.AP "int" xHot in
X-location of cursor hot-spot.
.AP "int" yHot in
Y-location of cursor hot-spot.
.AP Tk_Uid fg in
Textual description of foreground color for cursor.
.AP Tk_Uid bg in
Textual description of background color for cursor.
.AP Display *display in
Display for which \fIcursor\fR was allocated.
.AP Tk_Cursor cursor in
Opaque Tk identifier for cursor.  If passed to \fBTk_FreeCursor\fR, must
have been returned by some previous call to \fBTk_GetCursor\fR or
\fBTk_GetCursorFromData\fR.
.BE
.SH DESCRIPTION
.PP
These procedures manage a collection of cursors
being used by an application.  The procedures allow cursors to be
re-used efficiently, thereby avoiding server overhead, and also
allow cursors to be named with character strings.
.PP
\fBTk_AllocCursorFromObj\fR takes as argument an object describing a
cursor, and returns an opaque Tk identifier for a cursor corresponding
to the description.  It re-uses an existing cursor if possible and
creates a new one otherwise.  \fBTk_AllocCursorFromObj\fR caches
information about the return value in \fIobjPtr\fR, which speeds up
future calls to procedures such as \fBTk_AllocCursorFromObj\fR and
\fBTk_GetCursorFromObj\fR. If an error occurs in creating the cursor,
such as when \fIobjPtr\fR refers to a non-existent file, then \fBNone\fR
is returned and an error message will be stored in \fIinterp\fR's result
if \fIinterp\fR is not NULL.  \fIObjPtr\fR must contain a standard Tcl
list with one of the following forms:
.TP
\fIname\fR\0[\fIfgColor\fR\0[\fIbgColor\fR]]
\fIName\fR is the name of a cursor in the standard X cursor cursor,
i.e., any of the names defined in \fBcursorcursor.h\fR, without
the \fBXC_\fR.  Some example values are \fBX_cursor\fR, \fBhand2\fR,
or \fBleft_ptr\fR.  Appendix B of
.QW "The X Window System"
by Scheifler & Gettys has illustrations showing what each of these
cursors looks like.  If \fIfgColor\fR and \fIbgColor\fR are both
specified, they give the foreground and background colors to use
for the cursor (any of the forms acceptable to \fBTk_GetColor\fR
may be used).  If only \fIfgColor\fR is specified, then there
will be no background color:  the background will be transparent.
If no colors are specified, then the cursor
will use black for its foreground color and white for its background
color.
.RS
.PP
The Macintosh version of Tk supports all of the X cursors and
will also accept any of the standard Mac cursors
including \fBibeam\fR, \fBcrosshair\fR, \fBwatch\fR, \fBplus\fR, and
\fBarrow\fR.  In addition, Tk will load Macintosh cursor resources of
the types \fBcrsr\fR (color) and \fBCURS\fR (black and white) by the
name of the resource.  The application and all its open
dynamic library's resource files will be searched for the named
cursor.  If there are conflicts color cursors will always be loaded
in preference to black and white cursors.
.RE
.TP
\fB@@\fIsourceName\0maskName\0fgColor\0bgColor\fR
In this form, \fIsourceName\fR and \fImaskName\fR are the names of
files describing cursors for the cursor's source bits and mask.
Each file must be in standard X11 cursor format.
\fIFgColor\fR and \fIbgColor\fR 
indicate the colors to use for the
cursor, in any of the forms acceptable to \fBTk_GetColor\fR.  This
form of the command will not work on Macintosh or Windows computers.
.TP
\fB@@\fIsourceName\0fgColor\fR
This form is similar to the one above, except that the source is
used as mask also.  This means that the cursor's background is
transparent.  This form of the command will not work on Macintosh
or Windows computers.
.TP
\fB@@\fIsourceName\fR
This form only works on Windows, and will load a Windows system
cursor (\fB.ani\fR or \fB.cur\fR) from the file specified in
\fIsourceName\fR.
.PP
\fBTk_GetCursor\fR is identical to \fBTk_AllocCursorFromObj\fR except
that the description of the cursor is specified with a string instead
of an object.  This prevents \fBTk_GetCursor\fR from caching the
return value, so \fBTk_GetCursor\fR is less efficient than
\fBTk_AllocCursorFromObj\fR.
.PP
\fBTk_GetCursorFromObj\fR returns the token for an existing cursor, given
the window and description used to create the cursor.
\fBTk_GetCursorFromObj\fR does not actually create the cursor; the cursor
must already have been created with a previous call to
\fBTk_AllocCursorFromObj\fR or \fBTk_GetCursor\fR.  The return
value is cached in \fIobjPtr\fR, which speeds up
future calls to \fBTk_GetCursorFromObj\fR with the same \fIobjPtr\fR
and \fItkwin\fR.
.PP
\fBTk_GetCursorFromData\fR allows cursors to be created from
in-memory descriptions of their source and mask cursors.  \fISource\fR
points to standard cursor data for the cursor's source bits, and
\fImask\fR points to standard cursor data describing
which pixels of \fIsource\fR are to be drawn and which are to be
considered transparent.  \fIWidth\fR and \fIheight\fR give the
dimensions of the cursor, \fIxHot\fR and \fIyHot\fR indicate the
location of the cursor's hot-spot (the point that is reported when
an event occurs), and \fIfg\fR and \fIbg\fR describe the cursor's
foreground and background colors textually (any of the forms
suitable for \fBTk_GetColor\fR may be used).  Typically, the
arguments to \fBTk_GetCursorFromData\fR are created by including
a cursor file directly into the source code for a program, as in
the following example:
.CS
Tk_Cursor cursor;
#include "source.cursor"
#include "mask.cursor"
cursor = Tk_GetCursorFromData(interp, tkwin, source_bits,
    mask_bits, source_width, source_height, source_x_hot,
    source_y_hot, Tk_GetUid("red"), Tk_GetUid("blue"));
.CE
.PP
Under normal conditions \fBTk_GetCursorFromData\fR
will return an identifier for the requested cursor.  If an error
occurs in creating the cursor then \fBNone\fR is returned and an error
message will be stored in \fIinterp\fR's result.
.PP
\fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR, and
\fBTk_GetCursorFromData\fR maintain a
database of all the cursors they have created.  Whenever possible,
a call to \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR, or
\fBTk_GetCursorFromData\fR will
return an existing cursor rather than creating a new one.  This
approach can substantially reduce server overhead, so the Tk
procedures should generally be used in preference to Xlib procedures
like \fBXCreateFontCursor\fR or \fBXCreatePixmapCursor\fR, which
create a new cursor on each call.  The Tk procedures are also more
portable than the lower-level X procedures.
.PP
The procedure \fBTk_NameOfCursor\fR is roughly the inverse of
\fBTk_GetCursor\fR.  If its \fIcursor\fR argument was created
by \fBTk_GetCursor\fR, then the return value is the \fIname\fR
argument that was passed to \fBTk_GetCursor\fR to create the
cursor.  If \fIcursor\fR was created by a call to \fBTk_GetCursorFromData\fR,
or by any other mechanism, then the return value is a hexadecimal string
giving the X identifier for the cursor.
Note:  the string returned by \fBTk_NameOfCursor\fR is
only guaranteed to persist until the next call to
\fBTk_NameOfCursor\fR.  Also, this call is not portable except for
cursors returned by \fBTk_GetCursor\fR.
.PP
When a cursor returned by \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
or \fBTk_GetCursorFromData\fR
is no longer needed, \fBTk_FreeCursorFromObj\fR or
\fBTk_FreeCursor\fR should be called to release it.
For \fBTk_FreeCursorFromObj\fR the cursor to release is specified
with the same information used to create it; for
\fBTk_FreeCursor\fR the cursor to release is specified
with its Tk_Cursor token.
There should be exactly one call to \fBTk_FreeCursor\fR for
each call to \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
or \fBTk_GetCursorFromData\fR.
.SH BUGS
.PP
In determining whether an existing cursor can be used to satisfy
a new request, \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
and \fBTk_GetCursorFromData\fR
consider only the immediate values of their arguments.  For
example, when a file name is passed to \fBTk_GetCursor\fR,
\fBTk_GetCursor\fR will assume it is safe to re-use an existing
cursor created from the same file name:  it will not check to
see whether the file itself has changed, or whether the current
directory has changed, thereby causing the name to refer to
a different file.  Similarly, \fBTk_GetCursorFromData\fR assumes
that if the same \fIsource\fR pointer is used in two different calls,
then the pointers refer to the same data;  it does not check to
see if the actual data values have changed.
.SH KEYWORDS
cursor
@


1.14
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.13 2007/12/13 15:23:43 dgp Exp $
d122 1
a122 1
Each file must be in standard X11 or X10 cursor format.
@


1.13
log
@merge stable branch onto HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.9.2.1 2007/11/01 16:37:12 dgp Exp $
a71 1

a216 1

d218 1
a231 1

@


1.12
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.11 2007/10/26 20:13:22 dgp Exp $
@


1.11
log
@        * doc/*.1:              Revert doc changes that broke
        * doc/*.3:              `make html` so we can get the release
        * doc/*.n:              out the door.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.9 2007/01/05 00:00:48 nijtmans Exp $
d48 1
a48 1
resulting Tk_Cursor isn't cached.
d89 1
a89 1
if \fIinterp\fR isn't NULL.  \fIObjPtr\fR must contain a standard Tcl
d96 2
a97 1
or \fBleft_ptr\fR.  Appendix B of ``The X Window System''
d148 1
a148 1
\fBTk_GetCursorFromObj\fR doesn't actually create the cursor; the cursor
@


1.10
log
@Lots of improvements to look and feel of manual pages
@
text
@d96 1
a96 2
or \fBleft_ptr\fR.  Appendix B of
.QW "The X Window System"
@


1.9
log
@various "const" additions, in line with TIP #27
fix bug #1627732
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.8 2005/04/06 21:11:54 dkf Exp $
d96 2
a97 1
or \fBleft_ptr\fR.  Appendix B of ``The X Window System''
@


1.9.2.1
log
@merge updates from HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.9 2007/01/05 00:00:48 nijtmans Exp $
d48 1
a48 1
resulting Tk_Cursor is not cached.
d89 1
a89 1
if \fIinterp\fR is not NULL.  \fIObjPtr\fR must contain a standard Tcl
d96 1
a96 2
or \fBleft_ptr\fR.  Appendix B of
.QW "The X Window System"
d147 1
a147 1
\fBTk_GetCursorFromObj\fR does not actually create the cursor; the cursor
@


1.8
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.7 2004/09/19 16:05:36 dkf Exp $
d31 1
a31 1
CONST char *
d49 1
a49 1
.AP "CONST char" *source in
d51 1
a51 1
.AP "CONST char" *mask in
@


1.7
log
@Standardize style of section refs & public symbols. Remove displayed tabs
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.6 2004/08/22 15:43:20 dkf Exp $
a18 1
.VS 8.1
a26 1
.VE
a33 1
.VS 8.1
a34 1
.VE
a42 1
.VS 8.1 br
a48 1
.VE
a79 1
.VS 8.1
a90 1
.VE
a138 1
.VS 8.1
a152 1
.VE
a205 1
.VS 8.1
a216 1
.VE
@


1.6
log
@More doc fixes from Mikhail Kolesnitchenko. [Patch 1013520]
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.5 2002/08/05 04:30:38 dgp Exp $
d183 2
a184 2
	mask_bits, source_width, source_height, source_x_hot,
	source_y_hot, Tk_GetUid("red"), Tk_GetUid("blue"));
@


1.5
log
@Applied companion patch for Tcl Patch 585105,
updating Tk to use Tcl 8.4's fully CONST-ified
interface, and fully CONSTifying Tk at the
same time.

This patch includes purging Tk of its last
direct access to interp->result.  [Bug 589853]

The substantial changes include copying
event sequence strings into Tcl_DStrings
in tkBind.c, and copying [text] indices into
Tcl_DStrings because parsing them involved
overwriting them.  If this causes performance
trouble, that can be resolved by further
converting them to Tcl_Obj's.

The #defines USE_NON_CONST and USE_COMPAT_CONST
have the same effect for Tk as they do for Tcl.
(They actually change tcl.h)
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.4 1999/12/16 21:57:11 hobbs Exp $
d121 1
a121 1
name of the of the resource.  The application and all its open
@


1.4
log
@	* doc/GetCursor.3:
	* win/tkWinCursor.c: added support for Windows cursors to
	TkGetCursorByName (.ani, .cur) using -cursor @@<filename>
	(Ascher) [Bug: 1350]
	* doc/listbox.n: added doc for <<ListboxSelect>> [Bug: 3500]

	* doc/getOpenFile.n: removed note that -initialfile didn't work
	for tk_getOpenFile
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.3 1999/04/16 01:51:08 stanton Exp $
d33 1
a33 1
char *
d55 1
a55 1
.AP char *source in
d57 1
a57 1
.AP char *mask in
@


1.4.8.1
log
@merged with trunk at tag macosx-8-4-merge-2002-08-20-trunk
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d33 1
a33 1
CONST char *
d55 1
a55 1
.AP "CONST char" *source in
d57 1
a57 1
.AP "CONST char" *mask in
@


1.3
log
@* Merged 8.1 branch into the main trunk
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d141 5
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d3 1
a3 1
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
d11 1
a11 1
.TH Tk_GetCursor 3 4.1 Tk "Tk Library Procedures"
d14 1
a14 1
Tk_GetCursor, Tk_GetCursorFromData, Tk_NameOfCursor, Tk_FreeCursor \- maintain database of cursors
d19 1
d21 8
a28 1
\fBTk_GetCursor(\fIinterp, tkwin, nameId\fB)\fR
d36 4
d47 8
a54 2
.AP Tk_Uid nameId in
Description of cursor;  see below for possible values.
d56 1
a56 1
Data for cursor bitmap, in standard bitmap format.
d58 1
a58 1
Data for mask bitmap, in standard bitmap format.
d74 1
a74 1
Opaque Tk identifier for cursor.  If passed to\fBTk_FreeCursor\fR, must
d84 1
a84 1
allow cursors to be named with character strings (actually Tk_Uids).
d86 11
a96 5
\fBTk_GetCursor\fR takes as argument a Tk_Uid describing a cursor,
and returns an opaque Tk identifier for a cursor corresponding to the
description. 
It re-uses an existing cursor if possible and
creates a new one otherwise.  \fINameId\fR must be a standard Tcl
d98 1
d101 2
a102 2
\fIName\fR is the name of a cursor in the standard X cursor font,
i.e., any of the names defined in \fBcursorfont.h\fR, without
d114 4
a117 3

The Macintosh version of Tk also supports all of the X cursors.
Tk on the Mac will also accept any of the standard Mac cursors
d125 1
d129 2
a130 2
files describing bitmaps for the cursor's source bits and mask.
Each file must be in standard X11 or X10 bitmap format.
d142 17
d160 3
a162 3
in-memory descriptions of their source and mask bitmaps.  \fISource\fR
points to standard bitmap data for the cursor's source bits, and
\fImask\fR points to standard bitmap data describing
d182 1
a182 1
Under normal conditions, \fBTk_GetCursor\fR and \fBTk_GetCursorFromData\fR
d184 2
a185 3
occurs in creating the cursor, such as when \fInameId\fR refers
to a non-existent file, then \fBNone\fR is returned and an error
message will be stored in \fIinterp->result\fR.
d187 2
a188 1
\fBTk_GetCursor\fR and \fBTk_GetCursorFromData\fR maintain a
d190 2
a191 1
a call to \fBTk_GetCursor\fR or \fBTk_GetCursorFromData\fR will
d196 2
a197 1
create a new cursor on each call.
d201 1
a201 1
by \fBTk_GetCursor\fR, then the return value is the \fInameId\fR
d211 9
a219 2
When a cursor returned by \fBTk_GetCursor\fR or \fBTk_GetCursorFromData\fR
is no longer needed, \fBTk_FreeCursor\fR should be called to release it.
d221 3
a223 4
each call to \fBTk_GetCursor\fR or \fBTk_GetCursorFromData\fR.
When a cursor is no longer in use anywhere (i.e. it has been freed as
many times as it has been gotten) \fBTk_FreeCursor\fR will release
it to the X server and remove it from the database.
d227 2
a228 1
a new request, \fBTk_GetCursor\fR and \fBTk_GetCursorFromData\fR
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" SCCS: @@(#) GetCursor.3 1.23 96/08/27 13:21:26
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d3 1
a3 1
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
d8 1
a8 1
'\" SCCS: @@(#) GetCursor.3 1.24 98/01/14 13:58:59
d11 1
a11 1
.TH Tk_AllocCursorFromObj 3 8.1 Tk "Tk Library Procedures"
d14 1
a14 1
Tk_AllocCursorFromObj, Tk_GetCursor, Tk_GetCursorFromObj, Tk_GetCursorFromData, Tk_NameOfCursor, Tk_FreeCursorFromObj, Tk_FreeCursor \- maintain database of cursors
a18 1
.VS 8.1
d20 1
a20 8
\fBTk_AllocCursorFromObj(\fIinterp, tkwin, objPtr\fB)\fR
.sp
Tk_Cursor
\fBTk_GetCursor(\fIinterp, tkwin, name\fB)\fR
.sp
Tk_Cursor
\fBTk_GetCursorFromObj(\fItkwin, objPtr\fB)\fR
.VE
a27 4
.VS 8.1
\fBTk_FreeCursorFromObj(\fItkwin, objPtr\fB)\fR
.VE
.sp
d35 2
a36 8
.VS 8.1 br
.AP Tcl_Obj *objPtr in/out
Description of cursor;  see below for possible values.  Internal rep will be
modified to cache pointer to corresponding Tk_Cursor.
.AP char *name in
Same as \fIobjPtr\fR except description of cursor is passed as a string and
resulting Tk_Cursor isn't cached.
.VE
d38 1
a38 1
Data for cursor cursor, in standard cursor format.
d40 1
a40 1
Data for mask cursor, in standard cursor format.
d56 1
a56 1
Opaque Tk identifier for cursor.  If passed to \fBTk_FreeCursor\fR, must
d66 1
a66 1
allow cursors to be named with character strings.
d68 5
a72 11
.VS 8.1
\fBTk_AllocCursorFromObj\fR takes as argument an object describing a
cursor, and returns an opaque Tk identifier for a cursor corresponding
to the description.  It re-uses an existing cursor if possible and
creates a new one otherwise.  \fBTk_AllocCursorFromObj\fR caches
information about the return value in \fIobjPtr\fR, which speeds up
future calls to procedures such as \fBTk_AllocCursorFromObj\fR and
\fBTk_GetCursorFromObj\fR. If an error occurs in creating the cursor,
such as when \fIobjPtr\fR refers to a non-existent file, then \fBNone\fR
is returned and an error message will be stored in \fIinterp\fR's result
if \fIinterp\fR isn't NULL.  \fIObjPtr\fR must contain a standard Tcl
a73 1
.VE
d76 2
a77 2
\fIName\fR is the name of a cursor in the standard X cursor cursor,
i.e., any of the names defined in \fBcursorcursor.h\fR, without
d89 3
a91 4
.RS
.PP
The Macintosh version of Tk supports all of the X cursors and
will also accept any of the standard Mac cursors
a98 1
.RE
d102 2
a103 2
files describing cursors for the cursor's source bits and mask.
Each file must be in standard X11 or X10 cursor format.
a114 17
.VS 8.1
\fBTk_GetCursor\fR is identical to \fBTk_AllocCursorFromObj\fR except
that the description of the cursor is specified with a string instead
of an object.  This prevents \fBTk_GetCursor\fR from caching the
return value, so \fBTk_GetCursor\fR is less efficient than
\fBTk_AllocCursorFromObj\fR.
.PP
\fBTk_GetCursorFromObj\fR returns the token for an existing cursor, given
the window and description used to create the cursor.
\fBTk_GetCursorFromObj\fR doesn't actually create the cursor; the cursor
must already have been created with a previous call to
\fBTk_AllocCursorFromObj\fR or \fBTk_GetCursor\fR.  The return
value is cached in \fIobjPtr\fR, which speeds up
future calls to \fBTk_GetCursorFromObj\fR with the same \fIobjPtr\fR
and \fItkwin\fR.
.VE
.PP
d116 3
a118 3
in-memory descriptions of their source and mask cursors.  \fISource\fR
points to standard cursor data for the cursor's source bits, and
\fImask\fR points to standard cursor data describing
d138 1
a138 1
Under normal conditions \fBTk_GetCursorFromData\fR
d140 3
a142 2
occurs in creating the cursor then \fBNone\fR is returned and an error
message will be stored in \fIinterp\fR's result.
d144 1
a144 2
\fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR, and
\fBTk_GetCursorFromData\fR maintain a
d146 1
a146 2
a call to \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR, or
\fBTk_GetCursorFromData\fR will
d151 1
a151 2
create a new cursor on each call.  The Tk procedures are also more
portable than the lower-level X procedures.
d155 1
a155 1
by \fBTk_GetCursor\fR, then the return value is the \fIname\fR
d165 2
a166 9
.VS 8.1
When a cursor returned by \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
or \fBTk_GetCursorFromData\fR
is no longer needed, \fBTk_FreeCursorFromObj\fR or
\fBTk_FreeCursor\fR should be called to release it.
For \fBTk_FreeCursorFromObj\fR the cursor to release is specified
with the same information used to create it; for
\fBTk_FreeCursor\fR the cursor to release is specified
with its Tk_Cursor token.
d168 4
a171 3
each call to \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
or \fBTk_GetCursorFromData\fR.
.VE
d175 1
a175 2
a new request, \fBTk_AllocCursorFromObj\fR, \fBTk_GetCursor\fR,
and \fBTk_GetCursorFromData\fR
@


1.1.4.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetCursor.3,v 1.2 1998/09/14 18:22:49 stanton Exp $
@


