home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _de00506e8e45faede35e18eb8a5b2843 < prev    next >
Encoding:
Text File  |  2004-06-01  |  42.4 KB  |  1,199 lines

  1. /*
  2.  * tkInt.h --
  3.  *
  4.  *    Declarations for things used internally by the Tk
  5.  *    procedures but not exported outside the module.
  6.  *
  7.  * Copyright (c) 1990-1994 The Regents of the University of California.
  8.  * Copyright (c) 1994-1997 Sun Microsystems, Inc.
  9.  * Copyright (c) 1998 by Scriptics Corporation.
  10.  *
  11.  * See the file "license.terms" for information on usage and redistribution
  12.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  13.  *
  14.  * RCS: $Id: tkInt.h,v 1.56.2.1 2003/10/13 03:30:05 hobbs Exp $
  15.  */
  16.  
  17. #ifndef _TKINT
  18. #define _TKINT
  19.  
  20. #ifndef _TK
  21. #include "tk.h"
  22. #endif
  23. #ifdef BUILD_tk
  24. # undef TCL_STORAGE_CLASS
  25. # define TCL_STORAGE_CLASS DLLEXPORT
  26. #endif
  27.  
  28. /*
  29.  * Opaque type declarations:
  30.  */
  31.  
  32. typedef struct TkColormap TkColormap;
  33. typedef struct TkGrabEvent TkGrabEvent;
  34. typedef struct TkpCursor_ *TkpCursor;
  35. typedef struct TkRegion_ *TkRegion;
  36. typedef struct TkStressedCmap TkStressedCmap;
  37. typedef struct TkBindInfo_ *TkBindInfo;
  38.  
  39. /*
  40.  * Procedure types.
  41.  */
  42.  
  43. typedef int (TkBindEvalProc) _ANSI_ARGS_((ClientData clientData,
  44.     Tcl_Interp *interp, XEvent *eventPtr, Tk_Window tkwin,
  45.     KeySym keySym));
  46. typedef void (TkBindFreeProc) _ANSI_ARGS_((ClientData clientData));
  47.  
  48. /*
  49.  * One of the following structures is maintained for each cursor in
  50.  * use in the system.  This structure is used by tkCursor.c and the
  51.  * various system specific cursor files.
  52.  */
  53.  
  54. typedef struct TkCursor {
  55.     Tk_Cursor cursor;        /* System specific identifier for cursor. */
  56.     Display *display;        /* Display containing cursor. Needed for
  57.                  * disposal and retrieval of cursors. */
  58.     int resourceRefCount;    /* Number of active uses of this cursor (each
  59.                  * active use corresponds to a call to
  60.                  * Tk_AllocPreserveFromObj or Tk_Preserve).
  61.                  * If this count is 0, then this structure
  62.                  * is no longer valid and it isn't present
  63.                  * in a hash table: it is being kept around
  64.                  * only because there are objects referring
  65.                  * to it.  The structure is freed when
  66.                  * resourceRefCount and objRefCount are
  67.                  * both 0. */
  68.     int objRefCount;        /* Number of Tcl objects that reference
  69.                  * this structure.. */
  70.     Tcl_HashTable *otherTable;    /* Second table (other than idTable) used
  71.                  * to index this entry. */
  72.     Tcl_HashEntry *hashPtr;    /* Entry in otherTable for this structure
  73.                  * (needed when deleting). */
  74.     Tcl_HashEntry *idHashPtr;    /* Entry in idTable for this structure
  75.                  * (needed when deleting). */
  76.     struct TkCursor *nextPtr;    /* Points to the next TkCursor structure with
  77.                  * the same name.  Cursors with the same
  78.                  * name but different displays are chained
  79.                  * together off a single hash table entry. */
  80. } TkCursor;
  81.  
  82. /*
  83.  * This defines whether we should try to use XIM over-the-spot style
  84.  * input.  Allow users to override it.  It is a much more elegant use
  85.  * of XIM, but uses a bit more memory.
  86.  */
  87.  
  88. #ifndef TK_XIM_SPOT
  89. #   define TK_XIM_SPOT    1
  90. #endif
  91.  
  92. /*
  93.  * The following structure is kept one-per-TkDisplay to maintain information
  94.  * about the caret (cursor location) on this display.  This is used to
  95.  * dictate global focus location (Windows Accessibility guidelines) and to
  96.  * position the IME or XIM over-the-spot window.
  97.  */
  98.  
  99. typedef struct TkCaret {
  100.     struct TkWindow *winPtr;    /* the window on which we requested caret
  101.                  * placement */
  102.     int x;            /* relative x coord of the caret */
  103.     int y;            /* relative y coord of the caret */
  104.     int height;            /* specified height of the window */
  105. } TkCaret;
  106.  
  107. /*
  108.  * One of the following structures is maintained for each display
  109.  * containing a window managed by Tk.  In part, the structure is
  110.  * used to store thread-specific data, since each thread will have
  111.  * its own TkDisplay structure.
  112.  */
  113.  
  114. typedef struct TkDisplay {
  115.     Display *display;        /* Xlib's info about display. */
  116.     struct TkDisplay *nextPtr;    /* Next in list of all displays. */
  117.     char *name;            /* Name of display (with any screen
  118.                  * identifier removed).  Malloc-ed. */
  119.     Time lastEventTime;        /* Time of last event received for this
  120.                  * display. */
  121.  
  122.     /*
  123.      * Information used primarily by tk3d.c:
  124.      */
  125.  
  126.     int borderInit;             /* 0 means borderTable needs initializing. */
  127.     Tcl_HashTable borderTable;  /* Maps from color name to TkBorder
  128.                  * structure. */
  129.  
  130.     /*
  131.      * Information used by tkAtom.c only:
  132.      */
  133.  
  134.     int atomInit;        /* 0 means stuff below hasn't been
  135.                  * initialized yet. */
  136.     Tcl_HashTable nameTable;    /* Maps from names to Atom's. */
  137.     Tcl_HashTable atomTable;    /* Maps from Atom's back to names. */
  138.  
  139.     /*
  140.      * Information used primarily by tkBind.c:
  141.      */
  142.  
  143.     int bindInfoStale;        /* Non-zero means the variables in this
  144.                  * part of the structure are potentially
  145.                  * incorrect and should be recomputed. */
  146.     unsigned int modeModMask;    /* Has one bit set to indicate the modifier
  147.                  * corresponding to "mode shift".  If no
  148.                  * such modifier, than this is zero. */
  149.     unsigned int metaModMask;    /* Has one bit set to indicate the modifier
  150.                  * corresponding to the "Meta" key.  If no
  151.                  * such modifier, then this is zero. */
  152.     unsigned int altModMask;    /* Has one bit set to indicate the modifier
  153.                  * corresponding to the "Meta" key.  If no
  154.                  * such modifier, then this is zero. */
  155.     enum {LU_IGNORE, LU_CAPS, LU_SHIFT} lockUsage;
  156.                 /* Indicates how to interpret lock modifier. */
  157.     int numModKeyCodes;        /* Number of entries in modKeyCodes array
  158.                  * below. */
  159.     KeyCode *modKeyCodes;    /* Pointer to an array giving keycodes for
  160.                  * all of the keys that have modifiers
  161.                  * associated with them.  Malloc'ed, but
  162.                  * may be NULL. */
  163.  
  164.     /*
  165.      * Information used by tkBitmap.c only:
  166.      */
  167.  
  168.     int bitmapInit;             /* 0 means tables above need initializing. */
  169.     int bitmapAutoNumber;       /* Used to number bitmaps. */
  170.     Tcl_HashTable bitmapNameTable;
  171.                                 /* Maps from name of bitmap to the first
  172.                  * TkBitmap record for that name. */
  173.     Tcl_HashTable bitmapIdTable;/* Maps from bitmap id to the TkBitmap
  174.                  * structure for the bitmap. */
  175.     Tcl_HashTable bitmapDataTable;
  176.                                 /* Used by Tk_GetBitmapFromData to map from
  177.                  * a collection of in-core data about a
  178.                  * bitmap to a reference giving an auto-
  179.                  * matically-generated name for the bitmap. */
  180.  
  181.     /*
  182.      * Information used by tkCanvas.c only:
  183.      */
  184.  
  185.     int numIdSearches;
  186.     int numSlowSearches;
  187.  
  188.     /*
  189.      * Used by tkColor.c only:
  190.      */
  191.  
  192.     int colorInit;              /* 0 means color module needs initializing. */
  193.     TkStressedCmap *stressPtr;    /* First in list of colormaps that have
  194.                  * filled up, so we have to pick an
  195.                  * approximate color. */
  196.     Tcl_HashTable colorNameTable;
  197.                                 /* Maps from color name to TkColor structure
  198.                  * for that color. */
  199.     Tcl_HashTable colorValueTable;
  200.                                 /* Maps from integer RGB values to TkColor
  201.                  * structures. */
  202.  
  203.     /*
  204.      * Used by tkCursor.c only:
  205.      */
  206.  
  207.     int cursorInit;             /* 0 means cursor module need initializing. */
  208.     Tcl_HashTable cursorNameTable;
  209.                                 /* Maps from a string name to a cursor to the
  210.                  * TkCursor record for the cursor. */
  211.     Tcl_HashTable cursorDataTable;
  212.                                 /* Maps from a collection of in-core data
  213.                  * about a cursor to a TkCursor structure. */
  214.     Tcl_HashTable cursorIdTable;
  215.                                 /* Maps from a cursor id to the TkCursor
  216.                  * structure for the cursor. */
  217.     char cursorString[20];      /* Used to store a cursor id string. */
  218.     Font cursorFont;        /* Font to use for standard cursors.
  219.                  * None means font not loaded yet. */
  220.  
  221.     /*
  222.      * Information used by tkError.c only:
  223.      */
  224.  
  225.     struct TkErrorHandler *errorPtr;
  226.                 /* First in list of error handlers
  227.                  * for this display.  NULL means
  228.                  * no handlers exist at present. */
  229.     int deleteCount;        /* Counts # of handlers deleted since
  230.                  * last time inactive handlers were
  231.                  * garbage-collected.  When this number
  232.                  * gets big, handlers get cleaned up. */
  233.  
  234.     /*
  235.      * Used by tkEvent.c only:
  236.      */
  237.  
  238.     struct TkWindowEvent *delayedMotionPtr;
  239.                 /* Points to a malloc-ed motion event
  240.                  * whose processing has been delayed in
  241.                  * the hopes that another motion event
  242.                  * will come along right away and we can
  243.                  * merge the two of them together.  NULL
  244.                  * means that there is no delayed motion
  245.                  * event. */
  246.  
  247.     /*
  248.      * Information used by tkFocus.c only:
  249.      */
  250.  
  251.     int focusDebug;             /* 1 means collect focus debugging
  252.                  * statistics. */
  253.     struct TkWindow *implicitWinPtr;
  254.                 /* If the focus arrived at a toplevel window
  255.                  * implicitly via an Enter event (rather
  256.                  * than via a FocusIn event), this points
  257.                  * to the toplevel window.  Otherwise it is
  258.                  * NULL. */
  259.     struct TkWindow *focusPtr;    /* Points to the window on this display that
  260.                  * should be receiving keyboard events.  When
  261.                  * multiple applications on the display have
  262.                  * the focus, this will refer to the
  263.                  * innermost window in the innermost
  264.                  * application.  This information isn't used
  265.                  * under Unix or Windows, but it's needed on
  266.                  * the Macintosh. */
  267.  
  268.     /*
  269.      * Information used by tkGC.c only:
  270.      */
  271.  
  272.     Tcl_HashTable gcValueTable; /* Maps from a GC's values to a TkGC structure
  273.                  * describing a GC with those values. */
  274.     Tcl_HashTable gcIdTable;    /* Maps from a GC to a TkGC. */
  275.     int gcInit;                 /* 0 means the tables below need
  276.                  * initializing. */
  277.  
  278.     /*
  279.      * Information used by tkGeometry.c only:
  280.      */
  281.  
  282.     Tcl_HashTable maintainHashTable;
  283.                                 /* Hash table that maps from a master's
  284.                  * Tk_Window token to a list of slaves
  285.                  * managed by that master. */
  286.     int geomInit;
  287.  
  288.     /*
  289.      * Information used by tkGet.c only:
  290.      */
  291.  
  292.     Tcl_HashTable uidTable;     /* Stores all Tk_Uid  used in a thread. */
  293.     int uidInit;                /* 0 means uidTable needs initializing. */
  294.  
  295.     /*
  296.      * Information used by tkGrab.c only:
  297.      */
  298.  
  299.     struct TkWindow *grabWinPtr;
  300.                 /* Window in which the pointer is currently
  301.                  * grabbed, or NULL if none. */
  302.     struct TkWindow *eventualGrabWinPtr;
  303.                 /* Value that grabWinPtr will have once the
  304.                  * grab event queue (below) has been
  305.                  * completely emptied. */
  306.     struct TkWindow *buttonWinPtr;
  307.                 /* Window in which first mouse button was
  308.                  * pressed while grab was in effect, or NULL
  309.                  * if no such press in effect. */
  310.     struct TkWindow *serverWinPtr;
  311.                 /* If no application contains the pointer then
  312.                  * this is NULL.  Otherwise it contains the
  313.                  * last window for which we've gotten an
  314.                  * Enter or Leave event from the server (i.e.
  315.                  * the last window known to have contained
  316.                  * the pointer).  Doesn't reflect events
  317.                  * that were synthesized in tkGrab.c. */
  318.     TkGrabEvent *firstGrabEventPtr;
  319.                 /* First in list of enter/leave events
  320.                  * synthesized by grab code.  These events
  321.                  * must be processed in order before any other
  322.                  * events are processed.  NULL means no such
  323.                  * events. */
  324.     TkGrabEvent *lastGrabEventPtr;
  325.                 /* Last in list of synthesized events, or NULL
  326.                  * if list is empty. */
  327.     int grabFlags;        /* Miscellaneous flag values.  See definitions
  328.                  * in tkGrab.c. */
  329.  
  330.     /*
  331.      * Information used by tkGrid.c only:
  332.      */
  333.  
  334.     int gridInit;               /* 0 means table below needs initializing. */
  335.     Tcl_HashTable gridHashTable;/* Maps from Tk_Window tokens to
  336.                  * corresponding Grid structures. */
  337.  
  338.     /*
  339.      * Information used by tkImage.c only:
  340.      */
  341.  
  342.     int imageId;                /* Value used to number image ids. */
  343.  
  344.     /*
  345.      * Information used by tkMacWinMenu.c only:
  346.      */
  347.  
  348.     int postCommandGeneration;
  349.  
  350.     /*
  351.      * Information used by tkOption.c only.
  352.      */
  353.  
  354.  
  355.  
  356.     /*
  357.      * Information used by tkPack.c only.
  358.      */
  359.  
  360.     int packInit;              /* 0 means table below needs initializing. */
  361.     Tcl_HashTable packerHashTable;
  362.                                /* Maps from Tk_Window tokens to
  363.                 * corresponding Packer structures. */
  364.  
  365.  
  366.     /*
  367.      * Information used by tkPlace.c only.
  368.      */
  369.  
  370.     int placeInit;              /* 0 means tables below need initializing. */
  371.     Tcl_HashTable masterTable;  /* Maps from Tk_Window toke to the Master
  372.                  * structure for the window, if it exists. */
  373.     Tcl_HashTable slaveTable;   /* Maps from Tk_Window toke to the Slave
  374.                  * structure for the window, if it exists. */
  375.  
  376.     /*
  377.      * Information used by tkSelect.c and tkClipboard.c only:
  378.      */
  379.  
  380.     struct TkSelectionInfo *selectionInfoPtr;
  381.                 /* First in list of selection information
  382.                  * records.  Each entry contains information
  383.                  * about the current owner of a particular
  384.                  * selection on this display. */
  385.     Atom multipleAtom;        /* Atom for MULTIPLE.  None means
  386.                  * selection stuff isn't initialized. */
  387.     Atom incrAtom;        /* Atom for INCR. */
  388.     Atom targetsAtom;        /* Atom for TARGETS. */
  389.     Atom timestampAtom;        /* Atom for TIMESTAMP. */
  390.     Atom textAtom;        /* Atom for TEXT. */
  391.     Atom compoundTextAtom;    /* Atom for COMPOUND_TEXT. */
  392.     Atom applicationAtom;    /* Atom for TK_APPLICATION. */
  393.     Atom windowAtom;        /* Atom for TK_WINDOW. */
  394.     Atom clipboardAtom;        /* Atom for CLIPBOARD. */
  395.     Atom utf8Atom;        /* Atom for UTF8_STRING. */
  396.  
  397.     Tk_Window clipWindow;    /* Window used for clipboard ownership and to
  398.                  * retrieve selections between processes. NULL
  399.                  * means clipboard info hasn't been
  400.                  * initialized. */
  401.     int clipboardActive;    /* 1 means we currently own the clipboard
  402.                  * selection, 0 means we don't. */
  403.     struct TkMainInfo *clipboardAppPtr;
  404.                 /* Last application that owned clipboard. */
  405.     struct TkClipboardTarget *clipTargetPtr;
  406.                 /* First in list of clipboard type information
  407.                  * records.  Each entry contains information
  408.                  * about the buffers for a given selection
  409.                  * target. */
  410.  
  411.     /*
  412.      * Information used by tkSend.c only:
  413.      */
  414.  
  415.     Tk_Window commTkwin;    /* Window used for communication
  416.                  * between interpreters during "send"
  417.                  * commands.  NULL means send info hasn't
  418.                  * been initialized yet. */
  419.     Atom commProperty;        /* X's name for comm property. */
  420.     Atom registryProperty;    /* X's name for property containing
  421.                  * registry of interpreter names. */
  422.     Atom appNameProperty;    /* X's name for property used to hold the
  423.                  * application name on each comm window. */
  424.  
  425.     /*
  426.      * Information used by tkXId.c only:
  427.      */
  428.  
  429.     struct TkIdStack *idStackPtr;
  430.                 /* First in list of chunks of free resource
  431.                  * identifiers, or NULL if there are no free
  432.                  * resources. */
  433.     XID (*defaultAllocProc) _ANSI_ARGS_((Display *display));
  434.                 /* Default resource allocator for display. */
  435.     struct TkIdStack *windowStackPtr;
  436.                 /* First in list of chunks of window
  437.                  * identifers that can't be reused right
  438.                  * now. */
  439.     Tcl_TimerToken idCleanupScheduled;
  440.                 /* If set, it means a call to WindowIdCleanup
  441.                  * has already been scheduled, 0 means it
  442.                  * hasn't. */
  443.  
  444.     /*
  445.      * Information used by tkUnixWm.c and tkWinWm.c only:
  446.      */
  447.  
  448.     struct TkWmInfo *firstWmPtr;  /* Points to first top-level window. */
  449.     struct TkWmInfo *foregroundWmPtr;
  450.                                 /* Points to the foreground window. */
  451.  
  452.     /*
  453.      * Information maintained by tkWindow.c for use later on by tkXId.c:
  454.      */
  455.  
  456.  
  457.     int destroyCount;        /* Number of Tk_DestroyWindow operations
  458.                  * in progress. */
  459.     unsigned long lastDestroyRequest;
  460.                 /* Id of most recent XDestroyWindow request;
  461.                  * can re-use ids in windowStackPtr when
  462.                  * server has seen this request and event
  463.                  * queue is empty. */
  464.  
  465.     /*
  466.      * Information used by tkVisual.c only:
  467.      */
  468.  
  469.     TkColormap *cmapPtr;    /* First in list of all non-default colormaps
  470.                  * allocated for this display. */
  471.  
  472.     /*
  473.      * Miscellaneous information:
  474.      */
  475.  
  476. #ifdef TK_USE_INPUT_METHODS
  477.     XIM inputMethod;        /* Input method for this display */
  478. #if TK_XIM_SPOT
  479.     XFontSet inputXfs;        /* XFontSet cached for over-the-spot XIM. */
  480. #endif
  481. #endif /* TK_USE_INPUT_METHODS */
  482.     Tcl_HashTable winTable;    /* Maps from X window ids to TkWindow ptrs. */
  483.  
  484.     int refCount;        /* Reference count of how many Tk applications
  485.                                  * are using this display. Used to clean up
  486.                                  * the display when we no longer have any
  487.                                  * Tk applications using it.
  488.                                  */
  489.     /*
  490.      * The following field were all added for Tk8.3
  491.      */
  492.     int mouseButtonState;    /* current mouse button state for this
  493.                  * display */
  494.     Window mouseButtonWindow;    /* Window the button state was set in,
  495.                  * added in Tk 8.4. */
  496.     Window warpWindow;
  497.     int warpX;
  498.     int warpY;
  499.  
  500.     /*
  501.      * The following field(s) were all added for Tk8.4
  502.      */
  503.     unsigned int flags;        /* Various flag values:  these are all
  504.                  * defined in below. */
  505.     TkCaret caret;        /* information about the caret for this
  506.                  * display.  This is not a pointer. */
  507. } TkDisplay;
  508.  
  509. /*
  510.  * Flag values for TkDisplay flags.
  511.  *  TK_DISPLAY_COLLAPSE_MOTION_EVENTS:    (default on)
  512.  *    Indicates that we should collapse motion events on this display
  513.  *  TK_DISPLAY_USE_IM:            (default on, set via tk.tcl)
  514.  *    Whether to use input methods for this display
  515.  *  TK_DISPLAY_XIM_SPOT:        (default off)
  516.  *    Indicates that we should use over-the-spot XIM on this display
  517.  *  TK_DISPLAY_WM_TRACING:        (default off)
  518.  *    Whether we should do wm tracing on this display.
  519.  *  TK_DISPLAY_IN_WARP:            (default off)
  520.  *    Indicates that we are in a pointer warp
  521.  */
  522.  
  523. #define TK_DISPLAY_COLLAPSE_MOTION_EVENTS    (1 << 0)
  524. #define TK_DISPLAY_USE_IM            (1 << 1)
  525. #define TK_DISPLAY_XIM_SPOT            (1 << 2)
  526. #define TK_DISPLAY_WM_TRACING            (1 << 3)
  527. #define TK_DISPLAY_IN_WARP            (1 << 4)
  528.  
  529. /*
  530.  * One of the following structures exists for each error handler
  531.  * created by a call to Tk_CreateErrorHandler.  The structure
  532.  * is managed by tkError.c.
  533.  */
  534.  
  535. typedef struct TkErrorHandler {
  536.     TkDisplay *dispPtr;        /* Display to which handler applies. */
  537.     unsigned long firstRequest;    /* Only errors with serial numbers
  538.                  * >= to this are considered. */
  539.     unsigned long lastRequest;    /* Only errors with serial numbers
  540.                  * <= to this are considered.  This
  541.                  * field is filled in when XUnhandle
  542.                  * is called.  -1 means XUnhandle
  543.                  * hasn't been called yet. */
  544.     int error;            /* Consider only errors with this
  545.                  * error_code (-1 means consider
  546.                  * all errors). */
  547.     int request;        /* Consider only errors with this
  548.                  * major request code (-1 means
  549.                  * consider all major codes). */
  550.     int minorCode;        /* Consider only errors with this
  551.                  * minor request code (-1 means
  552.                  * consider all minor codes). */
  553.     Tk_ErrorProc *errorProc;    /* Procedure to invoke when a matching
  554.                  * error occurs.  NULL means just ignore
  555.                  * errors. */
  556.     ClientData clientData;    /* Arbitrary value to pass to
  557.                  * errorProc. */
  558.     struct TkErrorHandler *nextPtr;
  559.                 /* Pointer to next older handler for
  560.                  * this display, or NULL for end of
  561.                  * list. */
  562. } TkErrorHandler;
  563.  
  564.  
  565. /*
  566.  * One of the following structures exists for each event handler
  567.  * created by calling Tk_CreateEventHandler.  This information
  568.  * is used by tkEvent.c only.
  569.  */
  570.  
  571. typedef struct TkEventHandler {
  572.     unsigned long mask;        /* Events for which to invoke
  573.                  * proc. */
  574.     Tk_EventProc *proc;        /* Procedure to invoke when an event
  575.                  * in mask occurs. */
  576.     ClientData clientData;    /* Argument to pass to proc. */
  577.     struct TkEventHandler *nextPtr;
  578.                 /* Next in list of handlers
  579.                  * associated with window (NULL means
  580.                  * end of list). */
  581. } TkEventHandler;
  582.  
  583. /*
  584.  * Tk keeps one of the following data structures for each main
  585.  * window (created by a call to TkCreateMainWindow).  It stores
  586.  * information that is shared by all of the windows associated
  587.  * with a particular main window.
  588.  */
  589.  
  590. typedef struct TkMainInfo {
  591.     int refCount;        /* Number of windows whose "mainPtr" fields
  592.                  * point here.  When this becomes zero, can
  593.                  * free up the structure (the reference
  594.                  * count is zero because windows can get
  595.                  * deleted in almost any order;  the main
  596.                  * window isn't necessarily the last one
  597.                  * deleted). */
  598.     struct TkWindow *winPtr;    /* Pointer to main window. */
  599.     Tcl_Interp *interp;        /* Interpreter associated with application. */
  600.     Tcl_HashTable nameTable;    /* Hash table mapping path names to TkWindow
  601.                  * structs for all windows related to this
  602.                  * main window.  Managed by tkWindow.c. */
  603.     long deletionEpoch;        /* Incremented by window deletions */
  604.     Tk_BindingTable bindingTable;
  605.                 /* Used in conjunction with "bind" command
  606.                  * to bind events to Tcl commands. */
  607.     TkBindInfo bindInfo;    /* Information used by tkBind.c on a per
  608.                  * application basis. */
  609.     struct TkFontInfo *fontInfoPtr;
  610.                 /* Information used by tkFont.c on a per
  611.                  * application basis. */
  612.  
  613.     /*
  614.      * Information used only by tkFocus.c and tk*Embed.c:
  615.      */
  616.  
  617.     struct TkToplevelFocusInfo *tlFocusPtr;
  618.                 /* First in list of records containing focus
  619.                  * information for each top-level in the
  620.                  * application.  Used only by tkFocus.c. */
  621.     struct TkDisplayFocusInfo *displayFocusPtr;
  622.                 /* First in list of records containing focus
  623.                  * information for each display that this
  624.                  * application has ever used.  Used only
  625.                  * by tkFocus.c. */
  626.  
  627.     struct ElArray *optionRootPtr;
  628.                 /* Top level of option hierarchy for this
  629.                  * main window.  NULL means uninitialized.
  630.                  * Managed by tkOption.c. */
  631.     Tcl_HashTable imageTable;    /* Maps from image names to Tk_ImageMaster
  632.                  * structures.  Managed by tkImage.c. */
  633.     int strictMotif;        /* This is linked to the tk_strictMotif
  634.                  * global variable. */
  635.     struct TkMainInfo *nextPtr;    /* Next in list of all main windows managed by
  636.                  * this process. */
  637. } TkMainInfo;
  638.  
  639. /*
  640.  * Tk keeps the following data structure for each of it's builtin
  641.  * bitmaps.  This structure is only used by tkBitmap.c and other
  642.  * platform specific bitmap files.
  643.  */
  644.  
  645. typedef struct {
  646.     CONST char *source;        /* Bits for bitmap. */
  647.     int width, height;        /* Dimensions of bitmap. */
  648.     int native;            /* 0 means generic (X style) bitmap,
  649.                      * 1 means native style bitmap. */
  650. } TkPredefBitmap;
  651.  
  652. /*
  653.  * Tk keeps one of the following structures for each window.
  654.  * Some of the information (like size and location) is a shadow
  655.  * of information managed by the X server, and some is special
  656.  * information used here, such as event and geometry management
  657.  * information.  This information is (mostly) managed by tkWindow.c.
  658.  * WARNING: the declaration below must be kept consistent with the
  659.  * Tk_FakeWin structure in tk.h.  If you change one, be sure to
  660.  * change the other!!
  661.  */
  662.  
  663. typedef struct TkWindow {
  664.  
  665.     /*
  666.      * Structural information:
  667.      */
  668.  
  669.     Display *display;        /* Display containing window. */
  670.     TkDisplay *dispPtr;        /* Tk's information about display
  671.                  * for window. */
  672.     int screenNum;        /* Index of screen for window, among all
  673.                  * those for dispPtr. */
  674.     Visual *visual;        /* Visual to use for window.  If not default,
  675.                  * MUST be set before X window is created. */
  676.     int depth;            /* Number of bits/pixel. */
  677.     Window window;        /* X's id for window.   NULL means window
  678.                  * hasn't actually been created yet, or it's
  679.                  * been deleted. */
  680.     struct TkWindow *childList;    /* First in list of child windows,
  681.                  * or NULL if no children.  List is in
  682.                  * stacking order, lowest window first.*/
  683.     struct TkWindow *lastChildPtr;
  684.                 /* Last in list of child windows (highest
  685.                  * in stacking order), or NULL if no
  686.                  * children. */
  687.     struct TkWindow *parentPtr;    /* Pointer to parent window (logical
  688.                  * parent, not necessarily X parent).  NULL
  689.                  * means either this is the main window, or
  690.                  * the window's parent has already been
  691.                  * deleted. */
  692.     struct TkWindow *nextPtr;    /* Next higher sibling (in stacking order)
  693.                  * in list of children with same parent.  NULL
  694.                  * means end of list. */
  695.     TkMainInfo *mainPtr;    /* Information shared by all windows
  696.                  * associated with a particular main
  697.                  * window.  NULL means this window is
  698.                  * a rogue that isn't associated with
  699.                  * any application (at present, this
  700.                  * only happens for the dummy windows
  701.                  * used for "send" communication).  */
  702.  
  703.     /*
  704.      * Name and type information for the window:
  705.      */
  706.  
  707.     char *pathName;        /* Path name of window (concatenation
  708.                  * of all names between this window and
  709.                  * its top-level ancestor).  This is a
  710.                  * pointer into an entry in
  711.                  * mainPtr->nameTable.  NULL means that
  712.                  * the window hasn't been completely
  713.                  * created yet. */
  714.     Tk_Uid nameUid;        /* Name of the window within its parent
  715.                  * (unique within the parent). */
  716.     Tk_Uid classUid;        /* Class of the window.  NULL means window
  717.                  * hasn't been given a class yet. */
  718.  
  719.     /*
  720.      * Geometry and other attributes of window.  This information
  721.      * may not be updated on the server immediately;  stuff that
  722.      * hasn't been reflected in the server yet is called "dirty".
  723.      * At present, information can be dirty only if the window
  724.      * hasn't yet been created.
  725.      */
  726.  
  727.     XWindowChanges changes;    /* Geometry and other info about
  728.                  * window. */
  729.     unsigned int dirtyChanges;    /* Bits indicate fields of "changes"
  730.                  * that are dirty. */
  731.     XSetWindowAttributes atts;    /* Current attributes of window. */
  732.     unsigned long dirtyAtts;    /* Bits indicate fields of "atts"
  733.                  * that are dirty. */
  734.  
  735.     unsigned int flags;        /* Various flag values:  these are all
  736.                  * defined in tk.h (confusing, but they're
  737.                  * needed there for some query macros). */
  738.  
  739.     /*
  740.      * Information kept by the event manager (tkEvent.c):
  741.      */
  742.  
  743.     TkEventHandler *handlerList;/* First in list of event handlers
  744.                  * declared for this window, or
  745.                  * NULL if none. */
  746. #ifdef TK_USE_INPUT_METHODS
  747.     XIC inputContext;        /* XIM input context. */
  748. #endif /* TK_USE_INPUT_METHODS */
  749.  
  750.     /*
  751.      * Information used for event bindings (see "bind" and "bindtags"
  752.      * commands in tkCmds.c):
  753.      */
  754.  
  755.     ClientData *tagPtr;        /* Points to array of tags used for bindings
  756.                  * on this window.  Each tag is a Tk_Uid.
  757.                  * Malloc'ed.  NULL means no tags. */
  758.     int numTags;        /* Number of tags at *tagPtr. */
  759.  
  760.     /*
  761.      * Information used by tkOption.c to manage options for the
  762.      * window.
  763.      */
  764.  
  765.     int optionLevel;        /* -1 means no option information is
  766.                  * currently cached for this window.
  767.                  * Otherwise this gives the level in
  768.                  * the option stack at which info is
  769.                  * cached. */
  770.     /*
  771.      * Information used by tkSelect.c to manage the selection.
  772.      */
  773.  
  774.     struct TkSelHandler *selHandlerList;
  775.                 /* First in list of handlers for
  776.                  * returning the selection in various
  777.                  * forms. */
  778.  
  779.     /*
  780.      * Information used by tkGeometry.c for geometry management.
  781.      */
  782.  
  783.     Tk_GeomMgr *geomMgrPtr;    /* Information about geometry manager for
  784.                  * this window. */
  785.     ClientData geomData;    /* Argument for geometry manager procedures. */
  786.     int reqWidth, reqHeight;    /* Arguments from last call to
  787.                  * Tk_GeometryRequest, or 0's if
  788.                  * Tk_GeometryRequest hasn't been
  789.                  * called. */
  790.     int internalBorderLeft;    /* Width of internal border of window
  791.                  * (0 means no internal border).  Geometry
  792.                  * managers should not normally place children
  793.                  * on top of the border.
  794.                  * Fields for the other three sides are found
  795.                  * below. */
  796.  
  797.     /*
  798.      * Information maintained by tkWm.c for window manager communication.
  799.      */
  800.  
  801.     struct TkWmInfo *wmInfoPtr;    /* For top-level windows (and also
  802.                  * for special Unix menubar and wrapper
  803.                  * windows), points to structure with
  804.                  * wm-related info (see tkWm.c).  For
  805.                  * other windows, this is NULL. */
  806.  
  807.     /*
  808.      * Information used by widget classes.
  809.      */
  810.  
  811.     Tk_ClassProcs *classProcsPtr;
  812.     ClientData instanceData;
  813.  
  814.     /*
  815.      * Platform specific information private to each port.
  816.      */
  817.  
  818.     struct TkWindowPrivate *privatePtr;
  819.  
  820.     /*
  821.      * More information used by tkGeometry.c for geometry management.
  822.      */
  823.  
  824.     /* The remaining fields of internal border. */
  825.     int internalBorderRight;
  826.     int internalBorderTop;
  827.     int internalBorderBottom;
  828.  
  829.     int minReqWidth;        /* Minimum requested width. */
  830.     int minReqHeight;        /* Minimum requested height. */
  831. } TkWindow;
  832.  
  833. /*
  834.  * The following structure is used as a two way map between integers
  835.  * and strings, usually to map between an internal C representation
  836.  * and the strings used in Tcl.
  837.  */
  838.  
  839. typedef struct TkStateMap {
  840.     int numKey;            /* Integer representation of a value. */
  841.     char *strKey;        /* String representation of a value. */
  842. } TkStateMap;
  843.  
  844. /*
  845.  * This structure is used by the Mac and Window porting layers as
  846.  * the internal representation of a clip_mask in a GC.
  847.  */
  848.  
  849. typedef struct TkpClipMask {
  850.     int type;            /* One of TKP_CLIP_PIXMAP or TKP_CLIP_REGION */
  851.     union {
  852.     Pixmap pixmap;
  853.     TkRegion region;
  854.     } value;
  855. } TkpClipMask;
  856.  
  857. #define TKP_CLIP_PIXMAP 0
  858. #define TKP_CLIP_REGION 1
  859.  
  860. /*
  861.  * Pointer to first entry in list of all displays currently known.
  862.  */
  863.  
  864. extern TkDisplay *tkDisplayList;
  865.  
  866. /*
  867.  * Return values from TkGrabState:
  868.  */
  869.  
  870. #define TK_GRAB_NONE        0
  871. #define TK_GRAB_IN_TREE        1
  872. #define TK_GRAB_ANCESTOR    2
  873. #define TK_GRAB_EXCLUDED    3
  874.  
  875. /*
  876.  * The macro below is used to modify a "char" value (e.g. by casting
  877.  * it to an unsigned character) so that it can be used safely with
  878.  * macros such as isspace.
  879.  */
  880.  
  881. #define UCHAR(c) ((unsigned char) (c))
  882.  
  883. /*
  884.  * The following symbol is used in the mode field of FocusIn events
  885.  * generated by an embedded application to request the input focus from
  886.  * its container.
  887.  */
  888.  
  889. #define EMBEDDED_APP_WANTS_FOCUS (NotifyNormal + 20)
  890.  
  891. /*
  892.  * The following special modifier mask bits are defined, to indicate
  893.  * logical modifiers such as Meta and Alt that may float among the
  894.  * actual modifier bits.
  895.  */
  896.  
  897. #define META_MASK    (AnyModifier<<1)
  898. #define ALT_MASK    (AnyModifier<<2)
  899.  
  900. /*
  901.  * Object types not declared in tkObj.c need to be mentioned here so
  902.  * they can be properly registered with Tcl:
  903.  */
  904.  
  905. extern Tcl_ObjType tkBorderObjType;
  906. extern Tcl_ObjType tkBitmapObjType;
  907. extern Tcl_ObjType tkColorObjType;
  908. extern Tcl_ObjType tkCursorObjType;
  909. extern Tcl_ObjType tkFontObjType;
  910. extern Tcl_ObjType tkOptionObjType;
  911. extern Tcl_ObjType tkStateKeyObjType;
  912.  
  913. /*
  914.  * Miscellaneous variables shared among Tk modules but not exported
  915.  * to the outside world:
  916.  */
  917. typedef void TkDelayedEventProc _ANSI_ARGS_((void));
  918. typedef void tkHandleEventProc_t _ANSI_ARGS_((XEvent* eventPtr));
  919.  
  920. extern Tk_SmoothMethod        tkBezierSmoothMethod;
  921. extern Tk_ImageType        tkBitmapImageType;
  922. extern Tk_PhotoImageFormat    tkImgFmtGIF;
  923. extern void            (*tkHandleEventProc) _ANSI_ARGS_((
  924.                         XEvent* eventPtr));
  925. extern Tk_PhotoImageFormat    tkImgFmtPPM;
  926. extern TkMainInfo        *tkMainWindowList;
  927. extern Tk_ImageType        tkPhotoImageType;
  928. extern Tcl_HashTable        tkPredefBitmapTable;
  929. extern int            tkSendSerial;
  930.  
  931. #include "tkIntDecls.h"
  932.  
  933. #ifdef BUILD_tk
  934. # undef TCL_STORAGE_CLASS
  935. # define TCL_STORAGE_CLASS DLLEXPORT
  936. #endif
  937.  
  938. /*
  939.  * Internal procedures shared among Tk modules but not exported
  940.  * to the outside world:
  941.  */
  942.  
  943. EXTERN int        Tk_BellObjCmd _ANSI_ARGS_((ClientData clientData,
  944.                 Tcl_Interp *interp, int objc,
  945.                 Tcl_Obj *CONST objv[]));
  946. EXTERN int        Tk_BindObjCmd _ANSI_ARGS_((ClientData clientData,
  947.                 Tcl_Interp *interp, int objc,
  948.                 Tcl_Obj *CONST objv[]));
  949. EXTERN int        Tk_BindtagsObjCmd _ANSI_ARGS_((ClientData clientData,
  950.                 Tcl_Interp *interp, int objc,
  951.                 Tcl_Obj *CONST objv[]));
  952. EXTERN int        Tk_ButtonObjCmd _ANSI_ARGS_((ClientData clientData,
  953.                 Tcl_Interp *interp, int objc,
  954.                 Tcl_Obj *CONST objv[]));
  955. EXTERN int        Tk_CanvasObjCmd _ANSI_ARGS_((ClientData clientData,
  956.                 Tcl_Interp *interp, int argc,
  957.                 Tcl_Obj *CONST objv[]));
  958. EXTERN int        Tk_CheckbuttonObjCmd _ANSI_ARGS_((
  959.                 ClientData clientData,
  960.                 Tcl_Interp *interp, int objc,
  961.                 Tcl_Obj *CONST objv[]));
  962. EXTERN int              Tk_ClipboardObjCmd _ANSI_ARGS_((
  963.                 ClientData clientData, Tcl_Interp *interp,
  964.                 int objc, Tcl_Obj *CONST objv[]));
  965. EXTERN int              Tk_ChooseColorObjCmd _ANSI_ARGS_((
  966.                 ClientData clientData, Tcl_Interp *interp,
  967.                 int objc, Tcl_Obj *CONST objv[]));
  968. EXTERN int              Tk_ChooseDirectoryObjCmd _ANSI_ARGS_((
  969.                 ClientData clientData, Tcl_Interp *interp,
  970.                 int objc, Tcl_Obj *CONST objv[]));
  971. EXTERN int              Tk_ChooseFontObjCmd _ANSI_ARGS_((ClientData clientData,
  972.                 Tcl_Interp *interp, int objc,
  973.                 Tcl_Obj *CONST objv[]));
  974. EXTERN int        Tk_DestroyObjCmd _ANSI_ARGS_((ClientData clientData,
  975.                 Tcl_Interp *interp, int objc,
  976.                 Tcl_Obj *CONST objv[]));
  977. EXTERN int        Tk_EntryObjCmd _ANSI_ARGS_((ClientData clientData,
  978.                 Tcl_Interp *interp, int objc,
  979.                             Tcl_Obj *CONST objv[]));
  980. EXTERN int        Tk_EventObjCmd _ANSI_ARGS_((ClientData clientData,
  981.                 Tcl_Interp *interp, int objc,
  982.                 Tcl_Obj *CONST objv[]));
  983. EXTERN int        Tk_FileeventCmd _ANSI_ARGS_((ClientData clientData,
  984.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
  985. EXTERN int        Tk_FrameObjCmd _ANSI_ARGS_((ClientData clientData,
  986.                 Tcl_Interp *interp, int objc,
  987.                 Tcl_Obj *CONST objv[]));
  988. EXTERN int        Tk_FocusObjCmd _ANSI_ARGS_((ClientData clientData,
  989.                 Tcl_Interp *interp, int objc,
  990.                 Tcl_Obj *CONST objv[]));
  991. EXTERN int        Tk_FontObjCmd _ANSI_ARGS_((ClientData clientData,
  992.                 Tcl_Interp *interp, int objc,
  993.                 Tcl_Obj *CONST objv[]));
  994. EXTERN int              Tk_GetOpenFileObjCmd _ANSI_ARGS_((
  995.                 ClientData clientData,
  996.                 Tcl_Interp *interp, int objc,
  997.                 Tcl_Obj *CONST objv[]));
  998. EXTERN int              Tk_GetSaveFileObjCmd _ANSI_ARGS_((
  999.                 ClientData clientData,
  1000.                 Tcl_Interp *interp, int objc,
  1001.                 Tcl_Obj *CONST objv[]));
  1002. EXTERN int        Tk_GrabObjCmd _ANSI_ARGS_((ClientData clientData,
  1003.                 Tcl_Interp *interp, int objc,
  1004.                 Tcl_Obj *CONST objv[]));
  1005. EXTERN int        Tk_GridObjCmd _ANSI_ARGS_((ClientData clientData,
  1006.                 Tcl_Interp *interp, int objc,
  1007.                 Tcl_Obj *CONST objv[]));
  1008. EXTERN int        Tk_ImageObjCmd _ANSI_ARGS_((ClientData clientData,
  1009.                 Tcl_Interp *interp, int objc,
  1010.                 Tcl_Obj *CONST objv[]));
  1011. EXTERN int        Tk_LabelObjCmd _ANSI_ARGS_((ClientData clientData,
  1012.                 Tcl_Interp *interp, int objc,
  1013.                 Tcl_Obj *CONST objv[]));
  1014. EXTERN int        Tk_LabelframeObjCmd _ANSI_ARGS_((ClientData clientData,
  1015.                 Tcl_Interp *interp, int objc,
  1016.                 Tcl_Obj *CONST objv[]));
  1017. EXTERN int        Tk_ListboxObjCmd _ANSI_ARGS_((ClientData clientData,
  1018.                 Tcl_Interp *interp, int objc,
  1019.                 Tcl_Obj *CONST objv[]));
  1020. EXTERN int        Tk_LowerObjCmd _ANSI_ARGS_((ClientData clientData,
  1021.                 Tcl_Interp *interp, int objc,
  1022.                 Tcl_Obj *CONST objv[]));
  1023. EXTERN int        Tk_MenubuttonObjCmd _ANSI_ARGS_((ClientData clientData,
  1024.                 Tcl_Interp *interp, int objc,
  1025.                 Tcl_Obj *CONST objv[]));
  1026. EXTERN int              Tk_MessageBoxObjCmd _ANSI_ARGS_((ClientData clientData,
  1027.                             Tcl_Interp *interp, int objc,
  1028.                 Tcl_Obj *CONST objv[]));
  1029. EXTERN int        Tk_MessageObjCmd _ANSI_ARGS_((ClientData clientData,
  1030.                 Tcl_Interp *interp, int objc,
  1031.                 Tcl_Obj *CONST objv[]));
  1032. EXTERN int        Tk_PanedWindowObjCmd _ANSI_ARGS_((
  1033.                 ClientData clientData,
  1034.                 Tcl_Interp *interp, int objc,
  1035.                 Tcl_Obj *CONST objv[]));
  1036. EXTERN int        Tk_OptionObjCmd _ANSI_ARGS_((ClientData clientData,
  1037.                 Tcl_Interp *interp, int objc,
  1038.                         Tcl_Obj *CONST objv[]));
  1039. EXTERN int        Tk_PackObjCmd _ANSI_ARGS_((ClientData clientData,
  1040.                 Tcl_Interp *interp, int objc,
  1041.                 Tcl_Obj *CONST objv[]));
  1042. EXTERN int        Tk_PlaceObjCmd _ANSI_ARGS_((ClientData clientData,
  1043.                 Tcl_Interp *interp, int objc,
  1044.                 Tcl_Obj *CONST objv[]));
  1045. EXTERN int        Tk_RadiobuttonObjCmd _ANSI_ARGS_((
  1046.                 ClientData clientData,
  1047.                 Tcl_Interp *interp, int objc,
  1048.                 Tcl_Obj *CONST objv[]));
  1049. EXTERN int        Tk_RaiseObjCmd _ANSI_ARGS_((ClientData clientData,
  1050.                 Tcl_Interp *interp, int objc,
  1051.                 Tcl_Obj *CONST objv[]));
  1052. EXTERN int        Tk_ScaleObjCmd _ANSI_ARGS_((ClientData clientData,
  1053.                 Tcl_Interp *interp, int objc,
  1054.                             Tcl_Obj *CONST objv[]));
  1055. EXTERN int        Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
  1056.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
  1057. EXTERN int        Tk_SelectionObjCmd _ANSI_ARGS_((ClientData clientData,
  1058.                 Tcl_Interp *interp, int objc,
  1059.                 Tcl_Obj *CONST objv[]));
  1060. EXTERN int        Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
  1061.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
  1062. EXTERN int        Tk_SendObjCmd _ANSI_ARGS_((ClientData clientData,
  1063.                 Tcl_Interp *interp, int objc,
  1064.                 Tcl_Obj *CONST objv[]));
  1065. EXTERN int        Tk_SpinboxObjCmd _ANSI_ARGS_((ClientData clientData,
  1066.                 Tcl_Interp *interp, int objc,
  1067.                             Tcl_Obj *CONST objv[]));
  1068. EXTERN int        Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
  1069.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
  1070. EXTERN int        Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData,
  1071.                 Tcl_Interp *interp, int objc,
  1072.                 Tcl_Obj *CONST objv[]));
  1073. EXTERN int        Tk_TkwaitObjCmd _ANSI_ARGS_((ClientData clientData,
  1074.                 Tcl_Interp *interp, int objc,
  1075.                 Tcl_Obj *CONST objv[]));
  1076. EXTERN int        Tk_ToplevelObjCmd _ANSI_ARGS_((ClientData clientData,
  1077.                 Tcl_Interp *interp, int objc,
  1078.                 Tcl_Obj *CONST objv[]));
  1079. EXTERN int        Tk_UpdateObjCmd _ANSI_ARGS_((ClientData clientData,
  1080.                 Tcl_Interp *interp, int objc,
  1081.                 Tcl_Obj *CONST objv[]));
  1082. EXTERN int        Tk_WinfoObjCmd _ANSI_ARGS_((ClientData clientData,
  1083.                 Tcl_Interp *interp, int objc,
  1084.                 Tcl_Obj *CONST objv[]));
  1085. EXTERN int        Tk_WmObjCmd _ANSI_ARGS_((ClientData clientData,
  1086.                 Tcl_Interp *interp, int objc,
  1087.                 Tcl_Obj *CONST objv[]));
  1088.  
  1089. EXTERN void        TkConsolePrint _ANSI_ARGS_((Tcl_Interp *interp,
  1090.                 int devId, CONST char *buffer, long size));
  1091.  
  1092. EXTERN void        TkEventInit _ANSI_ARGS_((void));
  1093.  
  1094. EXTERN void        TkRegisterObjTypes _ANSI_ARGS_((void));
  1095.  
  1096. EXTERN int        TkCreateMenuCmd _ANSI_ARGS_((Tcl_Interp *interp));
  1097. EXTERN int        TkDeadAppCmd _ANSI_ARGS_((ClientData clientData,
  1098.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
  1099.  
  1100. EXTERN int        TkpTestembedCmd _ANSI_ARGS_((ClientData clientData,
  1101.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
  1102. EXTERN int        TkCanvasGetCoordObj _ANSI_ARGS_((Tcl_Interp *interp,
  1103.                 Tk_Canvas canvas, Tcl_Obj *obj,
  1104.                 double *doublePtr));
  1105. EXTERN int        TkCanvasDashParseProc _ANSI_ARGS_((
  1106.                 ClientData clientData, Tcl_Interp *interp,
  1107.                 Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
  1108.                 int offset));
  1109. EXTERN Tcl_Obj *    TkCanvasDashPrintProc _ANSI_ARGS_((
  1110.                 ClientData clientData, Tk_Window tkwin,
  1111.                 char *widgRec, int offset,
  1112.                 Tcl_FreeProc **freeProcPtr));
  1113. EXTERN int        TkGetDoublePixels _ANSI_ARGS_((Tcl_Interp *interp,
  1114.                 Tk_Window tkwin, CONST char *string,
  1115.                 double *doublePtr));
  1116. EXTERN int        TkOffsetParseProc _ANSI_ARGS_((
  1117.                 ClientData clientData, Tcl_Interp *interp,
  1118.                 Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
  1119.                 int offset));
  1120. EXTERN Tcl_Obj *    TkOffsetPrintProc _ANSI_ARGS_((
  1121.                 ClientData clientData, Tk_Window tkwin,
  1122.                 char *widgRec, int offset,
  1123.                 Tcl_FreeProc **freeProcPtr));
  1124. EXTERN int        TkOrientParseProc _ANSI_ARGS_((
  1125.                 ClientData clientData, Tcl_Interp *interp,
  1126.                 Tk_Window tkwin, Tcl_Obj *value,
  1127.                 char *widgRec, int offset));
  1128. EXTERN Tcl_Obj *    TkOrientPrintProc _ANSI_ARGS_((
  1129.                 ClientData clientData, Tk_Window tkwin,
  1130.                 char *widgRec, int offset,
  1131.                 Tcl_FreeProc **freeProcPtr));
  1132. EXTERN int        TkPixelParseProc _ANSI_ARGS_((
  1133.                 ClientData clientData, Tcl_Interp *interp,
  1134.                 Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
  1135.                 int offset));
  1136. EXTERN Tcl_Obj *    TkPixelPrintProc _ANSI_ARGS_((
  1137.                 ClientData clientData, Tk_Window tkwin,
  1138.                 char *widgRec, int offset,
  1139.                 Tcl_FreeProc **freeProcPtr));
  1140. EXTERN int        TkPostscriptImage _ANSI_ARGS_((Tcl_Interp *interp,
  1141.                 Tk_Window tkwin, Tk_PostscriptInfo psInfo,
  1142.                 XImage *ximage, int x, int y, int width,
  1143.                 int height));
  1144. EXTERN int        TkSmoothParseProc _ANSI_ARGS_((ClientData clientData,
  1145.                 Tcl_Interp *interp, Tk_Window tkwin,
  1146.                 Tcl_Obj *value, char *recordPtr, int offset));
  1147. EXTERN Tcl_Obj *    TkSmoothPrintProc _ANSI_ARGS_((ClientData clientData,
  1148.                 Tk_Window tkwin, char *recordPtr, int offset,
  1149.                 Tcl_FreeProc **freeProcPtr));
  1150. EXTERN int        TkStateParseProc _ANSI_ARGS_((
  1151.                 ClientData clientData, Tcl_Interp *interp,
  1152.                 Tk_Window tkwin, Tcl_Obj *value,
  1153.                 char *widgRec, int offset));
  1154. EXTERN Tcl_Obj *    TkStatePrintProc _ANSI_ARGS_((
  1155.                 ClientData clientData, Tk_Window tkwin,
  1156.                 char *widgRec, int offset,
  1157.                 Tcl_FreeProc **freeProcPtr));
  1158. EXTERN int        Tk_StateParseProc _ANSI_ARGS_((
  1159.                 ClientData clientData, Tcl_Interp *interp,
  1160.                 Tk_Window tkwin, Tcl_Obj *value,
  1161.                 char *widgRec, int offset));
  1162. EXTERN Tcl_Obj *    Tk_StatePrintProc _ANSI_ARGS_((
  1163.                 ClientData clientData, Tk_Window tkwin,
  1164.                 char *widgRec, int offset,
  1165.                 Tcl_FreeProc **freeProcPtr));
  1166. EXTERN int        TkTileParseProc _ANSI_ARGS_((
  1167.                 ClientData clientData, Tcl_Interp *interp,
  1168.                 Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
  1169.                 int offset));
  1170. EXTERN Tcl_Obj *    TkTilePrintProc _ANSI_ARGS_((
  1171.                 ClientData clientData, Tk_Window tkwin,
  1172.                 char *widgRec, int offset,
  1173.                 Tcl_FreeProc **freeProcPtr));
  1174.  
  1175. /*
  1176.  * Unsupported commands.
  1177.  */
  1178. EXTERN int        TkUnsupported1Cmd _ANSI_ARGS_((ClientData clientData,
  1179.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
  1180.  
  1181. /*
  1182.  * Canvas-related procedures that are shared among Tk modules but not
  1183.  * exported to the outside world:
  1184.  */
  1185.  
  1186. struct TkCanvas;
  1187. extern int        TkCanvPostscriptCmd _ANSI_ARGS_((struct TkCanvas *canvasPtr,
  1188.                 Tcl_Interp *interp, int argc, CONST84 Tcl_Obj *CONST *objv));
  1189.  
  1190. # undef TCL_STORAGE_CLASS
  1191. # define TCL_STORAGE_CLASS DLLIMPORT
  1192.  
  1193. #endif  /* _TKINT */
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.