diff options
Diffstat (limited to 'doc/GetCursor.3')
-rw-r--r-- | doc/GetCursor.3 | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/doc/GetCursor.3 b/doc/GetCursor.3 index daca323..953252b 100644 --- a/doc/GetCursor.3 +++ b/doc/GetCursor.3 @@ -14,7 +14,6 @@ Tk_AllocCursorFromObj, Tk_GetCursor, Tk_GetCursorFromObj, Tk_GetCursorFromData, .nf \fB#include <tk.h>\fR .sp -.VS 8.1 Tk_Cursor \fBTk_AllocCursorFromObj(\fIinterp, tkwin, objPtr\fB)\fR .sp @@ -23,17 +22,14 @@ Tk_Cursor .sp Tk_Cursor \fBTk_GetCursorFromObj(\fItkwin, objPtr\fB)\fR -.VE .sp Tk_Cursor \fBTk_GetCursorFromData(\fIinterp, tkwin, source, mask, width, height, xHot, yHot, fg, bg\fB)\fR .sp -CONST char * +const char * \fBTk_NameOfCursor(\fIdisplay, cursor\fB)\fR .sp -.VS 8.1 \fBTk_FreeCursorFromObj(\fItkwin, objPtr\fB)\fR -.VE .sp \fBTk_FreeCursor(\fIdisplay, cursor\fB)\fR .SH ARGUMENTS @@ -42,17 +38,15 @@ CONST char * Interpreter to use for error reporting. .AP Tk_Window tkwin in Token for window in which the cursor will be used. -.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 -.AP "CONST char" *source in +resulting Tk_Cursor is not cached. +.AP "const char" *source in Data for cursor cursor, in standard cursor format. -.AP "CONST char" *mask in +.AP "const char" *mask in Data for mask cursor, in standard cursor format. .AP "int" width in Width of \fIsource\fR and \fImask\fR. @@ -81,7 +75,6 @@ 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 -.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 @@ -91,15 +84,15 @@ 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 +if \fIinterp\fR is not NULL. \fIObjPtr\fR must contain a standard Tcl list with one of the following forms: -.VE .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 ``The X Window System'' +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 @@ -116,7 +109,7 @@ 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 of the resource. The application and all its open +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. @@ -142,7 +135,6 @@ 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 -.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 @@ -151,13 +143,12 @@ return value, so \fBTk_GetCursor\fR is less efficient than .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 +\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. -.VE .PP \fBTk_GetCursorFromData\fR allows cursors to be created from in-memory descriptions of their source and mask cursors. \fISource\fR @@ -178,8 +169,8 @@ 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")); + 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 @@ -211,7 +202,6 @@ 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 -.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 @@ -223,7 +213,6 @@ 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. -.VE .SH BUGS In determining whether an existing cursor can be used to satisfy |