home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / tkInt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-07  |  20.7 KB  |  597 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-1993 The Regents of the University of California.
  8.  * All rights reserved.
  9.  *
  10.  * Permission is hereby granted, without written agreement and without
  11.  * license or royalty fees, to use, copy, modify, and distribute this
  12.  * software and its documentation for any purpose, provided that the
  13.  * above copyright notice and the following two paragraphs appear in
  14.  * all copies of this software.
  15.  * 
  16.  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  17.  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  18.  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  19.  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20.  *
  21.  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  22.  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  23.  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  24.  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  25.  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  26.  *
  27.  * $Header: /user6/ouster/wish/RCS/tkInt.h,v 1.93 93/07/07 13:22:02 ouster Exp $ SPRITE (Berkeley)
  28.  */
  29.  
  30. #ifndef _TKINT
  31. #define _TKINT
  32.  
  33. #ifndef _XLIB_H_
  34. #include <X11/Xlib.h>
  35. #endif
  36. #ifndef _XUTIL_H
  37. #include <X11/Xutil.h>
  38. #endif
  39. #ifndef _TK
  40. #include "tk.h"
  41. #endif
  42. #ifndef _TCL
  43. #include "tcl.h"
  44. #endif
  45.  
  46. /*
  47.  * Opaque type declarations:
  48.  */
  49.  
  50. typedef struct Tk_PostscriptInfo Tk_PostscriptInfo;
  51. typedef struct TkGrabEvent TkGrabEvent;
  52.  
  53. /*
  54.  * One of the following structures is maintained for each display
  55.  * containing a window managed by Tk:
  56.  */
  57.  
  58. typedef struct TkDisplay {
  59.     Display *display;        /* Xlib's info about display. */
  60.     struct TkDisplay *nextPtr;    /* Next in list of all displays. */
  61.     char *name;            /* Name of display (with any screen
  62.                  * identifier removed).  Malloc-ed. */
  63.     Time lastEventTime;        /* Time of last event received for this
  64.                  * display. */
  65.  
  66.     /*
  67.      * Information used by tkFocus.c and tkEvent.c:
  68.      */
  69.  
  70.     struct TkWindow *focusTopLevelPtr;
  71.                 /* Pointer to the top-level window that
  72.                  * currently contains the focus for this
  73.                  * display.  NULL means none of the
  74.                  * top-levels managed by this application
  75.                  * contains the focus. */
  76.     int focussedOnEnter;    /* Non-zero means the focus was set
  77.                  * implicitly from an Enter event rather
  78.                  * than from a FocusIn event. */
  79.  
  80.     /*
  81.      * Information used primarily by tkBind.c:
  82.      */
  83.  
  84.     int bindInfoStale;        /* Non-zero means the variables in this
  85.                  * part of the structure are potentially
  86.                  * incorrect and should be recomputed. */
  87.     unsigned int modeModMask;    /* Has one bit set to indicate the modifier
  88.                  * corresponding to "mode shift".  If no
  89.                  * such modifier, than this is zero. */
  90.     enum {IGNORE, CAPS, SHIFT} lockUsage;
  91.                 /* Indicates how to interpret lock modifier. */
  92.  
  93.     /*
  94.      * Information used by tkError.c only:
  95.      */
  96.  
  97.     struct TkErrorHandler *errorPtr;
  98.                 /* First in list of error handlers
  99.                  * for this display.  NULL means
  100.                  * no handlers exist at present. */
  101.     int deleteCount;        /* Counts # of handlers deleted since
  102.                  * last time inactive handlers were
  103.                  * garbage-collected.  When this number
  104.                  * gets big, handlers get cleaned up. */
  105.     int (*defaultHandler) _ANSI_ARGS_((Display *display,
  106.         XErrorEvent *eventPtr));
  107.                 /* X's default event handler:  invoked
  108.                  * if an error occurs that we can't handle
  109.                  * ourselves. */
  110.  
  111.     /*
  112.      * Information used by tkSend.c only:
  113.      */
  114.  
  115.     Tk_Window commWindow;    /* Window used for communication
  116.                  * between interpreters during "send"
  117.                  * commands.  NULL means send info hasn't
  118.                  * been initialized yet. */
  119.     Atom commProperty;        /* X's name for comm property. */
  120.     Atom registryProperty;    /* X's name for property containing
  121.                  * registry of interpreter names. */
  122.     int serverSecure;        /* Non-zero means the server appears to
  123.                  * be reasonably secure;  zero means we
  124.                  * should reject incoming sends because
  125.                  * they can't be trusted. */
  126.  
  127.     /*
  128.      * Information used by tkSelect.c only:
  129.      */
  130.  
  131.     Tk_Window selectionOwner;    /* Current owner of selection, or
  132.                  * NULL if selection isn't owned by
  133.                  * a window in this process.  */
  134.     int selectionSerial;    /* Serial number of last XSelectionSetOwner
  135.                  * request we made to server (used to
  136.                  * filter out redundant SelectionClear
  137.                  * events. */
  138.     Time selectionTime;        /* Timestamp used to acquire selection. */
  139.     Atom multipleAtom;        /* Atom for MULTIPLE.  None means
  140.                  * selection stuff isn't initialized. */
  141.     Atom incrAtom;        /* Atom for INCR. */
  142.     Atom targetsAtom;        /* Atom for TARGETS. */
  143.     Atom timestampAtom;        /* Atom for TIMESTAMP. */
  144.     Atom textAtom;        /* Atom for TEXT. */
  145.     Atom compoundTextAtom;    /* Atom for COMPOUND_TEXT. */
  146.     Atom applicationAtom;    /* Atom for APPLICATION. */
  147.     Atom windowNameAtom;    /* Atom for WINDOW_NAME. */
  148.  
  149.     /*
  150.      * Information used by tkAtom.c only:
  151.      */
  152.  
  153.     int atomInit;        /* 0 means stuff below hasn't been
  154.                  * initialized yet. */
  155.     Tcl_HashTable nameTable;    /* Maps from names to Atom's. */
  156.     Tcl_HashTable atomTable;    /* Maps from Atom's back to names. */
  157.  
  158.     /*
  159.      * Information used by tkCursor.c only:
  160.      */
  161.  
  162.     Font cursorFont;        /* Font to use for standard cursors.
  163.                  * None means font not loaded yet. */
  164.  
  165.     /*
  166.      * Information used by tkGrab.c only:
  167.      */
  168.  
  169.     struct TkWindow *grabWinPtr;
  170.                 /* Window in which the pointer is currently
  171.                  * grabbed, or NULL if none. */
  172.     struct TkWindow *eventualGrabWinPtr;
  173.                 /* Value that grabWinPtr will have once the
  174.                  * grab event queue (below) has been
  175.                  * completely emptied. */
  176.     struct TkWindow *buttonWinPtr;
  177.                 /* Window in which first mouse button was
  178.                  * pressed while grab was in effect, or NULL
  179.                  * if no such press in effect. */
  180.     struct TkWindow *serverWinPtr;
  181.                 /* If no application contains the pointer then
  182.                  * this is NULL.  Otherwise it contains the
  183.                  * last window for which we've gotten an
  184.                  * Enter or Leave event from the server (i.e.
  185.                  * the last window known to have contained
  186.                  * the pointer).  Doesn't reflect events
  187.                  * that were synthesized in tkGrab.c. */
  188.     TkGrabEvent *firstGrabEventPtr;
  189.                 /* First in list of enter/leave events
  190.                  * synthesized by grab code.  These events
  191.                  * must be processed in order before any other
  192.                  * events are processed.  NULL means no such
  193.                  * events. */
  194.     TkGrabEvent *lastGrabEventPtr;
  195.                 /* Last in list of synthesized events, or NULL
  196.                  * if list is empty. */
  197.     int grabFlags;        /* Miscellaneous flag values.  See definitions
  198.                  * in tkGrab.c. */
  199.  
  200.     /*
  201.      * Miscellaneous information:
  202.      */
  203.  
  204.     Tk_ColorModel *colorModels;    /* Array of color models, one per screen;
  205.                  * indicates whether windows should attempt
  206.                  * to use full color for display, just mono,
  207.                  * etc.  Malloc'ed. */
  208. } TkDisplay;
  209.  
  210. /*
  211.  * One of the following structures exists for each error handler
  212.  * created by a call to Tk_CreateErrorHandler.  The structure
  213.  * is managed by tkError.c.
  214.  */
  215.  
  216. typedef struct TkErrorHandler {
  217.     TkDisplay *dispPtr;        /* Display to which handler applies. */
  218.     unsigned long firstRequest;    /* Only errors with serial numbers
  219.                  * >= to this are considered. */
  220.     unsigned long lastRequest;    /* Only errors with serial numbers
  221.                  * <= to this are considered.  This
  222.                  * field is filled in when XUnhandle
  223.                  * is called.  -1 means XUnhandle
  224.                  * hasn't been called yet. */
  225.     int error;            /* Consider only errors with this
  226.                  * error_code (-1 means consider
  227.                  * all errors). */
  228.     int request;        /* Consider only errors with this
  229.                  * major request code (-1 means
  230.                  * consider all major codes). */
  231.     int minorCode;        /* Consider only errors with this
  232.                  * minor request code (-1 means
  233.                  * consider all minor codes). */
  234.     Tk_ErrorProc *errorProc;    /* Procedure to invoke when a matching
  235.                  * error occurs.  NULL means just ignore
  236.                  * errors. */
  237.     ClientData clientData;    /* Arbitrary value to pass to
  238.                  * errorProc. */
  239.     struct TkErrorHandler *nextPtr;
  240.                 /* Pointer to next older handler for
  241.                  * this display, or NULL for end of
  242.                  * list. */
  243. } TkErrorHandler;
  244.  
  245. /*
  246.  * One of the following structures exists for each event handler
  247.  * created by calling Tk_CreateEventHandler.  This information
  248.  * is used by tkEvent.c only.
  249.  */
  250.  
  251. typedef struct TkEventHandler {
  252.     unsigned long mask;        /* Events for which to invoke
  253.                  * proc. */
  254.     Tk_EventProc *proc;        /* Procedure to invoke when an event
  255.                  * in mask occurs. */
  256.     ClientData clientData;    /* Argument to pass to proc. */
  257.     struct TkEventHandler *nextPtr;
  258.                 /* Next in list of handlers
  259.                  * associated with window (NULL means
  260.                  * end of list). */
  261. } TkEventHandler;
  262.  
  263. /*
  264.  * One of the following structures exists for each selection
  265.  * handler created by calling Tk_CreateSelHandler.  This
  266.  * information is used by tkSelect.c only.
  267.  */
  268.  
  269. typedef struct TkSelHandler {
  270.     Atom target;        /* Target type for selection
  271.                  * conversion, such as TARGETS or
  272.                  * STRING. */
  273.     Atom format;        /* Format in which selection
  274.                  * info will be returned, such
  275.                  * as STRING or ATOM. */
  276.     Tk_SelectionProc *proc;    /* Procedure to generate selection
  277.                  * in this format. */
  278.     ClientData clientData;    /* Argument to pass to proc. */
  279.     int size;            /* Size of units returned by proc
  280.                  * (8 for STRING, 32 for almost
  281.                  * anything else). */
  282.     struct TkSelHandler *nextPtr;
  283.                 /* Next selection handler associated
  284.                  * with same window (NULL for end of
  285.                  * list). */
  286. } TkSelHandler;
  287.  
  288. /*
  289.  * Tk keeps one of the following data structures for each main
  290.  * window (created by a call to Tk_CreateMainWindow).  It stores
  291.  * information that is shared by all of the windows associated
  292.  * with a particular main window.
  293.  */
  294.  
  295. typedef struct TkMainInfo {
  296.     struct TkWindow *winPtr;    /* Pointer to main window. */
  297.     Tcl_Interp *interp;        /* Interpreter associated with application. */
  298.     Tcl_HashTable nameTable;    /* Hash table mapping path names to TkWindow
  299.                  * structs for all windows related to this
  300.                  * main window.  Managed by tkWindow.c. */
  301.     Tk_BindingTable bindingTable;
  302.                 /* Used in conjunction with "bind" command
  303.                  * to bind events to Tcl commands. */
  304.     struct TkWindow *focusPtr;    /* Identifies window that currently has the
  305.                  * focus (or that will get the focus the next
  306.                  * time the pointer enters any of the top-level
  307.                  * windows associated with this main window).
  308.                  * NULL means nobody has the focus.
  309.                  * Managed by tkFocus.c. */
  310.     struct TkWindow *focusDefaultPtr;
  311.                 /* Window that is to receive the focus by
  312.                  * default when the focusPtr window is
  313.                  * deleted. */
  314.     struct ElArray *optionRootPtr;
  315.                 /* Top level of option hierarchy for this
  316.                  * main window.  NULL means uninitialized.
  317.                  * Managed by tkOption.c. */
  318.     struct TkMainInfo *nextPtr;    /* Next in list of all main windows managed by
  319.                  * this process. */
  320. } TkMainInfo;
  321.  
  322. /*
  323.  * Tk keeps one of the following structures for each window.
  324.  * Some of the information (like size and location) is a shadow
  325.  * of information managed by the X server, and some is special
  326.  * information used here, such as event and geometry management
  327.  * information.  This information is (mostly) managed by tkWindow.c.
  328.  * WARNING: the declaration below must be kept consistent with the
  329.  * Tk_ClientWindow structure in tk.h.  If you change one, be sure to
  330.  * change the other!!
  331.  */
  332.  
  333. typedef struct TkWindow {
  334.  
  335.     /*
  336.      * Structural information:
  337.      */
  338.  
  339.     Display *display;        /* Display containing window. */
  340.     TkDisplay *dispPtr;        /* Tk's information about display
  341.                  * for window. */
  342.     int screenNum;        /* Index of screen for window, among all
  343.                  * those for dispPtr. */
  344.     Visual *visual;        /* Visual to use for window.  If not default,
  345.                  * MUST be set before X window is created. */
  346.     int depth;            /* Number of bits/pixel. */
  347.     Window window;        /* X's id for window.   NULL means window
  348.                  * hasn't actually been created yet, or it's
  349.                  * been deleted. */
  350.     struct TkWindow *childList;    /* First in list of child windows,
  351.                  * or NULL if no children. */
  352.     struct TkWindow *lastChildPtr;
  353.                 /* Last in list of child windows, or NULL
  354.                  * if no children. */
  355.     struct TkWindow *parentPtr;    /* Pointer to parent window (logical
  356.                  * parent, not necessarily X parent), or
  357.                  * NULL if this is a main window. */
  358.     struct TkWindow *nextPtr;    /* Next in list of children with
  359.                  * same parent (NULL if end of
  360.                  * list). */
  361.     TkMainInfo *mainPtr;    /* Information shared by all windows
  362.                  * associated with a particular main
  363.                  * window.  NULL means this window is
  364.                  * a rogue that isn't associated with
  365.                  * any application (at present, there
  366.                  * should never be any rogues).  */
  367.  
  368.     /*
  369.      * Name and type information for the window:
  370.      */
  371.  
  372.     char *pathName;        /* Path name of window (concatenation
  373.                  * of all names between this window and
  374.                  * its top-level ancestor).  This is a
  375.                  * pointer into an entry in
  376.                  * mainPtr->nameTable or NULL if mainPtr
  377.                  * is NULL. */
  378.     Tk_Uid nameUid;        /* Name of the window within its parent
  379.                  * (unique within the parent). */
  380.     Tk_Uid classUid;        /* Class of the window.  NULL means window
  381.                  * hasn't been given a class yet. */
  382.  
  383.     /*
  384.      * Geometry and other attributes of window.  This information
  385.      * may not be updated on the server immediately;  stuff that
  386.      * hasn't been reflected in the server yet is called "dirty".
  387.      * At present, information can be dirty only if the window
  388.      * hasn't yet been created.
  389.      */
  390.  
  391.     XWindowChanges changes;    /* Geometry and other info about
  392.                  * window. */
  393.     unsigned int dirtyChanges;    /* Bits indicate fields of "changes"
  394.                  * that are dirty. */
  395.     XSetWindowAttributes atts;    /* Current attributes of window. */
  396.     unsigned long dirtyAtts;    /* Bits indicate fields of "atts"
  397.                  * that are dirty. */
  398.  
  399.     unsigned int flags;        /* Various flag values:  these are all
  400.                  * defined in tk.h (confusing, but they're
  401.                  * needed there for some query macros). */
  402.  
  403.     /*
  404.      * Information kept by the event manager (tkEvent.c):
  405.      */
  406.  
  407.     TkEventHandler *handlerList;/* First in list of event handlers
  408.                  * declared for this window, or
  409.                  * NULL if none. */
  410.     /*
  411.      * Information related to input focussing (tkFocus.c):
  412.      */
  413.  
  414.     Tk_FocusProc *focusProc;    /* Procedure to invoke when this window
  415.                  * gets or loses the input focus.  NULL
  416.                  * means this window is not prepared to
  417.                  * receive the focus. */
  418.     ClientData focusData;    /* Arbitrary value to pass to focusProc. */
  419.  
  420.     /*
  421.      * Information used by tkOption.c to manage options for the
  422.      * window.
  423.      */
  424.  
  425.     int optionLevel;        /* -1 means no option information is
  426.                  * currently cached for this window.
  427.                  * Otherwise this gives the level in
  428.                  * the option stack at which info is
  429.                  * cached. */
  430.     /*
  431.      * Information used by tkSelect.c to manage the selection.
  432.      */
  433.  
  434.     TkSelHandler *selHandlerList;
  435.                 /* First in list of handlers for
  436.                  * returning the selection in various
  437.                  * forms. */
  438.     Tk_LostSelProc *selClearProc;
  439.     ClientData selClearData;    /* Info to pass to selClearProc. */
  440.  
  441.     /*
  442.      * Information used by tkGeometry.c for geometry management.
  443.      */
  444.  
  445.     Tk_GeometryProc *geomProc;    /* Procedure to handle geometry
  446.                  * requests (NULL means no window is
  447.                  * unmanaged). */
  448.     ClientData geomData;    /* Argument for geomProc. */
  449.     int reqWidth, reqHeight;    /* Arguments from last call to
  450.                  * Tk_GeometryRequest, or 0's if
  451.                  * Tk_GeometryRequest hasn't been
  452.                  * called. */
  453.     int internalBorderWidth;    /* Width of internal border of window
  454.                  * (0 means no internal border).  Geom.
  455.                  * mgr. should not place children on top
  456.                  * of the border. */
  457.  
  458.     /*
  459.      * Information maintained by tkWm.c for window manager communication.
  460.      */
  461.  
  462.     struct TkWmInfo *wmInfoPtr;    /* For top-level windows, points to
  463.                  * structure with wm-related info (see
  464.                  * tkWm.c).  For other windows, this
  465.                  * is NULL. */
  466. } TkWindow;
  467.  
  468. /*
  469.  * The context below is used to map from an X window id to
  470.  * the TkWindow structure associated with the window.
  471.  */
  472.  
  473. extern XContext tkWindowContext;
  474.  
  475. /*
  476.  * Pointer to first entry in list of all displays currently known.
  477.  */
  478.  
  479. extern TkDisplay *tkDisplayList;
  480.  
  481. /*
  482.  * Flags passed to TkMeasureChars:
  483.  */
  484.  
  485. #define TK_WHOLE_WORDS        1
  486. #define TK_AT_LEAST_ONE        2
  487. #define TK_PARTIAL_OK        4
  488. #define TK_NEWLINES_NOT_SPECIAL    8
  489.  
  490. /*
  491.  * Location of library directory containing Tk scripts.  This value
  492.  * is put in the $tkLibrary variable for each application.
  493.  */
  494.  
  495. #ifndef TK_LIBRARY
  496. #define TK_LIBRARY "/usr/local/lib/tk"
  497. #endif
  498.  
  499. /*
  500.  * SPECIAL HACK!!!  I've started changing Tk over to use
  501.  * Tcl_PrintDouble instead of sprintf(... %g ...), but the change
  502.  * is not backwards-compatible.  So, until the next incompatible
  503.  * release of Tk, the following macro replaces the Tcl_PrintDouble
  504.  * calls with sprintf again.
  505.  */
  506.  
  507. #define Tcl_PrintDouble(interp, value, dst) \
  508.     sprintf(dst, "%g", value)
  509.  
  510. /*
  511.  * Miscellaneous variables shared among Tk modules but not exported
  512.  * to the outside world:
  513.  */
  514.  
  515. extern Tk_Uid        tkActiveUid;
  516. extern Tk_Uid        tkDisabledUid;
  517. extern TkMainInfo    *tkMainWindowList;
  518. extern Tk_Uid        tkNormalUid;
  519.  
  520. /*
  521.  * Internal procedures shared among Tk modules but not exported
  522.  * to the outside world:
  523.  */
  524.  
  525. extern int        TkAreaToPolygon _ANSI_ARGS_((double *polyPtr,
  526.                 int numPoints, double *rectPtr));
  527. extern void        TkBezierPoints _ANSI_ARGS_((double control[],
  528.                 int numSteps, double *coordPtr));
  529. extern void        TkBindEventProc _ANSI_ARGS_((TkWindow *winPtr,
  530.                 XEvent *eventPtr));
  531. extern int        TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  532.                 char *script));
  533. extern Time        TkCurrentTime _ANSI_ARGS_((TkDisplay *dispPtr));
  534. extern int        TkDeadAppCmd _ANSI_ARGS_((ClientData clientData,
  535.                 Tcl_Interp *interp, int argc, char **argv));
  536. extern void        TkDisplayChars _ANSI_ARGS_((Display *display,
  537.                 Drawable drawable, GC gc,
  538.                 XFontStruct *fontStructPtr, char *string,
  539.                 int numChars, int x, int y, int flags));
  540. extern void        TkEventDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
  541. extern void        TkFocusDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
  542. extern int        TkFocusFilterEvent _ANSI_ARGS_((TkWindow *winPtr,
  543.                 XEvent *eventPtr));
  544. extern void        TkGetButtPoints _ANSI_ARGS_((double p1[], double p2[],
  545.                 double width, int project, double m1[],
  546.                 double m2[]));
  547. extern int        TkGetInterpNames _ANSI_ARGS_((Tcl_Interp *interp,
  548.                 Tk_Window tkwin));
  549. extern int        TkGetMiterPoints _ANSI_ARGS_((double p1[], double p2[],
  550.                 double p3[], double width, double m1[],
  551.                 double m2[]));
  552. extern void        TkGrabDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
  553. extern void        TkGrabTriggerProc _ANSI_ARGS_((XEvent *eventPtr));
  554. extern int        TkLineToArea _ANSI_ARGS_((double end1Ptr[2],
  555.                 double end2Ptr[2], double rectPtr[4]));
  556. extern double        TkLineToPoint _ANSI_ARGS_((double end1Ptr[2],
  557.                 double end2Ptr[2], double pointPtr[2]));
  558. extern void        TkMakeBezierPostscript _ANSI_ARGS_((Tcl_Interp *interp,
  559.                 double *pointPtr, int numPoints,
  560.                 Tk_PostscriptInfo *psInfoPtr));
  561. extern int        TkMeasureChars _ANSI_ARGS_((XFontStruct *fontStructPtr,
  562.                 char *source, int maxChars, int startX, int maxX,
  563.                 int flags, int *nextXPtr));
  564. extern void        TkOptionDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
  565. extern int        TkOvalToArea _ANSI_ARGS_((double *ovalPtr,
  566.                 double *rectPtr));
  567. extern double        TkOvalToPoint _ANSI_ARGS_((double ovalPtr[4],
  568.                 double width, int filled, double pointPtr[2]));
  569. extern int        TkPointerEvent _ANSI_ARGS_((XEvent *eventPtr,
  570.                 TkWindow *winPtr));
  571. extern int        TkPolygonToArea _ANSI_ARGS_((double *polyPtr,
  572.                 int numPoints, double *rectPtr));
  573. extern double        TkPolygonToPoint _ANSI_ARGS_((double *polyPtr,
  574.                 int numPoints, double *pointPtr));
  575. extern void        TkQueueEvent _ANSI_ARGS_((TkDisplay *dispPtr,
  576.                 XEvent *eventPtr));
  577. extern void        TkSelDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
  578. extern void        TkSelEventProc _ANSI_ARGS_((Tk_Window tkwin,
  579.                 XEvent *eventPtr));
  580. extern void        TkSelPropProc _ANSI_ARGS_((XEvent *eventPtr));
  581. extern void        TkUnderlineChars _ANSI_ARGS_((Display *display,
  582.                 Drawable drawable, GC gc,
  583.                 XFontStruct *fontStructPtr, char *string,
  584.                 int x, int y, int flags, int firstChar,
  585.                 int lastChar));
  586. extern void        TkWmDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
  587. extern void        TkWmMapWindow _ANSI_ARGS_((TkWindow *winPtr));
  588. extern void        TkWmNewWindow _ANSI_ARGS_((TkWindow *winPtr));
  589. extern void        TkWmProtocolEventProc _ANSI_ARGS_((TkWindow *winPtr,
  590.                 XEvent *evenvPtr));
  591. extern void        TkWmRestackToplevel _ANSI_ARGS_((TkWindow *winPtr,
  592.                 int aboveBelow, TkWindow *otherPtr));
  593. extern void        TkWmSetClass _ANSI_ARGS_((TkWindow *winPtr));
  594. extern void        TkWmUnmapWindow _ANSI_ARGS_((TkWindow *winPtr));
  595.  
  596. #endif  /* _TKINT */
  597.