diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 973 | ||||
-rw-r--r-- | generic/tkInt.h | 163 |
2 files changed, 560 insertions, 576 deletions
diff --git a/generic/tk.h b/generic/tk.h index bc839ef..e047764 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1,18 +1,18 @@ /* * tk.h -- * - * Declarations for Tk-related things that are visible - * outside of the Tk module itself. + * Declarations for Tk-related things that are visible outside of the Tk + * module itself. * * Copyright (c) 1989-1994 The Regents of the University of California. * Copyright (c) 1994 The Australian National University. * Copyright (c) 1994-1998 Sun Microsystems, Inc. * Copyright (c) 1998-2000 Ajuba Solutions. * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.87 2006/05/04 14:11:46 dgp Exp $ + * RCS: @(#) $Id: tk.h,v 1.88 2006/08/18 10:24:41 dkf Exp $ */ #ifndef _TK @@ -43,17 +43,17 @@ extern "C" { * unix/tk.spec (3 LOC Major/Minor, 2 LOC patch) * win/tcl.m4 (not patchlevel) * - * You may also need to update some of these files when the numbers change - * for the version of Tcl that this release of Tk is compiled against. + * You may also need to update some of these files when the numbers change for + * the version of Tcl that this release of Tk is compiled against. */ -#define TK_MAJOR_VERSION 8 -#define TK_MINOR_VERSION 5 -#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TK_RELEASE_SERIAL 5 +#define TK_MAJOR_VERSION 8 +#define TK_MINOR_VERSION 5 +#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE +#define TK_RELEASE_SERIAL 5 -#define TK_VERSION "8.5" -#define TK_PATCH_LEVEL "8.5a5" +#define TK_VERSION "8.5" +#define TK_PATCH_LEVEL "8.5a5" #ifndef _TCL # include <tcl.h> @@ -62,18 +62,18 @@ extern "C" { # endif #endif -/* - * A special definition used to allow this header file to be included - * from windows or mac resource files so that they can obtain version - * information. RC_INVOKED is defined by default by the windows RC tool - * and manually set for macintosh. +/* + * A special definition used to allow this header file to be included from + * windows or mac resource files so that they can obtain version information. + * RC_INVOKED is defined by default by the windows RC tool and manually set + * for macintosh. * - * Resource compilers don't like all the C stuff, like typedefs and - * procedure declarations, that occur below, so block them out. + * Resource compilers don't like all the C stuff, like typedefs and procedure + * declarations, that occur below, so block them out. */ - + #ifndef RC_INVOKED - + #ifndef _XLIB_H # if defined(MAC_OSX_TK) # include <X11/Xlib.h> @@ -90,7 +90,7 @@ extern "C" { # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT #endif - + /* * Decide whether or not to use input methods. */ @@ -126,8 +126,8 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement; typedef CONST char *Tk_Uid; /* - * The enum below defines the valid types for Tk configuration options - * as implemented by Tk_InitOptions, Tk_SetOptions, etc. + * The enum below defines the valid types for Tk configuration options as + * implemented by Tk_InitOptions, Tk_SetOptions, etc. */ typedef enum { @@ -153,56 +153,54 @@ typedef enum { } Tk_OptionType; /* - * Structures of the following type are used by widgets to specify - * their configuration options. Typically each widget has a static - * array of these structures, where each element of the array describes - * a single configuration option. The array is passed to - * Tk_CreateOptionTable. + * Structures of the following type are used by widgets to specify their + * configuration options. Typically each widget has a static array of these + * structures, where each element of the array describes a single + * configuration option. The array is passed to Tk_CreateOptionTable. */ typedef struct Tk_OptionSpec { - Tk_OptionType type; /* Type of option, such as TK_OPTION_COLOR; - * see definitions above. Last option in - * table must have type TK_OPTION_END. */ - char *optionName; /* Name used to specify option in Tcl + Tk_OptionType type; /* Type of option, such as TK_OPTION_COLOR; + * see definitions above. Last option in table + * must have type TK_OPTION_END. */ + char *optionName; /* Name used to specify option in Tcl * commands. */ char *dbName; /* Name for option in option database. */ char *dbClass; /* Class for option in database. */ char *defValue; /* Default value for option if not specified - * in command line, the option database, - * or the system. */ + * in command line, the option database, or + * the system. */ int objOffset; /* Where in record to store a Tcl_Obj * that * holds the value of this option, specified - * as an offset in bytes from the start of - * the record. Use the Tk_Offset macro to - * generate values for this. -1 means don't - * store the Tcl_Obj in the record. */ + * as an offset in bytes from the start of the + * record. Use the Tk_Offset macro to generate + * values for this. -1 means don't store the + * Tcl_Obj in the record. */ int internalOffset; /* Where in record to store the internal * representation of the value of this option, - * such as an int or XColor *. This field - * is specified as an offset in bytes - * from the start of the record. Use the - * Tk_Offset macro to generate values for it. - * -1 means don't store the internal - * representation in the record. */ + * such as an int or XColor *. This field is + * specified as an offset in bytes from the + * start of the record. Use the Tk_Offset + * macro to generate values for it. -1 means + * don't store the internal representation in + * the record. */ int flags; /* Any combination of the values defined * below. */ ClientData clientData; /* An alternate place to put option-specific - * data. Used for the monochrome default value + * data. Used for the monochrome default value * for colors, etc. */ - int typeMask; /* An arbitrary bit mask defined by the - * class manager; typically bits correspond - * to certain kinds of options such as all - * those that require a redisplay when they - * change. Tk_SetOptions returns the bit-wise - * OR of the typeMasks of all options that - * were changed. */ + int typeMask; /* An arbitrary bit mask defined by the class + * manager; typically bits correspond to + * certain kinds of options such as all those + * that require a redisplay when they change. + * Tk_SetOptions returns the bit-wise OR of + * the typeMasks of all options that were + * changed. */ } Tk_OptionSpec; /* - * Flag values for Tk_OptionSpec structures. These flags are shared by - * Tk_ConfigSpec structures, so be sure to coordinate any changes - * carefully. + * Flag values for Tk_OptionSpec structures. These flags are shared by + * Tk_ConfigSpec structures, so be sure to coordinate any changes carefully. */ #define TK_OPTION_NULL_OK (1 << 0) @@ -223,28 +221,29 @@ typedef void (Tk_CustomOptionRestoreProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin, char *internalPtr, char *saveInternalPtr)); typedef void (Tk_CustomOptionFreeProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin, char *internalPtr)); - + typedef struct Tk_ObjCustomOption { - char *name; /* Name of the custom option. */ - Tk_CustomOptionSetProc *setProc; /* Function to use to set a record's - * option value from a Tcl_Obj */ - Tk_CustomOptionGetProc *getProc; /* Function to use to get a Tcl_Obj - * representation from an internal - * representation of an option. */ - Tk_CustomOptionRestoreProc *restoreProc; /* Function to use to restore a - * saved value for the internal - * representation. */ - Tk_CustomOptionFreeProc *freeProc; /* Function to use to free the internal - * representation of an option. */ - ClientData clientData; /* Arbitrary one-word value passed to - * the handling procs. */ + char *name; /* Name of the custom option. */ + Tk_CustomOptionSetProc *setProc; + /* Function to use to set a record's option + * value from a Tcl_Obj */ + Tk_CustomOptionGetProc *getProc; + /* Function to use to get a Tcl_Obj + * representation from an internal + * representation of an option. */ + Tk_CustomOptionRestoreProc *restoreProc; + /* Function to use to restore a saved value + * for the internal representation. */ + Tk_CustomOptionFreeProc *freeProc; + /* Function to use to free the internal + * representation of an option. */ + ClientData clientData; /* Arbitrary one-word value passed to the + * handling procs. */ } Tk_ObjCustomOption; - /* - * Macro to use to fill in "offset" fields of the Tk_OptionSpec. - * struct. Computes number of bytes from beginning of structure - * to a given field. + * Macro to use to fill in "offset" fields of the Tk_OptionSpec structure. + * Computes number of bytes from beginning of structure to a given field. */ #ifdef offsetof @@ -254,34 +253,30 @@ typedef struct Tk_ObjCustomOption { #endif /* - * The following two structures are used for error handling. When - * configuration options are being modified, the old values are - * saved in a Tk_SavedOptions structure. If an error occurs, then the - * contents of the structure can be used to restore all of the old - * values. The contents of this structure are for the private use - * Tk. No-one outside Tk should ever read or write any of the fields - * of these structures. + * The following two structures are used for error handling. When config + * options are being modified, the old values are saved in a Tk_SavedOptions + * structure. If an error occurs, then the contents of the structure can be + * used to restore all of the old values. The contents of this structure are + * for the private use Tk. No-one outside Tk should ever read or write any of + * the fields of these structures. */ typedef struct Tk_SavedOption { - struct TkOption *optionPtr; /* Points to information that describes - * the option. */ - Tcl_Obj *valuePtr; /* The old value of the option, in - * the form of a Tcl object; may be - * NULL if the value wasn't saved as - * an object. */ - double internalForm; /* The old value of the option, in - * some internal representation such - * as an int or (XColor *). Valid - * only if optionPtr->specPtr->objOffset - * is < 0. The space must be large - * enough to accommodate a double, a - * long, or a pointer; right now it - * looks like a double is big - * enough. Also, using a double - * guarantees that the field is - * properly aligned for storing large - * values. */ + struct TkOption *optionPtr; /* Points to information that describes the + * option. */ + Tcl_Obj *valuePtr; /* The old value of the option, in the form of + * a Tcl object; may be NULL if the value was + * not saved as an object. */ + double internalForm; /* The old value of the option, in some + * internal representation such as an int or + * (XColor *). Valid only if the field + * optionPtr->specPtr->objOffset is < 0. The + * space must be large enough to accommodate a + * double, a long, or a pointer; right now it + * looks like a double (i.e., 8 bytes) is big + * enough. Also, using a double guarantees + * that the field is properly aligned for + * storing large values. */ } Tk_SavedOption; #ifdef TCL_MEM_DEBUG @@ -291,31 +286,30 @@ typedef struct Tk_SavedOption { #endif typedef struct Tk_SavedOptions { - char *recordPtr; /* The data structure in which to - * restore configuration options. */ - Tk_Window tkwin; /* Window associated with recordPtr; - * needed to restore certain options. */ - int numItems; /* The number of valid items in - * items field. */ + char *recordPtr; /* The data structure in which to restore + * configuration options. */ + Tk_Window tkwin; /* Window associated with recordPtr; needed to + * restore certain options. */ + int numItems; /* The number of valid items in items field. */ Tk_SavedOption items[TK_NUM_SAVED_OPTIONS]; - /* Items used to hold old values. */ - struct Tk_SavedOptions *nextPtr; /* Points to next structure in list; - * needed if too many options changed - * to hold all the old values in a - * single structure. NULL means no - * more structures. */ + /* Items used to hold old values. */ + struct Tk_SavedOptions *nextPtr; + /* Points to next structure in list; needed if + * too many options changed to hold all the + * old values in a single structure. NULL + * means no more structures. */ } Tk_SavedOptions; /* - * Structure used to describe application-specific configuration - * options: indicates procedures to call to parse an option and - * to return a text string describing an option. THESE ARE - * DEPRECATED; PLEASE USE THE NEW STRUCTURES LISTED ABOVE. + * Structure used to describe application-specific configuration options: + * indicates procedures to call to parse an option and to return a text string + * describing an option. THESE ARE DEPRECATED; PLEASE USE THE NEW STRUCTURES + * LISTED ABOVE. */ /* - * This is a temporary flag used while tkObjConfig and new widgets - * are in development. + * This is a temporary flag used while tkObjConfig and new widgets are in + * development. */ #ifndef __NO_OLD_CONFIG @@ -328,58 +322,58 @@ typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData, Tcl_FreeProc **freeProcPtr)); typedef struct Tk_CustomOption { - Tk_OptionParseProc *parseProc; /* Procedure to call to parse an - * option and store it in converted - * form. */ - Tk_OptionPrintProc *printProc; /* Procedure to return a printable - * string describing an existing - * option. */ - ClientData clientData; /* Arbitrary one-word value used by - * option parser: passed to - * parseProc and printProc. */ + Tk_OptionParseProc *parseProc; + /* Procedure to call to parse an option and + * store it in converted form. */ + Tk_OptionPrintProc *printProc; + /* Procedure to return a printable string + * describing an existing option. */ + ClientData clientData; /* Arbitrary one-word value used by option + * parser: passed to parseProc and + * printProc. */ } Tk_CustomOption; /* - * Structure used to specify information for Tk_ConfigureWidget. Each - * structure gives complete information for one option, including - * how the option is specified on the command line, where it appears - * in the option database, etc. + * Structure used to specify information for Tk_ConfigureWidget. Each + * structure gives complete information for one option, including how the + * option is specified on the command line, where it appears in the option + * database, etc. */ typedef struct Tk_ConfigSpec { int type; /* Type of option, such as TK_CONFIG_COLOR; - * see definitions below. Last option in - * table must have type TK_CONFIG_END. */ - char *argvName; /* Switch used to specify option in argv. - * NULL means this spec is part of a group. */ + * see definitions below. Last option in table + * must have type TK_CONFIG_END. */ + char *argvName; /* Switch used to specify option in argv. NULL + * means this spec is part of a group. */ Tk_Uid dbName; /* Name for option in option database. */ Tk_Uid dbClass; /* Class for option in database. */ - Tk_Uid defValue; /* Default value for option if not - * specified in command line or database. */ - int offset; /* Where in widget record to store value; - * use Tk_Offset macro to generate values - * for this. */ + Tk_Uid defValue; /* Default value for option if not specified + * in command line or database. */ + int offset; /* Where in widget record to store value; use + * Tk_Offset macro to generate values for + * this. */ int specFlags; /* Any combination of the values defined - * below; other bits are used internally - * by tkConfig.c. */ - Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is - * a pointer to info about how to parse and - * print the option. Otherwise it is + * below; other bits are used internally by + * tkConfig.c. */ + Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is a + * pointer to info about how to parse and + * print the option. Otherwise it is * irrelevant. */ } Tk_ConfigSpec; /* - * Type values for Tk_ConfigSpec structures. See the user - * documentation for details. + * Type values for Tk_ConfigSpec structures. See the user documentation for + * details. */ typedef enum { TK_CONFIG_BOOLEAN, TK_CONFIG_INT, TK_CONFIG_DOUBLE, TK_CONFIG_STRING, TK_CONFIG_UID, TK_CONFIG_COLOR, TK_CONFIG_FONT, TK_CONFIG_BITMAP, - TK_CONFIG_BORDER, TK_CONFIG_RELIEF, TK_CONFIG_CURSOR, - TK_CONFIG_ACTIVE_CURSOR, TK_CONFIG_JUSTIFY, TK_CONFIG_ANCHOR, + TK_CONFIG_BORDER, TK_CONFIG_RELIEF, TK_CONFIG_CURSOR, + TK_CONFIG_ACTIVE_CURSOR, TK_CONFIG_JUSTIFY, TK_CONFIG_ANCHOR, TK_CONFIG_SYNONYM, TK_CONFIG_CAP_STYLE, TK_CONFIG_JOIN_STYLE, - TK_CONFIG_PIXELS, TK_CONFIG_MM, TK_CONFIG_WINDOW, TK_CONFIG_CUSTOM, + TK_CONFIG_PIXELS, TK_CONFIG_MM, TK_CONFIG_WINDOW, TK_CONFIG_CUSTOM, TK_CONFIG_END } Tk_ConfigTypes; @@ -391,10 +385,10 @@ typedef enum { #define TK_CONFIG_OBJS 0x80 /* - * Possible flag values for Tk_ConfigSpec structures. Any bits at - * or above TK_CONFIG_USER_BIT may be used by clients for selecting - * certain entries. Before changing any values here, coordinate with - * tkOldConfig.c (internal-use-only flags are defined there). + * Possible flag values for Tk_ConfigSpec structures. Any bits at or above + * TK_CONFIG_USER_BIT may be used by clients for selecting certain entries. + * Before changing any values here, coordinate with tkOldConfig.c + * (internal-use-only flags are defined there). */ #define TK_CONFIG_NULL_OK (1 << 0) @@ -410,14 +404,15 @@ typedef enum { */ typedef struct { - char *key; /* The key string that flags the option in the - * argv array. */ - int type; /* Indicates option type; see below. */ - char *src; /* Value to be used in setting dst; usage - * depends on type. */ - char *dst; /* Address of value to be modified; usage - * depends on type. */ - char *help; /* Documentation message describing this option. */ + char *key; /* The key string that flags the option in the + * argv array. */ + int type; /* Indicates option type; see below. */ + char *src; /* Value to be used in setting dst; usage + * depends on type. */ + char *dst; /* Address of value to be modified; usage + * depends on type. */ + char *help; /* Documentation message describing this + * option. */ } Tk_ArgvInfo; /* @@ -449,8 +444,8 @@ typedef struct { #define TK_ARGV_DONT_SKIP_FIRST_ARG 0x8 /* - * Enumerated type for describing actions to be taken in response - * to a restrictProc established by Tk_RestrictEvents. + * Enumerated type for describing actions to be taken in response to a + * restrictProc established by Tk_RestrictEvents. */ typedef enum { @@ -488,10 +483,10 @@ typedef enum { #define TK_3D_DARK_GC 3 /* - * Special EnterNotify/LeaveNotify "mode" for use in events - * generated by tkShare.c. Pick a high enough value that it's - * unlikely to conflict with existing values (like NotifyNormal) - * or any new values defined in the future. + * Special EnterNotify/LeaveNotify "mode" for use in events generated by + * tkShare.c. Pick a high enough value that it's unlikely to conflict with + * existing values (like NotifyNormal) or any new values defined in the + * future. */ #define TK_NOTIFY_SHARE 20 @@ -516,7 +511,7 @@ typedef enum { /* * The following structure is used by Tk_GetFontMetrics() to return - * information about the properties of a Tk_Font. + * information about the properties of a Tk_Font. */ typedef struct Tk_FontMetrics { @@ -528,9 +523,9 @@ typedef struct Tk_FontMetrics { * letter sticks below the baseline, plus any * extra blank space added by the designer of * the font. */ - int linespace; /* The sum of the ascent and descent. How - * far apart two lines of text in the same - * font should be placed so that none of the + int linespace; /* The sum of the ascent and descent. How far + * apart two lines of text in the same font + * should be placed so that none of the * characters in one line overlap any of the * characters in the other line. */ } Tk_FontMetrics; @@ -564,13 +559,12 @@ typedef void (Tk_ClassModalProc) _ANSI_ARGS_((Tk_Window tkwin, typedef struct Tk_ClassProcs { unsigned int size; Tk_ClassWorldChangedProc *worldChangedProc; - /* Procedure to invoke when the widget needs to - * respond in some way to a change in the + /* Procedure to invoke when the widget needs + * to respond in some way to a change in the * world (font changes, etc.) */ Tk_ClassCreateProc *createProc; - /* Procedure to invoke when the - * platform-dependent window needs to be - * created. */ + /* Procedure to invoke when the platform- + * dependent window needs to be created. */ Tk_ClassModalProc *modalProc; /* Procedure to invoke after all bindings on a * widget have been triggered in order to @@ -578,8 +572,8 @@ typedef struct Tk_ClassProcs { } Tk_ClassProcs; /* - * Simple accessor for Tk_ClassProcs structure. Checks that the structure - * is not NULL, then checks the size field and returns either the requested + * Simple accessor for Tk_ClassProcs structure. Checks that the structure is + * not NULL, then checks the size field and returns either the requested * field, if present, or NULL if the structure is too small to have the field * (or NULL if the structure is NULL). * @@ -596,9 +590,9 @@ typedef struct Tk_ClassProcs { (((procs)->size <= Tk_Offset(Tk_ClassProcs, which)) ? NULL:(procs)->which)) /* - * Each geometry manager (the packer, the placer, etc.) is represented - * by a structure of the following form, which indicates procedures - * to invoke in the geometry manager to carry out certain functions. + * Each geometry manager (the packer, the placer, etc.) is represented by a + * structure of the following form, which indicates procedures to invoke in + * the geometry manager to carry out certain functions. */ typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData, @@ -607,17 +601,17 @@ typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin)); typedef struct Tk_GeomMgr { - char *name; /* Name of the geometry manager (command - * used to invoke it, or name of widget - * class that allows embedded widgets). */ + char *name; /* Name of the geometry manager (command used + * to invoke it, or name of widget class that + * allows embedded widgets). */ Tk_GeomRequestProc *requestProc; /* Procedure to invoke when a slave's * requested geometry changes. */ Tk_GeomLostSlaveProc *lostSlaveProc; - /* Procedure to invoke when a slave is - * taken away from one geometry manager - * by another. NULL means geometry manager - * doesn't care when slaves are lost. */ + /* Procedure to invoke when a slave is taken + * away from one geometry manager by another. + * NULL means geometry manager doesn't care + * when slaves are lost. */ } Tk_GeomMgr; /* @@ -636,6 +630,7 @@ typedef struct Tk_GeomMgr { * *--------------------------------------------------------------------------- */ + #define VirtualEvent (LASTEvent) #define ActivateNotify (LASTEvent + 1) #define DeactivateNotify (LASTEvent + 2) @@ -648,41 +643,47 @@ typedef struct Tk_GeomMgr { #define VirtualEventMask (1L << 30) #define TK_LASTEVENT (LASTEvent + 4) - /* * A virtual event shares most of its fields with the XKeyEvent and - * XButtonEvent structures. 99% of the time a virtual event will be - * an abstraction of a key or button event, so this structure provides - * the most information to the user. The only difference is the changing - * of the detail field for a virtual event so that it holds the name of the - * virtual event being triggered. + * XButtonEvent structures. 99% of the time a virtual event will be an + * abstraction of a key or button event, so this structure provides the most + * information to the user. The only difference is the changing of the detail + * field for a virtual event so that it holds the name of the virtual event + * being triggered. + * + * When using this structure, you should ensure that you zero out all the + * fields first using memset() or bzero(). */ typedef struct { int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* True if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Window event; /* Window on which event was requested. */ - Window root; /* root window that the event occured on */ - Window subwindow; /* child window */ - Time time; /* milliseconds */ - int x, y; /* pointer x, y coordinates in event window */ - int x_root, y_root; /* coordinates relative to root */ - unsigned int state; /* key or button mask */ - Tk_Uid name; /* Name of virtual event. */ - Bool same_screen; /* same screen flag */ - Tcl_Obj *user_data; /* application-specific data reference; Tk will - * decrement the reference count *once* when it - * has finished processing the event. */ + unsigned long serial; /* # of last request processed by server. */ + Bool send_event; /* True if this came from a SendEvent + * request. */ + Display *display; /* Display the event was read from. */ + Window event; /* Window on which event was requested. */ + Window root; /* Root window that the event occured on. */ + Window subwindow; /* Child window. */ + Time time; /* Milliseconds. */ + int x, y; /* Pointer x, y coordinates in event + * window. */ + int x_root, y_root; /* Coordinates relative to root. */ + unsigned int state; /* Key or button mask */ + Tk_Uid name; /* Name of virtual event. */ + Bool same_screen; /* Same screen flag. */ + Tcl_Obj *user_data; /* Application-specific data reference; Tk + * will decrement the reference count *once* + * when it has finished processing the + * event. */ } XVirtualEvent; typedef struct { int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* True if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Window window; /* Window in which event occurred. */ + unsigned long serial; /* # of last request processed by server. */ + Bool send_event; /* True if this came from a SendEvent + * request. */ + Display *display; /* Display the event was read from. */ + Window window; /* Window in which event occurred. */ } XActivateDeactivateEvent; typedef XActivateDeactivateEvent XActivateEvent; typedef XActivateDeactivateEvent XDeactivateEvent; @@ -690,29 +691,29 @@ typedef XActivateDeactivateEvent XDeactivateEvent; /* *-------------------------------------------------------------- * - * Macros for querying Tk_Window structures. See the - * manual entries for documentation. + * Macros for querying Tk_Window structures. See the manual entries for + * documentation. * *-------------------------------------------------------------- */ -#define Tk_Display(tkwin) (((Tk_FakeWin *) (tkwin))->display) -#define Tk_ScreenNumber(tkwin) (((Tk_FakeWin *) (tkwin))->screenNum) -#define Tk_Screen(tkwin) (ScreenOfDisplay(Tk_Display(tkwin), \ - Tk_ScreenNumber(tkwin))) -#define Tk_Depth(tkwin) (((Tk_FakeWin *) (tkwin))->depth) -#define Tk_Visual(tkwin) (((Tk_FakeWin *) (tkwin))->visual) -#define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window) -#define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName) -#define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid) -#define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid) -#define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x) -#define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y) -#define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width) +#define Tk_Display(tkwin) (((Tk_FakeWin *) (tkwin))->display) +#define Tk_ScreenNumber(tkwin) (((Tk_FakeWin *) (tkwin))->screenNum) +#define Tk_Screen(tkwin) \ + (ScreenOfDisplay(Tk_Display(tkwin), Tk_ScreenNumber(tkwin))) +#define Tk_Depth(tkwin) (((Tk_FakeWin *) (tkwin))->depth) +#define Tk_Visual(tkwin) (((Tk_FakeWin *) (tkwin))->visual) +#define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window) +#define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName) +#define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid) +#define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid) +#define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x) +#define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y) +#define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width) #define Tk_Height(tkwin) \ (((Tk_FakeWin *) (tkwin))->changes.height) -#define Tk_Changes(tkwin) (&((Tk_FakeWin *) (tkwin))->changes) -#define Tk_Attributes(tkwin) (&((Tk_FakeWin *) (tkwin))->atts) +#define Tk_Changes(tkwin) (&((Tk_FakeWin *) (tkwin))->changes) +#define Tk_Attributes(tkwin) (&((Tk_FakeWin *) (tkwin))->atts) #define Tk_IsEmbedded(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED) #define Tk_IsContainer(tkwin) \ @@ -727,8 +728,8 @@ typedef XActivateDeactivateEvent XDeactivateEvent; (((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED) #define Tk_TopWinHierarchy(tkwin) \ (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY) -#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) -#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) +#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) +#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) /* Tk_InternalBorderWidth is deprecated */ #define Tk_InternalBorderWidth(tkwin) \ (((Tk_FakeWin *) (tkwin))->internalBorderLeft) @@ -740,20 +741,19 @@ typedef XActivateDeactivateEvent XDeactivateEvent; (((Tk_FakeWin *) (tkwin))->internalBorderTop) #define Tk_InternalBorderBottom(tkwin) \ (((Tk_FakeWin *) (tkwin))->internalBorderBottom) -#define Tk_MinReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->minReqWidth) -#define Tk_MinReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->minReqHeight) -#define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr) -#define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap) +#define Tk_MinReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->minReqWidth) +#define Tk_MinReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->minReqHeight) +#define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr) +#define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap) /* - * The structure below is needed by the macros above so that they can - * access the fields of a Tk_Window. The fields not needed by the macros - * are declared as "dummyX". The structure has its own type in order to - * prevent applications from accessing Tk_Window fields except using - * official macros. WARNING!! The structure definition must be kept - * consistent with the TkWindow structure in tkInt.h. If you change one, - * then change the other. See the declaration in tkInt.h for - * documentation on what the fields are used for internally. + * The structure below is needed by the macros above so that they can access + * the fields of a Tk_Window. The fields not needed by the macros are declared + * as "dummyX". The structure has its own type in order to prevent apps from + * accessing Tk_Window fields except using official macros. WARNING!! The + * structure definition must be kept consistent with the TkWindow structure in + * tkInt.h. If you change one, then change the other. See the declaration in + * tkInt.h for documentation on what the fields are used for internally. */ typedef struct Tk_FakeWin { @@ -808,69 +808,63 @@ typedef struct Tk_FakeWin { * TK_ALREADY_DEAD: 1 means the window is in the process of * being destroyed already. * TK_NEED_CONFIG_NOTIFY: 1 means that the window has been reconfigured - * before it was made to exist. At the time of + * before it was made to exist. At the time of * making it exist a ConfigureNotify event needs * to be generated. - * TK_GRAB_FLAG: Used to manage grabs. See tkGrab.c for - * details. + * TK_GRAB_FLAG: Used to manage grabs. See tkGrab.c for details * TK_CHECKED_IC: 1 means we've already tried to get an input - * context for this window; if the ic field - * is NULL it means that there isn't a context - * for the field. + * context for this window; if the ic field is + * NULL it means that there isn't a context for + * the field. * TK_DONT_DESTROY_WINDOW: 1 means that Tk_DestroyWindow should not * invoke XDestroyWindow to destroy this widget's - * X window. The flag is set when the window - * has already been destroyed elsewhere (e.g. - * by another application) or when it will be - * destroyed later (e.g. by destroying its - * parent). + * X window. The flag is set when the window has + * already been destroyed elsewhere (e.g. by + * another application) or when it will be + * destroyed later (e.g. by destroying its parent) * TK_WM_COLORMAP_WINDOW: 1 means that this window has at some time * appeared in the WM_COLORMAP_WINDOWS property - * for its toplevel, so we have to remove it - * from that property if the window is - * deleted and the toplevel isn't. + * for its toplevel, so we have to remove it from + * that property if the window is deleted and the + * toplevel isn't. * TK_EMBEDDED: 1 means that this window (which must be a * toplevel) is not a free-standing window but * rather is embedded in some other application. * TK_CONTAINER: 1 means that this window is a container, and - * that some other application (either in - * this process or elsewhere) may be - * embedding itself inside the window. + * that some other application (either in this + * process or elsewhere) may be embedding itself + * inside the window. * TK_BOTH_HALVES: 1 means that this window is used for - * application embedding (either as - * container or embedded application), and - * both the containing and embedded halves - * are associated with windows in this - * particular process. + * application embedding (either as container or + * embedded application), and both the containing + * and embedded halves are associated with + * windows in this particular process. * TK_DEFER_MODAL: 1 means that this window has deferred a modal * loop until all of the bindings for the current * event have been invoked. - * TK_WRAPPER: 1 means that this window is the extra - * wrapper window created around a toplevel - * to hold the menubar under Unix. See - * tkUnixWm.c for more information. + * TK_WRAPPER: 1 means that this window is the extra wrapper + * window created around a toplevel to hold the + * menubar under Unix. See tkUnixWm.c for more + * information. * TK_REPARENTED: 1 means that this window has been reparented * so that as far as the window system is - * concerned it isn't a child of its Tk - * parent. Initially this is used only for - * special Unix menubar windows. + * concerned it isn't a child of its Tk parent. + * Initially this is used only for special Unix + * menubar windows. * TK_ANONYMOUS_WINDOW: 1 means that this window has no name, and is * thus not accessible from Tk. * TK_HAS_WRAPPER 1 means that this window has a wrapper window - * TK_WIN_MANAGED 1 means that this window is a child of the - * root window, and is managed by the window - * manager. - * TK_TOP_HIERARCHY 1 means this window is at the top of a - * physical window hierarchy within this - * process, i.e. the window's parent - * either doesn't exist or is not owned by - * this Tk application. - * TK_PROP_PROPCHANGE 1 means that PropertyNotify events in - * this window's children should propagate - * up to this window. + * TK_WIN_MANAGED 1 means that this window is a child of the root + * window, and is managed by the window manager. + * TK_TOP_HIERARCHY 1 means this window is at the top of a physical + * window hierarchy within this process, i.e. the + * window's parent either doesn't exist or is not + * owned by this Tk application. + * TK_PROP_PROPCHANGE 1 means that PropertyNotify events in the + * window's children should propagate up to this + * window. */ - #define TK_MAPPED 1 #define TK_TOP_LEVEL 2 #define TK_ALREADY_DEAD 4 @@ -894,8 +888,7 @@ typedef struct Tk_FakeWin { /* *-------------------------------------------------------------- * - * Procedure prototypes and structures used for defining new canvas - * items: + * Procedure prototypes and structures used for defining new canvas items: * *-------------------------------------------------------------- */ @@ -916,54 +909,48 @@ typedef struct Tk_SmoothMethod { } Tk_SmoothMethod; /* - * For each item in a canvas widget there exists one record with - * the following structure. Each actual item is represented by - * a record with the following stuff at its beginning, plus additional - * type-specific stuff after that. + * For each item in a canvas widget there exists one record with the following + * structure. Each actual item is represented by a record with the following + * stuff at its beginning, plus additional type-specific stuff after that. */ #define TK_TAG_SPACE 3 -typedef struct Tk_Item { - int id; /* Unique identifier for this item - * (also serves as first tag for - * item). */ - struct Tk_Item *nextPtr; /* Next in display list of all - * items in this canvas. Later items - * in list are drawn on top of earlier - * ones. */ - Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of - * tags. */ - Tk_Uid *tagPtr; /* Pointer to array of tags. Usually - * points to staticTagSpace, but - * may point to malloc-ed space if - * there are lots of tags. */ - int tagSpace; /* Total amount of tag space available - * at tagPtr. */ - int numTags; /* Number of tag slots actually used - * at *tagPtr. */ - struct Tk_ItemType *typePtr; /* Table of procedures that implement - * this type of item. */ - int x1, y1, x2, y2; /* Bounding box for item, in integer - * canvas units. Set by item-specific - * code and guaranteed to contain every - * pixel drawn in item. Item area - * includes x1 and y1 but not x2 - * and y2. */ - struct Tk_Item *prevPtr; /* Previous in display list of all - * items in this canvas. Later items - * in list are drawn just below earlier - * ones. */ - Tk_State state; /* state of item */ - char *reserved1; /* reserved for future use */ - int redraw_flags; /* some flags used in the canvas */ +typedef struct Tk_Item { + int id; /* Unique identifier for this item (also + * serves as first tag for item). */ + struct Tk_Item *nextPtr; /* Next in display list of all items in this + * canvas. Later items in list are drawn on + * top of earlier ones. */ + Tk_Uid staticTagSpace[TK_TAG_SPACE]; + /* Built-in space for limited # of tags. */ + Tk_Uid *tagPtr; /* Pointer to array of tags. Usually points to + * staticTagSpace, but may point to malloc-ed + * space if there are lots of tags. */ + int tagSpace; /* Total amount of tag space available at + * tagPtr. */ + int numTags; /* Number of tag slots actually used at + * *tagPtr. */ + struct Tk_ItemType *typePtr;/* Table of procedures that implement this + * type of item. */ + int x1, y1, x2, y2; /* Bounding box for item, in integer canvas + * units. Set by item-specific code and + * guaranteed to contain every pixel drawn in + * item. Item area includes x1 and y1 but not + * x2 and y2. */ + struct Tk_Item *prevPtr; /* Previous in display list of all items in + * this canvas. Later items in list are drawn + * just below earlier ones. */ + Tk_State state; /* State of item. */ + char *reserved1; /* reserved for future use */ + int redraw_flags; /* Some flags used in the canvas */ /* *------------------------------------------------------------------ - * Starting here is additional type-specific stuff; see the - * declarations for individual types to see what is part of - * each type. The actual space below is determined by the - * "itemInfoSize" of the type's Tk_ItemType record. + * Starting here is additional type-specific stuff; see the declarations + * for individual types to see what is part of each type. The actual space + * below is determined by the "itemInfoSize" of the type's Tk_ItemType + * record. *------------------------------------------------------------------ */ } Tk_Item; @@ -971,20 +958,19 @@ typedef struct Tk_Item { /* * Flag bits for canvases (redraw_flags): * - * TK_ITEM_STATE_DEPENDANT - 1 means that object needs to be - * redrawn if the canvas state changes. - * TK_ITEM_DONT_REDRAW - 1 means that the object redraw is already - * been prepared, so the general canvas code - * doesn't need to do that any more. + * TK_ITEM_STATE_DEPENDANT - 1 means that object needs to be redrawn if the + * canvas state changes. + * TK_ITEM_DONT_REDRAW - 1 means that the object redraw is already been + * prepared, so the general canvas code doesn't + * need to do that any more. */ #define TK_ITEM_STATE_DEPENDANT 1 #define TK_ITEM_DONT_REDRAW 2 /* - * Records of the following type are used to describe a type of - * item (e.g. lines, circles, etc.) that can form part of a - * canvas widget. + * Records of the following type are used to describe a type of item (e.g. + * lines, circles, etc.) that can form part of a canvas widget. */ #ifdef USE_OLD_CANVAS @@ -1040,100 +1026,103 @@ typedef void Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas, #ifndef __NO_OLD_CONFIG typedef struct Tk_ItemType { - char *name; /* The name of this type of item, such - * as "line". */ - int itemSize; /* Total amount of space needed for - * item's record. */ - Tk_ItemCreateProc *createProc; /* Procedure to create a new item of - * this type. */ - Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration - * specs for this type. Used for - * returning configuration info. */ - Tk_ItemConfigureProc *configProc; /* Procedure to call to change - * configuration options. */ - Tk_ItemCoordProc *coordProc; /* Procedure to call to get and set - * the item's coordinates. */ - Tk_ItemDeleteProc *deleteProc; /* Procedure to delete existing item of - * this type. */ - Tk_ItemDisplayProc *displayProc; /* Procedure to display items of - * this type. */ - int alwaysRedraw; /* Non-zero means displayProc should - * be called even when the item has - * been moved off-screen. */ - Tk_ItemPointProc *pointProc; /* Computes distance from item to - * a given point. */ - Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, - * outside, or overlapping an area. */ + char *name; /* The name of this type of item, such as + * "line". */ + int itemSize; /* Total amount of space needed for item's + * record. */ + Tk_ItemCreateProc *createProc; + /* Procedure to create a new item of this + * type. */ + Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for + * this type. Used for returning configuration + * info. */ + Tk_ItemConfigureProc *configProc; + /* Procedure to call to change configuration + * options. */ + Tk_ItemCoordProc *coordProc;/* Procedure to call to get and set the item's + * coordinates. */ + Tk_ItemDeleteProc *deleteProc; + /* Procedure to delete existing item of this + * type. */ + Tk_ItemDisplayProc *displayProc; + /* Procedure to display items of this type. */ + int alwaysRedraw; /* Non-zero means displayProc should be called + * even when the item has been moved + * off-screen. */ + Tk_ItemPointProc *pointProc;/* Computes distance from item to a given + * point. */ + Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, outside, + * or overlapping an area. */ Tk_ItemPostscriptProc *postscriptProc; - /* Procedure to write a Postscript - * description for items of this - * type. */ - Tk_ItemScaleProc *scaleProc; /* Procedure to rescale items of - * this type. */ - Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of - * this type. */ - Tk_ItemIndexProc *indexProc; /* Procedure to determine index of - * indicated character. NULL if - * item doesn't support indexing. */ - Tk_ItemCursorProc *icursorProc; /* Procedure to set insert cursor pos. - * to just before a given position. */ - Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in - * STRING format) when it is in this - * item. */ - Tk_ItemInsertProc *insertProc; /* Procedure to insert something into - * an item. */ - Tk_ItemDCharsProc *dCharsProc; /* Procedure to delete characters - * from an item. */ - struct Tk_ItemType *nextPtr; /* Used to link types together into - * a list. */ - char *reserved1; /* Reserved for future extension. */ - int reserved2; /* Carefully compatible with */ - char *reserved3; /* Jan Nijtmans dash patch */ + /* Procedure to write a Postscript description + * for items of this type. */ + Tk_ItemScaleProc *scaleProc;/* Procedure to rescale items of this type. */ + Tk_ItemTranslateProc *translateProc; + /* Procedure to translate items of this + * type. */ + Tk_ItemIndexProc *indexProc;/* Procedure to determine index of indicated + * character. NULL if item doesn't support + * indexing. */ + Tk_ItemCursorProc *icursorProc; + /* Procedure to set insert cursor posn to just + * before a given position. */ + Tk_ItemSelectionProc *selectionProc; + /* Procedure to return selection (in STRING + * format) when it is in this item. */ + Tk_ItemInsertProc *insertProc; + /* Procedure to insert something into an + * item. */ + Tk_ItemDCharsProc *dCharsProc; + /* Procedure to delete characters from an + * item. */ + struct Tk_ItemType *nextPtr;/* Used to link types together into a list. */ + char *reserved1; /* Reserved for future extension. */ + int reserved2; /* Carefully compatible with */ + char *reserved3; /* Jan Nijtmans dash patch */ char *reserved4; } Tk_ItemType; #endif /* - * The following structure provides information about the selection and - * the insertion cursor. It is needed by only a few items, such as - * those that display text. It is shared by the generic canvas code - * and the item-specific code, but most of the fields should be written - * only by the canvas generic code. + * The following structure provides information about the selection and the + * insertion cursor. It is needed by only a few items, such as those that + * display text. It is shared by the generic canvas code and the item-specific + * code, but most of the fields should be written only by the canvas generic + * code. */ typedef struct Tk_CanvasTextInfo { Tk_3DBorder selBorder; /* Border and background for selected - * characters. Read-only to items.*/ - int selBorderWidth; /* Width of border around selection. - * Read-only to items. */ + * characters. Read-only to items.*/ + int selBorderWidth; /* Width of border around selection. Read-only + * to items. */ XColor *selFgColorPtr; /* Foreground color for selected text. * Read-only to items. */ - Tk_Item *selItemPtr; /* Pointer to selected item. NULL means - * selection isn't in this canvas. - * Writable by items. */ + Tk_Item *selItemPtr; /* Pointer to selected item. NULL means + * selection isn't in this canvas. Writable by + * items. */ int selectFirst; /* Character index of first selected - * character. Writable by items. */ - int selectLast; /* Character index of last selected - * character. Writable by items. */ - Tk_Item *anchorItemPtr; /* Item corresponding to "selectAnchor": - * not necessarily selItemPtr. Read-only - * to items. */ - int selectAnchor; /* Character index of fixed end of - * selection (i.e. "select to" operation will - * use this as one end of the selection). + * character. Writable by items. */ + int selectLast; /* Character index of last selected character. * Writable by items. */ + Tk_Item *anchorItemPtr; /* Item corresponding to "selectAnchor": not + * necessarily selItemPtr. Read-only to + * items. */ + int selectAnchor; /* Character index of fixed end of selection + * (i.e. "select to" operation will use this + * as one end of the selection). Writable by + * items. */ Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion - * cursor. Read-only to items. */ - int insertWidth; /* Total width of insertion cursor. Read-only + * cursor. Read-only to items. */ + int insertWidth; /* Total width of insertion cursor. Read-only * to items. */ int insertBorderWidth; /* Width of 3-D border around insert cursor. * Read-only to items. */ - Tk_Item *focusItemPtr; /* Item that currently has the input focus, - * or NULL if no such item. Read-only to - * items. */ + Tk_Item *focusItemPtr; /* Item that currently has the input focus, or + * NULL if no such item. Read-only to items. */ int gotFocus; /* Non-zero means that the canvas widget has - * the input focus. Read-only to items.*/ + * the input focus. Read-only to items.*/ int cursorOn; /* Non-zero means that an insertion cursor * should be displayed in focusItemPtr. * Read-only to items.*/ @@ -1152,7 +1141,7 @@ typedef struct Tk_Dash { } Tk_Dash; typedef struct Tk_TSOffset { - int flags; /* flags; see below for possible values */ + int flags; /* Flags; see below for possible values */ int xoffset; /* x offset */ int yoffset; /* y offset */ } Tk_TSOffset; @@ -1175,22 +1164,23 @@ typedef struct Tk_Outline { double width; /* Width of outline. */ double activeWidth; /* Width of outline. */ double disabledWidth; /* Width of outline. */ - int offset; /* Dash offset */ - Tk_Dash dash; /* Dash pattern */ - Tk_Dash activeDash; /* Dash pattern if state is active*/ - Tk_Dash disabledDash; /* Dash pattern if state is disabled*/ - VOID *reserved1; /* reserved for future expansion */ + int offset; /* Dash offset. */ + Tk_Dash dash; /* Dash pattern. */ + Tk_Dash activeDash; /* Dash pattern if state is active. */ + Tk_Dash disabledDash; /* Dash pattern if state is disabled. */ + VOID *reserved1; /* Reserved for future expansion. */ VOID *reserved2; VOID *reserved3; - Tk_TSOffset tsoffset; /* stipple offset for outline*/ + Tk_TSOffset tsoffset; /* Stipple offset for outline. */ XColor *color; /* Outline color. */ XColor *activeColor; /* Outline color if state is active. */ XColor *disabledColor; /* Outline color if state is disabled. */ Pixmap stipple; /* Outline Stipple pattern. */ - Pixmap activeStipple; /* Outline Stipple pattern if state is active. */ - Pixmap disabledStipple; /* Outline Stipple pattern if state is disabled. */ + Pixmap activeStipple; /* Outline Stipple pattern if state is + * active. */ + Pixmap disabledStipple; /* Outline Stipple pattern if state is + * disabled. */ } Tk_Outline; - /* *-------------------------------------------------------------- @@ -1226,39 +1216,37 @@ typedef int (Tk_ImagePostscriptProc) _ANSI_ARGS_((ClientData clientData, int x, int y, int width, int height, int prepass)); /* - * The following structure represents a particular type of image - * (bitmap, xpm image, etc.). It provides information common to - * all images of that type, such as the type name and a collection - * of procedures in the image manager that respond to various - * events. Each image manager is represented by one of these - * structures. + * The following structure represents a particular type of image (bitmap, xpm + * image, etc.). It provides information common to all images of that type, + * such as the type name and a collection of procedures in the image manager + * that respond to various events. Each image manager is represented by one of + * these structures. */ struct Tk_ImageType { char *name; /* Name of image type. */ Tk_ImageCreateProc *createProc; - /* Procedure to call to create a new image - * of this type. */ + /* Procedure to call to create a new image of + * this type. */ Tk_ImageGetProc *getProc; /* Procedure to call the first time - * Tk_GetImage is called in a new way - * (new visual or screen). */ + * Tk_GetImage is called in a new way (new + * visual or screen). */ Tk_ImageDisplayProc *displayProc; /* Call to draw image, in response to * Tk_RedrawImage calls. */ - Tk_ImageFreeProc *freeProc; /* Procedure to call whenever Tk_FreeImage - * is called to release an instance of an + Tk_ImageFreeProc *freeProc; /* Procedure to call whenever Tk_FreeImage is + * called to release an instance of an * image. */ Tk_ImageDeleteProc *deleteProc; - /* Procedure to call to delete image. It - * will not be called until after freeProc - * has been called for each instance of the - * image. */ + /* Procedure to call to delete image. It will + * not be called until after freeProc has been + * called for each instance of the image. */ Tk_ImagePostscriptProc *postscriptProc; /* Procedure to call to produce postscript * output for the image. */ struct Tk_ImageType *nextPtr; /* Next in list of all image types currently - * known. Filled in by Tk, not by image + * known. Filled in by Tk, not by image * manager. */ char *reserved; /* reserved for future expansion */ }; @@ -1272,8 +1260,8 @@ struct Tk_ImageType { */ /* - * The following type is used to identify a particular photo image - * to be manipulated: + * The following type is used to identify a particular photo image to be + * manipulated: */ typedef void *Tk_PhotoHandle; @@ -1284,29 +1272,28 @@ typedef void *Tk_PhotoHandle; typedef struct Tk_PhotoImageBlock { unsigned char *pixelPtr; /* Pointer to the first pixel. */ - int width; /* Width of block, in pixels. */ - int height; /* Height of block, in pixels. */ - int pitch; /* Address difference between corresponding + int width; /* Width of block, in pixels. */ + int height; /* Height of block, in pixels. */ + int pitch; /* Address difference between corresponding * pixels in successive lines. */ - int pixelSize; /* Address difference between successive + int pixelSize; /* Address difference between successive * pixels in the same line. */ - int offset[4]; /* Address differences between the red, green, + int offset[4]; /* Address differences between the red, green, * blue and alpha components of the pixel and * the pixel as a whole. */ } Tk_PhotoImageBlock; /* - * The following values control how blocks are combined into photo - * images when the alpha component of a pixel is not 255, a.k.a. the - * compositing rule. + * The following values control how blocks are combined into photo images when + * the alpha component of a pixel is not 255, a.k.a. the compositing rule. */ #define TK_PHOTO_COMPOSITE_OVERLAY 0 #define TK_PHOTO_COMPOSITE_SET 1 /* - * Procedure prototypes and structures used in reading and - * writing photo images: + * Procedure prototypes and structures used in reading and writing photo + * images: */ typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat; @@ -1348,49 +1335,47 @@ typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp, #endif /* - * The following structure represents a particular file format for - * storing images (e.g., PPM, GIF, JPEG, etc.). It provides information - * to allow image files of that format to be recognized and read into - * a photo image. + * The following structure represents a particular file format for storing + * images (e.g., PPM, GIF, JPEG, etc.). It provides information to allow image + * files of that format to be recognized and read into a photo image. */ struct Tk_PhotoImageFormat { char *name; /* Name of image file format */ Tk_ImageFileMatchProc *fileMatchProc; - /* Procedure to call to determine whether - * an image file matches this format. */ + /* Procedure to call to determine whether an + * image file matches this format. */ Tk_ImageStringMatchProc *stringMatchProc; - /* Procedure to call to determine whether - * the data in a string matches this format. */ + /* Procedure to call to determine whether the + * data in a string matches this format. */ Tk_ImageFileReadProc *fileReadProc; - /* Procedure to call to read data from - * an image file into a photo image. */ + /* Procedure to call to read data from an + * image file into a photo image. */ Tk_ImageStringReadProc *stringReadProc; - /* Procedure to call to read data from - * a string into a photo image. */ + /* Procedure to call to read data from a + * string into a photo image. */ Tk_ImageFileWriteProc *fileWriteProc; - /* Procedure to call to write data from - * a photo image to a file. */ + /* Procedure to call to write data from a + * photo image to a file. */ Tk_ImageStringWriteProc *stringWriteProc; /* Procedure to call to obtain a string * representation of the data in a photo * image.*/ struct Tk_PhotoImageFormat *nextPtr; /* Next in list of all photo image formats - * currently known. Filled in by Tk, not - * by image format handler. */ + * currently known. Filled in by Tk, not by + * image format handler. */ }; EXTERN void Tk_CreateOldImageType _ANSI_ARGS_(( - Tk_ImageType *typePtr)); + Tk_ImageType *typePtr)); EXTERN void Tk_CreateOldPhotoImageFormat _ANSI_ARGS_(( - Tk_PhotoImageFormat *formatPtr)); + Tk_PhotoImageFormat *formatPtr)); #if !defined(USE_TK_STUBS) && defined(USE_OLD_IMAGE) #define Tk_CreateImageType Tk_CreateOldImageType #define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat #endif - /* *-------------------------------------------------------------- @@ -1403,6 +1388,7 @@ EXTERN void Tk_CreateOldPhotoImageFormat _ANSI_ARGS_(( /* * Style support version tag. */ + #define TK_STYLE_VERSION_1 0x1 #define TK_STYLE_VERSION TK_STYLE_VERSION_1 @@ -1436,22 +1422,18 @@ typedef struct Tk_ElementSpec { Tk_ElementOptionSpec *options; /* List of required options. Last one's name * must be NULL. */ - - /* - * Hooks - */ - Tk_GetElementSizeProc *getSize; - /* Compute the external (resp. internal) size of - * the element from its desired internal (resp. - * external) size. */ + /* Compute the external (resp. internal) size + * of the element from its desired internal + * (resp. external) size. */ Tk_GetElementBoxProc *getBox; /* Compute the inscribed or bounding boxes * within a given area. */ Tk_GetElementBorderWidthProc *getBorderWidth; /* Return the element's internal border width. * Mostly useful for widgets. */ - Tk_DrawElementProc *draw; /* Draw the element in the given bounding box.*/ + Tk_DrawElementProc *draw; /* Draw the element in the given bounding + * box. */ } Tk_ElementSpec; /* @@ -1466,9 +1448,9 @@ typedef struct Tk_ElementSpec { /* *-------------------------------------------------------------- * - * The definitions below provide backward compatibility for - * functions and types related to event handling that used to - * be in Tk but have moved to Tcl. + * The definitions below provide backward compatibility for functions and + * types related to event handling that used to be in Tk but have moved to + * Tcl. * *-------------------------------------------------------------- */ @@ -1511,7 +1493,8 @@ typedef struct Tk_ElementSpec { #define Tk_Main(argc, argv, proc) \ Tk_MainEx(argc, argv, proc, Tcl_CreateInterp()) -CONST char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact)); +CONST char * Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, + char *version, int exact)); #ifndef USE_TK_STUBS @@ -1520,14 +1503,14 @@ CONST char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exa #endif -void Tk_InitImageArgs _ANSI_ARGS_((Tcl_Interp *interp, int argc, char ***argv)); +void Tk_InitImageArgs _ANSI_ARGS_((Tcl_Interp *interp, + int argc, char ***argv)); #if !defined(USE_TK_STUBS) || !defined(USE_OLD_IMAGE) #define Tk_InitImageArgs(interp, argc, argv) /**/ #endif - /* *-------------------------------------------------------------- @@ -1553,7 +1536,6 @@ typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_(( typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData, int offset, char *buffer, int maxBytes)); - /* *-------------------------------------------------------------- * @@ -1565,12 +1547,11 @@ typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData, #include "tkDecls.h" /* - * Allow users to say that they don't want to alter their source to - * add extra arguments to Tk_PhotoPutBlock() et al; DO NOT DEFINE THIS - * WHEN BUILDING TK. + * Allow users to say that they don't want to alter their source to add extra + * arguments to Tk_PhotoPutBlock() et al; DO NOT DEFINE THIS WHEN BUILDING TK. * - * This goes after the inclusion of the stubbed-decls so that the - * declarations of what is actually there can be correct. + * This goes after the inclusion of the stubbed-decls so that the declarations + * of what is actually there can be correct. */ #ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK @@ -1618,9 +1599,17 @@ typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData, /* * end block for C++ */ - + #ifdef __cplusplus } #endif - + #endif /* _TK */ + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tkInt.h b/generic/tkInt.h index 21808a0..40d1272 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: $Id: tkInt.h,v 1.71 2006/03/22 00:21:16 das Exp $ + * RCS: $Id: tkInt.h,v 1.72 2006/08/18 10:24:41 dkf Exp $ */ #ifndef _TKINT @@ -97,14 +97,13 @@ typedef struct TkCursor { * disposal and retrieval of cursors. */ int resourceRefCount; /* Number of active uses of this cursor (each * active use corresponds to a call to - * Tk_AllocPreserveFromObj or Tk_Preserve). - * If this count is 0, then this structure is - * no longer valid and it isn't present in a - * hash table: it is being kept around only - * because there are objects referring to it. - * The structure is freed when - * resourceRefCount and objRefCount are both - * 0. */ + * Tk_AllocPreserveFromObj or Tk_Preserve). If + * this count is 0, then this structure is no + * longer valid and it isn't present in a hash + * table: it is being kept around only because + * there are objects referring to it. The + * structure is freed when resourceRefCount + * and objRefCount are both 0. */ int objRefCount; /* Number of Tcl objects that reference this * structure.. */ Tcl_HashTable *otherTable; /* Second table (other than idTable) used to @@ -192,8 +191,7 @@ typedef struct TkDisplay { * corresponding to the "Meta" key. If no such * modifier, then this is zero. */ enum {LU_IGNORE, LU_CAPS, LU_SHIFT} lockUsage; - /* Indicates how to interpret lock - * modifier. */ + /* Indicates how to interpret lock modifier */ int numModKeyCodes; /* Number of entries in modKeyCodes array * below. */ KeyCode *modKeyCodes; /* Pointer to an array giving keycodes for all @@ -299,8 +297,7 @@ typedef struct TkDisplay { * the focus, this will refer to the innermost * window in the innermost application. This * information isn't used under Unix or - * Windows, but it's needed on the - * Macintosh. */ + * Windows, but it's needed on the Mac. */ /* * Information used by tkGC.c only: @@ -466,9 +463,8 @@ typedef struct TkDisplay { XID (*defaultAllocProc) (Display *display); /* Default resource allocator for display. */ struct TkIdStack *windowStackPtr; - /* First in list of chunks of window - * identifers that can't be reused right - * now. */ + /* First in list of chunks of window ids that + * can't be reused right now. */ Tcl_TimerToken idCleanupScheduled; /* If set, it means a call to WindowIdCleanup * has already been scheduled, 0 means it @@ -666,7 +662,7 @@ typedef struct TkMainInfo { */ typedef struct { - CONST char *source; /* Bits for bitmap. */ + const char *source; /* Bits for bitmap. */ int width, height; /* Dimensions of bitmap. */ int native; /* 0 means generic (X style) bitmap, 1 means * native style bitmap. */ @@ -707,8 +703,7 @@ typedef struct TkWindow { struct TkWindow *parentPtr; /* Pointer to parent window (logical parent, * not necessarily X parent). NULL means * either this is the main window, or the - * window's parent has already been - * deleted. */ + * window's parent has already been deleted. */ struct TkWindow *nextPtr; /* Next higher sibling (in stacking order) in * list of children with same parent. NULL * means end of list. */ @@ -881,10 +876,10 @@ extern TkDisplay *tkDisplayList; #define TK_GRAB_ANCESTOR 2 #define TK_GRAB_EXCLUDED 3 -/* - * An additional flag for TkpMeasureCharsInContext(). Coordinate with - * the other flags for this routine, but don't make public until - * TkpMeasureCharsInContext() is made public, too. +/* + * Additional flag for TkpMeasureCharsInContext. Coordinate with other flags + * for this routine, but don't make public until TkpMeasureCharsInContext is + * made public, too. */ #define TK_ISOLATE_END 32 @@ -892,7 +887,7 @@ extern TkDisplay *tkDisplayList; /* * The macro below is used to modify a "char" value (e.g. by casting it to an * unsigned character) so that it can be used safely with macros such as - * isspace. + * isspace(). */ #define UCHAR(c) ((unsigned char) (c)) @@ -956,174 +951,174 @@ MODULE_SCOPE Tcl_HashTable tkPredefBitmapTable; MODULE_SCOPE int Tk_BellObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_BindObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_BindtagsObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ButtonObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_CanvasObjCmd(ClientData clientData, Tcl_Interp *interp, int argc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_CheckbuttonObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ClipboardObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ChooseColorObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ChooseDirectoryObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ChooseFontObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_DestroyObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_EntryObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_EventObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_FrameObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_FocusObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_FontObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_GetOpenFileObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_GetSaveFileObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_GrabObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_GridObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ImageObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_LabelObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_LabelframeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ListboxObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_LowerObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_MenubuttonObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_MessageBoxObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_MessageObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_PanedWindowObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_OptionObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_PackObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_PlaceObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_RadiobuttonObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_RaiseObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ScaleObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ScrollbarCmd(ClientData clientData, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); MODULE_SCOPE int Tk_SelectionObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_SendCmd(ClientData clientData, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); MODULE_SCOPE int Tk_SendObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_SpinboxObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_TextObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_TkObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_TkwaitObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_ToplevelObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_UpdateObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_WinfoObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_WmObjCmd(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); MODULE_SCOPE void TkEventInit(void); MODULE_SCOPE void TkRegisterObjTypes(void); MODULE_SCOPE int TkCreateMenuCmd(Tcl_Interp *interp); MODULE_SCOPE int TkDeadAppCmd(ClientData clientData, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); MODULE_SCOPE int TkCanvasGetCoordObj(Tcl_Interp *interp, Tk_Canvas canvas, Tcl_Obj *obj, double *doublePtr); MODULE_SCOPE int TkCanvasDashParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, - CONST char *value, char *widgRec, int offset); + const char *value, char *widgRec, int offset); MODULE_SCOPE char * TkCanvasDashPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); MODULE_SCOPE int TkGetDoublePixels(Tcl_Interp *interp, Tk_Window tkwin, - CONST char *string, double *doublePtr); + const char *string, double *doublePtr); MODULE_SCOPE int TkOffsetParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, - CONST char *value, char *widgRec, int offset); + const char *value, char *widgRec, int offset); MODULE_SCOPE char * TkOffsetPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); MODULE_SCOPE int TkOrientParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, - CONST char *value, char *widgRec, int offset); + const char *value, char *widgRec, int offset); MODULE_SCOPE char * TkOrientPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); MODULE_SCOPE int TkPixelParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, - CONST char *value, char *widgRec, int offset); + const char *value, char *widgRec, int offset); MODULE_SCOPE char * TkPixelPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); @@ -1132,19 +1127,19 @@ MODULE_SCOPE int TkPostscriptImage(Tcl_Interp *interp, Tk_Window tkwin, int x, int y, int width, int height); MODULE_SCOPE int TkSmoothParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, - CONST char *value, char *recordPtr, int offset); + const char *value, char *recordPtr, int offset); MODULE_SCOPE char * TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin, char *recordPtr, int offset, Tcl_FreeProc **freeProcPtr); MODULE_SCOPE int TkStateParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, - CONST char *value, char *widgRec, int offset); + const char *value, char *widgRec, int offset); MODULE_SCOPE char * TkStatePrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); MODULE_SCOPE int TkTileParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, - CONST char *value, char *widgRec, int offset); + const char *value, char *widgRec, int offset); MODULE_SCOPE char * TkTilePrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); @@ -1166,15 +1161,15 @@ MODULE_SCOPE int TkParsePadAmount(Tcl_Interp *interp, int *pad1Ptr, int *pad2Ptr); MODULE_SCOPE void TkpDrawCharsInContext(Display * display, Drawable drawable, GC gc, Tk_Font tkfont, - CONST char * source, int numBytes, int rangeStart, + const char * source, int numBytes, int rangeStart, int rangeLength, int x, int y); MODULE_SCOPE int TkpMeasureCharsInContext(Tk_Font tkfont, - CONST char * source, int numBytes, int rangeStart, + const char * source, int numBytes, int rangeStart, int rangeLength, int maxLength, int flags, int * lengthPtr); MODULE_SCOPE void TkUnderlineCharsInContext(Display *display, Drawable drawable, GC gc, Tk_Font tkfont, - CONST char *string, int numBytes, int x, int y, + const char *string, int numBytes, int x, int y, int firstByte, int lastByte); /* @@ -1183,7 +1178,7 @@ MODULE_SCOPE void TkUnderlineCharsInContext(Display *display, MODULE_SCOPE int TkUnsupported1ObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj * CONST objv[]); + Tcl_Obj *const objv[]); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT |