home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / apache / files / ActivePerl-5.6.1.638-MSWin32-x86.msi / _4ef209e1445a16fe2502df74da4200be < prev    next >
Encoding:
Text File  |  2004-04-13  |  78.5 KB  |  1,980 lines

  1. /*
  2.  * tk.h --
  3.  *
  4.  *    Declarations for Tk-related things that are visible
  5.  *    outside of the Tk module itself.
  6.  *
  7.  * Copyright (c) 1989-1994 The Regents of the University of California.
  8.  * Copyright (c) 1994 The Australian National University.
  9.  * Copyright (c) 1994-1997 Sun Microsystems, Inc.
  10.  * Copyright (c) 1998-1999 Scriptics Corporation.
  11.  *
  12.  * See the file "license.terms" for information on usage and redistribution
  13.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14.  *
  15.  * RCS: @(#) $Id: tk.h,v 1.19 1999/02/04 21:03:27 stanton Exp $
  16.  */
  17.  
  18. #ifndef _TK
  19. #define _TK
  20.  
  21. /*
  22.  * When version numbers change here, you must also go into the following files
  23.  * and update the version numbers:
  24.  *
  25.  * README
  26.  * unix/configure.in
  27.  * win/makefile.bc
  28.  * win/makefile.vc
  29.  * win/README
  30.  * mac/README
  31.  * library/tk.tcl    (Not for patch release updates)
  32.  *
  33.  * The release level should be  0 for alpha, 1 for beta, and 2 for
  34.  * final/patch.  The release serial value is the number that follows the
  35.  * "a", "b", or "p" in the patch level; for example, if the patch level
  36.  * is 4.3b2, TK_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
  37.  * release level is changed, except for the final release, which should
  38.  * be 0.
  39.  *
  40.  * You may also need to update some of these files when the numbers change
  41.  * for the version of Tcl that this release of Tk is compiled against.
  42.  */
  43.  
  44. #define TK_MAJOR_VERSION   8
  45. #define TK_MINOR_VERSION   0
  46. #define TK_RELEASE_LEVEL   2
  47. #define TK_RELEASE_SERIAL  5
  48.  
  49. #define TK_VERSION "8.0"
  50. #define TK_PATCH_LEVEL "8.0.5"
  51.  
  52. /*
  53.  * A special definition used to allow this header file to be included
  54.  * in resource files.
  55.  */
  56.  
  57. #ifndef RESOURCE_INCLUDED
  58.  
  59. /*
  60.  * The following definitions set up the proper options for Macintosh
  61.  * compilers.  We use this method because there is no autoconf equivalent.
  62.  */
  63.  
  64. #ifdef MAC_TCL
  65. #   ifndef REDO_KEYSYM_LOOKUP
  66. #    define REDO_KEYSYM_LOOKUP
  67. #   endif
  68. #endif
  69.  
  70. #ifndef _TKPORT
  71. #include "tkPort.h"
  72. #endif
  73.  
  74. #if !defined(_XLIB_H)
  75. /* FIXME: There is a _XLIB vs _XLIB_H muddle with .t/.m files */
  76. #   ifdef MAC_TCL
  77. #    include <Xlib.h>
  78. #    include <X.h>
  79. #   else
  80. #    include <X11/Xlib.h>
  81. #   endif
  82. #if !defined(_XLIB_H)
  83. #define _XLIB_H
  84. #endif
  85. #endif
  86.  
  87.  
  88. #ifdef __STDC__
  89. #   include <stddef.h>
  90. #endif
  91.  
  92. #ifdef BUILD_tk
  93. # undef TCL_STORAGE_CLASS
  94. # define TCL_STORAGE_CLASS DLLEXPORT
  95. #endif
  96.  
  97. /*
  98.  * Decide whether or not to use input methods.
  99.  */
  100.  
  101. #ifdef XNQueryInputStyle
  102. #define TK_USE_INPUT_METHODS
  103. #endif
  104.  
  105. /*
  106.  * Dummy types that are used by clients:
  107.  */
  108.  
  109. typedef struct Tk_BindingTable_ *Tk_BindingTable;
  110. typedef struct Tk_Canvas_ *Tk_Canvas;
  111. typedef struct Tk_Cursor_ *Tk_Cursor;
  112. typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler;
  113. typedef struct Tk_Font_ *Tk_Font;
  114. typedef struct Tk_Image__ *Tk_Image;
  115. typedef struct Tk_ImageMaster_ *Tk_ImageMaster;
  116. typedef struct Tk_PostscriptInfo_ *Tk_PostscriptInfo;
  117. typedef struct Tk_TextLayout_ *Tk_TextLayout;
  118. typedef struct Tk_Window_ *Tk_Window;
  119. typedef struct Tk_3DBorder_ *Tk_3DBorder;
  120.  
  121. /*
  122.  * Additional types exported to clients.
  123.  */
  124.  
  125. typedef char *Tk_Uid;
  126.  
  127. /*
  128.  * Structure used to specify how to handle objv options.
  129.  */
  130.  
  131. typedef struct {
  132.     char *key;        /* The key string that flags the option in the
  133.              * objv array. */
  134.     int type;        /* Indicates option type;  see below. */
  135.     char *src;        /* Value to be used in setting dst;  usage
  136.              * depends on type. */
  137.     char *dst;        /* Address of value to be modified;  usage
  138.              * depends on type. */
  139.     char *help;        /* Documentation message describing this option. */
  140. } Tk_ArgvInfo;
  141.  
  142. /*
  143.  * Legal values for the type field of a Tk_ArgvInfo: see the user
  144.  * documentation for details.
  145.  */
  146.  
  147. #define TK_ARGV_CONSTANT        15
  148. #define TK_ARGV_INT            16
  149. #define TK_ARGV_STRING            17
  150. #define TK_ARGV_UID            18
  151. #define TK_ARGV_REST            19
  152. #define TK_ARGV_FLOAT            20
  153. #define TK_ARGV_FUNC            21
  154. #define TK_ARGV_GENFUNC            22
  155. #define TK_ARGV_HELP            23
  156. #define TK_ARGV_CONST_OPTION        24
  157. #define TK_ARGV_OPTION_VALUE        25
  158. #define TK_ARGV_OPTION_NAME_VALUE    26
  159. #define TK_ARGV_END            27
  160.  
  161. /*
  162.  * Flag bits for passing to Tk_ParseArgv:
  163.  */
  164.  
  165. #define TK_ARGV_NO_DEFAULTS        0x1
  166. #define TK_ARGV_NO_LEFTOVERS        0x2
  167. #define TK_ARGV_NO_ABBREV        0x4
  168. #define TK_ARGV_DONT_SKIP_FIRST_ARG    0x8
  169.  
  170. /*
  171.  * Structure used to describe application-specific configuration
  172.  * options:  indicates procedures to call to parse an option and
  173.  * to return a text string describing an option.
  174.  */
  175.  
  176. typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData,
  177.     Tcl_Interp *interp, Tk_Window tkwin, Arg value, char *widgRec,
  178.     int offset));
  179. typedef Arg (Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData,
  180.     Tk_Window tkwin, char *widgRec, int offset,
  181.     Tcl_FreeProc **freeProcPtr));
  182.  
  183. typedef struct Tk_CustomOption {
  184.     Tk_OptionParseProc *parseProc;    /* Procedure to call to parse an
  185.                      * option and store it in converted
  186.                      * form. */
  187.     Tk_OptionPrintProc *printProc;    /* Procedure to return a printable
  188.                      * string describing an existing
  189.                      * option. */
  190.     ClientData clientData;        /* Arbitrary one-word value used by
  191.                      * option parser:  passed to
  192.                      * parseProc and printProc. */
  193. } Tk_CustomOption;
  194.  
  195. /*
  196.  * Structure used to specify information for Tk_ConfigureWidget.  Each
  197.  * structure gives complete information for one option, including
  198.  * how the option is specified on the command line, where it appears
  199.  * in the option database, etc.
  200.  */
  201.  
  202. typedef struct Tk_ConfigSpec {
  203.     int type;            /* Type of option, such as TK_CONFIG_COLOR;
  204.                  * see definitions below.  Last option in
  205.                  * table must have type TK_CONFIG_END. */
  206.     char *argvName;        /* Switch used to specify option in objv.
  207.                  * NULL means this spec is part of a group. */
  208.     char *dbName;        /* Name for option in option database. */
  209.     char *dbClass;        /* Class for option in database. */
  210.     char *defValue;        /* Default value for option if not
  211.                  * specified in command line or database. */
  212.     int offset;            /* Where in widget record to store value;
  213.                  * use Tk_Offset macro to generate values
  214.                  * for this. */
  215.     int specFlags;        /* Any combination of the values defined
  216.                  * below;  other bits are used internally
  217.                  * by tkConfig.c. */
  218.     Tk_CustomOption *customPtr;    /* If type is TK_CONFIG_CUSTOM then this is
  219.                  * a pointer to info about how to parse and
  220.                  * print the option.  Otherwise it is
  221.                  * irrelevant. */
  222. } Tk_ConfigSpec;
  223.  
  224. /*
  225.  * Type values for Tk_ConfigSpec structures.  See the user
  226.  * documentation for details.
  227.  */
  228.  
  229. #define TK_CONFIG_BOOLEAN    1
  230. #define TK_CONFIG_INT        2
  231. #define TK_CONFIG_DOUBLE    3
  232. #define TK_CONFIG_STRING    4
  233. #define TK_CONFIG_UID        5
  234. #define TK_CONFIG_COLOR        6
  235. #define TK_CONFIG_FONT        7
  236. #define TK_CONFIG_BITMAP    8
  237. #define TK_CONFIG_BORDER    9
  238. #define TK_CONFIG_RELIEF    10
  239. #define TK_CONFIG_CURSOR    11
  240. #define TK_CONFIG_ACTIVE_CURSOR    12
  241. #define TK_CONFIG_JUSTIFY    13
  242. #define TK_CONFIG_ANCHOR    14
  243. #define TK_CONFIG_SYNONYM    15
  244. #define TK_CONFIG_CAP_STYLE    16
  245. #define TK_CONFIG_JOIN_STYLE    17
  246. #define TK_CONFIG_PIXELS    18
  247. #define TK_CONFIG_MM        19
  248. #define TK_CONFIG_WINDOW    20
  249. #define TK_CONFIG_CUSTOM    21
  250. #define TK_CONFIG_CALLBACK    22
  251. #define TK_CONFIG_LANGARG    23
  252. #define TK_CONFIG_SCALARVAR    24
  253. #define TK_CONFIG_HASHVAR    25
  254. #define TK_CONFIG_ARRAYVAR    26
  255. #define TK_CONFIG_OBJECT    27
  256. #define TK_CONFIG_END        28
  257.  
  258. /*
  259.  * Macro to use to fill in "offset" fields of Tk_ConfigInfos.
  260.  * Computes number of bytes from beginning of structure to a
  261.  * given field.
  262.  */
  263.  
  264. #ifdef offsetof
  265. #define Tk_Offset(type, field) ((int) offsetof(type, field))
  266. #else
  267. #define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
  268. #endif
  269.  
  270. /*
  271.  * Possible values for flags argument to Tk_ConfigureWidget:
  272.  */
  273.  
  274. #define TK_CONFIG_ARGV_ONLY    1
  275. #define TK_CONFIG_OBJS        0x80
  276.  
  277. /*
  278.  * Possible flag values for Tk_ConfigInfo structures.  Any bits at
  279.  * or above TK_CONFIG_USER_BIT may be used by clients for selecting
  280.  * certain entries.  Before changing any values here, coordinate with
  281.  * tkConfig.c (internal-use-only flags are defined there).
  282.  */
  283.  
  284. #define TK_CONFIG_COLOR_ONLY        1
  285. #define TK_CONFIG_MONO_ONLY        2
  286. #define TK_CONFIG_NULL_OK        4
  287. #define TK_CONFIG_DONT_SET_DEFAULT    8
  288. #define TK_CONFIG_OPTION_SPECIFIED    0x10
  289. #define TK_CONFIG_USER_BIT        0x100
  290.  
  291. /*
  292.  * Enumerated type for describing actions to be taken in response
  293.  * to a restrictProc established by Tk_RestrictEvents.
  294.  */
  295.  
  296. typedef enum {
  297.     TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT
  298. } Tk_RestrictAction;
  299.  
  300. /*
  301.  * Priority levels to pass to Tk_AddOption:
  302.  */
  303.  
  304. #define TK_WIDGET_DEFAULT_PRIO    20
  305. #define TK_STARTUP_FILE_PRIO    40
  306. #define TK_USER_DEFAULT_PRIO    60
  307. #define TK_INTERACTIVE_PRIO    80
  308. #define TK_MAX_PRIO        100
  309.  
  310. /*
  311.  * Relief values returned by Tk_GetRelief:
  312.  */
  313.  
  314. #define TK_RELIEF_RAISED    1
  315. #define TK_RELIEF_FLAT        2
  316. #define TK_RELIEF_SUNKEN    4
  317. #define TK_RELIEF_GROOVE    8
  318. #define TK_RELIEF_RIDGE        16
  319. #define TK_RELIEF_SOLID        32
  320.  
  321. /*
  322.  * "Which" argument values for Tk_3DBorderGC:
  323.  */
  324.  
  325. #define TK_3D_FLAT_GC        1
  326. #define TK_3D_LIGHT_GC        2
  327. #define TK_3D_DARK_GC        3
  328.  
  329. /*
  330.  * Special EnterNotify/LeaveNotify "mode" for use in events
  331.  * generated by tkShare.c.  Pick a high enough value that it's
  332.  * unlikely to conflict with existing values (like NotifyNormal)
  333.  * or any new values defined in the future.
  334.  */
  335.  
  336. #define TK_NOTIFY_SHARE        20
  337.  
  338. /*
  339.  * Enumerated type for describing a point by which to anchor something:
  340.  */
  341.  
  342. typedef enum {
  343.     TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE,
  344.     TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW,
  345.     TK_ANCHOR_CENTER
  346. } Tk_Anchor;
  347.  
  348. /*
  349.  * Enumerated type for describing a style of justification:
  350.  */
  351.  
  352. typedef enum {
  353.     TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER
  354. } Tk_Justify;
  355.  
  356. /*
  357.  * The following structure is used by Tk_GetFontMetrics() to return
  358.  * information about the properties of a Tk_Font.
  359.  */
  360.  
  361. typedef struct Tk_FontMetrics {
  362.     int ascent;            /* The amount in pixels that the tallest
  363.                  * letter sticks up above the baseline, plus
  364.                  * any extra blank space added by the designer
  365.                  * of the font. */
  366.     int descent;        /* The largest amount in pixels that any
  367.                  * letter sticks below the baseline, plus any
  368.                  * extra blank space added by the designer of
  369.                  * the font. */
  370.     int linespace;        /* The sum of the ascent and descent.  How
  371.                  * far apart two lines of text in the same
  372.                  * font should be placed so that none of the
  373.                  * characters in one line overlap any of the
  374.                  * characters in the other line. */
  375. } Tk_FontMetrics;
  376.  
  377. /*
  378.  * Flags passed to Tk_MeasureChars:
  379.  */
  380.  
  381. #define TK_WHOLE_WORDS        1
  382. #define TK_AT_LEAST_ONE        2
  383. #define TK_PARTIAL_OK        4
  384.  
  385. /*
  386.  * Flags passed to Tk_ComputeTextLayout:
  387.  */
  388.  
  389. #define TK_IGNORE_TABS        8
  390. #define TK_IGNORE_NEWLINES    16
  391.  
  392. /*
  393.  * Each geometry manager (the packer, the placer, etc.) is represented
  394.  * by a structure of the following form, which indicates procedures
  395.  * to invoke in the geometry manager to carry out certain functions.
  396.  */
  397.  
  398. typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData,
  399.     Tk_Window tkwin));
  400. typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData,
  401.     Tk_Window tkwin));
  402.  
  403. typedef struct Tk_GeomMgr {
  404.     char *name;            /* Name of the geometry manager (command
  405.                  * used to invoke it, or name of widget
  406.                  * class that allows embedded widgets). */
  407.     Tk_GeomRequestProc *requestProc;
  408.                 /* Procedure to invoke when a slave's
  409.                  * requested geometry changes. */
  410.     Tk_GeomLostSlaveProc *lostSlaveProc;
  411.                 /* Procedure to invoke when a slave is
  412.                  * taken away from one geometry manager
  413.                  * by another.  NULL means geometry manager
  414.                  * doesn't care when slaves are lost. */
  415. } Tk_GeomMgr;
  416.  
  417. /*
  418.  * Result values returned by Tk_GetScrollInfo:
  419.  */
  420.  
  421. #define TK_SCROLL_MOVETO    1
  422. #define TK_SCROLL_PAGES        2
  423. #define TK_SCROLL_UNITS        3
  424. #define TK_SCROLL_ERROR        4
  425.  
  426. /*
  427.  *---------------------------------------------------------------------------
  428.  *
  429.  * Extensions to the X event set
  430.  *
  431.  *---------------------------------------------------------------------------
  432.  */
  433. #define VirtualEvent        (LASTEvent)
  434. #define ActivateNotify        (LASTEvent + 1)
  435. #define DeactivateNotify    (LASTEvent + 2)
  436. #define MouseWheelEvent     (LASTEvent + 3)
  437. #define TK_LASTEVENT        (LASTEvent + 4)
  438.  
  439. #define MouseWheelMask        (1L << 28)
  440.  
  441. #define ActivateMask        (1L << 29)
  442. #define VirtualEventMask    (1L << 30)
  443. #define TK_LASTEVENT        (LASTEvent + 4)
  444.  
  445.  
  446. /*
  447.  * A virtual event shares most of its fields with the XKeyEvent and
  448.  * XButtonEvent structures.  99% of the time a virtual event will be
  449.  * an abstraction of a key or button event, so this structure provides
  450.  * the most information to the user.  The only difference is the changing
  451.  * of the detail field for a virtual event so that it holds the name of the
  452.  * virtual event being triggered.
  453.  */
  454.  
  455. typedef struct {
  456.     int type;
  457.     unsigned long serial;   /* # of last request processed by server */
  458.     Bool send_event;        /* True if this came from a SendEvent request */
  459.     Display *display;        /* Display the event was read from */
  460.     Window event;        /* Window on which event was requested. */
  461.     Window root;        /* root window that the event occured on */
  462.     Window subwindow;        /* child window */
  463.     Time time;            /* milliseconds */
  464.     int x, y;            /* pointer x, y coordinates in event window */
  465.     int x_root, y_root;        /* coordinates relative to root */
  466.     unsigned int state;        /* key or button mask */
  467.     Tk_Uid name;        /* Name of virtual event. */
  468.     Bool same_screen;        /* same screen flag */
  469. } XVirtualEvent;
  470.  
  471. typedef struct {
  472.     int type;
  473.     unsigned long serial;   /* # of last request processed by server */
  474.     Bool send_event;        /* True if this came from a SendEvent request */
  475.     Display *display;        /* Display the event was read from */
  476.     Window window;        /* Window in which event occurred. */
  477. } XActivateDeactivateEvent;
  478. typedef XActivateDeactivateEvent XActivateEvent;
  479. typedef XActivateDeactivateEvent XDeactivateEvent;
  480.  
  481. /*
  482.  *--------------------------------------------------------------
  483.  *
  484.  * Macros for querying Tk_Window structures.  See the
  485.  * manual entries for documentation.
  486.  *
  487.  *--------------------------------------------------------------
  488.  */
  489.  
  490. #define Tk_Display(tkwin)        (((Tk_FakeWin *) (tkwin))->display)
  491. #define Tk_ScreenNumber(tkwin)        (((Tk_FakeWin *) (tkwin))->screenNum)
  492. #define Tk_Screen(tkwin)        (ScreenOfDisplay(Tk_Display(tkwin), \
  493.     Tk_ScreenNumber(tkwin)))
  494. #define Tk_Depth(tkwin)            (((Tk_FakeWin *) (tkwin))->depth)
  495. #define Tk_Visual(tkwin)        (((Tk_FakeWin *) (tkwin))->visual)
  496. #define Tk_WindowId(tkwin)        (((Tk_FakeWin *) (tkwin))->window)
  497. #define Tk_PathName(tkwin)         (((Tk_FakeWin *) (tkwin))->pathName)
  498. #define Tk_Name(tkwin)            (((Tk_FakeWin *) (tkwin))->nameUid)
  499. #define Tk_Class(tkwin)         (((Tk_FakeWin *) (tkwin))->classUid)
  500. #define Tk_X(tkwin)            (((Tk_FakeWin *) (tkwin))->changes.x)
  501. #define Tk_Y(tkwin)            (((Tk_FakeWin *) (tkwin))->changes.y)
  502. #define Tk_Width(tkwin)            (((Tk_FakeWin *) (tkwin))->changes.width)
  503. #define Tk_Height(tkwin) \
  504.     (((Tk_FakeWin *) (tkwin))->changes.height)
  505. #define Tk_Changes(tkwin)        (&((Tk_FakeWin *) (tkwin))->changes)
  506. #define Tk_Attributes(tkwin)        (&((Tk_FakeWin *) (tkwin))->atts)
  507. #define Tk_IsEmbedded(tkwin) \
  508.     (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED)
  509. #define Tk_IsContainer(tkwin) \
  510.     (((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER)
  511. #define Tk_IsMapped(tkwin) \
  512.     (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED)
  513. #define Tk_IsTopLevel(tkwin) \
  514.     (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL)
  515. #define Tk_ReqWidth(tkwin)        (((Tk_FakeWin *) (tkwin))->reqWidth)
  516. #define Tk_ReqHeight(tkwin)        (((Tk_FakeWin *) (tkwin))->reqHeight)
  517. #define Tk_InternalBorderWidth(tkwin) \
  518.     (((Tk_FakeWin *) (tkwin))->internalBorderWidth)
  519. #define Tk_Parent(tkwin)        (((Tk_FakeWin *) (tkwin))->parentPtr)
  520. #define Tk_Colormap(tkwin)        (((Tk_FakeWin *) (tkwin))->atts.colormap)
  521.  
  522. /*
  523.  * The structure below is needed by the macros above so that they can
  524.  * access the fields of a Tk_Window.  The fields not needed by the macros
  525.  * are declared as "dummyX".  The structure has its own type in order to
  526.  * prevent applications from accessing Tk_Window fields except using
  527.  * official macros.  WARNING!! The structure definition must be kept
  528.  * consistent with the TkWindow structure in tkInt.h.  If you change one,
  529.  * then change the other.  See the declaration in tkInt.h for
  530.  * documentation on what the fields are used for internally.
  531.  */
  532.  
  533. typedef struct Tk_FakeWin {
  534.     Display *display;
  535.     char *dummy1;
  536.     int screenNum;
  537.     Visual *visual;
  538.     int depth;
  539.     Window window;
  540.     char *dummy2;
  541.     char *dummy3;
  542.     Tk_Window parentPtr;
  543.     char *dummy4;
  544.     char *dummy5;
  545.     char *pathName;
  546.     Tk_Uid nameUid;
  547.     Tk_Uid classUid;
  548.     XWindowChanges changes;
  549.     unsigned int dummy6;
  550.     XSetWindowAttributes atts;
  551.     unsigned long dummy7;
  552.     unsigned int flags;
  553.     char *dummy8;
  554. #ifdef TK_USE_INPUT_METHODS
  555.     XIC dummy9;
  556. #endif /* TK_USE_INPUT_METHODS */
  557.     ClientData *dummy10;
  558.     int dummy11;
  559.     int dummy12;
  560.     char *dummy13;
  561.     char *dummy14;
  562.     ClientData dummy15;
  563.     int reqWidth, reqHeight;
  564.     int internalBorderWidth;
  565.     char *dummy16;
  566.     char *dummy17;
  567.     ClientData dummy18;
  568.     char *dummy19;
  569. } Tk_FakeWin;
  570.  
  571. /*
  572.  * Flag values for TkWindow (and Tk_FakeWin) structures are:
  573.  *
  574.  * TK_MAPPED:            1 means window is currently mapped,
  575.  *                0 means unmapped.
  576.  * TK_TOP_LEVEL:        1 means this is a top-level window (it
  577.  *                was or will be created as a child of
  578.  *                a root window).
  579.  * TK_ALREADY_DEAD:        1 means the window is in the process of
  580.  *                being destroyed already.
  581.  * TK_NEED_CONFIG_NOTIFY:    1 means that the window has been reconfigured
  582.  *                before it was made to exist.  At the time of
  583.  *                making it exist a ConfigureNotify event needs
  584.  *                to be generated.
  585.  * TK_GRAB_FLAG:        Used to manage grabs.  See tkGrab.c for
  586.  *                details.
  587.  * TK_CHECKED_IC:        1 means we've already tried to get an input
  588.  *                context for this window;  if the ic field
  589.  *                is NULL it means that there isn't a context
  590.  *                for the field.
  591.  * TK_DONT_DESTROY_WINDOW:    1 means that Tk_DestroyWindow should not
  592.  *                invoke XDestroyWindow to destroy this widget's
  593.  *                X window.  The flag is set when the window
  594.  *                has already been destroyed elsewhere (e.g.
  595.  *                by another application) or when it will be
  596.  *                destroyed later (e.g. by destroying its
  597.  *                parent).
  598.  * TK_WM_COLORMAP_WINDOW:    1 means that this window has at some time
  599.  *                appeared in the WM_COLORMAP_WINDOWS property
  600.  *                for its toplevel, so we have to remove it
  601.  *                from that property if the window is
  602.  *                deleted and the toplevel isn't.
  603.  * TK_EMBEDDED:            1 means that this window (which must be a
  604.  *                toplevel) is not a free-standing window but
  605.  *                rather is embedded in some other application.
  606.  * TK_CONTAINER:        1 means that this window is a container, and
  607.  *                that some other application (either in
  608.  *                this process or elsewhere) may be
  609.  *                embedding itself inside the window.
  610.  * TK_BOTH_HALVES:        1 means that this window is used for
  611.  *                application embedding (either as
  612.  *                container or embedded application), and
  613.  *                both the containing and embedded halves
  614.  *                are associated with windows in this
  615.  *                particular process.
  616.  * TK_DEFER_MODAL:        1 means that this window has deferred a modal
  617.  *                loop until all of the bindings for the current
  618.  *                event have been invoked.
  619.  * TK_WRAPPER:            1 means that this window is the extra
  620.  *                wrapper window created around a toplevel
  621.  *                to hold the menubar under Unix.  See
  622.  *                tkUnixWm.c for more information.
  623.  * TK_REPARENTED:        1 means that this window has been reparented
  624.  *                so that as far as the window system is
  625.  *                concerned it isn't a child of its Tk
  626.  *                parent.  Initially this is used only for
  627.  *                special Unix menubar windows.
  628.  */
  629.  
  630.  
  631. #define TK_MAPPED        1
  632. #define TK_TOP_LEVEL        2
  633. #define TK_ALREADY_DEAD        4
  634. #define TK_NEED_CONFIG_NOTIFY    8
  635. #define TK_GRAB_FLAG        0x10
  636. #define TK_CHECKED_IC        0x20
  637. #define TK_DONT_DESTROY_WINDOW    0x40
  638. #define TK_WM_COLORMAP_WINDOW    0x80
  639. #define TK_EMBEDDED        0x100
  640. #define TK_CONTAINER        0x200
  641. #define TK_BOTH_HALVES        0x400
  642. #define TK_DEFER_MODAL        0x800
  643. #define TK_WRAPPER        0x1000
  644. #define TK_REPARENTED        0x2000
  645.  
  646. /*
  647.  *--------------------------------------------------------------
  648.  *
  649.  * Procedure prototypes and structures used for defining new canvas
  650.  * items:
  651.  *
  652.  *--------------------------------------------------------------
  653.  */
  654.  
  655. typedef enum {
  656.     TK_STATE_NULL, TK_STATE_NORMAL, TK_STATE_HIDDEN,
  657.     TK_STATE_DISABLED, TK_STATE_ACTIVE
  658. } Tk_State;
  659.  
  660. typedef struct Tk_SmoothMethod {
  661.     char *name;
  662.     int (*coordProc) _ANSI_ARGS_((Tk_Canvas canvas,
  663.         double *pointPtr, int numPoints, int numSteps,
  664.         XPoint xPoints[], double dblPoints[]));
  665.     void (*postscriptProc) _ANSI_ARGS_((Tcl_Interp *interp,
  666.         Tk_Canvas canvas, double *coordPtr,
  667.         int numPoints, int numSteps));
  668. } Tk_SmoothMethod;
  669.  
  670. /*
  671.  * For each item in a canvas widget there exists one record with
  672.  * the following structure.  Each actual item is represented by
  673.  * a record with the following stuff at its beginning, plus additional
  674.  * type-specific stuff after that.
  675.  */
  676.  
  677. #define TK_TAG_SPACE 3
  678.  
  679. typedef struct Tk_Item  {
  680.     int id;                /* Unique identifier for this item
  681.                      * (also serves as first tag for
  682.                      * item). */
  683.     struct Tk_Item *nextPtr;        /* Next in display list of all
  684.                      * items in this canvas.  Later items
  685.                      * in list are drawn on top of earlier
  686.                      * ones. */
  687.     Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of
  688.                      * tags. */
  689.     Tk_Uid *tagPtr;            /* Pointer to array of tags.  Usually
  690.                      * points to staticTagSpace, but
  691.                      * may point to malloc-ed space if
  692.                      * there are lots of tags. */
  693.     int tagSpace;            /* Total amount of tag space available
  694.                      * at tagPtr. */
  695.     int numTags;            /* Number of tag slots actually used
  696.                      * at *tagPtr. */
  697.     struct Tk_ItemType *typePtr;    /* Table of procedures that implement
  698.                      * this type of item. */
  699.     int x1, y1, x2, y2;            /* Bounding box for item, in integer
  700.                      * canvas units. Set by item-specific
  701.                      * code and guaranteed to contain every
  702.                      * pixel drawn in item.  Item area
  703.                      * includes x1 and y1 but not x2
  704.                      * and y2. */
  705.     struct Tk_Item *prevPtr;        /* Previous in display list of all
  706.                      * items in this canvas. Later items
  707.                      * in list are drawn just below earlier
  708.                      * ones. */
  709.     Tk_State state;            /* state of item */
  710.     LangCallback *updateCmd;        /* for "-updatecommand" option */
  711.     int redraw_flags;            /* some flags used in the canvas */
  712.     struct Tk_Item *group;        /* group item managing this one */
  713.  
  714.     /*
  715.      *------------------------------------------------------------------
  716.      * Starting here is additional type-specific stuff;  see the
  717.      * declarations for individual types to see what is part of
  718.      * each type.  The actual space below is determined by the
  719.      * "itemInfoSize" of the type's Tk_ItemType record.
  720.      *------------------------------------------------------------------
  721.      */
  722. } Tk_Item;
  723.  
  724. /*
  725.  * Flag bits for canvases (redraw_flags):
  726.  *
  727.  * TK_ITEM_STATE_DEPENDANT -    1 means that object needs to be
  728.  *                redrawn if the canvas state changes.
  729.  * TK_ITEM_DONT_REDRAW -     1 means that the object redraw is already
  730.  *                been prepared, so the general canvas code
  731.  *                doesn't need to do that any more.
  732.  */
  733.  
  734. #define TK_ITEM_STATE_DEPENDANT        1
  735. #define TK_ITEM_DONT_REDRAW        2
  736.  
  737. /*
  738.  * Structures used for implementing visitors.
  739.  */
  740.  
  741. typedef ClientData Tk_VisitorStartProc _ANSI_ARGS_((Tcl_Interp *interp,
  742.            Tk_Canvas canvas, int argc, Tcl_Obj **objv));
  743. typedef int     Tk_VisitorItemProc _ANSI_ARGS_((Tcl_Interp *interp,
  744.            Tk_Canvas canvas, ClientData clientData,
  745.            Tk_Item *itemPtr));
  746. typedef int     Tk_VisitorEndProc _ANSI_ARGS_((Tcl_Interp *interp,
  747.            Tk_Canvas canvas, ClientData clientData));
  748.  
  749. typedef struct Tk_VisitorType {
  750.     char *name;
  751.     int typeSize;            /* should be sizeof(Tk_VisitorType) */
  752.     int flags;                /* If this flag is non-zero then
  753.                      * the item needs to be redrawn. */
  754.     Tk_VisitorStartProc *startProc;
  755.     Tk_VisitorEndProc  *endProc;
  756.     Tk_VisitorItemProc *visitArc;    /* The Arc visitor procedure. */
  757.     Tk_VisitorItemProc *visitBitmap;    /* The Bitmap visitor procedure. */
  758.     Tk_VisitorItemProc *visitImage;    /* The Image visitor procedure. */
  759.     Tk_VisitorItemProc *visitLine;    /* The Line visitor procedure. */
  760.     Tk_VisitorItemProc *visitOval;    /* The Oval visitor procedure. */
  761.     Tk_VisitorItemProc *visitPolygon;    /* The Polygon visitor procedure. */
  762.     Tk_VisitorItemProc *visitRectangle;    /* The Rectangle visitor procedure. */
  763.     Tk_VisitorItemProc *visitText;    /* The Text visitor procedure. */
  764.     Tk_VisitorItemProc *visitWindow;    /* The Window visitor procedure. */
  765.     Tk_VisitorItemProc *visitSticker;    /* The Sticker visitor procedure.
  766.                      * from tkSticker*/
  767.     Tk_VisitorItemProc *visitViewport;    /* The Viewport visitor procedure.
  768.                      * from TkSM */
  769.     Tk_VisitorItemProc *visitBarchart;    /* The Barchart visitor procedure.
  770.                      * from Scotty */
  771.     Tk_VisitorItemProc *visitStripchart;/* The Stripchart visitor procedure.
  772.                      * from Scotty */
  773.  
  774.     /* ptk extensions */
  775.     Tk_VisitorItemProc *visitGroup;    /* The Group visitor procedure. */
  776.     Tk_VisitorItemProc *visitGrid;    /* The Grid visitor procedure. */
  777.  
  778.     /*
  779.      *------------------------------------------------------------------
  780.      * Starting here is additional item-extension stuff;
  781.      * you can add extra item types after this plus other information.
  782.      *------------------------------------------------------------------
  783.      */
  784. } Tk_VisitorType;
  785.  
  786. /*
  787.  * Records of the following type are used to describe a type of
  788.  * item (e.g.  lines, circles, etc.) that can form part of a
  789.  * canvas widget.
  790.  */
  791.  
  792. typedef int    Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
  793.             Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
  794.             Tcl_Obj **objv));
  795. typedef int    Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,
  796.             Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
  797.             Tcl_Obj **objv, int flags));
  798. typedef int    Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,
  799.             Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
  800.             Tcl_Obj **objv));
  801. typedef void    Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas,
  802.             Tk_Item *itemPtr, Display *display));
  803. typedef void    Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas,
  804.             Tk_Item *itemPtr, Display *display, Drawable dst,
  805.             int x, int y, int width, int height));
  806. typedef double    Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas,
  807.             Tk_Item *itemPtr, double *pointPtr));
  808. typedef int    Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas,
  809.             Tk_Item *itemPtr, double *rectPtr));
  810. typedef int    Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp,
  811.             Tk_Canvas canvas, Tk_Item *itemPtr, int prepass));
  812. typedef void    Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas,
  813.             Tk_Item *itemPtr, double originX, double originY,
  814.             double scaleX, double scaleY));
  815. typedef void    Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas,
  816.             Tk_Item *itemPtr, double deltaX, double deltaY));
  817. typedef int    Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp,
  818.             Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Obj *indexString,
  819.             int *indexPtr));
  820. typedef void    Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas,
  821.             Tk_Item *itemPtr, int index));
  822. typedef int    Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas,
  823.             Tk_Item *itemPtr, int offset, char *buffer,
  824.             int maxBytes));
  825. typedef void    Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas,
  826.             Tk_Item *itemPtr, int beforeThis, Tcl_Obj *string));
  827. typedef void    Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas,
  828.             Tk_Item *itemPtr, int first, int last));
  829. typedef void    Tk_ItemBboxProc _ANSI_ARGS_((Tk_Canvas canvas,
  830.             Tk_Item *itemPtr));
  831. typedef int    Tk_ItemGetCoordProc _ANSI_ARGS_((Tk_Item *itemPtr,
  832.             double **coordsPtr, Tcl_FreeProc *freeProc));
  833. typedef int    Tk_ItemSetCoordProc _ANSI_ARGS_((Tk_Canvas canvas,
  834.             Tk_Item *itemPtr, int num, double *coords));
  835.  
  836. /*
  837.  * Some flag values that can be used in the "flags" field in Tk_ItemType.
  838.  */
  839.  
  840. #define TK_ITEM_ALWAYS_REDRAW 1
  841. #define TK_ITEM_VISITOR_SUPPORT 2
  842.  
  843. /*
  844.  * Structures used for implementing visitors.
  845.  */
  846.  
  847. typedef struct Tk_ItemType {
  848.     char *name;                /* The name of this type of item, such
  849.                      * as "line". */
  850.     int itemSize;            /* Total amount of space needed for
  851.                      * item's record. */
  852.     Tk_ItemCreateProc *createProc;    /* Procedure to create a new item of
  853.                      * this type. */
  854.     Tk_ConfigSpec *configSpecs;        /* Pointer to array of configuration
  855.                      * specs for this type.  Used for
  856.                      * returning configuration info. */
  857.     Tk_ItemConfigureProc *configProc;    /* Procedure to call to change
  858.                      * configuration options. */
  859.     Tk_ItemCoordProc *coordProc;    /* Procedure to call to get and set
  860.                      * the item's coordinates. */
  861.     Tk_ItemDeleteProc *deleteProc;    /* Procedure to delete existing item of
  862.                      * this type. */
  863.     Tk_ItemDisplayProc *displayProc;    /* Procedure to display items of
  864.                      * this type. */
  865.     int flags;                /* TK_ITEM_TYPE_ALWAYS_REDRAW means displayProc
  866.                      * should be called even when the item has
  867.                      * been moved off-screen. */
  868.     Tk_ItemPointProc *pointProc;    /* Computes distance from item to
  869.                      * a given point. */
  870.     Tk_ItemAreaProc *areaProc;        /* Computes whether item is inside,
  871.                      * outside, or overlapping an area. */
  872.     Tk_ItemPostscriptProc *postscriptProc;
  873.                     /* Procedure to write a Postscript
  874.                      * description for items of this
  875.                      * type. */
  876.     Tk_ItemScaleProc *scaleProc;    /* Procedure to rescale items of
  877.                      * this type. */
  878.     Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of
  879.                      * this type. */
  880.     Tk_ItemIndexProc *indexProc;    /* Procedure to determine index of
  881.                      * indicated character.  NULL if
  882.                      * item doesn't support indexing. */
  883.     Tk_ItemCursorProc *icursorProc;    /* Procedure to set insert cursor pos.
  884.                      * to just before a given position. */
  885.     Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in
  886.                      * STRING format) when it is in this
  887.                      * item. */
  888.     Tk_ItemInsertProc *insertProc;    /* Procedure to insert something into
  889.                      * an item. */
  890.     Tk_ItemDCharsProc *dCharsProc;    /* Procedure to delete characters
  891.                      * from an item. */
  892.     struct Tk_ItemType *nextPtr;    /* Used to link types together into
  893.                      * a list. */
  894.     Tk_ItemBboxProc *bboxProc;        /* Procedure to calculate the bounding
  895.                      * box for an item. */
  896.     int acceptProc;            /* Offset of visitors function  in
  897.                      * tkVisitorType struct for this item. */
  898.     Tk_ItemGetCoordProc *getCoordProc;    /* Procedure to get the coordinates
  899.                      * for an item. */
  900.     Tk_ItemSetCoordProc *setCoordProc;    /* Procedure to set the coordinates
  901.                      * for an item. */
  902. } Tk_ItemType;
  903.  
  904. /*
  905.  * The following structure provides information about the selection and
  906.  * the insertion cursor.  It is needed by only a few items, such as
  907.  * those that display text.  It is shared by the generic canvas code
  908.  * and the item-specific code, but most of the fields should be written
  909.  * only by the canvas generic code.
  910.  */
  911.  
  912. typedef struct Tk_CanvasTextInfo {
  913.     Tk_3DBorder selBorder;    /* Border and background for selected
  914.                  * characters.  Read-only to items.*/
  915.     int selBorderWidth;        /* Width of border around selection.
  916.                  * Read-only to items. */
  917.     XColor *selFgColorPtr;    /* Foreground color for selected text.
  918.                  * Read-only to items. */
  919.     Tk_Item *selItemPtr;    /* Pointer to selected item.  NULL means
  920.                  * selection isn't in this canvas.
  921.                  * Writable by items. */
  922.     int selectFirst;        /* Index of first selected character.
  923.                  * Writable by items. */
  924.     int selectLast;        /* Index of last selected character.
  925.                  * Writable by items. */
  926.     Tk_Item *anchorItemPtr;    /* Item corresponding to "selectAnchor":
  927.                  * not necessarily selItemPtr.   Read-only
  928.                  * to items. */
  929.     int selectAnchor;        /* Fixed end of selection (i.e. "select to"
  930.                  * operation will use this as one end of the
  931.                  * selection).  Writable by items. */
  932.     Tk_3DBorder insertBorder;    /* Used to draw vertical bar for insertion
  933.                  * cursor.  Read-only to items. */
  934.     int insertWidth;        /* Total width of insertion cursor.  Read-only
  935.                  * to items. */
  936.     int insertBorderWidth;    /* Width of 3-D border around insert cursor.
  937.                  * Read-only to items. */
  938.     Tk_Item *focusItemPtr;    /* Item that currently has the input focus,
  939.                  * or NULL if no such item.  Read-only to
  940.                  * items.  */
  941.     int gotFocus;        /* Non-zero means that the canvas widget has
  942.                  * the input focus.  Read-only to items.*/
  943.     int cursorOn;        /* Non-zero means that an insertion cursor
  944.                  * should be displayed in focusItemPtr.
  945.                  * Read-only to items.*/
  946. } Tk_CanvasTextInfo;
  947.  
  948. /*
  949.  * Structures used for Dashing and Outline.
  950.  */
  951.  
  952. typedef struct Tk_Dash {
  953.     int number;
  954.     union {
  955.     char *pt;
  956.     char array[sizeof(char *)];
  957.     } pattern;
  958. } Tk_Dash;
  959.  
  960. typedef struct Tk_TSOffset {
  961.     int flags;            /* flags; see below for possible values */
  962.     int xoffset;        /* x offset */
  963.     int yoffset;        /* y offset */
  964. } Tk_TSOffset;
  965.  
  966. /*
  967.  * Bit fields in Tk_Offset->flags:
  968.  */
  969.  
  970. #define TK_OFFSET_INDEX        1
  971. #define TK_OFFSET_RELATIVE    2
  972. #define TK_OFFSET_LEFT        4
  973. #define TK_OFFSET_CENTER    8
  974. #define TK_OFFSET_RIGHT        16
  975. #define TK_OFFSET_TOP        32
  976. #define TK_OFFSET_MIDDLE    64
  977. #define TK_OFFSET_BOTTOM    128
  978.  
  979. typedef struct Tk_Tile_ *Tk_Tile;    /* Opaque type for tiles */
  980.  
  981. typedef struct Tk_Outline {
  982.     GC gc;            /* Graphics context. */
  983.     double width;        /* Width of outline. */
  984.     double activeWidth;        /* Width of outline. */
  985.     double disabledWidth;    /* Width of outline. */
  986.     int offset;            /* Dash offset */
  987.     Tk_Dash dash;        /* Dash pattern */
  988.     Tk_Dash activeDash;        /* Dash pattern if state is active*/
  989.     Tk_Dash disabledDash;    /* Dash pattern if state is disabled*/
  990.     Tk_Tile tile;        /* Tile pattern */
  991.     Tk_Tile activeTile;        /* Tile pattern if state is active*/
  992.     Tk_Tile disabledTile;    /* Tile pattern if state is disabled*/
  993.     Tk_TSOffset tsoffset;    /* tile/stipple offset for outline*/
  994.     XColor *color;        /* Outline color. */
  995.     XColor *activeColor;    /* Outline color if state is active. */
  996.     XColor *disabledColor;    /* Outline color if state is disabled. */
  997.     Pixmap stipple;        /* Outline Stipple pattern. */
  998.     Pixmap activeStipple;    /* Outline Stipple pattern if state is active. */
  999.     Pixmap disabledStipple;    /* Outline Stipple pattern if state is disabled. */
  1000. } Tk_Outline;
  1001.  
  1002. /*
  1003.  * Some functions handy for Dashing and Outlines (in tkCanvUtil.c).
  1004.  */
  1005.  
  1006. EXTERN int    Tk_GetDash _ANSI_ARGS_((Tcl_Interp *interp,
  1007.             Arg value, Tk_Dash *dash));
  1008. EXTERN void    Tk_CreateOutline _ANSI_ARGS_((Tk_Outline *outline));
  1009. EXTERN void    Tk_DeleteOutline _ANSI_ARGS_((Display *display,
  1010.             Tk_Outline *outline));
  1011. EXTERN int    Tk_ConfigOutlineGC _ANSI_ARGS_((XGCValues *gcValues,
  1012.             Tk_Canvas canvas ,Tk_Item *item,
  1013.             Tk_Outline *outline));
  1014. EXTERN int    Tk_ChangeOutlineGC _ANSI_ARGS_((Tk_Canvas canvas,
  1015.             Tk_Item *item, Tk_Outline *outline));
  1016. EXTERN int    Tk_ResetOutlineGC _ANSI_ARGS_((Tk_Canvas canvas,
  1017.             Tk_Item *item, Tk_Outline *outline));
  1018. EXTERN int    Tk_CanvasPsOutline _ANSI_ARGS_((Tk_Canvas canvas,
  1019.             Tk_Item *item, Tk_Outline *outline));
  1020.  
  1021. /*
  1022.  * Some functions handy for Tiling and Stipple/Tile offset.
  1023.  */
  1024.  
  1025. typedef void    (Tk_TileChangedProc) _ANSI_ARGS_((ClientData clientData,
  1026.             Tk_Tile tile, Tk_Item *itemPtr));
  1027. EXTERN Tk_Tile    Tk_GetTile _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin,
  1028.             CONST char *imageName));
  1029. EXTERN void    Tk_FreeTile _ANSI_ARGS_((Tk_Tile tile));
  1030. EXTERN char *    Tk_NameOfTile _ANSI_ARGS_((Tk_Tile tile));
  1031. EXTERN void    Tk_SetTileChangedProc _ANSI_ARGS_((Tk_Tile tile,
  1032.             Tk_TileChangedProc * changeProc, ClientData clientData,
  1033.             Tk_Item *itemPtr));
  1034. EXTERN Pixmap    Tk_PixmapOfTile _ANSI_ARGS_((Tk_Tile tile));
  1035. EXTERN int    Tk_PixelParseProc _ANSI_ARGS_((
  1036.             ClientData clientData, Tcl_Interp *interp,
  1037.             Tk_Window tkwin, Arg value, char *widgRec,
  1038.             int offset));
  1039. EXTERN Arg    Tk_PixelPrintProc _ANSI_ARGS_((
  1040.             ClientData clientData, Tk_Window tkwin,
  1041.             char *widgRec, int offset,
  1042.             Tcl_FreeProc **freeProcPtr));
  1043. EXTERN void    Tk_SizeOfTile _ANSI_ARGS_((Tk_Tile tile, int *widthPtr,
  1044.             int *heightPtr));
  1045. EXTERN void    Tk_SetTileOrigin _ANSI_ARGS_((Tk_Window tkwin, GC gc, int x,
  1046.             int y));
  1047. EXTERN int    Tk_TileParseProc _ANSI_ARGS_((
  1048.             ClientData clientData, Tcl_Interp *interp,
  1049.             Tk_Window tkwin, Arg value, char *widgRec,
  1050.             int offset));
  1051. EXTERN Arg    Tk_TilePrintProc _ANSI_ARGS_((
  1052.             ClientData clientData, Tk_Window tkwin,
  1053.             char *widgRec, int offset,
  1054.             Tcl_FreeProc **freeProcPtr));
  1055. EXTERN int    Tk_OffsetParseProc _ANSI_ARGS_((
  1056.             ClientData clientData, Tcl_Interp *interp,
  1057.             Tk_Window tkwin, Arg value, char *widgRec,
  1058.             int offset));
  1059. EXTERN Arg    Tk_OffsetPrintProc _ANSI_ARGS_((
  1060.             ClientData clientData, Tk_Window tkwin,
  1061.             char *widgRec, int offset,
  1062.             Tcl_FreeProc **freeProcPtr));
  1063. EXTERN void    Tk_SetTileCanvasItem _ANSI_ARGS_((Tk_Tile tile,
  1064.                 Tk_Canvas canvas, Tk_Item *itemPtr));
  1065.  
  1066.  
  1067. /*
  1068.  *--------------------------------------------------------------
  1069.  *
  1070.  * Procedure prototypes and structures used for managing images:
  1071.  *
  1072.  *--------------------------------------------------------------
  1073.  */
  1074.  
  1075. typedef struct Tk_ImageType Tk_ImageType;
  1076. typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,
  1077.     char *name, int objc, Tcl_Obj *objv[], Tk_ImageType *typePtr,
  1078.     Tk_ImageMaster master, ClientData *masterDataPtr));
  1079. typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,
  1080.     ClientData masterData));
  1081. typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData,
  1082.     Display *display, Drawable drawable, int imageX, int imageY,
  1083.     int width, int height, int drawableX, int drawableY));
  1084. typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData,
  1085.     Display *display));
  1086. typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData));
  1087. typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData,
  1088.     int x, int y, int width, int height, int imageWidth,
  1089.     int imageHeight));
  1090. typedef int (Tk_ImagePostscriptProc) _ANSI_ARGS_((ClientData clientData,
  1091.     Tcl_Interp *interp, Tk_Window tkwin, Tk_PostscriptInfo psinfo,
  1092.     int x, int y, int width, int height, int prepass));
  1093.  
  1094. /*
  1095.  * The following structure represents a particular type of image
  1096.  * (bitmap, xpm image, etc.).  It provides information common to
  1097.  * all images of that type, such as the type name and a collection
  1098.  * of procedures in the image manager that respond to various
  1099.  * events.  Each image manager is represented by one of these
  1100.  * structures.
  1101.  */
  1102.  
  1103. struct Tk_ImageType {
  1104.     char *name;            /* Name of image type. */
  1105.     Tk_ImageCreateProc *createProc;
  1106.                 /* Procedure to call to create a new image
  1107.                  * of this type. */
  1108.     Tk_ImageGetProc *getProc;    /* Procedure to call the first time
  1109.                  * Tk_GetImage is called in a new way
  1110.                  * (new visual or screen). */
  1111.     Tk_ImageDisplayProc *displayProc;
  1112.                 /* Call to draw image, in response to
  1113.                  * Tk_RedrawImage calls. */
  1114.     Tk_ImageFreeProc *freeProc;    /* Procedure to call whenever Tk_FreeImage
  1115.                  * is called to release an instance of an
  1116.                  * image. */
  1117.     Tk_ImageDeleteProc *deleteProc;
  1118.                 /* Procedure to call to delete image.  It
  1119.                  * will not be called until after freeProc
  1120.                  * has been called for each instance of the
  1121.                  * image. */
  1122.     Tk_ImagePostscriptProc *postscriptProc;
  1123.                 /* Procedure to call to create postscript
  1124.                  * output for this image type. */
  1125.     struct Tk_ImageType *nextPtr;
  1126.                 /* Next in list of all image types currently
  1127.                  * known.  Filled in by Tk, not by image
  1128.                  * manager. */
  1129.     char *reserved;        /* reserved for future expansion */
  1130. };
  1131.  
  1132. /*
  1133.  *--------------------------------------------------------------
  1134.  *
  1135.  * Additional definitions used to manage images of type "photo".
  1136.  *
  1137.  *--------------------------------------------------------------
  1138.  */
  1139.  
  1140. /*
  1141.  * The following type is used to identify a particular photo image
  1142.  * to be manipulated:
  1143.  */
  1144.  
  1145. typedef void *Tk_PhotoHandle;
  1146.  
  1147. /*
  1148.  * The following structure describes a block of pixels in memory:
  1149.  */
  1150.  
  1151. typedef struct Tk_PhotoImageBlock {
  1152.     unsigned char *pixelPtr;    /* Pointer to the first pixel. */
  1153.     int        width;        /* Width of block, in pixels. */
  1154.     int        height;        /* Height of block, in pixels. */
  1155.     int        pitch;        /* Address difference between corresponding
  1156.                  * pixels in successive lines. */
  1157.     int        pixelSize;    /* Address difference between successive
  1158.                  * pixels in the same line. */
  1159.     int        offset[4];    /* Address differences between the red, green
  1160.                  * and blue components of the pixel and the
  1161.                  * pixel as a whole. */
  1162.     int        reserved;    /* Reserved for extensions (dash patch) */
  1163. } Tk_PhotoImageBlock;
  1164.  
  1165. /*
  1166.  * Procedure prototypes and structures used in reading and
  1167.  * writing photo images:
  1168.  */
  1169.  
  1170. typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;
  1171. typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan,
  1172.     Tcl_Obj *fileName, Tcl_Obj *format, int *widthPtr,
  1173.     int *heightPtr));
  1174. typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj,
  1175.     Tcl_Obj *format, int *widthPtr, int *heightPtr));
  1176. typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
  1177.     Tcl_Channel chan, Tcl_Obj *fileName, Tcl_Obj *format,
  1178.     Tk_PhotoHandle imageHandle, int destX, int destY,
  1179.     int width, int height, int srcX, int srcY));
  1180. typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
  1181.     Tcl_Obj *dataObj, Tcl_Obj *format, Tk_PhotoHandle imageHandle,
  1182.     int destX, int destY, int width, int height, int srcX, int srcY));
  1183. typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
  1184.     char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
  1185. typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
  1186.     Tcl_DString *dataPtr, Tcl_Obj *format,
  1187.     Tk_PhotoImageBlock *blockPtr));
  1188.  
  1189. /*
  1190.  * The following structure represents a particular file format for
  1191.  * storing images (e.g., PPM, GIF, JPEG, etc.).  It provides information
  1192.  * to allow image files of that format to be recognized and read into
  1193.  * a photo image.
  1194.  */
  1195.  
  1196. struct Tk_PhotoImageFormat {
  1197.     char *name;            /* Name of image file format */
  1198.     Tk_ImageFileMatchProc *fileMatchProc;
  1199.                 /* Procedure to call to determine whether
  1200.                  * an image file matches this format. */
  1201.     Tk_ImageStringMatchProc *stringMatchProc;
  1202.                 /* Procedure to call to determine whether
  1203.                  * the data in a string matches this format. */
  1204.     Tk_ImageFileReadProc *fileReadProc;
  1205.                 /* Procedure to call to read data from
  1206.                  * an image file into a photo image. */
  1207.     Tk_ImageStringReadProc *stringReadProc;
  1208.                 /* Procedure to call to read data from
  1209.                  * a string into a photo image. */
  1210.     Tk_ImageFileWriteProc *fileWriteProc;
  1211.                 /* Procedure to call to write data from
  1212.                  * a photo image to a file. */
  1213.     Tk_ImageStringWriteProc *stringWriteProc;
  1214.                 /* Procedure to call to obtain a string
  1215.                  * representation of the data in a photo
  1216.                  * image.*/
  1217.     struct Tk_PhotoImageFormat *nextPtr;
  1218.                 /* Next in list of all photo image formats
  1219.                  * currently known.  Filled in by Tk, not
  1220.                  * by image format handler. */
  1221. };
  1222.  
  1223. /*
  1224.  *--------------------------------------------------------------
  1225.  *
  1226.  * The definitions below provide backward compatibility for
  1227.  * functions and types related to event handling that used to
  1228.  * be in Tk but have moved to Tcl.
  1229.  *
  1230.  *--------------------------------------------------------------
  1231.  */
  1232.  
  1233. #if 0
  1234.  
  1235. #define TK_READABLE        TCL_READABLE
  1236. #define TK_WRITABLE        TCL_WRITABLE
  1237. #define TK_EXCEPTION        TCL_EXCEPTION
  1238.  
  1239. #define TK_DONT_WAIT        TCL_DONT_WAIT
  1240. #define TK_X_EVENTS        TCL_WINDOW_EVENTS
  1241. #define TK_WINDOW_EVENTS    TCL_WINDOW_EVENTS
  1242. #define TK_FILE_EVENTS        TCL_FILE_EVENTS
  1243. #define TK_TIMER_EVENTS        TCL_TIMER_EVENTS
  1244. #define TK_IDLE_EVENTS        TCL_IDLE_EVENTS
  1245. #define TK_ALL_EVENTS        TCL_ALL_EVENTS
  1246.  
  1247. #define Tk_IdleProc        Tcl_IdleProc
  1248. #define Tk_FileProc        Tcl_FileProc
  1249. #define Tk_TimerProc        Tcl_TimerProc
  1250. #define Tk_TimerToken        Tcl_TimerToken
  1251.  
  1252. #define Tk_BackgroundError    Tcl_BackgroundError
  1253. #define Tk_CancelIdleCall    Tcl_CancelIdleCall
  1254. #define Tk_CreateFileHandler    Tcl_CreateFileHandler
  1255. #define Tk_CreateTimerHandler    Tcl_CreateTimerHandler
  1256. #define Tk_DeleteFileHandler    Tcl_DeleteFileHandler
  1257. #define Tk_DeleteTimerHandler    Tcl_DeleteTimerHandler
  1258. #define Tk_DoOneEvent        Tcl_DoOneEvent
  1259. #define Tk_DoWhenIdle        Tcl_DoWhenIdle
  1260. #define Tk_Sleep        Tcl_Sleep
  1261.  
  1262. #define Tk_EventuallyFree    Tcl_EventuallyFree
  1263. #define Tk_FreeProc        Tcl_FreeProc
  1264. #define Tk_Preserve        Tcl_Preserve
  1265. #define Tk_Release        Tcl_Release
  1266. #define Tk_FileeventCmd        Tcl_FileEventCmd
  1267.  
  1268. #endif
  1269.  
  1270.  
  1271. /*
  1272.  *--------------------------------------------------------------
  1273.  *
  1274.  * Additional procedure types defined by Tk.
  1275.  *
  1276.  *--------------------------------------------------------------
  1277.  */
  1278.  
  1279. #define TK_EVENTTYPE_NONE    0
  1280. #define TK_EVENTTYPE_STRING  1
  1281. #define TK_EVENTTYPE_NUMBER  2
  1282. #define TK_EVENTTYPE_WINDOW  3
  1283. #define TK_EVENTTYPE_ATOM    4
  1284. #define TK_EVENTTYPE_DISPLAY 5
  1285. #define TK_EVENTTYPE_DATA    6
  1286.  
  1287. typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData,
  1288.     XErrorEvent *errEventPtr));
  1289. typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData,
  1290.     XEvent *eventPtr));
  1291. typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData,
  1292.     XEvent *eventPtr));
  1293. typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData,
  1294.     Tcl_Interp *interp, char *portion));
  1295. typedef int (Tk_GetXSelProc) _ANSI_ARGS_((ClientData clientData,
  1296.     Tcl_Interp *interp, long *portion, int numValues,
  1297.     int format, Atom type, Tk_Window tkwin));
  1298. typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData));
  1299. typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_((
  1300.     ClientData clientData, XEvent *eventPtr));
  1301. typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData,
  1302.     int offset, char *buffer, int maxBytes));
  1303. typedef int (Tk_XSelectionProc) _ANSI_ARGS_((ClientData clientData,
  1304.     int offset, long *buffer, int maxBytes,
  1305.     Atom type, Tk_Window tkwin));
  1306.  
  1307.  
  1308. typedef struct {
  1309.     char *name;            /* Name of command. */
  1310.     int (*cmdProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp,
  1311.         int argc, Tcl_Obj **objv));
  1312.                 /* Command procedure. */
  1313. } Tk_Cmd;
  1314.  
  1315. /*
  1316.  *--------------------------------------------------------------
  1317.  *
  1318.  * Exported procedures and variables.
  1319.  *
  1320.  *--------------------------------------------------------------
  1321.  */
  1322.  
  1323. EXTERN char *        Tk_EventInfo _ANSI_ARGS_((int letter, Tk_Window tkwin, XEvent *eventPtr,
  1324.                 KeySym keySym, int *numPtr, int *isNum, int *type,
  1325.                             int num_size, char *numStorage));
  1326.  
  1327. EXTERN XColor *        Tk_3DBorderColor _ANSI_ARGS_((Tk_3DBorder border));
  1328. EXTERN GC        Tk_3DBorderGC _ANSI_ARGS_((Tk_Window tkwin,
  1329.                 Tk_3DBorder border, int which));
  1330. EXTERN void        Tk_3DHorizontalBevel _ANSI_ARGS_((Tk_Window tkwin,
  1331.                 Drawable drawable, Tk_3DBorder border, int x,
  1332.                 int y, int width, int height, int leftIn,
  1333.                 int rightIn, int topBevel, int relief));
  1334. EXTERN void        Tk_3DVerticalBevel _ANSI_ARGS_((Tk_Window tkwin,
  1335.                 Drawable drawable, Tk_3DBorder border, int x,
  1336.                 int y, int width, int height, int leftBevel,
  1337.                 int relief));
  1338. EXTERN void        Tk_AddOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
  1339.                 char *value, int priority));
  1340. EXTERN void        Tk_BindEvent _ANSI_ARGS_((Tk_BindingTable bindingTable,
  1341.                 XEvent *eventPtr, Tk_Window tkwin, int numObjects,
  1342.                 ClientData *objectPtr));
  1343. EXTERN int        Tk_CanvasDashParseProc _ANSI_ARGS_((
  1344.                 ClientData clientData, Tcl_Interp *interp,
  1345.                 Tk_Window tkwin, Arg value, char *widgRec,
  1346.                 int offset));
  1347. EXTERN Arg        Tk_CanvasDashPrintProc _ANSI_ARGS_((
  1348.                 ClientData clientData, Tk_Window tkwin,
  1349.                 char *widgRec, int offset,
  1350.                 Tcl_FreeProc **freeProcPtr));
  1351. EXTERN void        Tk_CanvasDrawableCoords _ANSI_ARGS_((Tk_Canvas canvas,
  1352.                 double x, double y, short *drawableXPtr,
  1353.                 short *drawableYPtr));
  1354. EXTERN void        Tk_CanvasEventuallyRedraw _ANSI_ARGS_((
  1355.                 Tk_Canvas canvas, int x1, int y1, int x2,
  1356.                 int y2));
  1357. EXTERN int        Tk_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp *interp,
  1358.                 Tk_Canvas canvas, char *string,
  1359.                 double *doublePtr));
  1360. EXTERN int        Tk_CanvasGetCoordFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1361.                 Tk_Canvas canvas, Tcl_Obj *obj,
  1362.                 double *doublePtr));
  1363. EXTERN Tk_CanvasTextInfo *Tk_CanvasGetTextInfo _ANSI_ARGS_((Tk_Canvas canvas));
  1364. EXTERN int        Tk_CanvasPsBitmap _ANSI_ARGS_((Tcl_Interp *interp,
  1365.                 Tk_Canvas canvas, Pixmap bitmap, int x, int y,
  1366.                 int width, int height));
  1367. EXTERN int        Tk_CanvasPsColor _ANSI_ARGS_((Tcl_Interp *interp,
  1368.                 Tk_Canvas canvas, XColor *colorPtr));
  1369. EXTERN int        Tk_CanvasPsFont _ANSI_ARGS_((Tcl_Interp *interp,
  1370.                 Tk_Canvas canvas, Tk_Font font));
  1371. EXTERN void        Tk_CanvasPsPath _ANSI_ARGS_((Tcl_Interp *interp,
  1372.                 Tk_Canvas canvas, double *coordPtr, int numPoints));
  1373. EXTERN int        Tk_CanvasPsStipple _ANSI_ARGS_((Tcl_Interp *interp,
  1374.                 Tk_Canvas canvas, Pixmap bitmap));
  1375. EXTERN double        Tk_CanvasPsY _ANSI_ARGS_((Tk_Canvas canvas, double y));
  1376. EXTERN void        Tk_CanvasSetOffset _ANSI_ARGS_((
  1377.                 Tk_Canvas canvas, GC gc, Tk_TSOffset *offset));
  1378. EXTERN void        Tk_CanvasSetStippleOrigin _ANSI_ARGS_((
  1379.                 Tk_Canvas canvas, GC gc));
  1380. EXTERN int        Tk_CanvasTagsParseProc _ANSI_ARGS_((
  1381.                 ClientData clientData, Tcl_Interp *interp,
  1382.                 Tk_Window tkwin, Arg value, char *widgRec,
  1383.                 int offset));
  1384. EXTERN Arg        Tk_CanvasTagsPrintProc _ANSI_ARGS_((
  1385.                 ClientData clientData, Tk_Window tkwin,
  1386.                 char *widgRec, int offset,
  1387.                 Tcl_FreeProc **freeProcPtr));
  1388. EXTERN Tk_Window    Tk_CanvasTkwin _ANSI_ARGS_((Tk_Canvas canvas));
  1389. EXTERN void        Tk_CanvasWindowCoords _ANSI_ARGS_((Tk_Canvas canvas,
  1390.                 double x, double y, short *screenXPtr,
  1391.                 short *screenYPtr));
  1392. EXTERN void        Tk_ChangeWindowAttributes _ANSI_ARGS_((Tk_Window tkwin,
  1393.                 unsigned long valueMask,
  1394.                 XSetWindowAttributes *attsPtr));
  1395. EXTERN int        Tk_CharBbox _ANSI_ARGS_((Tk_TextLayout layout,
  1396.                 int index, int *xPtr, int *yPtr, int *widthPtr,
  1397.                 int *heightPtr));
  1398. EXTERN void        Tk_ClearSelection _ANSI_ARGS_((Tk_Window tkwin,
  1399.                 Atom selection));
  1400. EXTERN int        Tk_ClipboardAppend _ANSI_ARGS_((Tcl_Interp *interp,
  1401.                 Tk_Window tkwin, Atom target, Atom format,
  1402.                 char* buffer));
  1403. EXTERN int        Tk_ClipboardClear _ANSI_ARGS_((Tcl_Interp *interp,
  1404.                 Tk_Window tkwin));
  1405. EXTERN int        Tk_ConfigureInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1406.                 Tk_Window tkwin, Tk_ConfigSpec *specs,
  1407.                 char *widgRec, char *argvName, int flags));
  1408. EXTERN int        Tk_ConfigureValue _ANSI_ARGS_((Tcl_Interp *interp,
  1409.                 Tk_Window tkwin, Tk_ConfigSpec *specs,
  1410.                 char *widgRec, char *argvName, int flags));
  1411. EXTERN int        Tk_ConfigureWidget _ANSI_ARGS_((Tcl_Interp *interp,
  1412.                 Tk_Window tkwin, Tk_ConfigSpec *specs,
  1413.                 int argc, Tcl_Obj **objv, char *widgRec,
  1414.                 int flags));
  1415. EXTERN void        Tk_ConfigureWindow _ANSI_ARGS_((Tk_Window tkwin,
  1416.                 unsigned int valueMask, XWindowChanges *valuePtr));
  1417. EXTERN Tk_TextLayout    Tk_ComputeTextLayout _ANSI_ARGS_((Tk_Font font,
  1418.                 CONST char *string, int numChars, int wrapLength,
  1419.                 Tk_Justify justify, int flags, int *widthPtr,
  1420.                 int *heightPtr));
  1421. EXTERN Tk_Window    Tk_CoordsToWindow _ANSI_ARGS_((int rootX, int rootY,
  1422.                 Tk_Window tkwin));
  1423. EXTERN unsigned long    Tk_CreateBinding _ANSI_ARGS_((Tcl_Interp *interp,
  1424.                 Tk_BindingTable bindingTable, ClientData object,
  1425.                 char *eventString, Arg command, int append));
  1426. EXTERN Tk_BindingTable    Tk_CreateBindingTable _ANSI_ARGS_((Tcl_Interp *interp));
  1427. EXTERN Tk_ErrorHandler    Tk_CreateErrorHandler _ANSI_ARGS_((Display *display,
  1428.                 int errNum, int request, int minorCode,
  1429.                 Tk_ErrorProc *errorProc, ClientData clientData));
  1430. EXTERN void        Tk_CreateEventHandler _ANSI_ARGS_((Tk_Window token,
  1431.                 unsigned long mask, Tk_EventProc *proc,
  1432.                 ClientData clientData));
  1433. EXTERN void        Tk_CreatePhotoOption _ANSI_ARGS_((Tcl_Interp *interp,
  1434.                 CONST char *name, Tcl_CmdProc *proc));
  1435. EXTERN void        Tk_CreateGenericHandler _ANSI_ARGS_((
  1436.                 Tk_GenericProc *proc, ClientData clientData));
  1437. EXTERN void        Tk_CreateImageType _ANSI_ARGS_((
  1438.                 Tk_ImageType *typePtr));
  1439. EXTERN void        Tk_CreateItemType _ANSI_ARGS_((Tk_ItemType *typePtr));
  1440. EXTERN void        Tk_CreatePhotoImageFormat _ANSI_ARGS_((
  1441.                 Tk_PhotoImageFormat *formatPtr));
  1442. EXTERN void        Tk_CreateSelHandler _ANSI_ARGS_((Tk_Window tkwin,
  1443.                 Atom selection, Atom target,
  1444.                 Tk_SelectionProc *proc, ClientData clientData,
  1445.                 Atom format));
  1446. EXTERN void        Tk_CreateSmoothMethod _ANSI_ARGS_((Tcl_Interp *interp,
  1447.                 Tk_SmoothMethod *method));
  1448. EXTERN void        Tk_CreateCanvasVisitor _ANSI_ARGS_((Tcl_Interp *interp,
  1449.                 CONST Tk_VisitorType *typePtr));
  1450. EXTERN void        Tk_CreateXSelHandler _ANSI_ARGS_((Tk_Window tkwin,
  1451.                 Atom selection, Atom target,
  1452.                 Tk_XSelectionProc *proc, ClientData clientData,
  1453.                 Atom format));
  1454. EXTERN Tk_Window    Tk_CreateWindow _ANSI_ARGS_((Tcl_Interp *interp,
  1455.                 Tk_Window parent, char *name, char *screenName));
  1456. EXTERN Tk_Window    Tk_CreateWindowFromPath _ANSI_ARGS_((
  1457.                 Tcl_Interp *interp, Tk_Window tkwin,
  1458.                 char *pathName, char *screenName));
  1459. EXTERN int        Tk_DefineBitmap _ANSI_ARGS_((Tcl_Interp *interp,
  1460.                 Tk_Uid name, char *source, int width,
  1461.                 int height));
  1462. EXTERN void        Tk_DefineCursor _ANSI_ARGS_((Tk_Window window,
  1463.                 Tk_Cursor cursor));
  1464. EXTERN void        Tk_DeleteAllBindings _ANSI_ARGS_((
  1465.                 Tk_BindingTable bindingTable, ClientData object));
  1466. EXTERN int        Tk_DeleteBinding _ANSI_ARGS_((Tcl_Interp *interp,
  1467.                 Tk_BindingTable bindingTable, ClientData object,
  1468.                 char *eventString));
  1469. EXTERN void        Tk_DeleteBindingTable _ANSI_ARGS_((
  1470.                 Tk_BindingTable bindingTable));
  1471. EXTERN void        Tk_DeleteErrorHandler _ANSI_ARGS_((
  1472.                 Tk_ErrorHandler handler));
  1473. EXTERN void        Tk_DeleteEventHandler _ANSI_ARGS_((Tk_Window token,
  1474.                 unsigned long mask, Tk_EventProc *proc,
  1475.                 ClientData clientData));
  1476. EXTERN void        Tk_DeleteGenericHandler _ANSI_ARGS_((
  1477.                 Tk_GenericProc *proc, ClientData clientData));
  1478. EXTERN void        Tk_DeleteImage _ANSI_ARGS_((Tcl_Interp *interp,
  1479.                 char *name));
  1480. EXTERN void        Tk_DeleteSelHandler _ANSI_ARGS_((Tk_Window tkwin,
  1481.                 Atom selection, Atom target));
  1482. EXTERN void             Tk_DestroyWindow _ANSI_ARGS_((Tk_Window tkwin));
  1483. EXTERN char *        Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin));
  1484. EXTERN void        Tk_DitherPhoto _ANSI_ARGS_((Tk_PhotoHandle handle,
  1485.                 int x, int y, int width, int height));
  1486. EXTERN int        Tk_DistanceToTextLayout _ANSI_ARGS_((
  1487.                 Tk_TextLayout layout, int x, int y));
  1488. EXTERN void        Tk_Draw3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
  1489.                 Drawable drawable, Tk_3DBorder border,
  1490.                 XPoint *pointPtr, int numPoints, int borderWidth,
  1491.                 int leftRelief));
  1492. EXTERN void        Tk_Draw3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
  1493.                 Drawable drawable, Tk_3DBorder border, int x,
  1494.                 int y, int width, int height, int borderWidth,
  1495.                 int relief));
  1496. EXTERN void        Tk_DrawChars _ANSI_ARGS_((Display *display,
  1497.                 Drawable drawable, GC gc, Tk_Font tkfont,
  1498.                 CONST char *source, int numChars, int x,
  1499.                 int y));
  1500. EXTERN void        Tk_DrawFocusHighlight _ANSI_ARGS_((Tk_Window tkwin,
  1501.                 GC gc, int width, Drawable drawable));
  1502. EXTERN void        Tk_DrawTextLayout _ANSI_ARGS_((Display *display,
  1503.                 Drawable drawable, GC gc, Tk_TextLayout layout,
  1504.                 int x, int y, int firstChar, int lastChar));
  1505. EXTERN void        Tk_Fill3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
  1506.                 Drawable drawable, Tk_3DBorder border,
  1507.                 XPoint *pointPtr, int numPoints, int borderWidth,
  1508.                 int leftRelief));
  1509. EXTERN void        Tk_Fill3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
  1510.                 Drawable drawable, Tk_3DBorder border, int x,
  1511.                 int y, int width, int height, int borderWidth,
  1512.                 int relief));
  1513. EXTERN Tk_PhotoHandle    Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp *interp,
  1514.                 char *imageName));
  1515. EXTERN Font        Tk_FontId _ANSI_ARGS_((Tk_Font font));
  1516. EXTERN void        Tk_Free3DBorder _ANSI_ARGS_((Tk_3DBorder border));
  1517. EXTERN void        Tk_FreeBitmap _ANSI_ARGS_((Display *display,
  1518.                 Pixmap bitmap));
  1519. EXTERN void        Tk_FreeColor _ANSI_ARGS_((XColor *colorPtr));
  1520. EXTERN void        Tk_FreeColormap _ANSI_ARGS_((Display *display,
  1521.                 Colormap colormap));
  1522. EXTERN void        Tk_FreeCursor _ANSI_ARGS_((Display *display,
  1523.                 Tk_Cursor cursor));
  1524. EXTERN void        Tk_FreeFont _ANSI_ARGS_((Tk_Font));
  1525. EXTERN void        Tk_FreeGC _ANSI_ARGS_((Display *display, GC gc));
  1526. EXTERN void        Tk_FreeImage _ANSI_ARGS_((Tk_Image image));
  1527. EXTERN void        Tk_FreeOptions _ANSI_ARGS_((Tk_ConfigSpec *specs,
  1528.                 char *widgRec, Display *display, int needFlags));
  1529. EXTERN void        Tk_FreePixmap _ANSI_ARGS_((Display *display,
  1530.                 Pixmap pixmap));
  1531. EXTERN void        Tk_FreeTextLayout _ANSI_ARGS_((
  1532.                 Tk_TextLayout textLayout));
  1533. EXTERN void        Tk_FreeXId _ANSI_ARGS_((Display *display, XID xid));
  1534. EXTERN GC        Tk_GCForColor _ANSI_ARGS_((XColor *colorPtr,
  1535.                 Drawable drawable));
  1536. EXTERN void        Tk_GeometryRequest _ANSI_ARGS_((Tk_Window tkwin,
  1537.                 int reqWidth,  int reqHeight));
  1538. EXTERN Tk_3DBorder    Tk_Get3DBorder _ANSI_ARGS_((Tcl_Interp *interp,
  1539.                 Tk_Window tkwin, Tk_Uid colorName));
  1540. EXTERN void        Tk_GetAllBindings _ANSI_ARGS_((Tcl_Interp *interp,
  1541.                 Tk_BindingTable bindingTable, ClientData object));
  1542. EXTERN int        Tk_GetAnchor _ANSI_ARGS_((Tcl_Interp *interp,
  1543.                 char *string, Tk_Anchor *anchorPtr));
  1544. EXTERN char *        Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin,
  1545.                 Atom atom));
  1546. EXTERN Arg        Tk_GetBinding _ANSI_ARGS_((Tcl_Interp *interp,
  1547.                 Tk_BindingTable bindingTable, ClientData object,
  1548.                 char *eventString));
  1549. EXTERN Pixmap        Tk_GetBitmap _ANSI_ARGS_((Tcl_Interp *interp,
  1550.                 Tk_Window tkwin, Tk_Uid string));
  1551. EXTERN Pixmap        Tk_GetBitmapFromData _ANSI_ARGS_((Tcl_Interp *interp,
  1552.                 Tk_Window tkwin, char *source,
  1553.                 int width, int height));
  1554. EXTERN Tk_VisitorType *    Tk_GetCanvasVisitor _ANSI_ARGS_((Tcl_Interp *interp,
  1555.                 CONST char *name));
  1556. EXTERN int        Tk_GetCapStyle _ANSI_ARGS_((Tcl_Interp *interp,
  1557.                 char *string, int *capPtr));
  1558. EXTERN XColor *        Tk_GetColor _ANSI_ARGS_((Tcl_Interp *interp,
  1559.                 Tk_Window tkwin, Tk_Uid name));
  1560. EXTERN XColor *        Tk_GetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
  1561.                 XColor *colorPtr));
  1562. EXTERN Colormap        Tk_GetColormap _ANSI_ARGS_((Tcl_Interp *interp,
  1563.                 Tk_Window tkwin, char *string));
  1564. EXTERN Tk_Cursor    Tk_GetCursor _ANSI_ARGS_((Tcl_Interp *interp,
  1565.                 Tk_Window tkwin, Arg arg));
  1566. EXTERN Tk_Cursor    Tk_GetCursorFromData _ANSI_ARGS_((Tcl_Interp *interp,
  1567.                 Tk_Window tkwin, char *source, char *mask,
  1568.                 int width, int height, int xHot, int yHot,
  1569.                 Tk_Uid fg, Tk_Uid bg));
  1570. EXTERN int        Tk_GetDoublePixels _ANSI_ARGS_((Tcl_Interp *interp,
  1571.                 Tk_Window tkwin, CONST char *string,
  1572.                 double *doublePtr));
  1573. EXTERN Tk_Font        Tk_GetFont _ANSI_ARGS_((Tcl_Interp *interp,
  1574.                 Tk_Window tkwin, CONST char *string));
  1575. EXTERN Tk_Font        Tk_GetFontFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1576.                 Tk_Window tkwin, Tcl_Obj *objPtr));
  1577. EXTERN void        Tk_GetFontMetrics _ANSI_ARGS_((Tk_Font font,
  1578.                 Tk_FontMetrics *fmPtr));
  1579. EXTERN GC        Tk_GetGC _ANSI_ARGS_((Tk_Window tkwin,
  1580.                 unsigned long valueMask, XGCValues *valuePtr));
  1581. EXTERN Tk_Image        Tk_GetImage _ANSI_ARGS_((Tcl_Interp *interp,
  1582.                 Tk_Window tkwin, char *name,
  1583.                 Tk_ImageChangedProc *changeProc,
  1584.                 ClientData clientData));
  1585. EXTERN ClientData    Tk_GetImageMasterData _ANSI_ARGS_ ((Tcl_Interp *interp,
  1586.                 char *name, Tk_ImageType **typePtrPtr));
  1587. EXTERN Tk_ItemType *    Tk_GetItemTypes _ANSI_ARGS_((void));
  1588. EXTERN int        Tk_GetJoinStyle _ANSI_ARGS_((Tcl_Interp *interp,
  1589.                 char *string, int *joinPtr));
  1590. EXTERN int        Tk_GetJustify _ANSI_ARGS_((Tcl_Interp *interp,
  1591.                 char *string, Tk_Justify *justifyPtr));
  1592. EXTERN int        Tk_GetNumMainWindows _ANSI_ARGS_((void));
  1593. EXTERN Tk_Uid        Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
  1594.                 char *className));
  1595. EXTERN int        Tk_GetPixels _ANSI_ARGS_((Tcl_Interp *interp,
  1596.                 Tk_Window tkwin, char *string, int *intPtr));
  1597. EXTERN Pixmap        Tk_GetPixmap _ANSI_ARGS_((Display *display, Drawable d,
  1598.                 int width, int height, int depth));
  1599. EXTERN int        Tk_GetRelief _ANSI_ARGS_((Tcl_Interp *interp,
  1600.                 char *name, int *reliefPtr));
  1601. EXTERN void        Tk_GetRootCoords _ANSI_ARGS_ ((Tk_Window tkwin,
  1602.                 int *xPtr, int *yPtr));
  1603. EXTERN int        Tk_GetScrollInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1604.                 int argc, Tcl_Obj **objv, double *dblPtr,
  1605.                 int *intPtr));
  1606. EXTERN int        Tk_GetScreenMM _ANSI_ARGS_((Tcl_Interp *interp,
  1607.                 Tk_Window tkwin, char *string, double *doublePtr));
  1608. EXTERN int        Tk_GetSelection _ANSI_ARGS_((Tcl_Interp *interp,
  1609.                 Tk_Window tkwin, Atom selection, Atom target,
  1610.                 Tk_GetSelProc *proc, ClientData clientData));
  1611. EXTERN int        Tk_GetXSelection _ANSI_ARGS_((Tcl_Interp *interp,
  1612.                 Tk_Window tkwin, Atom selection, Atom target,
  1613.                 Tk_GetXSelProc *proc, ClientData clientData));
  1614. EXTERN Tk_Uid        Tk_GetUid _ANSI_ARGS_((CONST char *string));
  1615. EXTERN Visual *        Tk_GetVisual _ANSI_ARGS_((Tcl_Interp *interp,
  1616.                 Tk_Window tkwin, Arg arg, int *depthPtr,
  1617.                 Colormap *colormapPtr));
  1618. EXTERN void        Tk_GetVRootGeometry _ANSI_ARGS_((Tk_Window tkwin,
  1619.                 int *xPtr, int *yPtr, int *widthPtr,
  1620.                 int *heightPtr));
  1621. EXTERN int        Tk_Grab _ANSI_ARGS_((Tcl_Interp *interp,
  1622.                 Tk_Window tkwin, int grabGlobal));
  1623. EXTERN void        Tk_HandleEvent _ANSI_ARGS_((XEvent *eventPtr));
  1624. EXTERN Tk_Window          Tk_IdToWindow _ANSI_ARGS_((Display *display,
  1625.                 Window window));
  1626. EXTERN void        Tk_ImageChanged _ANSI_ARGS_((
  1627.                 Tk_ImageMaster master, int x, int y,
  1628.                 int width, int height, int imageWidth,
  1629.                 int imageHeight));
  1630. EXTERN int        Tk_Init _ANSI_ARGS_((Tcl_Interp *interp));
  1631. EXTERN Atom        Tk_InternAtom _ANSI_ARGS_((Tk_Window tkwin,
  1632.                 char *name));
  1633. EXTERN int        Tk_IntersectTextLayout _ANSI_ARGS_((
  1634.                 Tk_TextLayout layout, int x, int y, int width,
  1635.                 int height));
  1636. EXTERN void        Tk_Main _ANSI_ARGS_((int argc, Tcl_Obj **objv,
  1637.                 Tcl_AppInitProc *appInitProc));
  1638. EXTERN void        Tk_MainLoop _ANSI_ARGS_((void));
  1639. EXTERN void        Tk_MaintainGeometry _ANSI_ARGS_((Tk_Window slave,
  1640.                 Tk_Window master, int x, int y, int width,
  1641.                 int height));
  1642. EXTERN Tk_Window    Tk_MainWindow _ANSI_ARGS_((Tcl_Interp *interp));
  1643. EXTERN void        Tk_MakeWindowExist _ANSI_ARGS_((Tk_Window tkwin));
  1644. EXTERN void        Tk_ManageGeometry _ANSI_ARGS_((Tk_Window tkwin,
  1645.                 Tk_GeomMgr *mgrPtr, ClientData clientData));
  1646. EXTERN void        Tk_MapWindow _ANSI_ARGS_((Tk_Window tkwin));
  1647. EXTERN int        Tk_MeasureChars _ANSI_ARGS_((Tk_Font tkfont,
  1648.                 CONST char *source, int maxChars, int maxPixels,
  1649.                 int flags, int *lengthPtr));
  1650. EXTERN void        Tk_MoveResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
  1651.                 int x, int y, int width, int height));
  1652. EXTERN void        Tk_MoveWindow _ANSI_ARGS_((Tk_Window tkwin, int x,
  1653.                 int y));
  1654. EXTERN void        Tk_MoveToplevelWindow _ANSI_ARGS_((Tk_Window tkwin,
  1655.                 int x, int y));
  1656. EXTERN char *        Tk_NameOf3DBorder _ANSI_ARGS_((Tk_3DBorder border));
  1657. EXTERN char *        Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor));
  1658. EXTERN char *        Tk_NameOfBitmap _ANSI_ARGS_((Display *display,
  1659.                 Pixmap bitmap));
  1660. EXTERN char *        Tk_NameOfCapStyle _ANSI_ARGS_((int cap));
  1661. EXTERN char *        Tk_NameOfColor _ANSI_ARGS_((XColor *colorPtr));
  1662. EXTERN char *        Tk_NameOfCursor _ANSI_ARGS_((Display *display,
  1663.                 Tk_Cursor cursor));
  1664. EXTERN char *        Tk_NameOfFont _ANSI_ARGS_((Tk_Font font));
  1665. EXTERN char *        Tk_NameOfImage _ANSI_ARGS_((
  1666.                 Tk_ImageMaster imageMaster));
  1667. EXTERN char *        Tk_NameOfJoinStyle _ANSI_ARGS_((int join));
  1668. EXTERN char *        Tk_NameOfJustify _ANSI_ARGS_((Tk_Justify justify));
  1669. EXTERN char *        Tk_NameOfRelief _ANSI_ARGS_((int relief));
  1670. EXTERN Tk_Window    Tk_NameToWindow _ANSI_ARGS_((Tcl_Interp *interp,
  1671.                 char *pathName, Tk_Window tkwin));
  1672. EXTERN void        Tk_OwnSelection _ANSI_ARGS_((Tk_Window tkwin,
  1673.                 Atom selection, Tk_LostSelProc *proc,
  1674.                 ClientData clientData));
  1675. EXTERN int        Tk_ParseArgv _ANSI_ARGS_((Tcl_Interp *interp,
  1676.                 Tk_Window tkwin, int *argcPtr, Tcl_Obj **objv,
  1677.                 Tk_ArgvInfo *argTable, int flags));
  1678. EXTERN int        Tk_OrientParseProc _ANSI_ARGS_((
  1679.                 ClientData clientData, Tcl_Interp *interp,
  1680.                 Tk_Window tkwin, Arg value,
  1681.                 char *widgRec, int offset));
  1682. EXTERN Arg        Tk_OrientPrintProc _ANSI_ARGS_((
  1683.                 ClientData clientData, Tk_Window tkwin,
  1684.                 char *widgRec, int offset,
  1685.                 Tcl_FreeProc **freeProcPtr));
  1686. EXTERN void        Tk_PhotoPutBlock _ANSI_ARGS_((Tk_PhotoHandle handle,
  1687.                 Tk_PhotoImageBlock *blockPtr, int x, int y,
  1688.                 int width, int height));
  1689. EXTERN void        Tk_PhotoPutZoomedBlock _ANSI_ARGS_((
  1690.                 Tk_PhotoHandle handle,
  1691.                 Tk_PhotoImageBlock *blockPtr, int x, int y,
  1692.                 int width, int height, int zoomX, int zoomY,
  1693.                 int subsampleX, int subsampleY));
  1694. EXTERN int        Tk_PhotoGetImage _ANSI_ARGS_((Tk_PhotoHandle handle,
  1695.                 Tk_PhotoImageBlock *blockPtr));
  1696. EXTERN void        Tk_PhotoBlank _ANSI_ARGS_((Tk_PhotoHandle handle));
  1697. EXTERN void        Tk_PhotoExpand _ANSI_ARGS_((Tk_PhotoHandle handle,
  1698.                 int width, int height ));
  1699. EXTERN void        Tk_PhotoGetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
  1700.                 int *widthPtr, int *heightPtr));
  1701. EXTERN void        Tk_PhotoSetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
  1702.                 int width, int height));
  1703. EXTERN int        Tk_PointToChar _ANSI_ARGS_((Tk_TextLayout layout,
  1704.                 int x, int y));
  1705. EXTERN int        Tk_PostscriptBitmap _ANSI_ARGS_((Tcl_Interp *interp,
  1706.                 Tk_Window tkwin, Tk_PostscriptInfo psInfo,
  1707.                 Pixmap bitmap, int startX, int startY,
  1708.                 int width, int height));
  1709. EXTERN int        Tk_PostscriptColor _ANSI_ARGS_((Tcl_Interp *interp,
  1710.                 Tk_PostscriptInfo psInfo, XColor *colorPtr));
  1711. EXTERN int        Tk_PostscriptFontName _ANSI_ARGS_((Tk_Font tkfont,
  1712.                 Tcl_DString *dsPtr));
  1713. EXTERN int        Tk_PostscriptFont _ANSI_ARGS_((Tcl_Interp *interp,
  1714.                 Tk_PostscriptInfo psInfo, Tk_Font font));
  1715. EXTERN int        Tk_PostscriptImage _ANSI_ARGS_((Tk_Image image,
  1716.                 Tcl_Interp *interp, Tk_Window tkwin,
  1717.                 Tk_PostscriptInfo psinfo, int x, int y,
  1718.                 int width, int height, int prepass));
  1719. EXTERN void        Tk_PostscriptPath _ANSI_ARGS_((Tcl_Interp *interp,
  1720.                 Tk_PostscriptInfo psInfo, double *coordPtr,
  1721.                 int numPoints));
  1722. EXTERN int        Tk_PostscriptStipple _ANSI_ARGS_((Tcl_Interp *interp,
  1723.                 Tk_Window tkwin, Tk_PostscriptInfo psInfo,
  1724.                 Pixmap bitmap));
  1725. EXTERN double        Tk_PostscriptY _ANSI_ARGS_((double y,
  1726.                 Tk_PostscriptInfo psInfo));
  1727. EXTERN void        Tk_PreserveColormap _ANSI_ARGS_((Display *display,
  1728.                 Colormap colormap));
  1729. EXTERN void        Tk_QueueWindowEvent _ANSI_ARGS_((XEvent *eventPtr,
  1730.                 Tcl_QueuePosition position));
  1731. EXTERN void        Tk_RedrawImage _ANSI_ARGS_((Tk_Image image, int imageX,
  1732.                 int imageY, int width, int height,
  1733.                 Drawable drawable, int drawableX, int drawableY));
  1734. EXTERN void        Tk_ResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
  1735.                 int width, int height));
  1736. EXTERN int        Tk_RestackWindow _ANSI_ARGS_((Tk_Window tkwin,
  1737.                 int aboveBelow, Tk_Window other));
  1738. EXTERN Tk_RestrictProc *Tk_RestrictEvents _ANSI_ARGS_((Tk_RestrictProc *proc,
  1739.                 ClientData arg, ClientData *prevArgPtr));
  1740. EXTERN int        Tk_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
  1741. EXTERN char *        Tk_SetAppName _ANSI_ARGS_((Tk_Window tkwin,
  1742.                 char *name));
  1743. EXTERN void        Tk_SetBackgroundFromBorder _ANSI_ARGS_((
  1744.                 Tk_Window tkwin, Tk_3DBorder border));
  1745. EXTERN void        Tk_SetClass _ANSI_ARGS_((Tk_Window tkwin,
  1746.                 char *className));
  1747. EXTERN void        Tk_SetGrid _ANSI_ARGS_((Tk_Window tkwin,
  1748.                 int reqWidth, int reqHeight, int gridWidth,
  1749.                 int gridHeight));
  1750. EXTERN void        Tk_SetInternalBorder _ANSI_ARGS_((Tk_Window tkwin,
  1751.                 int width));
  1752. EXTERN void        Tk_SetWindowBackground _ANSI_ARGS_((Tk_Window tkwin,
  1753.                 unsigned long pixel));
  1754. EXTERN void        Tk_SetWindowBackgroundPixmap _ANSI_ARGS_((
  1755.                 Tk_Window tkwin, Pixmap pixmap));
  1756. EXTERN void        Tk_SetWindowBorder _ANSI_ARGS_((Tk_Window tkwin,
  1757.                 unsigned long pixel));
  1758. EXTERN void        Tk_SetWindowBorderWidth _ANSI_ARGS_((Tk_Window tkwin,
  1759.                 int width));
  1760. EXTERN void        Tk_SetWindowBorderPixmap _ANSI_ARGS_((Tk_Window tkwin,
  1761.                 Pixmap pixmap));
  1762. EXTERN void        Tk_SetWindowColormap _ANSI_ARGS_((Tk_Window tkwin,
  1763.                 Colormap colormap));
  1764. EXTERN int        Tk_SetWindowVisual _ANSI_ARGS_((Tk_Window tkwin,
  1765.                 Visual *visual, int depth,
  1766.                 Colormap colormap));
  1767. EXTERN void        Tk_SizeOfBitmap _ANSI_ARGS_((Display *display,
  1768.                 Pixmap bitmap, int *widthPtr,
  1769.                 int *heightPtr));
  1770. EXTERN void        Tk_SizeOfImage _ANSI_ARGS_((Tk_Image image,
  1771.                 int *widthPtr, int *heightPtr));
  1772. EXTERN int        Tk_StateParseProc _ANSI_ARGS_((
  1773.                 ClientData clientData, Tcl_Interp *interp,
  1774.                 Tk_Window tkwin, Arg value,
  1775.                 char *widgRec, int offset));
  1776. EXTERN Arg        Tk_StatePrintProc _ANSI_ARGS_((
  1777.                 ClientData clientData, Tk_Window tkwin,
  1778.                 char *widgRec, int offset,
  1779.                 Tcl_FreeProc **freeProcPtr));
  1780. EXTERN int        Tk_StrictMotif _ANSI_ARGS_((Tk_Window tkwin));
  1781. EXTERN void        Tk_TextLayoutToPostscript _ANSI_ARGS_((
  1782.                 Tcl_Interp *interp, Tk_TextLayout layout));
  1783. EXTERN int        Tk_TextWidth _ANSI_ARGS_((Tk_Font font,
  1784.                 CONST char *string, int numChars));
  1785. EXTERN void        Tk_UndefineCursor _ANSI_ARGS_((Tk_Window window));
  1786. EXTERN void        Tk_UnderlineChars _ANSI_ARGS_((Display *display,
  1787.                 Drawable drawable, GC gc, Tk_Font tkfont,
  1788.                 CONST char *source, int x, int y, int firstChar,
  1789.                 int lastChar));
  1790. EXTERN void        Tk_UnderlineTextLayout _ANSI_ARGS_((
  1791.                 Display *display, Drawable drawable, GC gc,
  1792.                 Tk_TextLayout layout, int x, int y,
  1793.                 int underline));
  1794. EXTERN void        Tk_Ungrab _ANSI_ARGS_((Tk_Window tkwin));
  1795. EXTERN void        Tk_UnmaintainGeometry _ANSI_ARGS_((Tk_Window slave,
  1796.                 Tk_Window master));
  1797. EXTERN void        Tk_UnmapWindow _ANSI_ARGS_((Tk_Window tkwin));
  1798. EXTERN void        Tk_UnsetGrid _ANSI_ARGS_((Tk_Window tkwin));
  1799. EXTERN Tk_Window    Tk_EventWindow _ANSI_ARGS_((XEvent *eventPtr));
  1800. EXTERN void        Tk_UpdatePointer _ANSI_ARGS_((Tk_Window tkwin,
  1801.                 int x, int y, int state));
  1802. /*
  1803.  * Tcl commands exported by Tk:
  1804.  */
  1805.  
  1806. EXTERN int        Tk_BellObjCmd _ANSI_ARGS_((ClientData clientData,
  1807.                 Tcl_Interp *interp, int objc,
  1808.                 Tcl_Obj *CONST objv[]));
  1809. EXTERN int        Tk_BindCmd _ANSI_ARGS_((ClientData clientData,
  1810.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1811. EXTERN int        Tk_BindtagsCmd _ANSI_ARGS_((ClientData clientData,
  1812.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1813. EXTERN int        Tk_ButtonCmd _ANSI_ARGS_((ClientData clientData,
  1814.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1815. EXTERN int        Tk_CanvasObjCmd _ANSI_ARGS_((ClientData clientData,
  1816.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
  1817. EXTERN int        Tk_CheckbuttonCmd _ANSI_ARGS_((ClientData clientData,
  1818.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1819. EXTERN int        Tk_ClipboardCmd _ANSI_ARGS_((ClientData clientData,
  1820.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1821. EXTERN int              Tk_ChooseColorCmd _ANSI_ARGS_((ClientData clientData,
  1822.                             Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1823. EXTERN int        Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData,
  1824.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1825. EXTERN int        Tk_EntryCmd _ANSI_ARGS_((ClientData clientData,
  1826.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1827. EXTERN int        Tk_EventObjCmd _ANSI_ARGS_((ClientData clientData,
  1828.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
  1829. EXTERN int        Tk_FrameCmd _ANSI_ARGS_((ClientData clientData,
  1830.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1831. EXTERN int        Tk_FocusObjCmd _ANSI_ARGS_((ClientData clientData,
  1832.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
  1833. EXTERN int        Tk_FontObjCmd _ANSI_ARGS_((ClientData clientData,
  1834.                 Tcl_Interp *interp, int objc,
  1835.                 Tcl_Obj *CONST objv[]));
  1836. EXTERN int              Tk_GetOpenFileCmd _ANSI_ARGS_((ClientData clientData,
  1837.                             Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1838. EXTERN int              Tk_GetSaveFileCmd _ANSI_ARGS_((ClientData clientData,
  1839.                             Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1840. EXTERN int        Tk_GrabCmd _ANSI_ARGS_((ClientData clientData,
  1841.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1842. EXTERN int        Tk_GridCmd _ANSI_ARGS_((ClientData clientData,
  1843.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1844. EXTERN int        Tk_ImageObjCmd _ANSI_ARGS_((ClientData clientData,
  1845.                 Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
  1846. EXTERN int        Tk_LabelCmd _ANSI_ARGS_((ClientData clientData,
  1847.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1848. EXTERN int        Tk_ListboxCmd _ANSI_ARGS_((ClientData clientData,
  1849.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1850. EXTERN int        Tk_LowerCmd _ANSI_ARGS_((ClientData clientData,
  1851.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1852. EXTERN int        Tk_MenuCmd _ANSI_ARGS_((ClientData clientData,
  1853.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1854. EXTERN int        Tk_MenubuttonCmd _ANSI_ARGS_((ClientData clientData,
  1855.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1856. EXTERN int              Tk_MessageBoxCmd _ANSI_ARGS_((ClientData clientData,
  1857.                             Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1858. EXTERN int        Tk_MessageCmd _ANSI_ARGS_((ClientData clientData,
  1859.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1860. EXTERN int        Tk_OptionCmd _ANSI_ARGS_((ClientData clientData,
  1861.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1862. EXTERN int        Tk_PackCmd _ANSI_ARGS_((ClientData clientData,
  1863.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1864. EXTERN int        Tk_PlaceCmd _ANSI_ARGS_((ClientData clientData,
  1865.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1866. EXTERN int        Tk_PropertyCmd _ANSI_ARGS_((ClientData clientData,
  1867.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1868. EXTERN int        Tk_RadiobuttonCmd _ANSI_ARGS_((ClientData clientData,
  1869.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1870. EXTERN int        Tk_RaiseCmd _ANSI_ARGS_((ClientData clientData,
  1871.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1872. EXTERN int        Tk_ScaleCmd _ANSI_ARGS_((ClientData clientData,
  1873.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1874. EXTERN int        Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
  1875.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1876. EXTERN int        Tk_SelectionCmd _ANSI_ARGS_((ClientData clientData,
  1877.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1878. EXTERN int        Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
  1879.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1880. EXTERN int        Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
  1881.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1882. EXTERN int        Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData,
  1883.                 Tcl_Interp *interp, int objc,
  1884.                 Tcl_Obj *CONST objv[]));
  1885. EXTERN int        Tk_TkwaitCmd _ANSI_ARGS_((ClientData clientData,
  1886.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1887. EXTERN int        Tk_ToplevelCmd _ANSI_ARGS_((ClientData clientData,
  1888.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1889. EXTERN int        Tk_UpdateCmd _ANSI_ARGS_((ClientData clientData,
  1890.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1891. EXTERN int        Tk_WinfoObjCmd _ANSI_ARGS_((ClientData clientData,
  1892.                 Tcl_Interp *interp, int objc,
  1893.                 Tcl_Obj *CONST objv[]));
  1894. EXTERN int        Tk_WmCmd _ANSI_ARGS_((ClientData clientData,
  1895.                 Tcl_Interp *interp, int argc, Tcl_Obj **objv));
  1896.  
  1897. EXTERN int    TkTileParseProc _ANSI_ARGS_((
  1898.             ClientData clientData, Tcl_Interp *interp,
  1899.             Tk_Window tkwin, Arg value, char *widgRec,
  1900.             int offset));
  1901. EXTERN Arg    TkTilePrintProc _ANSI_ARGS_((
  1902.             ClientData clientData, Tk_Window tkwin,
  1903.             char *widgRec, int offset,
  1904.             Tcl_FreeProc **freeProcPtr));
  1905. EXTERN int    TkOffsetParseProc _ANSI_ARGS_((
  1906.             ClientData clientData, Tcl_Interp *interp,
  1907.             Tk_Window tkwin, Arg value, char *widgRec,
  1908.             int offset));
  1909. EXTERN Arg    TkOffsetPrintProc _ANSI_ARGS_((
  1910.             ClientData clientData, Tk_Window tkwin,
  1911.             char *widgRec, int offset,
  1912.             Tcl_FreeProc **freeProcPtr));
  1913. EXTERN int    TkStateParseProc _ANSI_ARGS_((
  1914.             ClientData clientData, Tcl_Interp *interp,
  1915.             Tk_Window tkwin, Arg value,
  1916.             char *widgRec, int offset));
  1917. EXTERN Arg    TkStatePrintProc _ANSI_ARGS_((
  1918.             ClientData clientData, Tk_Window tkwin,
  1919.             char *widgRec, int offset,
  1920.             Tcl_FreeProc **freeProcPtr));
  1921. EXTERN int    TkOrientParseProc _ANSI_ARGS_((
  1922.             ClientData clientData, Tcl_Interp *interp,
  1923.             Tk_Window tkwin, Arg value,
  1924.             char *widgRec, int offset));
  1925. EXTERN Arg    TkOrientPrintProc _ANSI_ARGS_((
  1926.             ClientData clientData, Tk_Window tkwin,
  1927.             char *widgRec, int offset,
  1928.             Tcl_FreeProc **freeProcPtr));
  1929. EXTERN int    TkPixelParseProc _ANSI_ARGS_((
  1930.             ClientData clientData, Tcl_Interp *interp,
  1931.             Tk_Window tkwin, Arg value,
  1932.             char *widgRec, int offset));
  1933. EXTERN Arg    TkPixelPrintProc _ANSI_ARGS_((
  1934.             ClientData clientData, Tk_Window tkwin,
  1935.             char *widgRec, int offset,
  1936.             Tcl_FreeProc **freeProcPtr));
  1937.  
  1938. EXTERN Tcl_Command    Lang_CreateWidget _ANSI_ARGS_((Tcl_Interp *interp,
  1939.                 Tk_Window, Tcl_CmdProc *proc,
  1940.                 ClientData clientData,
  1941.                 Tcl_CmdDeleteProc *deleteProc));
  1942.  
  1943. EXTERN Tcl_Command    Lang_CreateImage _ANSI_ARGS_((Tcl_Interp *interp,
  1944.                 char *cmdName, Tcl_CmdProc *proc,
  1945.                 ClientData clientData,
  1946.                 Tcl_CmdDeleteProc *deleteProc,
  1947.                 Tk_ImageType *typePtr));
  1948.  
  1949. EXTERN void        Lang_DeleteWidget _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Command cmd));
  1950.  
  1951. EXTERN void        Tk_ChangeScreen _ANSI_ARGS_((Tcl_Interp *interp,
  1952.                 char *dispName, int screenIndex));
  1953.  
  1954. EXTERN Var        LangFindVar _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window, char *name));
  1955.  
  1956. EXTERN Tcl_Obj *    LangWidgetObj _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window));
  1957. EXTERN Tcl_Obj *    LangFontObj _ANSI_ARGS_((Tcl_Interp *interp, Tk_Font font, char *name));
  1958. EXTERN Tcl_Obj *    LangObjectObj _ANSI_ARGS_((Tcl_Interp *interp, char *));
  1959.  
  1960. #define LangWidgetArg(interp,win) LangObjArg(LangWidgetObj(interp,win),__FILE__,__LINE__)
  1961. #define LangFontArg(interp,font,name) LangObjArg(LangFontObj(interp,font,name),__FILE__,__LINE__)
  1962. #define LangObjectArg(interp,name) LangObjArg(LangObjectObj(interp,name),__FILE__,__LINE__)
  1963.  
  1964.  
  1965. #ifndef NO_EXTERN
  1966. EXTERN void        Lang_DeadMainWindow _ANSI_ARGS_((Tcl_Interp *, Tk_Window));
  1967. EXTERN void        Lang_NewMainWindow  _ANSI_ARGS_((Tcl_Interp *, Tk_Window));
  1968. EXTERN void        LangDeadWindow _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window));
  1969. EXTERN void        LangClientMessage _ANSI_ARGS_((Tcl_Interp *interp,Tk_Window, XEvent *));
  1970. #endif
  1971.  
  1972. EXTERN int LangEventCallback _ANSI_ARGS_((ClientData, Tcl_Interp *,XEvent *,Tk_Window,KeySym));
  1973.  
  1974. #endif /* RESOURCE_INCLUDED */
  1975.  
  1976. #undef TCL_STORAGE_CLASS
  1977. #define TCL_STORAGE_CLASS DLLIMPORT
  1978.  
  1979. #endif /* _TK */
  1980.