tk.h

Go to the documentation of this file.
00001 /*
00002  * tk.h --
00003  *
00004  *      Declarations for Tk-related things that are visible
00005  *      outside of the Tk module itself.
00006  *
00007  * Copyright (c) 1989-1994 The Regents of the University of California.
00008  * Copyright (c) 1994 The Australian National University.
00009  * Copyright (c) 1994-1998 Sun Microsystems, Inc.
00010  * Copyright (c) 1998-2000 Ajuba Solutions.
00011  *
00012  * See the file "license.terms" for information on usage and redistribution
00013  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00014  *
00015  * RCS: @(#) $Id: tk.h,v 14.1 2004/11/16 19:42:10 morrison Exp $
00016  */
00017 
00018 #include "common.h"
00019 
00020 #ifndef _TK
00021 #define _TK
00022 
00023 /*
00024  * For C++ compilers, use extern "C"
00025  */
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 /*
00032  * When version numbers change here, you must also go into the following files
00033  * and update the version numbers:
00034  *
00035  * library/tk.tcl       (only if Major.minor changes, not patchlevel)
00036  * unix/configure.in    (2 LOC Major, 2 LOC minor, 1 LOC patch)
00037  * win/configure.in     (as above)
00038  * win/makefile.vc      (not patchlevel)
00039  * README               (sections 0 and 1)
00040  * mac/README           (not patchlevel)
00041  * macosx/Wish.pbproj/project.pbxproj
00042  *                      (14 LOC total, 4 LOC patch)
00043  * win/README           (not patchlevel)
00044  * unix/README          (not patchlevel)
00045  * unix/tk.spec         (3 LOC Major/Minor, 2 LOC patch)
00046  * win/tcl.m4           (not patchlevel)
00047  *
00048  * You may also need to update some of these files when the numbers change
00049  * for the version of Tcl that this release of Tk is compiled against.
00050  */
00051 
00052 #define TK_MAJOR_VERSION   8
00053 #define TK_MINOR_VERSION   4
00054 #define TK_RELEASE_LEVEL   TCL_FINAL_RELEASE
00055 #define TK_RELEASE_SERIAL  6
00056 
00057 #define TK_VERSION      "8.4"
00058 #define TK_PATCH_LEVEL  "8.4.6"
00059 
00060 /*
00061  * The following definitions set up the proper options for Macintosh
00062  * compilers.  We use this method because there is no autoconf equivalent.
00063  */
00064 
00065 #if defined(MAC_TCL) || defined(MAC_OSX_TK)
00066 #   ifndef REDO_KEYSYM_LOOKUP
00067 #       define REDO_KEYSYM_LOOKUP
00068 #   endif
00069 #endif
00070 
00071 #ifndef _TCL
00072 #   include <tcl.h>
00073 #   if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION != 4)
00074 #       error Tk 8.4 must be compiled with tcl.h from Tcl 8.4
00075 #   endif
00076 #endif
00077 
00078 /* 
00079  * A special definition used to allow this header file to be included
00080  * from windows or mac resource files so that they can obtain version
00081  * information.  RC_INVOKED is defined by default by the windows RC tool
00082  * and manually set for macintosh.
00083  *
00084  * Resource compilers don't like all the C stuff, like typedefs and
00085  * procedure declarations, that occur below, so block them out.
00086  */
00087     
00088 #ifndef RC_INVOKED
00089     
00090 #ifndef _XLIB_H
00091 #   if defined (MAC_TCL)
00092 #       include <Xlib.h>
00093 #       include <X.h>
00094 #   elif defined(MAC_OSX_TK)
00095 #       include <X11/Xlib.h>
00096 #       include <X11/X.h>
00097 #   else
00098 #       include <X11/Xlib.h>
00099 #   endif
00100 #endif
00101 #ifdef __STDC__
00102 #   include <stddef.h>
00103 #endif
00104 
00105 #ifdef BUILD_tk
00106 # undef TCL_STORAGE_CLASS
00107 # define TCL_STORAGE_CLASS DLLEXPORT
00108 #endif
00109 
00110 /*
00111  * Decide whether or not to use input methods.
00112  */
00113 
00114 #ifdef XNQueryInputStyle
00115 #define TK_USE_INPUT_METHODS
00116 #endif
00117 
00118 /*
00119  * Dummy types that are used by clients:
00120  */
00121 
00122 typedef struct Tk_BindingTable_ *Tk_BindingTable;
00123 typedef struct Tk_Canvas_ *Tk_Canvas;
00124 typedef struct Tk_Cursor_ *Tk_Cursor;
00125 typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler;
00126 typedef struct Tk_Font_ *Tk_Font;
00127 typedef struct Tk_Image__ *Tk_Image;
00128 typedef struct Tk_ImageMaster_ *Tk_ImageMaster;
00129 typedef struct Tk_OptionTable_ *Tk_OptionTable;
00130 typedef struct Tk_PostscriptInfo_ *Tk_PostscriptInfo;
00131 typedef struct Tk_TextLayout_ *Tk_TextLayout;
00132 typedef struct Tk_Window_ *Tk_Window;
00133 typedef struct Tk_3DBorder_ *Tk_3DBorder;
00134 typedef struct Tk_Style_ *Tk_Style;
00135 typedef struct Tk_StyleEngine_ *Tk_StyleEngine;
00136 typedef struct Tk_StyledElement_ *Tk_StyledElement;
00137 
00138 /*
00139  * Additional types exported to clients.
00140  */
00141 
00142 typedef CONST char *Tk_Uid;
00143 
00144 /*
00145  * The enum below defines the valid types for Tk configuration options
00146  * as implemented by Tk_InitOptions, Tk_SetOptions, etc.
00147  */
00148 
00149 typedef enum {
00150     TK_OPTION_BOOLEAN,
00151     TK_OPTION_INT,
00152     TK_OPTION_DOUBLE,
00153     TK_OPTION_STRING,
00154     TK_OPTION_STRING_TABLE,
00155     TK_OPTION_COLOR,
00156     TK_OPTION_FONT,
00157     TK_OPTION_BITMAP,
00158     TK_OPTION_BORDER,
00159     TK_OPTION_RELIEF,
00160     TK_OPTION_CURSOR,
00161     TK_OPTION_JUSTIFY,
00162     TK_OPTION_ANCHOR,
00163     TK_OPTION_SYNONYM,
00164     TK_OPTION_PIXELS,
00165     TK_OPTION_WINDOW,
00166     TK_OPTION_END,
00167     TK_OPTION_CUSTOM,
00168     TK_OPTION_STYLE
00169 } Tk_OptionType;
00170 
00171 /*
00172  * Structures of the following type are used by widgets to specify
00173  * their configuration options.  Typically each widget has a static
00174  * array of these structures, where each element of the array describes
00175  * a single configuration option.  The array is passed to
00176  * Tk_CreateOptionTable.
00177  */
00178 
00179 typedef struct Tk_OptionSpec {
00180     Tk_OptionType type;         /* Type of option, such as TK_OPTION_COLOR; 
00181                                  * see definitions above. Last option in
00182                                  * table must have type TK_OPTION_END. */
00183     char *optionName;           /* Name used to specify option in Tcl   
00184                                  * commands. */
00185     char *dbName;               /* Name for option in option database. */
00186     char *dbClass;              /* Class for option in database. */
00187     char *defValue;             /* Default value for option if not specified
00188                                  * in command line, the option database,
00189                                  * or the system. */
00190     int objOffset;              /* Where in record to store a Tcl_Obj * that
00191                                  * holds the value of this option, specified
00192                                  * as an offset in bytes from the start of
00193                                  * the record. Use the Tk_Offset macro to
00194                                  * generate values for this.  -1 means don't
00195                                  * store the Tcl_Obj in the record. */
00196     int internalOffset;         /* Where in record to store the internal
00197                                  * representation of the value of this option,
00198                                  * such as an int or XColor *.  This field
00199                                  * is specified as an offset in bytes
00200                                  * from the start of the record. Use the
00201                                  * Tk_Offset macro to generate values for it.
00202                                  * -1 means don't store the internal
00203                                  * representation in the record. */
00204     int flags;                  /* Any combination of the values defined
00205                                  * below. */
00206     ClientData clientData;      /* An alternate place to put option-specific
00207                                  * data. Used for the monochrome default value
00208                                  * for colors, etc. */
00209     int typeMask;               /* An arbitrary bit mask defined by the
00210                                  * class manager; typically bits correspond
00211                                  * to certain kinds of options such as all
00212                                  * those that require a redisplay when they
00213                                  * change.  Tk_SetOptions returns the bit-wise
00214                                  * OR of the typeMasks of all options that
00215                                  * were changed. */
00216 } Tk_OptionSpec;
00217 
00218 /*
00219  * Flag values for Tk_OptionSpec structures.  These flags are shared by
00220  * Tk_ConfigSpec structures, so be sure to coordinate any changes
00221  * carefully.
00222  */
00223 
00224 #define TK_OPTION_NULL_OK               (1 << 0)
00225 #define TK_OPTION_DONT_SET_DEFAULT      (1 << 3)
00226 
00227 /*
00228  * The following structure and function types are used by TK_OPTION_CUSTOM
00229  * options; the structure holds pointers to the functions needed by the Tk
00230  * option config code to handle a custom option.
00231  */
00232 
00233 typedef int (Tk_CustomOptionSetProc) _ANSI_ARGS_((ClientData clientData,
00234         Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *widgRec,
00235         int offset, char *saveInternalPtr, int flags));
00236 typedef Tcl_Obj *(Tk_CustomOptionGetProc) _ANSI_ARGS_((ClientData clientData,
00237         Tk_Window tkwin, char *widgRec, int offset));
00238 typedef void (Tk_CustomOptionRestoreProc) _ANSI_ARGS_((ClientData clientData,
00239         Tk_Window tkwin, char *internalPtr, char *saveInternalPtr));
00240 typedef void (Tk_CustomOptionFreeProc) _ANSI_ARGS_((ClientData clientData,
00241         Tk_Window tkwin, char *internalPtr));
00242     
00243 typedef struct Tk_ObjCustomOption {
00244     char *name;                         /* Name of the custom option. */
00245     Tk_CustomOptionSetProc *setProc;    /* Function to use to set a record's
00246                                          * option value from a Tcl_Obj */
00247     Tk_CustomOptionGetProc *getProc;    /* Function to use to get a Tcl_Obj
00248                                          * representation from an internal
00249                                          * representation of an option. */
00250     Tk_CustomOptionRestoreProc *restoreProc;    /* Function to use to restore a
00251                                                  * saved value for the internal
00252                                                  * representation. */
00253     Tk_CustomOptionFreeProc *freeProc;  /* Function to use to free the internal
00254                                          * representation of an option. */
00255     ClientData clientData;              /* Arbitrary one-word value passed to
00256                                          * the handling procs. */
00257 } Tk_ObjCustomOption;
00258 
00259 
00260 /*
00261  * Macro to use to fill in "offset" fields of the Tk_OptionSpec.
00262  * struct.  Computes number of bytes from beginning of structure
00263  * to a given field.
00264  */
00265 
00266 #ifdef offsetof
00267 #define Tk_Offset(type, field) ((int) offsetof(type, field))
00268 #else
00269 #define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
00270 #endif
00271 
00272 /*
00273  * The following two structures are used for error handling.  When
00274  * configuration options are being modified, the old values are
00275  * saved in a Tk_SavedOptions structure.  If an error occurs, then the
00276  * contents of the structure can be used to restore all of the old
00277  * values.  The contents of this structure are for the private use
00278  * Tk.  No-one outside Tk should ever read or write any of the fields
00279  * of these structures.
00280  */
00281 
00282 typedef struct Tk_SavedOption {
00283     struct TkOption *optionPtr;         /* Points to information that describes
00284                                          * the option. */
00285     Tcl_Obj *valuePtr;                  /* The old value of the option, in
00286                                          * the form of a Tcl object; may be
00287                                          * NULL if the value wasn't saved as
00288                                          * an object. */
00289     double internalForm;                /* The old value of the option, in
00290                                          * some internal representation such
00291                                          * as an int or (XColor *).  Valid
00292                                          * only if optionPtr->specPtr->objOffset
00293                                          * is < 0.  The space must be large
00294                                          * enough to accommodate a double, a
00295                                          * long, or a pointer; right now it
00296                                          * looks like a double is big
00297                                          * enough.  Also, using a double
00298                                          * guarantees that the field is
00299                                          * properly aligned for storing large
00300                                          * values. */
00301 } Tk_SavedOption;
00302 
00303 #ifdef TCL_MEM_DEBUG
00304 #   define TK_NUM_SAVED_OPTIONS 2
00305 #else
00306 #   define TK_NUM_SAVED_OPTIONS 20
00307 #endif
00308 
00309 typedef struct Tk_SavedOptions {
00310     char *recordPtr;                    /* The data structure in which to
00311                                          * restore configuration options. */
00312     Tk_Window tkwin;                    /* Window associated with recordPtr;
00313                                          * needed to restore certain options. */
00314     int numItems;                       /* The number of valid items in 
00315                                          * items field. */
00316     Tk_SavedOption items[TK_NUM_SAVED_OPTIONS];
00317                                         /* Items used to hold old values. */
00318     struct Tk_SavedOptions *nextPtr;    /* Points to next structure in list;    
00319                                          * needed if too many options changed
00320                                          * to hold all the old values in a
00321                                          * single structure.  NULL means no
00322                                          * more structures. */
00323 } Tk_SavedOptions;
00324 
00325 /*
00326  * Structure used to describe application-specific configuration
00327  * options:  indicates procedures to call to parse an option and
00328  * to return a text string describing an option. THESE ARE
00329  * DEPRECATED; PLEASE USE THE NEW STRUCTURES LISTED ABOVE.
00330  */
00331 
00332 /*
00333  * This is a temporary flag used while tkObjConfig and new widgets
00334  * are in development.
00335  */
00336 
00337 #ifndef __NO_OLD_CONFIG
00338 
00339 typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData,
00340         Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value, char *widgRec,
00341         int offset));
00342 typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData,
00343         Tk_Window tkwin, char *widgRec, int offset,
00344         Tcl_FreeProc **freeProcPtr));
00345 
00346 typedef struct Tk_CustomOption {
00347     Tk_OptionParseProc *parseProc;      /* Procedure to call to parse an
00348                                          * option and store it in converted
00349                                          * form. */
00350     Tk_OptionPrintProc *printProc;      /* Procedure to return a printable
00351                                          * string describing an existing
00352                                          * option. */
00353     ClientData clientData;              /* Arbitrary one-word value used by
00354                                          * option parser:  passed to
00355                                          * parseProc and printProc. */
00356 } Tk_CustomOption;
00357 
00358 /*
00359  * Structure used to specify information for Tk_ConfigureWidget.  Each
00360  * structure gives complete information for one option, including
00361  * how the option is specified on the command line, where it appears
00362  * in the option database, etc.
00363  */
00364 
00365 typedef struct Tk_ConfigSpec {
00366     int type;                   /* Type of option, such as TK_CONFIG_COLOR;
00367                                  * see definitions below.  Last option in
00368                                  * table must have type TK_CONFIG_END. */
00369     char *argvName;             /* Switch used to specify option in argv.
00370                                  * NULL means this spec is part of a group. */
00371     Tk_Uid dbName;              /* Name for option in option database. */
00372     Tk_Uid dbClass;             /* Class for option in database. */
00373     Tk_Uid defValue;            /* Default value for option if not
00374                                  * specified in command line or database. */
00375     int offset;                 /* Where in widget record to store value;
00376                                  * use Tk_Offset macro to generate values
00377                                  * for this. */
00378     int specFlags;              /* Any combination of the values defined
00379                                  * below;  other bits are used internally
00380                                  * by tkConfig.c. */
00381     Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is
00382                                  * a pointer to info about how to parse and
00383                                  * print the option.  Otherwise it is
00384                                  * irrelevant. */
00385 } Tk_ConfigSpec;
00386 
00387 /*
00388  * Type values for Tk_ConfigSpec structures.  See the user
00389  * documentation for details.
00390  */
00391 
00392 typedef enum {
00393     TK_CONFIG_BOOLEAN, TK_CONFIG_INT, TK_CONFIG_DOUBLE, TK_CONFIG_STRING,
00394     TK_CONFIG_UID, TK_CONFIG_COLOR, TK_CONFIG_FONT, TK_CONFIG_BITMAP,
00395     TK_CONFIG_BORDER, TK_CONFIG_RELIEF, TK_CONFIG_CURSOR, 
00396     TK_CONFIG_ACTIVE_CURSOR, TK_CONFIG_JUSTIFY, TK_CONFIG_ANCHOR, 
00397     TK_CONFIG_SYNONYM, TK_CONFIG_CAP_STYLE, TK_CONFIG_JOIN_STYLE,
00398     TK_CONFIG_PIXELS, TK_CONFIG_MM, TK_CONFIG_WINDOW, TK_CONFIG_CUSTOM, 
00399     TK_CONFIG_END
00400 } Tk_ConfigTypes;
00401 
00402 /*
00403  * Possible values for flags argument to Tk_ConfigureWidget:
00404  */
00405 
00406 #define TK_CONFIG_ARGV_ONLY     1
00407 #define TK_CONFIG_OBJS          0x80
00408 
00409 /*
00410  * Possible flag values for Tk_ConfigSpec structures.  Any bits at
00411  * or above TK_CONFIG_USER_BIT may be used by clients for selecting
00412  * certain entries.  Before changing any values here, coordinate with
00413  * tkOldConfig.c (internal-use-only flags are defined there).
00414  */
00415 
00416 #define TK_CONFIG_NULL_OK               (1 << 0)
00417 #define TK_CONFIG_COLOR_ONLY            (1 << 1)
00418 #define TK_CONFIG_MONO_ONLY             (1 << 2)
00419 #define TK_CONFIG_DONT_SET_DEFAULT      (1 << 3)
00420 #define TK_CONFIG_OPTION_SPECIFIED      (1 << 4)
00421 #define TK_CONFIG_USER_BIT              0x100
00422 #endif /* __NO_OLD_CONFIG */
00423 
00424 /*
00425  * Structure used to specify how to handle argv options.
00426  */
00427 
00428 typedef struct {
00429     char *key;          /* The key string that flags the option in the
00430                          * argv array. */
00431     int type;           /* Indicates option type;  see below. */
00432     char *src;          /* Value to be used in setting dst;  usage
00433                          * depends on type. */
00434     char *dst;          /* Address of value to be modified;  usage
00435                          * depends on type. */
00436     char *help;         /* Documentation message describing this option. */
00437 } Tk_ArgvInfo;
00438 
00439 /*
00440  * Legal values for the type field of a Tk_ArgvInfo: see the user
00441  * documentation for details.
00442  */
00443 
00444 #define TK_ARGV_CONSTANT                15
00445 #define TK_ARGV_INT                     16
00446 #define TK_ARGV_STRING                  17
00447 #define TK_ARGV_UID                     18
00448 #define TK_ARGV_REST                    19
00449 #define TK_ARGV_FLOAT                   20
00450 #define TK_ARGV_FUNC                    21
00451 #define TK_ARGV_GENFUNC                 22
00452 #define TK_ARGV_HELP                    23
00453 #define TK_ARGV_CONST_OPTION            24
00454 #define TK_ARGV_OPTION_VALUE            25
00455 #define TK_ARGV_OPTION_NAME_VALUE       26
00456 #define TK_ARGV_END                     27
00457 
00458 /*
00459  * Flag bits for passing to Tk_ParseArgv:
00460  */
00461 
00462 #define TK_ARGV_NO_DEFAULTS             0x1
00463 #define TK_ARGV_NO_LEFTOVERS            0x2
00464 #define TK_ARGV_NO_ABBREV               0x4
00465 #define TK_ARGV_DONT_SKIP_FIRST_ARG     0x8
00466 
00467 /*
00468  * Enumerated type for describing actions to be taken in response
00469  * to a restrictProc established by Tk_RestrictEvents.
00470  */
00471 
00472 typedef enum {
00473     TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT
00474 } Tk_RestrictAction;
00475 
00476 /*
00477  * Priority levels to pass to Tk_AddOption:
00478  */
00479 
00480 #define TK_WIDGET_DEFAULT_PRIO  20
00481 #define TK_STARTUP_FILE_PRIO    40
00482 #define TK_USER_DEFAULT_PRIO    60
00483 #define TK_INTERACTIVE_PRIO     80
00484 #define TK_MAX_PRIO             100
00485 
00486 /*
00487  * Relief values returned by Tk_GetRelief:
00488  */
00489 
00490 #define TK_RELIEF_NULL          -1
00491 #define TK_RELIEF_FLAT          0
00492 #define TK_RELIEF_GROOVE        1
00493 #define TK_RELIEF_RAISED        2
00494 #define TK_RELIEF_RIDGE         3
00495 #define TK_RELIEF_SOLID         4
00496 #define TK_RELIEF_SUNKEN        5
00497 
00498 /*
00499  * "Which" argument values for Tk_3DBorderGC:
00500  */
00501 
00502 #define TK_3D_FLAT_GC           1
00503 #define TK_3D_LIGHT_GC          2
00504 #define TK_3D_DARK_GC           3
00505 
00506 /*
00507  * Special EnterNotify/LeaveNotify "mode" for use in events
00508  * generated by tkShare.c.  Pick a high enough value that it's
00509  * unlikely to conflict with existing values (like NotifyNormal)
00510  * or any new values defined in the future.
00511  */
00512 
00513 #define TK_NOTIFY_SHARE         20
00514 
00515 /*
00516  * Enumerated type for describing a point by which to anchor something:
00517  */
00518 
00519 typedef enum {
00520     TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE,
00521     TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW,
00522     TK_ANCHOR_CENTER
00523 } Tk_Anchor;
00524 
00525 /*
00526  * Enumerated type for describing a style of justification:
00527  */
00528 
00529 typedef enum {
00530     TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER
00531 } Tk_Justify;
00532 
00533 /*
00534  * The following structure is used by Tk_GetFontMetrics() to return
00535  * information about the properties of a Tk_Font.  
00536  */
00537 
00538 typedef struct Tk_FontMetrics {
00539     int ascent;                 /* The amount in pixels that the tallest
00540                                  * letter sticks up above the baseline, plus
00541                                  * any extra blank space added by the designer
00542                                  * of the font. */
00543     int descent;                /* The largest amount in pixels that any
00544                                  * letter sticks below the baseline, plus any
00545                                  * extra blank space added by the designer of
00546                                  * the font. */
00547     int linespace;              /* The sum of the ascent and descent.  How
00548                                  * far apart two lines of text in the same
00549                                  * font should be placed so that none of the
00550                                  * characters in one line overlap any of the
00551                                  * characters in the other line. */
00552 } Tk_FontMetrics;
00553 
00554 /*
00555  * Flags passed to Tk_MeasureChars:
00556  */
00557 
00558 #define TK_WHOLE_WORDS          1
00559 #define TK_AT_LEAST_ONE         2
00560 #define TK_PARTIAL_OK           4
00561 
00562 /*
00563  * Flags passed to Tk_ComputeTextLayout:
00564  */
00565 
00566 #define TK_IGNORE_TABS          8
00567 #define TK_IGNORE_NEWLINES      16
00568 
00569 /*
00570  * Widget class procedures used to implement platform specific widget
00571  * behavior.
00572  */
00573 
00574 typedef Window (Tk_ClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin,
00575         Window parent, ClientData instanceData));
00576 typedef void (Tk_ClassWorldChangedProc) _ANSI_ARGS_((ClientData instanceData));
00577 typedef void (Tk_ClassModalProc) _ANSI_ARGS_((Tk_Window tkwin,
00578         XEvent *eventPtr));
00579 
00580 typedef struct Tk_ClassProcs {
00581     unsigned int size;
00582     Tk_ClassWorldChangedProc *worldChangedProc;
00583                                 /* Procedure to invoke when the widget needs to
00584                                  * respond in some way to a change in the
00585                                  * world (font changes, etc.) */
00586     Tk_ClassCreateProc *createProc;
00587                                 /* Procedure to invoke when the
00588                                  * platform-dependent window needs to be
00589                                  * created. */
00590     Tk_ClassModalProc *modalProc;
00591                                 /* Procedure to invoke after all bindings on a
00592                                  * widget have been triggered in order to
00593                                  * handle a modal loop. */
00594 } Tk_ClassProcs;
00595 
00596 /*
00597  * Simple accessor for Tk_ClassProcs structure.  Checks that the structure
00598  * is not NULL, then checks the size field and returns either the requested
00599  * field, if present, or NULL if the structure is too small to have the field
00600  * (or NULL if the structure is NULL).
00601  *
00602  * A more general version of this function may be useful if other
00603  * size-versioned structure pop up in the future:
00604  *
00605  *      #define Tk_GetField(name, who, which) \
00606  *          (((who) == NULL) ? NULL :
00607  *          (((who)->size <= Tk_Offset(name, which)) ? NULL :(name)->which))
00608  */
00609 
00610 #define Tk_GetClassProc(procs, which) \
00611     (((procs) == NULL) ? NULL : \
00612     (((procs)->size <= Tk_Offset(Tk_ClassProcs, which)) ? NULL:(procs)->which))
00613 
00614 /*
00615  * Each geometry manager (the packer, the placer, etc.) is represented
00616  * by a structure of the following form, which indicates procedures
00617  * to invoke in the geometry manager to carry out certain functions.
00618  */
00619 
00620 typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData,
00621         Tk_Window tkwin));
00622 typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData,
00623         Tk_Window tkwin));
00624 
00625 typedef struct Tk_GeomMgr {
00626     char *name;                 /* Name of the geometry manager (command
00627                                  * used to invoke it, or name of widget
00628                                  * class that allows embedded widgets). */
00629     Tk_GeomRequestProc *requestProc;
00630                                 /* Procedure to invoke when a slave's
00631                                  * requested geometry changes. */
00632     Tk_GeomLostSlaveProc *lostSlaveProc;
00633                                 /* Procedure to invoke when a slave is
00634                                  * taken away from one geometry manager
00635                                  * by another.  NULL means geometry manager
00636                                  * doesn't care when slaves are lost. */
00637 } Tk_GeomMgr;
00638 
00639 /*
00640  * Result values returned by Tk_GetScrollInfo:
00641  */
00642 
00643 #define TK_SCROLL_MOVETO        1
00644 #define TK_SCROLL_PAGES         2
00645 #define TK_SCROLL_UNITS         3
00646 #define TK_SCROLL_ERROR         4
00647 
00648 /*
00649  *---------------------------------------------------------------------------
00650  *
00651  * Extensions to the X event set
00652  *
00653  *---------------------------------------------------------------------------
00654  */
00655 #define VirtualEvent        (LASTEvent)
00656 #define ActivateNotify      (LASTEvent + 1)
00657 #define DeactivateNotify    (LASTEvent + 2)
00658 #define MouseWheelEvent     (LASTEvent + 3)
00659 #define TK_LASTEVENT        (LASTEvent + 4)
00660 
00661 #define MouseWheelMask      (1L << 28)
00662 
00663 #define ActivateMask        (1L << 29)
00664 #define VirtualEventMask    (1L << 30)
00665 #define TK_LASTEVENT        (LASTEvent + 4)
00666 
00667 
00668 /*
00669  * A virtual event shares most of its fields with the XKeyEvent and
00670  * XButtonEvent structures.  99% of the time a virtual event will be
00671  * an abstraction of a key or button event, so this structure provides
00672  * the most information to the user.  The only difference is the changing
00673  * of the detail field for a virtual event so that it holds the name of the
00674  * virtual event being triggered.
00675  */
00676 
00677 typedef struct {
00678     int type;
00679     unsigned long serial;   /* # of last request processed by server */
00680     Bool send_event;        /* True if this came from a SendEvent request */
00681     Display *display;       /* Display the event was read from */
00682     Window event;           /* Window on which event was requested. */
00683     Window root;            /* root window that the event occured on */
00684     Window subwindow;       /* child window */
00685     Time time;              /* milliseconds */
00686     int x, y;               /* pointer x, y coordinates in event window */
00687     int x_root, y_root;     /* coordinates relative to root */
00688     unsigned int state;     /* key or button mask */
00689     Tk_Uid name;            /* Name of virtual event. */
00690     Bool same_screen;       /* same screen flag */
00691 } XVirtualEvent;
00692 
00693 typedef struct {
00694     int type;
00695     unsigned long serial;   /* # of last request processed by server */
00696     Bool send_event;        /* True if this came from a SendEvent request */
00697     Display *display;       /* Display the event was read from */
00698     Window window;          /* Window in which event occurred. */
00699 } XActivateDeactivateEvent;
00700 typedef XActivateDeactivateEvent XActivateEvent;
00701 typedef XActivateDeactivateEvent XDeactivateEvent;
00702 
00703 /*
00704  *--------------------------------------------------------------
00705  *
00706  * Macros for querying Tk_Window structures.  See the
00707  * manual entries for documentation.
00708  *
00709  *--------------------------------------------------------------
00710  */
00711 
00712 #define Tk_Display(tkwin)               (((Tk_FakeWin *) (tkwin))->display)
00713 #define Tk_ScreenNumber(tkwin)          (((Tk_FakeWin *) (tkwin))->screenNum)
00714 #define Tk_Screen(tkwin)                (ScreenOfDisplay(Tk_Display(tkwin), \
00715         Tk_ScreenNumber(tkwin)))
00716 #define Tk_Depth(tkwin)                 (((Tk_FakeWin *) (tkwin))->depth)
00717 #define Tk_Visual(tkwin)                (((Tk_FakeWin *) (tkwin))->visual)
00718 #define Tk_WindowId(tkwin)              (((Tk_FakeWin *) (tkwin))->window)
00719 #define Tk_PathName(tkwin)              (((Tk_FakeWin *) (tkwin))->pathName)
00720 #define Tk_Name(tkwin)                  (((Tk_FakeWin *) (tkwin))->nameUid)
00721 #define Tk_Class(tkwin)                 (((Tk_FakeWin *) (tkwin))->classUid)
00722 #define Tk_X(tkwin)                     (((Tk_FakeWin *) (tkwin))->changes.x)
00723 #define Tk_Y(tkwin)                     (((Tk_FakeWin *) (tkwin))->changes.y)
00724 #define Tk_Width(tkwin)                 (((Tk_FakeWin *) (tkwin))->changes.width)
00725 #define Tk_Height(tkwin) \
00726     (((Tk_FakeWin *) (tkwin))->changes.height)
00727 #define Tk_Changes(tkwin)               (&((Tk_FakeWin *) (tkwin))->changes)
00728 #define Tk_Attributes(tkwin)            (&((Tk_FakeWin *) (tkwin))->atts)
00729 #define Tk_IsEmbedded(tkwin) \
00730     (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED)
00731 #define Tk_IsContainer(tkwin) \
00732     (((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER)
00733 #define Tk_IsMapped(tkwin) \
00734     (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED)
00735 #define Tk_IsTopLevel(tkwin) \
00736     (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL)
00737 #define Tk_HasWrapper(tkwin) \
00738     (((Tk_FakeWin *) (tkwin))->flags & TK_HAS_WRAPPER)
00739 #define Tk_WinManaged(tkwin) \
00740     (((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED)
00741 #define Tk_TopWinHierarchy(tkwin) \
00742     (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY)
00743 #define Tk_ReqWidth(tkwin)              (((Tk_FakeWin *) (tkwin))->reqWidth)
00744 #define Tk_ReqHeight(tkwin)             (((Tk_FakeWin *) (tkwin))->reqHeight)
00745 /* Tk_InternalBorderWidth is deprecated */
00746 #define Tk_InternalBorderWidth(tkwin) \
00747     (((Tk_FakeWin *) (tkwin))->internalBorderLeft)
00748 #define Tk_InternalBorderLeft(tkwin) \
00749     (((Tk_FakeWin *) (tkwin))->internalBorderLeft)
00750 #define Tk_InternalBorderRight(tkwin) \
00751     (((Tk_FakeWin *) (tkwin))->internalBorderRight)
00752 #define Tk_InternalBorderTop(tkwin) \
00753     (((Tk_FakeWin *) (tkwin))->internalBorderTop)
00754 #define Tk_InternalBorderBottom(tkwin) \
00755     (((Tk_FakeWin *) (tkwin))->internalBorderBottom)
00756 #define Tk_MinReqWidth(tkwin)           (((Tk_FakeWin *) (tkwin))->minReqWidth)
00757 #define Tk_MinReqHeight(tkwin)          (((Tk_FakeWin *) (tkwin))->minReqHeight)
00758 #define Tk_Parent(tkwin)                (((Tk_FakeWin *) (tkwin))->parentPtr)
00759 #define Tk_Colormap(tkwin)              (((Tk_FakeWin *) (tkwin))->atts.colormap)
00760 
00761 /*
00762  * The structure below is needed by the macros above so that they can
00763  * access the fields of a Tk_Window.  The fields not needed by the macros
00764  * are declared as "dummyX".  The structure has its own type in order to
00765  * prevent applications from accessing Tk_Window fields except using
00766  * official macros.  WARNING!! The structure definition must be kept
00767  * consistent with the TkWindow structure in tkInt.h.  If you change one,
00768  * then change the other.  See the declaration in tkInt.h for
00769  * documentation on what the fields are used for internally.
00770  */
00771 
00772 typedef struct Tk_FakeWin {
00773     Display *display;
00774     char *dummy1;               /* dispPtr */
00775     int screenNum;
00776     Visual *visual;
00777     int depth;
00778     Window window;
00779     char *dummy2;               /* childList */
00780     char *dummy3;               /* lastChildPtr */
00781     Tk_Window parentPtr;        /* parentPtr */
00782     char *dummy4;               /* nextPtr */
00783     char *dummy5;               /* mainPtr */
00784     char *pathName;
00785     Tk_Uid nameUid;
00786     Tk_Uid classUid;
00787     XWindowChanges changes;
00788     unsigned int dummy6;        /* dirtyChanges */
00789     XSetWindowAttributes atts;
00790     unsigned long dummy7;       /* dirtyAtts */
00791     unsigned int flags;
00792     char *dummy8;               /* handlerList */
00793 #ifdef TK_USE_INPUT_METHODS
00794     XIC dummy9;                 /* inputContext */
00795 #endif /* TK_USE_INPUT_METHODS */
00796     ClientData *dummy10;        /* tagPtr */
00797     int dummy11;                /* numTags */
00798     int dummy12;                /* optionLevel */
00799     char *dummy13;              /* selHandlerList */
00800     char *dummy14;              /* geomMgrPtr */
00801     ClientData dummy15;         /* geomData */
00802     int reqWidth, reqHeight;
00803     int internalBorderLeft;
00804     char *dummy16;              /* wmInfoPtr */
00805     char *dummy17;              /* classProcPtr */
00806     ClientData dummy18;         /* instanceData */
00807     char *dummy19;              /* privatePtr */
00808     int internalBorderRight;
00809     int internalBorderTop;
00810     int internalBorderBottom;
00811     int minReqWidth;
00812     int minReqHeight;
00813 } Tk_FakeWin;
00814 
00815 /*
00816  * Flag values for TkWindow (and Tk_FakeWin) structures are:
00817  *
00818  * TK_MAPPED:                   1 means window is currently mapped,
00819  *                              0 means unmapped.
00820  * TK_TOP_LEVEL:                1 means this is a top-level widget.
00821  * TK_ALREADY_DEAD:             1 means the window is in the process of
00822  *                              being destroyed already.
00823  * TK_NEED_CONFIG_NOTIFY:       1 means that the window has been reconfigured
00824  *                              before it was made to exist.  At the time of
00825  *                              making it exist a ConfigureNotify event needs
00826  *                              to be generated.
00827  * TK_GRAB_FLAG:                Used to manage grabs.  See tkGrab.c for
00828  *                              details.
00829  * TK_CHECKED_IC:               1 means we've already tried to get an input
00830  *                              context for this window;  if the ic field
00831  *                              is NULL it means that there isn't a context
00832  *                              for the field.
00833  * TK_DONT_DESTROY_WINDOW:      1 means that Tk_DestroyWindow should not
00834  *                              invoke XDestroyWindow to destroy this widget's
00835  *                              X window.  The flag is set when the window
00836  *                              has already been destroyed elsewhere (e.g.
00837  *                              by another application) or when it will be
00838  *                              destroyed later (e.g. by destroying its
00839  *                              parent).
00840  * TK_WM_COLORMAP_WINDOW:       1 means that this window has at some time
00841  *                              appeared in the WM_COLORMAP_WINDOWS property
00842  *                              for its toplevel, so we have to remove it
00843  *                              from that property if the window is
00844  *                              deleted and the toplevel isn't.
00845  * TK_EMBEDDED:                 1 means that this window (which must be a
00846  *                              toplevel) is not a free-standing window but
00847  *                              rather is embedded in some other application.
00848  * TK_CONTAINER:                1 means that this window is a container, and
00849  *                              that some other application (either in
00850  *                              this process or elsewhere) may be
00851  *                              embedding itself inside the window.
00852  * TK_BOTH_HALVES:              1 means that this window is used for
00853  *                              application embedding (either as
00854  *                              container or embedded application), and
00855  *                              both the containing and embedded halves
00856  *                              are associated with windows in this
00857  *                              particular process.
00858  * TK_DEFER_MODAL:              1 means that this window has deferred a modal
00859  *                              loop until all of the bindings for the current
00860  *                              event have been invoked.
00861  * TK_WRAPPER:                  1 means that this window is the extra
00862  *                              wrapper window created around a toplevel
00863  *                              to hold the menubar under Unix.  See
00864  *                              tkUnixWm.c for more information.
00865  * TK_REPARENTED:               1 means that this window has been reparented
00866  *                              so that as far as the window system is
00867  *                              concerned it isn't a child of its Tk
00868  *                              parent.  Initially this is used only for
00869  *                              special Unix menubar windows.
00870  * TK_ANONYMOUS_WINDOW:         1 means that this window has no name, and is
00871  *                              thus not accessible from Tk.
00872  * TK_HAS_WRAPPER               1 means that this window has a wrapper window
00873  * TK_WIN_MANAGED               1 means that this window is a child of the
00874  *                              root window, and is managed by the window
00875  *                              manager.
00876  * TK_TOP_HIERARCHY             1 means this window is at the top of a
00877  *                              physical window hierarchy within this
00878  *                              process, i.e. the window's parent
00879  *                              either doesn't exist or is not owned by
00880  *                              this Tk application.
00881  * TK_PROP_PROPCHANGE           1 means that PropertyNotify events in
00882  *                              this window's children should propagate
00883  *                              up to this window.
00884  */
00885 
00886 
00887 #define TK_MAPPED               1
00888 #define TK_TOP_LEVEL            2
00889 #define TK_ALREADY_DEAD         4
00890 #define TK_NEED_CONFIG_NOTIFY   8
00891 #define TK_GRAB_FLAG            0x10
00892 #define TK_CHECKED_IC           0x20
00893 #define TK_DONT_DESTROY_WINDOW  0x40
00894 #define TK_WM_COLORMAP_WINDOW   0x80
00895 #define TK_EMBEDDED             0x100
00896 #define TK_CONTAINER            0x200
00897 #define TK_BOTH_HALVES          0x400
00898 #define TK_DEFER_MODAL          0x800
00899 #define TK_WRAPPER              0x1000
00900 #define TK_REPARENTED           0x2000
00901 #define TK_ANONYMOUS_WINDOW     0x4000
00902 #define TK_HAS_WRAPPER          0x8000
00903 #define TK_WIN_MANAGED          0x10000
00904 #define TK_TOP_HIERARCHY        0x20000
00905 #define TK_PROP_PROPCHANGE      0x40000
00906 
00907 /*
00908  *--------------------------------------------------------------
00909  *
00910  * Procedure prototypes and structures used for defining new canvas
00911  * items:
00912  *
00913  *--------------------------------------------------------------
00914  */
00915 
00916 typedef enum {
00917     TK_STATE_NULL = -1, TK_STATE_ACTIVE, TK_STATE_DISABLED,
00918     TK_STATE_NORMAL, TK_STATE_HIDDEN
00919 } Tk_State;
00920 
00921 typedef struct Tk_SmoothMethod {
00922     char *name;
00923     int (*coordProc) _ANSI_ARGS_((Tk_Canvas canvas,
00924                 double *pointPtr, int numPoints, int numSteps,
00925                 XPoint xPoints[], double dblPoints[]));
00926     void (*postscriptProc) _ANSI_ARGS_((Tcl_Interp *interp,
00927                 Tk_Canvas canvas, double *coordPtr,
00928                 int numPoints, int numSteps));
00929 } Tk_SmoothMethod;
00930 
00931 /*
00932  * For each item in a canvas widget there exists one record with
00933  * the following structure.  Each actual item is represented by
00934  * a record with the following stuff at its beginning, plus additional
00935  * type-specific stuff after that.
00936  */
00937 
00938 #define TK_TAG_SPACE 3
00939 
00940 typedef struct Tk_Item  {
00941     int id;                             /* Unique identifier for this item
00942                                          * (also serves as first tag for
00943                                          * item). */
00944     struct Tk_Item *nextPtr;            /* Next in display list of all
00945                                          * items in this canvas.  Later items
00946                                          * in list are drawn on top of earlier
00947                                          * ones. */
00948     Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of
00949                                          * tags. */
00950     Tk_Uid *tagPtr;                     /* Pointer to array of tags.  Usually
00951                                          * points to staticTagSpace, but
00952                                          * may point to malloc-ed space if
00953                                          * there are lots of tags. */
00954     int tagSpace;                       /* Total amount of tag space available
00955                                          * at tagPtr. */
00956     int numTags;                        /* Number of tag slots actually used
00957                                          * at *tagPtr. */
00958     struct Tk_ItemType *typePtr;        /* Table of procedures that implement
00959                                          * this type of item. */
00960     int x1, y1, x2, y2;                 /* Bounding box for item, in integer
00961                                          * canvas units. Set by item-specific
00962                                          * code and guaranteed to contain every
00963                                          * pixel drawn in item.  Item area
00964                                          * includes x1 and y1 but not x2
00965                                          * and y2. */
00966     struct Tk_Item *prevPtr;            /* Previous in display list of all
00967                                          * items in this canvas. Later items
00968                                          * in list are drawn just below earlier
00969                                          * ones. */
00970     Tk_State state;                     /* state of item */
00971     char *reserved1;                    /* reserved for future use */
00972     int redraw_flags;                   /* some flags used in the canvas */
00973 
00974     /*
00975      *------------------------------------------------------------------
00976      * Starting here is additional type-specific stuff;  see the
00977      * declarations for individual types to see what is part of
00978      * each type.  The actual space below is determined by the
00979      * "itemInfoSize" of the type's Tk_ItemType record.
00980      *------------------------------------------------------------------
00981      */
00982 } Tk_Item;
00983 
00984 /*
00985  * Flag bits for canvases (redraw_flags):
00986  *
00987  * TK_ITEM_STATE_DEPENDANT -    1 means that object needs to be
00988  *                              redrawn if the canvas state changes.
00989  * TK_ITEM_DONT_REDRAW -        1 means that the object redraw is already
00990  *                              been prepared, so the general canvas code
00991  *                              doesn't need to do that any more.
00992  */
00993 
00994 #define TK_ITEM_STATE_DEPENDANT         1
00995 #define TK_ITEM_DONT_REDRAW             2
00996 
00997 /*
00998  * Records of the following type are used to describe a type of
00999  * item (e.g.  lines, circles, etc.) that can form part of a
01000  * canvas widget.
01001  */
01002 
01003 #ifdef USE_OLD_CANVAS
01004 typedef int     Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
01005                     Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
01006                     char **argv));
01007 typedef int     Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,
01008                     Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
01009                     char **argv, int flags));
01010 typedef int     Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,
01011                     Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
01012                     char **argv));
01013 #else
01014 typedef int     Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
01015                     Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
01016                     Tcl_Obj *CONST objv[]));
01017 typedef int     Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,
01018                     Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
01019                     Tcl_Obj *CONST objv[], int flags));
01020 typedef int     Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,
01021                     Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
01022                     Tcl_Obj *CONST argv[]));
01023 #endif
01024 typedef void    Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas,
01025                     Tk_Item *itemPtr, Display *display));
01026 typedef void    Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas,
01027                     Tk_Item *itemPtr, Display *display, Drawable dst,
01028                     int x, int y, int width, int height));
01029 typedef double  Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas,
01030                     Tk_Item *itemPtr, double *pointPtr));
01031 typedef int     Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas,
01032                     Tk_Item *itemPtr, double *rectPtr));
01033 typedef int     Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp,
01034                     Tk_Canvas canvas, Tk_Item *itemPtr, int prepass));
01035 typedef void    Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas,
01036                     Tk_Item *itemPtr, double originX, double originY,
01037                     double scaleX, double scaleY));
01038 typedef void    Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas,
01039                     Tk_Item *itemPtr, double deltaX, double deltaY));
01040 typedef int     Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp,
01041                     Tk_Canvas canvas, Tk_Item *itemPtr, char *indexString,
01042                     int *indexPtr));
01043 typedef void    Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas,
01044                     Tk_Item *itemPtr, int index));
01045 typedef int     Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas,
01046                     Tk_Item *itemPtr, int offset, char *buffer,
01047                     int maxBytes));
01048 typedef void    Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas,
01049                     Tk_Item *itemPtr, int beforeThis, char *string));
01050 typedef void    Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas,
01051                     Tk_Item *itemPtr, int first, int last));
01052 
01053 #ifndef __NO_OLD_CONFIG
01054 
01055 typedef struct Tk_ItemType {
01056     char *name;                         /* The name of this type of item, such
01057                                          * as "line". */
01058     int itemSize;                       /* Total amount of space needed for
01059                                          * item's record. */
01060     Tk_ItemCreateProc *createProc;      /* Procedure to create a new item of
01061                                          * this type. */
01062     Tk_ConfigSpec *configSpecs;         /* Pointer to array of configuration
01063                                          * specs for this type.  Used for
01064                                          * returning configuration info. */
01065     Tk_ItemConfigureProc *configProc;   /* Procedure to call to change
01066                                          * configuration options. */
01067     Tk_ItemCoordProc *coordProc;        /* Procedure to call to get and set
01068                                          * the item's coordinates. */
01069     Tk_ItemDeleteProc *deleteProc;      /* Procedure to delete existing item of
01070                                          * this type. */
01071     Tk_ItemDisplayProc *displayProc;    /* Procedure to display items of
01072                                          * this type. */
01073     int alwaysRedraw;                   /* Non-zero means displayProc should
01074                                          * be called even when the item has
01075                                          * been moved off-screen. */
01076     Tk_ItemPointProc *pointProc;        /* Computes distance from item to
01077                                          * a given point. */
01078     Tk_ItemAreaProc *areaProc;          /* Computes whether item is inside,
01079                                          * outside, or overlapping an area. */
01080     Tk_ItemPostscriptProc *postscriptProc;
01081                                         /* Procedure to write a Postscript
01082                                          * description for items of this
01083                                          * type. */
01084     Tk_ItemScaleProc *scaleProc;        /* Procedure to rescale items of
01085                                          * this type. */
01086     Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of
01087                                          * this type. */
01088     Tk_ItemIndexProc *indexProc;        /* Procedure to determine index of
01089                                          * indicated character.  NULL if
01090                                          * item doesn't support indexing. */
01091     Tk_ItemCursorProc *icursorProc;     /* Procedure to set insert cursor pos.
01092                                          * to just before a given position. */
01093     Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in
01094                                          * STRING format) when it is in this
01095                                          * item. */
01096     Tk_ItemInsertProc *insertProc;      /* Procedure to insert something into
01097                                          * an item. */
01098     Tk_ItemDCharsProc *dCharsProc;      /* Procedure to delete characters
01099                                          * from an item. */
01100     struct Tk_ItemType *nextPtr;        /* Used to link types together into
01101                                          * a list. */
01102     char *reserved1;                    /* Reserved for future extension. */
01103     int   reserved2;                    /* Carefully compatible with */
01104     char *reserved3;                    /* Jan Nijtmans dash patch */
01105     char *reserved4;
01106 } Tk_ItemType;
01107 
01108 #endif
01109 
01110 /*
01111  * The following structure provides information about the selection and
01112  * the insertion cursor.  It is needed by only a few items, such as
01113  * those that display text.  It is shared by the generic canvas code
01114  * and the item-specific code, but most of the fields should be written
01115  * only by the canvas generic code.
01116  */
01117 
01118 typedef struct Tk_CanvasTextInfo {
01119     Tk_3DBorder selBorder;      /* Border and background for selected
01120                                  * characters.  Read-only to items.*/
01121     int selBorderWidth;         /* Width of border around selection. 
01122                                  * Read-only to items. */
01123     XColor *selFgColorPtr;      /* Foreground color for selected text.
01124                                  * Read-only to items. */
01125     Tk_Item *selItemPtr;        /* Pointer to selected item.  NULL means
01126                                  * selection isn't in this canvas.
01127                                  * Writable by items. */
01128     int selectFirst;            /* Character index of first selected
01129                                  * character.  Writable by items. */
01130     int selectLast;             /* Character index of last selected
01131                                  * character.  Writable by items. */
01132     Tk_Item *anchorItemPtr;     /* Item corresponding to "selectAnchor":
01133                                  * not necessarily selItemPtr.   Read-only
01134                                  * to items. */
01135     int selectAnchor;           /* Character index of fixed end of
01136                                  * selection (i.e. "select to" operation will
01137                                  * use this as one end of the selection).
01138                                  * Writable by items. */
01139     Tk_3DBorder insertBorder;   /* Used to draw vertical bar for insertion
01140                                  * cursor.  Read-only to items. */
01141     int insertWidth;            /* Total width of insertion cursor.  Read-only
01142                                  * to items. */
01143     int insertBorderWidth;      /* Width of 3-D border around insert cursor.
01144                                  * Read-only to items. */
01145     Tk_Item *focusItemPtr;      /* Item that currently has the input focus,
01146                                  * or NULL if no such item.  Read-only to
01147                                  * items.  */
01148     int gotFocus;               /* Non-zero means that the canvas widget has
01149                                  * the input focus.  Read-only to items.*/
01150     int cursorOn;               /* Non-zero means that an insertion cursor
01151                                  * should be displayed in focusItemPtr.
01152                                  * Read-only to items.*/
01153 } Tk_CanvasTextInfo;
01154 
01155 /*
01156  * Structures used for Dashing and Outline.
01157  */
01158 
01159 typedef struct Tk_Dash {
01160     int number;
01161     union {
01162         char *pt;
01163         char array[sizeof(char *)];
01164     } pattern;
01165 } Tk_Dash;
01166 
01167 typedef struct Tk_TSOffset {
01168     int flags;                  /* flags; see below for possible values */
01169     int xoffset;                /* x offset */
01170     int yoffset;                /* y offset */
01171 } Tk_TSOffset;
01172 
01173 /*
01174  * Bit fields in Tk_Offset->flags:
01175  */
01176 
01177 #define TK_OFFSET_INDEX         1
01178 #define TK_OFFSET_RELATIVE      2
01179 #define TK_OFFSET_LEFT          4
01180 #define TK_OFFSET_CENTER        8
01181 #define TK_OFFSET_RIGHT         16
01182 #define TK_OFFSET_TOP           32
01183 #define TK_OFFSET_MIDDLE        64
01184 #define TK_OFFSET_BOTTOM        128
01185 
01186 typedef struct Tk_Outline {
01187     GC gc;                      /* Graphics context. */
01188     double width;               /* Width of outline. */
01189     double activeWidth;         /* Width of outline. */
01190     double disabledWidth;       /* Width of outline. */
01191     int offset;                 /* Dash offset */
01192     Tk_Dash dash;               /* Dash pattern */
01193     Tk_Dash activeDash;         /* Dash pattern if state is active*/
01194     Tk_Dash disabledDash;       /* Dash pattern if state is disabled*/
01195     VOID *reserved1;            /* reserved for future expansion */
01196     VOID *reserved2;
01197     VOID *reserved3;
01198     Tk_TSOffset tsoffset;       /* stipple offset for outline*/
01199     XColor *color;              /* Outline color. */
01200     XColor *activeColor;        /* Outline color if state is active. */
01201     XColor *disabledColor;      /* Outline color if state is disabled. */
01202     Pixmap stipple;             /* Outline Stipple pattern. */
01203     Pixmap activeStipple;       /* Outline Stipple pattern if state is active. */
01204     Pixmap disabledStipple;     /* Outline Stipple pattern if state is disabled. */
01205 } Tk_Outline;
01206 
01207 
01208 /*
01209  *--------------------------------------------------------------
01210  *
01211  * Procedure prototypes and structures used for managing images:
01212  *
01213  *--------------------------------------------------------------
01214  */
01215 
01216 typedef struct Tk_ImageType Tk_ImageType;
01217 #ifdef USE_OLD_IMAGE
01218 typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,
01219         char *name, int argc, char **argv, Tk_ImageType *typePtr,
01220         Tk_ImageMaster master, ClientData *masterDataPtr));
01221 #else
01222 typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,
01223         char *name, int objc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr,
01224         Tk_ImageMaster master, ClientData *masterDataPtr));
01225 #endif
01226 typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,
01227         ClientData masterData));
01228 typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData,
01229         Display *display, Drawable drawable, int imageX, int imageY,
01230         int width, int height, int drawableX, int drawableY));
01231 typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData,
01232         Display *display));
01233 typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData));
01234 typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData,
01235         int x, int y, int width, int height, int imageWidth,
01236         int imageHeight));
01237 typedef int (Tk_ImagePostscriptProc) _ANSI_ARGS_((ClientData clientData,
01238         Tcl_Interp *interp, Tk_Window tkwin, Tk_PostscriptInfo psinfo,
01239         int x, int y, int width, int height, int prepass));
01240 
01241 /*
01242  * The following structure represents a particular type of image
01243  * (bitmap, xpm image, etc.).  It provides information common to
01244  * all images of that type, such as the type name and a collection
01245  * of procedures in the image manager that respond to various
01246  * events.  Each image manager is represented by one of these
01247  * structures.
01248  */
01249 
01250 struct Tk_ImageType {
01251     char *name;                 /* Name of image type. */
01252     Tk_ImageCreateProc *createProc;
01253                                 /* Procedure to call to create a new image
01254                                  * of this type. */
01255     Tk_ImageGetProc *getProc;   /* Procedure to call the first time
01256                                  * Tk_GetImage is called in a new way
01257                                  * (new visual or screen). */
01258     Tk_ImageDisplayProc *displayProc;
01259                                 /* Call to draw image, in response to
01260                                  * Tk_RedrawImage calls. */
01261     Tk_ImageFreeProc *freeProc; /* Procedure to call whenever Tk_FreeImage
01262                                  * is called to release an instance of an
01263                                  * image. */
01264     Tk_ImageDeleteProc *deleteProc;
01265                                 /* Procedure to call to delete image.  It
01266                                  * will not be called until after freeProc
01267                                  * has been called for each instance of the
01268                                  * image. */
01269     Tk_ImagePostscriptProc *postscriptProc;
01270                                 /* Procedure to call to produce postscript
01271                                  * output for the image. */
01272     struct Tk_ImageType *nextPtr;
01273                                 /* Next in list of all image types currently
01274                                  * known.  Filled in by Tk, not by image
01275                                  * manager. */
01276     char *reserved;             /* reserved for future expansion */
01277 };
01278 
01279 /*
01280  *--------------------------------------------------------------
01281  *
01282  * Additional definitions used to manage images of type "photo".
01283  *
01284  *--------------------------------------------------------------
01285  */
01286 
01287 /*
01288  * The following type is used to identify a particular photo image
01289  * to be manipulated:
01290  */
01291 
01292 typedef void *Tk_PhotoHandle;
01293 
01294 /*
01295  * The following structure describes a block of pixels in memory:
01296  */
01297 
01298 typedef struct Tk_PhotoImageBlock {
01299     unsigned char *pixelPtr;    /* Pointer to the first pixel. */
01300     int         width;          /* Width of block, in pixels. */
01301     int         height;         /* Height of block, in pixels. */
01302     int         pitch;          /* Address difference between corresponding
01303                                  * pixels in successive lines. */
01304     int         pixelSize;      /* Address difference between successive
01305                                  * pixels in the same line. */
01306     int         offset[4];      /* Address differences between the red, green,
01307                                  * blue and alpha components of the pixel and
01308                                  * the pixel as a whole. */
01309 } Tk_PhotoImageBlock;
01310 
01311 /*
01312  * The following values control how blocks are combined into photo
01313  * images when the alpha component of a pixel is not 255, a.k.a. the
01314  * compositing rule.
01315  */
01316 
01317 #define TK_PHOTO_COMPOSITE_OVERLAY      0
01318 #define TK_PHOTO_COMPOSITE_SET          1
01319 
01320 /*
01321  * Procedure prototypes and structures used in reading and
01322  * writing photo images:
01323  */
01324 
01325 typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;
01326 #ifdef USE_OLD_IMAGE
01327 typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,
01328         char *fileName, char *formatString, int *widthPtr, int *heightPtr));
01329 typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string,
01330         char *formatString, int *widthPtr, int *heightPtr));
01331 typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
01332         Tcl_Channel chan, char *fileName, char *formatString,
01333         Tk_PhotoHandle imageHandle, int destX, int destY,
01334         int width, int height, int srcX, int srcY));
01335 typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
01336         char *string, char *formatString, Tk_PhotoHandle imageHandle,
01337         int destX, int destY, int width, int height, int srcX, int srcY));
01338 typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
01339         char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr));
01340 typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
01341         Tcl_DString *dataPtr, char *formatString,
01342         Tk_PhotoImageBlock *blockPtr));
01343 #else
01344 typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,
01345         CONST char *fileName, Tcl_Obj *format, int *widthPtr,
01346         int *heightPtr, Tcl_Interp *interp));
01347 typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Obj *dataObj,
01348         Tcl_Obj *format, int *widthPtr, int *heightPtr,
01349         Tcl_Interp *interp));
01350 typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
01351         Tcl_Channel chan, CONST char *fileName, Tcl_Obj *format,
01352         Tk_PhotoHandle imageHandle, int destX, int destY,
01353         int width, int height, int srcX, int srcY));
01354 typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
01355         Tcl_Obj *dataObj, Tcl_Obj *format, Tk_PhotoHandle imageHandle,
01356         int destX, int destY, int width, int height, int srcX, int srcY));
01357 typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
01358         CONST char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
01359 typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
01360         Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
01361 #endif
01362 
01363 /*
01364  * The following structure represents a particular file format for
01365  * storing images (e.g., PPM, GIF, JPEG, etc.).  It provides information
01366  * to allow image files of that format to be recognized and read into
01367  * a photo image.
01368  */
01369 
01370 struct Tk_PhotoImageFormat {
01371     char *name;                 /* Name of image file format */
01372     Tk_ImageFileMatchProc *fileMatchProc;
01373                                 /* Procedure to call to determine whether
01374                                  * an image file matches this format. */
01375     Tk_ImageStringMatchProc *stringMatchProc;
01376                                 /* Procedure to call to determine whether
01377                                  * the data in a string matches this format. */
01378     Tk_ImageFileReadProc *fileReadProc;
01379                                 /* Procedure to call to read data from
01380                                  * an image file into a photo image. */
01381     Tk_ImageStringReadProc *stringReadProc;
01382                                 /* Procedure to call to read data from
01383                                  * a string into a photo image. */
01384     Tk_ImageFileWriteProc *fileWriteProc;
01385                                 /* Procedure to call to write data from
01386                                  * a photo image to a file. */
01387     Tk_ImageStringWriteProc *stringWriteProc;
01388                                 /* Procedure to call to obtain a string
01389                                  * representation of the data in a photo
01390                                  * image.*/
01391     struct Tk_PhotoImageFormat *nextPtr;
01392                                 /* Next in list of all photo image formats
01393                                  * currently known.  Filled in by Tk, not
01394                                  * by image format handler. */
01395 };
01396 
01397 EXTERN void             Tk_CreateOldImageType _ANSI_ARGS_((
01398                                 Tk_ImageType *typePtr));
01399 EXTERN void             Tk_CreateOldPhotoImageFormat _ANSI_ARGS_((
01400                                 Tk_PhotoImageFormat *formatPtr));
01401 
01402 #if !defined(USE_TK_STUBS) && defined(USE_OLD_IMAGE)
01403 #define Tk_CreateImageType Tk_CreateOldImageType
01404 #define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat
01405 #endif
01406 
01407 
01408 /*
01409  *--------------------------------------------------------------
01410  *
01411  * Procedure prototypes and structures used for managing styles:
01412  *
01413  *--------------------------------------------------------------
01414  */
01415 
01416 /*
01417  * Style support version tag.
01418  */
01419 #define TK_STYLE_VERSION_1      0x1
01420 #define TK_STYLE_VERSION        TK_STYLE_VERSION_1
01421 
01422 /*
01423  * The following structures and prototypes are used as static templates to
01424  * declare widget elements.
01425  */
01426 
01427 typedef void (Tk_GetElementSizeProc) _ANSI_ARGS_((ClientData clientData,
01428         char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin,
01429         int width, int height, int inner, int *widthPtr, int *heightPtr));
01430 typedef void (Tk_GetElementBoxProc) _ANSI_ARGS_((ClientData clientData,
01431         char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin,
01432         int x, int y, int width, int height, int inner, int *xPtr, int *yPtr,
01433         int *widthPtr, int *heightPtr));
01434 typedef int (Tk_GetElementBorderWidthProc) _ANSI_ARGS_((ClientData clientData,
01435         char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin));
01436 typedef void (Tk_DrawElementProc) _ANSI_ARGS_((ClientData clientData,
01437         char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin,
01438         Drawable d, int x, int y, int width, int height, int state));
01439 
01440 typedef struct Tk_ElementOptionSpec {
01441     char *name;                 /* Name of the required option. */
01442     Tk_OptionType type;         /* Accepted option type. TK_OPTION_END means
01443                                  * any. */
01444 } Tk_ElementOptionSpec;
01445 
01446 typedef struct Tk_ElementSpec {
01447     int version;                /* Version of the style support. */
01448     char *name;                 /* Name of element. */
01449     Tk_ElementOptionSpec *options;
01450                                 /* List of required options. Last one's name
01451                                  * must be NULL. */
01452 
01453     /*
01454      * Hooks
01455      */
01456 
01457     Tk_GetElementSizeProc *getSize;
01458                                 /* Compute the external (resp. internal) size of
01459                                  * the element from its desired internal (resp.
01460                                  * external) size. */
01461     Tk_GetElementBoxProc *getBox;
01462                                 /* Compute the inscribed or bounding boxes
01463                                  * within a given area. */
01464     Tk_GetElementBorderWidthProc *getBorderWidth;
01465                                 /* Return the element's internal border width.
01466                                  * Mostly useful for widgets. */
01467     Tk_DrawElementProc *draw;   /* Draw the element in the given bounding box.*/
01468 } Tk_ElementSpec;
01469 
01470 /*
01471  * Element state flags. Can be OR'ed.
01472  */
01473 
01474 #define TK_ELEMENT_STATE_ACTIVE         1<<0
01475 #define TK_ELEMENT_STATE_DISABLED       1<<1
01476 #define TK_ELEMENT_STATE_FOCUS          1<<2
01477 #define TK_ELEMENT_STATE_PRESSED        1<<3
01478 
01479 /*
01480  *--------------------------------------------------------------
01481  *
01482  * The definitions below provide backward compatibility for
01483  * functions and types related to event handling that used to
01484  * be in Tk but have moved to Tcl.
01485  *
01486  *--------------------------------------------------------------
01487  */
01488 
01489 #define TK_READABLE             TCL_READABLE
01490 #define TK_WRITABLE             TCL_WRITABLE
01491 #define TK_EXCEPTION            TCL_EXCEPTION
01492 
01493 #define TK_DONT_WAIT            TCL_DONT_WAIT
01494 #define TK_X_EVENTS             TCL_WINDOW_EVENTS
01495 #define TK_WINDOW_EVENTS        TCL_WINDOW_EVENTS
01496 #define TK_FILE_EVENTS          TCL_FILE_EVENTS
01497 #define TK_TIMER_EVENTS         TCL_TIMER_EVENTS
01498 #define TK_IDLE_EVENTS          TCL_IDLE_EVENTS
01499 #define TK_ALL_EVENTS           TCL_ALL_EVENTS
01500 
01501 #define Tk_IdleProc             Tcl_IdleProc
01502 #define Tk_FileProc             Tcl_FileProc
01503 #define Tk_TimerProc            Tcl_TimerProc
01504 #define Tk_TimerToken           Tcl_TimerToken
01505 
01506 #define Tk_BackgroundError      Tcl_BackgroundError
01507 #define Tk_CancelIdleCall       Tcl_CancelIdleCall
01508 #define Tk_CreateFileHandler    Tcl_CreateFileHandler
01509 #define Tk_CreateTimerHandler   Tcl_CreateTimerHandler
01510 #define Tk_DeleteFileHandler    Tcl_DeleteFileHandler
01511 #define Tk_DeleteTimerHandler   Tcl_DeleteTimerHandler
01512 #define Tk_DoOneEvent           Tcl_DoOneEvent
01513 #define Tk_DoWhenIdle           Tcl_DoWhenIdle
01514 #define Tk_Sleep                Tcl_Sleep
01515 
01516 /* Additional stuff that has moved to Tcl: */
01517 
01518 #define Tk_EventuallyFree       Tcl_EventuallyFree
01519 #define Tk_FreeProc             Tcl_FreeProc
01520 #define Tk_Preserve             Tcl_Preserve
01521 #define Tk_Release              Tcl_Release
01522 
01523 /* Removed Tk_Main, use macro instead */
01524 #define Tk_Main(argc, argv, proc) \
01525     Tk_MainEx(argc, argv, proc, Tcl_CreateInterp())
01526 
01527 CONST char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact));
01528 
01529 #ifndef USE_TK_STUBS
01530 
01531 #define Tk_InitStubs(interp, version, exact) \
01532     Tcl_PkgRequire(interp, "Tk", version, exact)
01533 
01534 #endif
01535 
01536 void Tk_InitImageArgs _ANSI_ARGS_((Tcl_Interp *interp, int argc, char ***argv));
01537 
01538 #if !defined(USE_TK_STUBS) || !defined(USE_OLD_IMAGE)
01539 
01540 #define Tk_InitImageArgs(interp, argc, argv) /**/
01541 
01542 #endif
01543 
01544 
01545 /*
01546  *--------------------------------------------------------------
01547  *
01548  * Additional procedure types defined by Tk.
01549  *
01550  *--------------------------------------------------------------
01551  */
01552 
01553 typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData,
01554         XErrorEvent *errEventPtr));
01555 typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData,
01556         XEvent *eventPtr));
01557 typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData,
01558         XEvent *eventPtr));
01559 typedef int (Tk_ClientMessageProc) _ANSI_ARGS_((Tk_Window tkwin,
01560         XEvent *eventPtr));
01561 typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData,
01562         Tcl_Interp *interp, char *portion));
01563 typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData));
01564 typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_((
01565         ClientData clientData, XEvent *eventPtr));
01566 typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData,
01567         int offset, char *buffer, int maxBytes));
01568 
01569 
01570 /*
01571  *--------------------------------------------------------------
01572  *
01573  * Platform independant exported procedures and variables.
01574  *
01575  *--------------------------------------------------------------
01576  */
01577 
01578 #include "tkDecls.h"
01579 
01580 /*
01581  * Allow users to say that they don't want to alter their source to
01582  * add the extra argument to Tk_PhotoPutBlock(); DO NOT DEFINE THIS
01583  * WHEN BUILDING TK.
01584  *
01585  * This goes after the inclusion of the stubbed-decls so that the
01586  * declarations of what is actually there can be correct.
01587  */
01588 
01589 #ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK
01590 #   ifdef Tk_PhotoPutBlock
01591 #       undef Tk_PhotoPutBlock
01592 #   endif
01593 #   define Tk_PhotoPutBlock             Tk_PhotoPutBlock_NoComposite
01594 #   ifdef Tk_PhotoPutZoomedBlock
01595 #       undef Tk_PhotoPutZoomedBlock
01596 #   endif
01597 #   define Tk_PhotoPutZoomedBlock       Tk_PhotoPutZoomedBlock_NoComposite
01598 #endif /* USE_COMPOSITELESS_PHOTO_PUT_BLOCK */
01599 
01600 /*
01601  * Tcl commands exported by Tk:
01602  */
01603 
01604 
01605 #undef TCL_STORAGE_CLASS
01606 #define TCL_STORAGE_CLASS DLLIMPORT
01607 
01608 #endif /* RC_INVOKED */
01609 
01610 /*
01611  * end block for C++
01612  */
01613     
01614 #ifdef __cplusplus
01615 }
01616 #endif
01617     
01618 #endif /* _TK */
01619 
01620 /*
01621  * Local Variables:
01622  * mode: C
01623  * tab-width: 8
01624  * c-basic-offset: 4
01625  * indent-tabs-mode: t
01626  * End:
01627  * ex: shiftwidth=4 tabstop=8
01628  */

Generated on Mon Sep 18 01:24:44 2006 for BRL-CAD by  doxygen 1.4.6