Lines Matching defs:cursor

4  *	This file contains X specific cursor manipulation routines.
18 * defined in tkCursor.c. Each system specific cursor module will define
19 * a different cursor structure. All of these structures must have the
26 TkCursor info; /* Generic cursor info used by tkCursor.c */
27 Display *display; /* Display for which cursor is valid. */
31 * The table below is used to map from the name of a cursor to its
32 * index in the official cursor font:
124 #define CURSORFONT "cursor"
134 * Retrieve a cursor by name. Parse the cursor name into fields
135 * and create a cursor, either from the standard cursor font or
139 * Returns a new cursor, or NULL on errors.
142 * Allocates a new cursor.
150 Tk_Window tkwin; /* Window in which cursor will be used. */
151 Tk_Uid string; /* Description of cursor. See manual entry
155 Cursor cursor = None;
175 * The cursor is to come from the standard cursor font. If one
176 * arg, it is cursor name (use black and white for fg and bg).
221 interp->result = "couldn't load cursor font";
225 cursor = XCreateGlyphCursor(display, dispPtr->cursorFont,
234 * The cursor is to be created by reading bitmap files. There
262 cursor = XCreatePixmapCursor(display, source, source,
290 cursor = XCreatePixmapCursor(display, source, mask,
295 if (cursor != None) {
297 cursorPtr->info.cursor = (Tk_Cursor) cursor;
315 Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",
326 * Creates a cursor from the source and mask bits.
329 * Returns a new cursor, or NULL on errors.
332 * Allocates a new cursor.
340 Tk_Window tkwin; /* Window in which cursor will be used. */
341 char *source; /* Bitmap data for cursor shape. */
342 char *mask; /* Bitmap data for cursor mask. */
343 int width, height; /* Dimensions of cursor. */
344 int xHot, yHot; /* Location of hot-spot in cursor. */
345 XColor fgColor; /* Foreground color for cursor. */
346 XColor bgColor; /* Background color for cursor. */
348 Cursor cursor;
359 cursor = XCreatePixmapCursor(display, sourcePixmap,
364 if (cursor != None) {
366 cursorPtr->info.cursor = (Tk_Cursor) cursor;
378 * This procedure is called to release a cursor allocated by
385 * The cursor data structure is deallocated.
395 XFreeCursor(unixCursorPtr->display, (Cursor) unixCursorPtr->info.cursor);
396 Tk_FreeXId(unixCursorPtr->display, (XID) unixCursorPtr->info.cursor);