OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [generic/] [tk.h] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
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 by 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.1.1.1 2002-01-16 10:25:50 markom 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      (Not for patch release updates)
28
 * win/makefile.vc      (Not for patch release updates)
29
 * win/README
30
 * library/tk.tcl
31
 *
32
 * The release level should be  0 for alpha, 1 for beta, and 2 for
33
 * final/patch.  The release serial value is the number that follows the
34
 * "a", "b", or "p" in the patch level; for example, if the patch level
35
 * is 4.3b2, TK_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
36
 * release level is changed, except for the final release, which should
37
 * be 0.
38
 *
39
 * You may also need to update some of these files when the numbers change
40
 * for the version of Tcl that this release of Tk is compiled against.
41
 */
42
 
43
#define TK_MAJOR_VERSION   8
44
#define TK_MINOR_VERSION   0
45
#define TK_RELEASE_LEVEL   2
46
#define TK_RELEASE_SERIAL  4
47
 
48
#define TK_VERSION "8.0"
49
#define TK_PATCH_LEVEL "8.0.4"
50
 
51
/*
52
 * A special definition used to allow this header file to be included
53
 * in resource files.
54
 */
55
 
56
#ifndef RESOURCE_INCLUDED
57
 
58
/*
59
 * The following definitions set up the proper options for Macintosh
60
 * compilers.  We use this method because there is no autoconf equivalent.
61
 */
62
 
63
#ifdef MAC_TCL
64
#   ifndef REDO_KEYSYM_LOOKUP
65
#       define REDO_KEYSYM_LOOKUP
66
#   endif
67
#endif
68
 
69
#ifndef _TCL
70
#   include <tcl.h>
71
#endif
72
#ifndef _XLIB_H
73
#   ifdef MAC_TCL
74
#       include <Xlib.h>
75
#       include <X.h>
76
#   else
77
#       include <X11/Xlib.h>
78
#   endif
79
#endif
80
#ifdef __STDC__
81
#   include <stddef.h>
82
#endif
83
 
84
#ifdef BUILD_tk
85
# undef TCL_STORAGE_CLASS
86
# define TCL_STORAGE_CLASS DLLEXPORT
87
#endif
88
 
89
/*
90
 * Decide whether or not to use input methods.
91
 */
92
 
93
#ifdef XNQueryInputStyle
94
#define TK_USE_INPUT_METHODS
95
#endif
96
 
97
/*
98
 * Dummy types that are used by clients:
99
 */
100
 
101
typedef struct Tk_BindingTable_ *Tk_BindingTable;
102
typedef struct Tk_Canvas_ *Tk_Canvas;
103
typedef struct Tk_Cursor_ *Tk_Cursor;
104
typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler;
105
typedef struct Tk_Font_ *Tk_Font;
106
typedef struct Tk_Image__ *Tk_Image;
107
typedef struct Tk_ImageMaster_ *Tk_ImageMaster;
108
typedef struct Tk_TextLayout_ *Tk_TextLayout;
109
typedef struct Tk_Window_ *Tk_Window;
110
typedef struct Tk_3DBorder_ *Tk_3DBorder;
111
 
112
/*
113
 * Additional types exported to clients.
114
 */
115
 
116
typedef char *Tk_Uid;
117
 
118
/*
119
 * Structure used to specify how to handle argv options.
120
 */
121
 
122
typedef struct {
123
    char *key;          /* The key string that flags the option in the
124
                         * argv array. */
125
    int type;           /* Indicates option type;  see below. */
126
    char *src;          /* Value to be used in setting dst;  usage
127
                         * depends on type. */
128
    char *dst;          /* Address of value to be modified;  usage
129
                         * depends on type. */
130
    char *help;         /* Documentation message describing this option. */
131
} Tk_ArgvInfo;
132
 
133
/*
134
 * Legal values for the type field of a Tk_ArgvInfo: see the user
135
 * documentation for details.
136
 */
137
 
138
#define TK_ARGV_CONSTANT                15
139
#define TK_ARGV_INT                     16
140
#define TK_ARGV_STRING                  17
141
#define TK_ARGV_UID                     18
142
#define TK_ARGV_REST                    19
143
#define TK_ARGV_FLOAT                   20
144
#define TK_ARGV_FUNC                    21
145
#define TK_ARGV_GENFUNC                 22
146
#define TK_ARGV_HELP                    23
147
#define TK_ARGV_CONST_OPTION            24
148
#define TK_ARGV_OPTION_VALUE            25
149
#define TK_ARGV_OPTION_NAME_VALUE       26
150
/* CYGNUS LOCAL: Support -version argument.  */
151
#define TK_ARGV_VERSION                 27
152
#define TK_ARGV_END                     28
153
 
154
/*
155
 * Flag bits for passing to Tk_ParseArgv:
156
 */
157
 
158
#define TK_ARGV_NO_DEFAULTS             0x1
159
#define TK_ARGV_NO_LEFTOVERS            0x2
160
#define TK_ARGV_NO_ABBREV               0x4
161
#define TK_ARGV_DONT_SKIP_FIRST_ARG     0x8
162
 
163
/*
164
 * Structure used to describe application-specific configuration
165
 * options:  indicates procedures to call to parse an option and
166
 * to return a text string describing an option.
167
 */
168
 
169
typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData,
170
        Tcl_Interp *interp, Tk_Window tkwin, char *value, char *widgRec,
171
        int offset));
172
typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData,
173
        Tk_Window tkwin, char *widgRec, int offset,
174
        Tcl_FreeProc **freeProcPtr));
175
 
176
typedef struct Tk_CustomOption {
177
    Tk_OptionParseProc *parseProc;      /* Procedure to call to parse an
178
                                         * option and store it in converted
179
                                         * form. */
180
    Tk_OptionPrintProc *printProc;      /* Procedure to return a printable
181
                                         * string describing an existing
182
                                         * option. */
183
    ClientData clientData;              /* Arbitrary one-word value used by
184
                                         * option parser:  passed to
185
                                         * parseProc and printProc. */
186
} Tk_CustomOption;
187
 
188
/*
189
 * Structure used to specify information for Tk_ConfigureWidget.  Each
190
 * structure gives complete information for one option, including
191
 * how the option is specified on the command line, where it appears
192
 * in the option database, etc.
193
 */
194
 
195
typedef struct Tk_ConfigSpec {
196
    int type;                   /* Type of option, such as TK_CONFIG_COLOR;
197
                                 * see definitions below.  Last option in
198
                                 * table must have type TK_CONFIG_END. */
199
    char *argvName;             /* Switch used to specify option in argv.
200
                                 * NULL means this spec is part of a group. */
201
    char *dbName;               /* Name for option in option database. */
202
    char *dbClass;              /* Class for option in database. */
203
    char *defValue;             /* Default value for option if not
204
                                 * specified in command line or database. */
205
    int offset;                 /* Where in widget record to store value;
206
                                 * use Tk_Offset macro to generate values
207
                                 * for this. */
208
    int specFlags;              /* Any combination of the values defined
209
                                 * below;  other bits are used internally
210
                                 * by tkConfig.c. */
211
    Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is
212
                                 * a pointer to info about how to parse and
213
                                 * print the option.  Otherwise it is
214
                                 * irrelevant. */
215
} Tk_ConfigSpec;
216
 
217
/*
218
 * Type values for Tk_ConfigSpec structures.  See the user
219
 * documentation for details.
220
 */
221
 
222
#define TK_CONFIG_BOOLEAN       1
223
#define TK_CONFIG_INT           2
224
#define TK_CONFIG_DOUBLE        3
225
#define TK_CONFIG_STRING        4
226
#define TK_CONFIG_UID           5
227
#define TK_CONFIG_COLOR         6
228
#define TK_CONFIG_FONT          7
229
#define TK_CONFIG_BITMAP        8
230
#define TK_CONFIG_BORDER        9
231
#define TK_CONFIG_RELIEF        10
232
#define TK_CONFIG_CURSOR        11
233
#define TK_CONFIG_ACTIVE_CURSOR 12
234
#define TK_CONFIG_JUSTIFY       13
235
#define TK_CONFIG_ANCHOR        14
236
#define TK_CONFIG_SYNONYM       15
237
#define TK_CONFIG_CAP_STYLE     16
238
#define TK_CONFIG_JOIN_STYLE    17
239
#define TK_CONFIG_PIXELS        18
240
#define TK_CONFIG_MM            19
241
#define TK_CONFIG_WINDOW        20
242
#define TK_CONFIG_CUSTOM        21
243
#define TK_CONFIG_END           22
244
 
245
/*
246
 * Macro to use to fill in "offset" fields of Tk_ConfigInfos.
247
 * Computes number of bytes from beginning of structure to a
248
 * given field.
249
 */
250
 
251
#ifdef offsetof
252
#define Tk_Offset(type, field) ((int) offsetof(type, field))
253
#else
254
#define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
255
#endif
256
 
257
/*
258
 * Possible values for flags argument to Tk_ConfigureWidget:
259
 */
260
 
261
#define TK_CONFIG_ARGV_ONLY     1
262
 
263
/*
264
 * Possible flag values for Tk_ConfigInfo structures.  Any bits at
265
 * or above TK_CONFIG_USER_BIT may be used by clients for selecting
266
 * certain entries.  Before changing any values here, coordinate with
267
 * tkConfig.c (internal-use-only flags are defined there).
268
 */
269
 
270
#define TK_CONFIG_COLOR_ONLY            1
271
#define TK_CONFIG_MONO_ONLY             2
272
#define TK_CONFIG_NULL_OK               4
273
#define TK_CONFIG_DONT_SET_DEFAULT      8
274
#define TK_CONFIG_OPTION_SPECIFIED      0x10
275
#define TK_CONFIG_USER_BIT              0x100
276
 
277
/*
278
 * Enumerated type for describing actions to be taken in response
279
 * to a restrictProc established by Tk_RestrictEvents.
280
 */
281
 
282
typedef enum {
283
    TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT
284
} Tk_RestrictAction;
285
 
286
/*
287
 * Priority levels to pass to Tk_AddOption:
288
 */
289
 
290
#define TK_WIDGET_DEFAULT_PRIO  20
291
#define TK_STARTUP_FILE_PRIO    40
292
#define TK_USER_DEFAULT_PRIO    60
293
#define TK_INTERACTIVE_PRIO     80
294
#define TK_MAX_PRIO             100
295
 
296
/*
297
 * Relief values returned by Tk_GetRelief:
298
 */
299
 
300
#define TK_RELIEF_RAISED        1
301
#define TK_RELIEF_FLAT          2
302
#define TK_RELIEF_SUNKEN        4
303
#define TK_RELIEF_GROOVE        8
304
#define TK_RELIEF_RIDGE         16
305
#define TK_RELIEF_SOLID         32
306
 
307
/*
308
 * "Which" argument values for Tk_3DBorderGC:
309
 */
310
 
311
#define TK_3D_FLAT_GC           1
312
#define TK_3D_LIGHT_GC          2
313
#define TK_3D_DARK_GC           3
314
 
315
/*
316
 * Special EnterNotify/LeaveNotify "mode" for use in events
317
 * generated by tkShare.c.  Pick a high enough value that it's
318
 * unlikely to conflict with existing values (like NotifyNormal)
319
 * or any new values defined in the future.
320
 */
321
 
322
#define TK_NOTIFY_SHARE         20
323
 
324
/*
325
 * Enumerated type for describing a point by which to anchor something:
326
 */
327
 
328
typedef enum {
329
    TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE,
330
    TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW,
331
    TK_ANCHOR_CENTER
332
} Tk_Anchor;
333
 
334
/*
335
 * Enumerated type for describing a style of justification:
336
 */
337
 
338
typedef enum {
339
    TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER
340
} Tk_Justify;
341
 
342
/*
343
 * The following structure is used by Tk_GetFontMetrics() to return
344
 * information about the properties of a Tk_Font.
345
 */
346
 
347
typedef struct Tk_FontMetrics {
348
    int ascent;                 /* The amount in pixels that the tallest
349
                                 * letter sticks up above the baseline, plus
350
                                 * any extra blank space added by the designer
351
                                 * of the font. */
352
    int descent;                /* The largest amount in pixels that any
353
                                 * letter sticks below the baseline, plus any
354
                                 * extra blank space added by the designer of
355
                                 * the font. */
356
    int linespace;              /* The sum of the ascent and descent.  How
357
                                 * far apart two lines of text in the same
358
                                 * font should be placed so that none of the
359
                                 * characters in one line overlap any of the
360
                                 * characters in the other line. */
361
} Tk_FontMetrics;
362
 
363
/*
364
 * Flags passed to Tk_MeasureChars:
365
 */
366
 
367
#define TK_WHOLE_WORDS          1
368
#define TK_AT_LEAST_ONE         2
369
#define TK_PARTIAL_OK           4
370
 
371
/*
372
 * Flags passed to Tk_ComputeTextLayout:
373
 */
374
 
375
#define TK_IGNORE_TABS          8
376
#define TK_IGNORE_NEWLINES      16
377
 
378
/*
379
 * Each geometry manager (the packer, the placer, etc.) is represented
380
 * by a structure of the following form, which indicates procedures
381
 * to invoke in the geometry manager to carry out certain functions.
382
 */
383
 
384
typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData,
385
        Tk_Window tkwin));
386
typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData,
387
        Tk_Window tkwin));
388
 
389
typedef struct Tk_GeomMgr {
390
    char *name;                 /* Name of the geometry manager (command
391
                                 * used to invoke it, or name of widget
392
                                 * class that allows embedded widgets). */
393
    Tk_GeomRequestProc *requestProc;
394
                                /* Procedure to invoke when a slave's
395
                                 * requested geometry changes. */
396
    Tk_GeomLostSlaveProc *lostSlaveProc;
397
                                /* Procedure to invoke when a slave is
398
                                 * taken away from one geometry manager
399
                                 * by another.  NULL means geometry manager
400
                                 * doesn't care when slaves are lost. */
401
} Tk_GeomMgr;
402
 
403
/*
404
 * Result values returned by Tk_GetScrollInfo:
405
 */
406
 
407
#define TK_SCROLL_MOVETO        1
408
#define TK_SCROLL_PAGES         2
409
#define TK_SCROLL_UNITS         3
410
#define TK_SCROLL_ERROR         4
411
 
412
/*
413
 *---------------------------------------------------------------------------
414
 *
415
 * Extensions to the X event set
416
 *
417
 *---------------------------------------------------------------------------
418
 */
419
#define VirtualEvent        (LASTEvent)
420
#define ActivateNotify      (LASTEvent + 1)
421
#define DeactivateNotify    (LASTEvent + 2)
422
#define MouseWheelEvent     (LASTEvent + 3)
423
#define TK_LASTEVENT        (LASTEvent + 4)
424
 
425
#define MouseWheelMask      (1L << 28)
426
 
427
#define ActivateMask        (1L << 29)
428
#define VirtualEventMask    (1L << 30)
429
#define TK_LASTEVENT        (LASTEvent + 4)
430
 
431
 
432
/*
433
 * A virtual event shares most of its fields with the XKeyEvent and
434
 * XButtonEvent structures.  99% of the time a virtual event will be
435
 * an abstraction of a key or button event, so this structure provides
436
 * the most information to the user.  The only difference is the changing
437
 * of the detail field for a virtual event so that it holds the name of the
438
 * virtual event being triggered.
439
 */
440
 
441
typedef struct {
442
    int type;
443
    unsigned long serial;   /* # of last request processed by server */
444
    Bool send_event;        /* True if this came from a SendEvent request */
445
    Display *display;       /* Display the event was read from */
446
    Window event;           /* Window on which event was requested. */
447
    Window root;            /* root window that the event occured on */
448
    Window subwindow;       /* child window */
449
    Time time;              /* milliseconds */
450
    int x, y;               /* pointer x, y coordinates in event window */
451
    int x_root, y_root;     /* coordinates relative to root */
452
    unsigned int state;     /* key or button mask */
453
    Tk_Uid name;            /* Name of virtual event. */
454
    Bool same_screen;       /* same screen flag */
455
} XVirtualEvent;
456
 
457
typedef struct {
458
    int type;
459
    unsigned long serial;   /* # of last request processed by server */
460
    Bool send_event;        /* True if this came from a SendEvent request */
461
    Display *display;       /* Display the event was read from */
462
    Window window;          /* Window in which event occurred. */
463
} XActivateDeactivateEvent;
464
typedef XActivateDeactivateEvent XActivateEvent;
465
typedef XActivateDeactivateEvent XDeactivateEvent;
466
 
467
/*
468
 *--------------------------------------------------------------
469
 *
470
 * Macros for querying Tk_Window structures.  See the
471
 * manual entries for documentation.
472
 *
473
 *--------------------------------------------------------------
474
 */
475
 
476
#define Tk_Display(tkwin)               (((Tk_FakeWin *) (tkwin))->display)
477
#define Tk_ScreenNumber(tkwin)          (((Tk_FakeWin *) (tkwin))->screenNum)
478
#define Tk_Screen(tkwin)                (ScreenOfDisplay(Tk_Display(tkwin), \
479
        Tk_ScreenNumber(tkwin)))
480
#define Tk_Depth(tkwin)                 (((Tk_FakeWin *) (tkwin))->depth)
481
#define Tk_Visual(tkwin)                (((Tk_FakeWin *) (tkwin))->visual)
482
#define Tk_WindowId(tkwin)              (((Tk_FakeWin *) (tkwin))->window)
483
#define Tk_PathName(tkwin)              (((Tk_FakeWin *) (tkwin))->pathName)
484
#define Tk_Name(tkwin)                  (((Tk_FakeWin *) (tkwin))->nameUid)
485
#define Tk_Class(tkwin)                 (((Tk_FakeWin *) (tkwin))->classUid)
486
#define Tk_X(tkwin)                     (((Tk_FakeWin *) (tkwin))->changes.x)
487
#define Tk_Y(tkwin)                     (((Tk_FakeWin *) (tkwin))->changes.y)
488
#define Tk_Width(tkwin)                 (((Tk_FakeWin *) (tkwin))->changes.width)
489
#define Tk_Height(tkwin) \
490
    (((Tk_FakeWin *) (tkwin))->changes.height)
491
#define Tk_Changes(tkwin)               (&((Tk_FakeWin *) (tkwin))->changes)
492
#define Tk_Attributes(tkwin)            (&((Tk_FakeWin *) (tkwin))->atts)
493
#define Tk_IsEmbedded(tkwin) \
494
    (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED)
495
#define Tk_IsContainer(tkwin) \
496
    (((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER)
497
#define Tk_IsMapped(tkwin) \
498
    (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED)
499
#define Tk_IsTopLevel(tkwin) \
500
    (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL)
501
#define Tk_ReqWidth(tkwin)              (((Tk_FakeWin *) (tkwin))->reqWidth)
502
#define Tk_ReqHeight(tkwin)             (((Tk_FakeWin *) (tkwin))->reqHeight)
503
#define Tk_InternalBorderWidth(tkwin) \
504
    (((Tk_FakeWin *) (tkwin))->internalBorderWidth)
505
#define Tk_Parent(tkwin)                (((Tk_FakeWin *) (tkwin))->parentPtr)
506
#define Tk_Colormap(tkwin)              (((Tk_FakeWin *) (tkwin))->atts.colormap)
507
 
508
/*
509
 * The structure below is needed by the macros above so that they can
510
 * access the fields of a Tk_Window.  The fields not needed by the macros
511
 * are declared as "dummyX".  The structure has its own type in order to
512
 * prevent applications from accessing Tk_Window fields except using
513
 * official macros.  WARNING!! The structure definition must be kept
514
 * consistent with the TkWindow structure in tkInt.h.  If you change one,
515
 * then change the other.  See the declaration in tkInt.h for
516
 * documentation on what the fields are used for internally.
517
 */
518
 
519
typedef struct Tk_FakeWin {
520
    Display *display;
521
    char *dummy1;
522
    int screenNum;
523
    Visual *visual;
524
    int depth;
525
    Window window;
526
    char *dummy2;
527
    char *dummy3;
528
    Tk_Window parentPtr;
529
    char *dummy4;
530
    char *dummy5;
531
    char *pathName;
532
    Tk_Uid nameUid;
533
    Tk_Uid classUid;
534
    XWindowChanges changes;
535
    unsigned int dummy6;
536
    XSetWindowAttributes atts;
537
    unsigned long dummy7;
538
    unsigned int flags;
539
    char *dummy8;
540
#ifdef TK_USE_INPUT_METHODS
541
    XIC dummy9;
542
#endif /* TK_USE_INPUT_METHODS */
543
    ClientData *dummy10;
544
    int dummy11;
545
    int dummy12;
546
    char *dummy13;
547
    char *dummy14;
548
    ClientData dummy15;
549
    int reqWidth, reqHeight;
550
    int internalBorderWidth;
551
    char *dummy16;
552
    char *dummy17;
553
    ClientData dummy18;
554
    char *dummy19;
555
} Tk_FakeWin;
556
 
557
/*
558
 * Flag values for TkWindow (and Tk_FakeWin) structures are:
559
 *
560
 * TK_MAPPED:                   1 means window is currently mapped,
561
 *                              0 means unmapped.
562
 * TK_TOP_LEVEL:                1 means this is a top-level window (it
563
 *                              was or will be created as a child of
564
 *                              a root window).
565
 * TK_ALREADY_DEAD:             1 means the window is in the process of
566
 *                              being destroyed already.
567
 * TK_NEED_CONFIG_NOTIFY:       1 means that the window has been reconfigured
568
 *                              before it was made to exist.  At the time of
569
 *                              making it exist a ConfigureNotify event needs
570
 *                              to be generated.
571
 * TK_GRAB_FLAG:                Used to manage grabs.  See tkGrab.c for
572
 *                              details.
573
 * TK_CHECKED_IC:               1 means we've already tried to get an input
574
 *                              context for this window;  if the ic field
575
 *                              is NULL it means that there isn't a context
576
 *                              for the field.
577
 * TK_DONT_DESTROY_WINDOW:      1 means that Tk_DestroyWindow should not
578
 *                              invoke XDestroyWindow to destroy this widget's
579
 *                              X window.  The flag is set when the window
580
 *                              has already been destroyed elsewhere (e.g.
581
 *                              by another application) or when it will be
582
 *                              destroyed later (e.g. by destroying its
583
 *                              parent).
584
 * TK_WM_COLORMAP_WINDOW:       1 means that this window has at some time
585
 *                              appeared in the WM_COLORMAP_WINDOWS property
586
 *                              for its toplevel, so we have to remove it
587
 *                              from that property if the window is
588
 *                              deleted and the toplevel isn't.
589
 * TK_EMBEDDED:                 1 means that this window (which must be a
590
 *                              toplevel) is not a free-standing window but
591
 *                              rather is embedded in some other application.
592
 * TK_CONTAINER:                1 means that this window is a container, and
593
 *                              that some other application (either in
594
 *                              this process or elsewhere) may be
595
 *                              embedding itself inside the window.
596
 * TK_BOTH_HALVES:              1 means that this window is used for
597
 *                              application embedding (either as
598
 *                              container or embedded application), and
599
 *                              both the containing and embedded halves
600
 *                              are associated with windows in this
601
 *                              particular process.
602
 * TK_DEFER_MODAL:              1 means that this window has deferred a modal
603
 *                              loop until all of the bindings for the current
604
 *                              event have been invoked.
605
 * TK_WRAPPER:                  1 means that this window is the extra
606
 *                              wrapper window created around a toplevel
607
 *                              to hold the menubar under Unix.  See
608
 *                              tkUnixWm.c for more information.
609
 * TK_REPARENTED:               1 means that this window has been reparented
610
 *                              so that as far as the window system is
611
 *                              concerned it isn't a child of its Tk
612
 *                              parent.  Initially this is used only for
613
 *                              special Unix menubar windows.
614
 */
615
 
616
 
617
#define TK_MAPPED               1
618
#define TK_TOP_LEVEL            2
619
#define TK_ALREADY_DEAD         4
620
#define TK_NEED_CONFIG_NOTIFY   8
621
#define TK_GRAB_FLAG            0x10
622
#define TK_CHECKED_IC           0x20
623
#define TK_DONT_DESTROY_WINDOW  0x40
624
#define TK_WM_COLORMAP_WINDOW   0x80
625
#define TK_EMBEDDED             0x100
626
#define TK_CONTAINER            0x200
627
#define TK_BOTH_HALVES          0x400
628
#define TK_DEFER_MODAL          0x800
629
#define TK_WRAPPER              0x1000
630
#define TK_REPARENTED           0x2000
631
 
632
/*
633
 *--------------------------------------------------------------
634
 *
635
 * Procedure prototypes and structures used for defining new canvas
636
 * items:
637
 *
638
 *--------------------------------------------------------------
639
 */
640
 
641
/*
642
 * For each item in a canvas widget there exists one record with
643
 * the following structure.  Each actual item is represented by
644
 * a record with the following stuff at its beginning, plus additional
645
 * type-specific stuff after that.
646
 */
647
 
648
#define TK_TAG_SPACE 3
649
 
650
typedef struct Tk_Item  {
651
    int id;                             /* Unique identifier for this item
652
                                         * (also serves as first tag for
653
                                         * item). */
654
    struct Tk_Item *nextPtr;            /* Next in display list of all
655
                                         * items in this canvas.  Later items
656
                                         * in list are drawn on top of earlier
657
                                         * ones. */
658
    Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of
659
                                         * tags. */
660
    Tk_Uid *tagPtr;                     /* Pointer to array of tags.  Usually
661
                                         * points to staticTagSpace, but
662
                                         * may point to malloc-ed space if
663
                                         * there are lots of tags. */
664
    int tagSpace;                       /* Total amount of tag space available
665
                                         * at tagPtr. */
666
    int numTags;                        /* Number of tag slots actually used
667
                                         * at *tagPtr. */
668
    struct Tk_ItemType *typePtr;        /* Table of procedures that implement
669
                                         * this type of item. */
670
    int x1, y1, x2, y2;                 /* Bounding box for item, in integer
671
                                         * canvas units. Set by item-specific
672
                                         * code and guaranteed to contain every
673
                                         * pixel drawn in item.  Item area
674
                                         * includes x1 and y1 but not x2
675
                                         * and y2. */
676
    struct Tk_Item *prevPtr;            /* Previous in display list of all
677
                                         * items in this canvas. Later items
678
                                         * in list are drawn just below earlier
679
                                         * ones. */
680
    int   reserved1;                    /* This padding is for compatibility */
681
    char *reserved2;                    /* with Jan Nijtmans dash patch */
682
    int   reserved3;
683
 
684
    /*
685
     *------------------------------------------------------------------
686
     * Starting here is additional type-specific stuff;  see the
687
     * declarations for individual types to see what is part of
688
     * each type.  The actual space below is determined by the
689
     * "itemInfoSize" of the type's Tk_ItemType record.
690
     *------------------------------------------------------------------
691
     */
692
} Tk_Item;
693
 
694
/*
695
 * Records of the following type are used to describe a type of
696
 * item (e.g.  lines, circles, etc.) that can form part of a
697
 * canvas widget.
698
 */
699
 
700
typedef int     Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
701
                    Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
702
                    char **argv));
703
typedef int     Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,
704
                    Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
705
                    char **argv, int flags));
706
typedef int     Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,
707
                    Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
708
                    char **argv));
709
typedef void    Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas,
710
                    Tk_Item *itemPtr, Display *display));
711
typedef void    Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas,
712
                    Tk_Item *itemPtr, Display *display, Drawable dst,
713
                    int x, int y, int width, int height));
714
typedef double  Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas,
715
                    Tk_Item *itemPtr, double *pointPtr));
716
typedef int     Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas,
717
                    Tk_Item *itemPtr, double *rectPtr));
718
typedef int     Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp,
719
                    Tk_Canvas canvas, Tk_Item *itemPtr, int prepass));
720
typedef void    Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas,
721
                    Tk_Item *itemPtr, double originX, double originY,
722
                    double scaleX, double scaleY));
723
typedef void    Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas,
724
                    Tk_Item *itemPtr, double deltaX, double deltaY));
725
typedef int     Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp,
726
                    Tk_Canvas canvas, Tk_Item *itemPtr, char *indexString,
727
                    int *indexPtr));
728
typedef void    Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas,
729
                    Tk_Item *itemPtr, int index));
730
typedef int     Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas,
731
                    Tk_Item *itemPtr, int offset, char *buffer,
732
                    int maxBytes));
733
typedef void    Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas,
734
                    Tk_Item *itemPtr, int beforeThis, char *string));
735
typedef void    Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas,
736
                    Tk_Item *itemPtr, int first, int last));
737
 
738
typedef struct Tk_ItemType {
739
    char *name;                         /* The name of this type of item, such
740
                                         * as "line". */
741
    int itemSize;                       /* Total amount of space needed for
742
                                         * item's record. */
743
    Tk_ItemCreateProc *createProc;      /* Procedure to create a new item of
744
                                         * this type. */
745
    Tk_ConfigSpec *configSpecs;         /* Pointer to array of configuration
746
                                         * specs for this type.  Used for
747
                                         * returning configuration info. */
748
    Tk_ItemConfigureProc *configProc;   /* Procedure to call to change
749
                                         * configuration options. */
750
    Tk_ItemCoordProc *coordProc;        /* Procedure to call to get and set
751
                                         * the item's coordinates. */
752
    Tk_ItemDeleteProc *deleteProc;      /* Procedure to delete existing item of
753
                                         * this type. */
754
    Tk_ItemDisplayProc *displayProc;    /* Procedure to display items of
755
                                         * this type. */
756
    int alwaysRedraw;                   /* Non-zero means displayProc should
757
                                         * be called even when the item has
758
                                         * been moved off-screen. */
759
    Tk_ItemPointProc *pointProc;        /* Computes distance from item to
760
                                         * a given point. */
761
    Tk_ItemAreaProc *areaProc;          /* Computes whether item is inside,
762
                                         * outside, or overlapping an area. */
763
    Tk_ItemPostscriptProc *postscriptProc;
764
                                        /* Procedure to write a Postscript
765
                                         * description for items of this
766
                                         * type. */
767
    Tk_ItemScaleProc *scaleProc;        /* Procedure to rescale items of
768
                                         * this type. */
769
    Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of
770
                                         * this type. */
771
    Tk_ItemIndexProc *indexProc;        /* Procedure to determine index of
772
                                         * indicated character.  NULL if
773
                                         * item doesn't support indexing. */
774
    Tk_ItemCursorProc *icursorProc;     /* Procedure to set insert cursor pos.
775
                                         * to just before a given position. */
776
    Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in
777
                                         * STRING format) when it is in this
778
                                         * item. */
779
    Tk_ItemInsertProc *insertProc;      /* Procedure to insert something into
780
                                         * an item. */
781
    Tk_ItemDCharsProc *dCharsProc;      /* Procedure to delete characters
782
                                         * from an item. */
783
    struct Tk_ItemType *nextPtr;        /* Used to link types together into
784
                                         * a list. */
785
    char *reserved1;                    /* Reserved for future extension. */
786
    int   reserved2;                    /* Carefully compatible with */
787
    char *reserved3;                    /* Jan Nijtmans dash patch */
788
    char *reserved4;
789
} Tk_ItemType;
790
 
791
/*
792
 * The following structure provides information about the selection and
793
 * the insertion cursor.  It is needed by only a few items, such as
794
 * those that display text.  It is shared by the generic canvas code
795
 * and the item-specific code, but most of the fields should be written
796
 * only by the canvas generic code.
797
 */
798
 
799
typedef struct Tk_CanvasTextInfo {
800
    Tk_3DBorder selBorder;      /* Border and background for selected
801
                                 * characters.  Read-only to items.*/
802
    int selBorderWidth;         /* Width of border around selection.
803
                                 * Read-only to items. */
804
    XColor *selFgColorPtr;      /* Foreground color for selected text.
805
                                 * Read-only to items. */
806
    Tk_Item *selItemPtr;        /* Pointer to selected item.  NULL means
807
                                 * selection isn't in this canvas.
808
                                 * Writable by items. */
809
    int selectFirst;            /* Index of first selected character.
810
                                 * Writable by items. */
811
    int selectLast;             /* Index of last selected character.
812
                                 * Writable by items. */
813
    Tk_Item *anchorItemPtr;     /* Item corresponding to "selectAnchor":
814
                                 * not necessarily selItemPtr.   Read-only
815
                                 * to items. */
816
    int selectAnchor;           /* Fixed end of selection (i.e. "select to"
817
                                 * operation will use this as one end of the
818
                                 * selection).  Writable by items. */
819
    Tk_3DBorder insertBorder;   /* Used to draw vertical bar for insertion
820
                                 * cursor.  Read-only to items. */
821
    int insertWidth;            /* Total width of insertion cursor.  Read-only
822
                                 * to items. */
823
    int insertBorderWidth;      /* Width of 3-D border around insert cursor.
824
                                 * Read-only to items. */
825
    Tk_Item *focusItemPtr;      /* Item that currently has the input focus,
826
                                 * or NULL if no such item.  Read-only to
827
                                 * items.  */
828
    int gotFocus;               /* Non-zero means that the canvas widget has
829
                                 * the input focus.  Read-only to items.*/
830
    int cursorOn;               /* Non-zero means that an insertion cursor
831
                                 * should be displayed in focusItemPtr.
832
                                 * Read-only to items.*/
833
} Tk_CanvasTextInfo;
834
 
835
/*
836
 *--------------------------------------------------------------
837
 *
838
 * Procedure prototypes and structures used for managing images:
839
 *
840
 *--------------------------------------------------------------
841
 */
842
 
843
typedef struct Tk_ImageType Tk_ImageType;
844
typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,
845
        char *name, int objc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr,
846
        Tk_ImageMaster master, ClientData *masterDataPtr));
847
typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,
848
        ClientData masterData));
849
typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData,
850
        Display *display, Drawable drawable, int imageX, int imageY,
851
        int width, int height, int drawableX, int drawableY));
852
typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData,
853
        Display *display));
854
typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData));
855
typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData,
856
        int x, int y, int width, int height, int imageWidth,
857
        int imageHeight));
858
 
859
/*
860
 * The following structure represents a particular type of image
861
 * (bitmap, xpm image, etc.).  It provides information common to
862
 * all images of that type, such as the type name and a collection
863
 * of procedures in the image manager that respond to various
864
 * events.  Each image manager is represented by one of these
865
 * structures.
866
 */
867
 
868
struct Tk_ImageType {
869
    char *name;                 /* Name of image type. */
870
    Tk_ImageCreateProc *createProc;
871
                                /* Procedure to call to create a new image
872
                                 * of this type. */
873
    Tk_ImageGetProc *getProc;   /* Procedure to call the first time
874
                                 * Tk_GetImage is called in a new way
875
                                 * (new visual or screen). */
876
    Tk_ImageDisplayProc *displayProc;
877
                                /* Call to draw image, in response to
878
                                 * Tk_RedrawImage calls. */
879
    Tk_ImageFreeProc *freeProc; /* Procedure to call whenever Tk_FreeImage
880
                                 * is called to release an instance of an
881
                                 * image. */
882
    Tk_ImageDeleteProc *deleteProc;
883
                                /* Procedure to call to delete image.  It
884
                                 * will not be called until after freeProc
885
                                 * has been called for each instance of the
886
                                 * image. */
887
    struct Tk_ImageType *nextPtr;
888
                                /* Next in list of all image types currently
889
                                 * known.  Filled in by Tk, not by image
890
                                 * manager. */
891
    char *reserved;             /* reserved for future expansion */
892
};
893
 
894
/*
895
 *--------------------------------------------------------------
896
 *
897
 * Additional definitions used to manage images of type "photo".
898
 *
899
 *--------------------------------------------------------------
900
 */
901
 
902
/*
903
 * The following type is used to identify a particular photo image
904
 * to be manipulated:
905
 */
906
 
907
typedef void *Tk_PhotoHandle;
908
 
909
/*
910
 * The following structure describes a block of pixels in memory:
911
 */
912
 
913
typedef struct Tk_PhotoImageBlock {
914
    unsigned char *pixelPtr;    /* Pointer to the first pixel. */
915
    int         width;          /* Width of block, in pixels. */
916
    int         height;         /* Height of block, in pixels. */
917
    int         pitch;          /* Address difference between corresponding
918
                                 * pixels in successive lines. */
919
    int         pixelSize;      /* Address difference between successive
920
                                 * pixels in the same line. */
921
    int         offset[3];      /* Address differences between the red, green
922
                                 * and blue components of the pixel and the
923
                                 * pixel as a whole. */
924
    int         reserved;       /* Reserved for extensions (dash patch) */
925
} Tk_PhotoImageBlock;
926
 
927
/*
928
 * Procedure prototypes and structures used in reading and
929
 * writing photo images:
930
 */
931
 
932
typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;
933
typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,
934
        char *fileName, char *formatString, int *widthPtr, int *heightPtr));
935
typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Obj *dataObj,
936
        char *formatString, int *widthPtr, int *heightPtr));
937
typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
938
        Tcl_Channel chan, char *fileName, char *formatString,
939
        Tk_PhotoHandle imageHandle, int destX, int destY,
940
        int width, int height, int srcX, int srcY));
941
typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
942
        Tcl_Obj *dataObj, char *formatString, Tk_PhotoHandle imageHandle,
943
        int destX, int destY, int width, int height, int srcX, int srcY));
944
typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
945
        char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr));
946
typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
947
        Tcl_DString *dataPtr, char *formatString,
948
        Tk_PhotoImageBlock *blockPtr));
949
 
950
/*
951
 * The following structure represents a particular file format for
952
 * storing images (e.g., PPM, GIF, JPEG, etc.).  It provides information
953
 * to allow image files of that format to be recognized and read into
954
 * a photo image.
955
 */
956
 
957
struct Tk_PhotoImageFormat {
958
    char *name;                 /* Name of image file format */
959
    Tk_ImageFileMatchProc *fileMatchProc;
960
                                /* Procedure to call to determine whether
961
                                 * an image file matches this format. */
962
    Tk_ImageStringMatchProc *stringMatchProc;
963
                                /* Procedure to call to determine whether
964
                                 * the data in a string matches this format. */
965
    Tk_ImageFileReadProc *fileReadProc;
966
                                /* Procedure to call to read data from
967
                                 * an image file into a photo image. */
968
    Tk_ImageStringReadProc *stringReadProc;
969
                                /* Procedure to call to read data from
970
                                 * a string into a photo image. */
971
    Tk_ImageFileWriteProc *fileWriteProc;
972
                                /* Procedure to call to write data from
973
                                 * a photo image to a file. */
974
    Tk_ImageStringWriteProc *stringWriteProc;
975
                                /* Procedure to call to obtain a string
976
                                 * representation of the data in a photo
977
                                 * image.*/
978
    struct Tk_PhotoImageFormat *nextPtr;
979
                                /* Next in list of all photo image formats
980
                                 * currently known.  Filled in by Tk, not
981
                                 * by image format handler. */
982
};
983
 
984
/*
985
 *--------------------------------------------------------------
986
 *
987
 * The definitions below provide backward compatibility for
988
 * functions and types related to event handling that used to
989
 * be in Tk but have moved to Tcl.
990
 *
991
 *--------------------------------------------------------------
992
 */
993
 
994
#define TK_READABLE             TCL_READABLE
995
#define TK_WRITABLE             TCL_WRITABLE
996
#define TK_EXCEPTION            TCL_EXCEPTION
997
 
998
#define TK_DONT_WAIT            TCL_DONT_WAIT
999
#define TK_X_EVENTS             TCL_WINDOW_EVENTS
1000
#define TK_WINDOW_EVENTS        TCL_WINDOW_EVENTS
1001
#define TK_FILE_EVENTS          TCL_FILE_EVENTS
1002
#define TK_TIMER_EVENTS         TCL_TIMER_EVENTS
1003
#define TK_IDLE_EVENTS          TCL_IDLE_EVENTS
1004
#define TK_ALL_EVENTS           TCL_ALL_EVENTS
1005
 
1006
#define Tk_IdleProc             Tcl_IdleProc
1007
#define Tk_FileProc             Tcl_FileProc
1008
#define Tk_TimerProc            Tcl_TimerProc
1009
#define Tk_TimerToken           Tcl_TimerToken
1010
 
1011
#define Tk_BackgroundError      Tcl_BackgroundError
1012
#define Tk_CancelIdleCall       Tcl_CancelIdleCall
1013
#define Tk_CreateFileHandler    Tcl_CreateFileHandler
1014
#define Tk_CreateTimerHandler   Tcl_CreateTimerHandler
1015
#define Tk_DeleteFileHandler    Tcl_DeleteFileHandler
1016
#define Tk_DeleteTimerHandler   Tcl_DeleteTimerHandler
1017
#define Tk_DoOneEvent           Tcl_DoOneEvent
1018
#define Tk_DoWhenIdle           Tcl_DoWhenIdle
1019
#define Tk_Sleep                Tcl_Sleep
1020
 
1021
#define Tk_EventuallyFree       Tcl_EventuallyFree
1022
#define Tk_FreeProc             Tcl_FreeProc
1023
#define Tk_Preserve             Tcl_Preserve
1024
#define Tk_Release              Tcl_Release
1025
#define Tk_FileeventCmd         Tcl_FileEventCmd
1026
 
1027
/*
1028
 *--------------------------------------------------------------
1029
 *
1030
 * Additional procedure types defined by Tk.
1031
 *
1032
 *--------------------------------------------------------------
1033
 */
1034
 
1035
typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData,
1036
        XErrorEvent *errEventPtr));
1037
typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData,
1038
        XEvent *eventPtr));
1039
typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData,
1040
        XEvent *eventPtr));
1041
typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData,
1042
        Tcl_Interp *interp, char *portion));
1043
typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData));
1044
typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_((
1045
        ClientData clientData, XEvent *eventPtr));
1046
typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData,
1047
        int offset, char *buffer, int maxBytes));
1048
 
1049
/*
1050
 *--------------------------------------------------------------
1051
 *
1052
 * Exported procedures and variables.
1053
 *
1054
 *--------------------------------------------------------------
1055
 */
1056
 
1057
EXTERN XColor *         Tk_3DBorderColor _ANSI_ARGS_((Tk_3DBorder border));
1058
EXTERN GC               Tk_3DBorderGC _ANSI_ARGS_((Tk_Window tkwin,
1059
                            Tk_3DBorder border, int which));
1060
EXTERN void             Tk_3DHorizontalBevel _ANSI_ARGS_((Tk_Window tkwin,
1061
                            Drawable drawable, Tk_3DBorder border, int x,
1062
                            int y, int width, int height, int leftIn,
1063
                            int rightIn, int topBevel, int relief));
1064
EXTERN void             Tk_3DVerticalBevel _ANSI_ARGS_((Tk_Window tkwin,
1065
                            Drawable drawable, Tk_3DBorder border, int x,
1066
                            int y, int width, int height, int leftBevel,
1067
                            int relief));
1068
EXTERN void             Tk_AddOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
1069
                            char *value, int priority));
1070
EXTERN void             Tk_BindEvent _ANSI_ARGS_((Tk_BindingTable bindingTable,
1071
                            XEvent *eventPtr, Tk_Window tkwin, int numObjects,
1072
                            ClientData *objectPtr));
1073
EXTERN void             Tk_CanvasDrawableCoords _ANSI_ARGS_((Tk_Canvas canvas,
1074
                            double x, double y, short *drawableXPtr,
1075
                            short *drawableYPtr));
1076
EXTERN void             Tk_CanvasEventuallyRedraw _ANSI_ARGS_((
1077
                            Tk_Canvas canvas, int x1, int y1, int x2,
1078
                            int y2));
1079
EXTERN int              Tk_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp *interp,
1080
                            Tk_Canvas canvas, char *string,
1081
                            double *doublePtr));
1082
EXTERN Tk_CanvasTextInfo *Tk_CanvasGetTextInfo _ANSI_ARGS_((Tk_Canvas canvas));
1083
EXTERN int              Tk_CanvasPsBitmap _ANSI_ARGS_((Tcl_Interp *interp,
1084
                            Tk_Canvas canvas, Pixmap bitmap, int x, int y,
1085
                            int width, int height));
1086
EXTERN int              Tk_CanvasPsColor _ANSI_ARGS_((Tcl_Interp *interp,
1087
                            Tk_Canvas canvas, XColor *colorPtr));
1088
EXTERN int              Tk_CanvasPsFont _ANSI_ARGS_((Tcl_Interp *interp,
1089
                            Tk_Canvas canvas, Tk_Font font));
1090
EXTERN void             Tk_CanvasPsPath _ANSI_ARGS_((Tcl_Interp *interp,
1091
                            Tk_Canvas canvas, double *coordPtr, int numPoints));
1092
EXTERN int              Tk_CanvasPsStipple _ANSI_ARGS_((Tcl_Interp *interp,
1093
                            Tk_Canvas canvas, Pixmap bitmap));
1094
EXTERN double           Tk_CanvasPsY _ANSI_ARGS_((Tk_Canvas canvas, double y));
1095
EXTERN void             Tk_CanvasSetStippleOrigin _ANSI_ARGS_((
1096
                            Tk_Canvas canvas, GC gc));
1097
EXTERN int              Tk_CanvasTagsParseProc _ANSI_ARGS_((
1098
                            ClientData clientData, Tcl_Interp *interp,
1099
                            Tk_Window tkwin, char *value, char *widgRec,
1100
                            int offset));
1101
EXTERN char *           Tk_CanvasTagsPrintProc _ANSI_ARGS_((
1102
                            ClientData clientData, Tk_Window tkwin,
1103
                            char *widgRec, int offset,
1104
                            Tcl_FreeProc **freeProcPtr));
1105
EXTERN Tk_Window        Tk_CanvasTkwin _ANSI_ARGS_((Tk_Canvas canvas));
1106
EXTERN void             Tk_CanvasWindowCoords _ANSI_ARGS_((Tk_Canvas canvas,
1107
                            double x, double y, short *screenXPtr,
1108
                            short *screenYPtr));
1109
EXTERN void             Tk_ChangeWindowAttributes _ANSI_ARGS_((Tk_Window tkwin,
1110
                            unsigned long valueMask,
1111
                            XSetWindowAttributes *attsPtr));
1112
EXTERN int              Tk_CharBbox _ANSI_ARGS_((Tk_TextLayout layout,
1113
                            int index, int *xPtr, int *yPtr, int *widthPtr,
1114
                            int *heightPtr));
1115
EXTERN void             Tk_ClearSelection _ANSI_ARGS_((Tk_Window tkwin,
1116
                            Atom selection));
1117
EXTERN int              Tk_ClipboardAppend _ANSI_ARGS_((Tcl_Interp *interp,
1118
                            Tk_Window tkwin, Atom target, Atom format,
1119
                            char* buffer));
1120
EXTERN int              Tk_ClipboardClear _ANSI_ARGS_((Tcl_Interp *interp,
1121
                            Tk_Window tkwin));
1122
EXTERN int              Tk_ConfigureInfo _ANSI_ARGS_((Tcl_Interp *interp,
1123
                            Tk_Window tkwin, Tk_ConfigSpec *specs,
1124
                            char *widgRec, char *argvName, int flags));
1125
EXTERN int              Tk_ConfigureValue _ANSI_ARGS_((Tcl_Interp *interp,
1126
                            Tk_Window tkwin, Tk_ConfigSpec *specs,
1127
                            char *widgRec, char *argvName, int flags));
1128
EXTERN int              Tk_ConfigureWidget _ANSI_ARGS_((Tcl_Interp *interp,
1129
                            Tk_Window tkwin, Tk_ConfigSpec *specs,
1130
                            int argc, char **argv, char *widgRec,
1131
                            int flags));
1132
EXTERN void             Tk_ConfigureWindow _ANSI_ARGS_((Tk_Window tkwin,
1133
                            unsigned int valueMask, XWindowChanges *valuePtr));
1134
EXTERN Tk_TextLayout    Tk_ComputeTextLayout _ANSI_ARGS_((Tk_Font font,
1135
                            CONST char *string, int numChars, int wrapLength,
1136
                            Tk_Justify justify, int flags, int *widthPtr,
1137
                            int *heightPtr));
1138
EXTERN Tk_Window        Tk_CoordsToWindow _ANSI_ARGS_((int rootX, int rootY,
1139
                            Tk_Window tkwin));
1140
EXTERN unsigned long    Tk_CreateBinding _ANSI_ARGS_((Tcl_Interp *interp,
1141
                            Tk_BindingTable bindingTable, ClientData object,
1142
                            char *eventString, char *command, int append));
1143
EXTERN Tk_BindingTable  Tk_CreateBindingTable _ANSI_ARGS_((Tcl_Interp *interp));
1144
EXTERN Tk_ErrorHandler  Tk_CreateErrorHandler _ANSI_ARGS_((Display *display,
1145
                            int errNum, int request, int minorCode,
1146
                            Tk_ErrorProc *errorProc, ClientData clientData));
1147
EXTERN void             Tk_CreateEventHandler _ANSI_ARGS_((Tk_Window token,
1148
                            unsigned long mask, Tk_EventProc *proc,
1149
                            ClientData clientData));
1150
EXTERN void             Tk_CreateGenericHandler _ANSI_ARGS_((
1151
                            Tk_GenericProc *proc, ClientData clientData));
1152
EXTERN void             Tk_CreateImageType _ANSI_ARGS_((
1153
                            Tk_ImageType *typePtr));
1154
EXTERN void             Tk_CreateItemType _ANSI_ARGS_((Tk_ItemType *typePtr));
1155
EXTERN void             Tk_CreatePhotoImageFormat _ANSI_ARGS_((
1156
                            Tk_PhotoImageFormat *formatPtr));
1157
EXTERN void             Tk_CreateSelHandler _ANSI_ARGS_((Tk_Window tkwin,
1158
                            Atom selection, Atom target,
1159
                            Tk_SelectionProc *proc, ClientData clientData,
1160
                            Atom format));
1161
EXTERN Tk_Window        Tk_CreateWindow _ANSI_ARGS_((Tcl_Interp *interp,
1162
                            Tk_Window parent, char *name, char *screenName));
1163
EXTERN Tk_Window        Tk_CreateWindowFromPath _ANSI_ARGS_((
1164
                            Tcl_Interp *interp, Tk_Window tkwin,
1165
                            char *pathName, char *screenName));
1166
EXTERN int              Tk_DefineBitmap _ANSI_ARGS_((Tcl_Interp *interp,
1167
                            Tk_Uid name, char *source, int width,
1168
                            int height));
1169
EXTERN void             Tk_DefineCursor _ANSI_ARGS_((Tk_Window window,
1170
                            Tk_Cursor cursor));
1171
EXTERN void             Tk_DeleteAllBindings _ANSI_ARGS_((
1172
                            Tk_BindingTable bindingTable, ClientData object));
1173
EXTERN int              Tk_DeleteBinding _ANSI_ARGS_((Tcl_Interp *interp,
1174
                            Tk_BindingTable bindingTable, ClientData object,
1175
                            char *eventString));
1176
EXTERN void             Tk_DeleteBindingTable _ANSI_ARGS_((
1177
                            Tk_BindingTable bindingTable));
1178
EXTERN void             Tk_DeleteErrorHandler _ANSI_ARGS_((
1179
                            Tk_ErrorHandler handler));
1180
EXTERN void             Tk_DeleteEventHandler _ANSI_ARGS_((Tk_Window token,
1181
                            unsigned long mask, Tk_EventProc *proc,
1182
                            ClientData clientData));
1183
EXTERN void             Tk_DeleteGenericHandler _ANSI_ARGS_((
1184
                            Tk_GenericProc *proc, ClientData clientData));
1185
EXTERN void             Tk_DeleteImage _ANSI_ARGS_((Tcl_Interp *interp,
1186
                            char *name));
1187
EXTERN void             Tk_DeleteSelHandler _ANSI_ARGS_((Tk_Window tkwin,
1188
                            Atom selection, Atom target));
1189
EXTERN void             Tk_DestroyWindow _ANSI_ARGS_((Tk_Window tkwin));
1190
EXTERN char *           Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin));
1191
EXTERN int              Tk_DistanceToTextLayout _ANSI_ARGS_((
1192
                            Tk_TextLayout layout, int x, int y));
1193
EXTERN void             Tk_Draw3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
1194
                            Drawable drawable, Tk_3DBorder border,
1195
                            XPoint *pointPtr, int numPoints, int borderWidth,
1196
                            int leftRelief));
1197
EXTERN void             Tk_Draw3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
1198
                            Drawable drawable, Tk_3DBorder border, int x,
1199
                            int y, int width, int height, int borderWidth,
1200
                            int relief));
1201
EXTERN void             Tk_DrawChars _ANSI_ARGS_((Display *display,
1202
                            Drawable drawable, GC gc, Tk_Font tkfont,
1203
                            CONST char *source, int numChars, int x,
1204
                            int y));
1205
EXTERN void             Tk_DrawFocusHighlight _ANSI_ARGS_((Tk_Window tkwin,
1206
                            GC gc, int width, Drawable drawable));
1207
EXTERN void             Tk_DrawTextLayout _ANSI_ARGS_((Display *display,
1208
                            Drawable drawable, GC gc, Tk_TextLayout layout,
1209
                            int x, int y, int firstChar, int lastChar));
1210
EXTERN void             Tk_Fill3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
1211
                            Drawable drawable, Tk_3DBorder border,
1212
                            XPoint *pointPtr, int numPoints, int borderWidth,
1213
                            int leftRelief));
1214
EXTERN void             Tk_Fill3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
1215
                            Drawable drawable, Tk_3DBorder border, int x,
1216
                            int y, int width, int height, int borderWidth,
1217
                            int relief));
1218
EXTERN Tk_PhotoHandle   Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp *interp,
1219
                            char *imageName));
1220
EXTERN Font             Tk_FontId _ANSI_ARGS_((Tk_Font font));
1221
EXTERN void             Tk_Free3DBorder _ANSI_ARGS_((Tk_3DBorder border));
1222
EXTERN void             Tk_FreeBitmap _ANSI_ARGS_((Display *display,
1223
                            Pixmap bitmap));
1224
EXTERN void             Tk_FreeColor _ANSI_ARGS_((XColor *colorPtr));
1225
EXTERN void             Tk_FreeColormap _ANSI_ARGS_((Display *display,
1226
                            Colormap colormap));
1227
EXTERN void             Tk_FreeCursor _ANSI_ARGS_((Display *display,
1228
                            Tk_Cursor cursor));
1229
EXTERN void             Tk_FreeFont _ANSI_ARGS_((Tk_Font));
1230
EXTERN void             Tk_FreeGC _ANSI_ARGS_((Display *display, GC gc));
1231
EXTERN void             Tk_FreeImage _ANSI_ARGS_((Tk_Image image));
1232
EXTERN void             Tk_FreeOptions _ANSI_ARGS_((Tk_ConfigSpec *specs,
1233
                            char *widgRec, Display *display, int needFlags));
1234
EXTERN void             Tk_FreePixmap _ANSI_ARGS_((Display *display,
1235
                            Pixmap pixmap));
1236
EXTERN void             Tk_FreeTextLayout _ANSI_ARGS_((
1237
                            Tk_TextLayout textLayout));
1238
EXTERN void             Tk_FreeXId _ANSI_ARGS_((Display *display, XID xid));
1239
EXTERN GC               Tk_GCForColor _ANSI_ARGS_((XColor *colorPtr,
1240
                            Drawable drawable));
1241
EXTERN void             Tk_GeometryRequest _ANSI_ARGS_((Tk_Window tkwin,
1242
                            int reqWidth,  int reqHeight));
1243
EXTERN Tk_3DBorder      Tk_Get3DBorder _ANSI_ARGS_((Tcl_Interp *interp,
1244
                            Tk_Window tkwin, Tk_Uid colorName));
1245
EXTERN void             Tk_GetAllBindings _ANSI_ARGS_((Tcl_Interp *interp,
1246
                            Tk_BindingTable bindingTable, ClientData object));
1247
EXTERN int              Tk_GetAnchor _ANSI_ARGS_((Tcl_Interp *interp,
1248
                            char *string, Tk_Anchor *anchorPtr));
1249
EXTERN char *           Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin,
1250
                            Atom atom));
1251
EXTERN char *           Tk_GetBinding _ANSI_ARGS_((Tcl_Interp *interp,
1252
                            Tk_BindingTable bindingTable, ClientData object,
1253
                            char *eventString));
1254
EXTERN Pixmap           Tk_GetBitmap _ANSI_ARGS_((Tcl_Interp *interp,
1255
                            Tk_Window tkwin, Tk_Uid string));
1256
EXTERN Pixmap           Tk_GetBitmapFromData _ANSI_ARGS_((Tcl_Interp *interp,
1257
                            Tk_Window tkwin, char *source,
1258
                            int width, int height));
1259
EXTERN int              Tk_GetCapStyle _ANSI_ARGS_((Tcl_Interp *interp,
1260
                            char *string, int *capPtr));
1261
EXTERN XColor *         Tk_GetColor _ANSI_ARGS_((Tcl_Interp *interp,
1262
                            Tk_Window tkwin, Tk_Uid name));
1263
EXTERN XColor *         Tk_GetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
1264
                            XColor *colorPtr));
1265
EXTERN Colormap         Tk_GetColormap _ANSI_ARGS_((Tcl_Interp *interp,
1266
                            Tk_Window tkwin, char *string));
1267
EXTERN Tk_Cursor        Tk_GetCursor _ANSI_ARGS_((Tcl_Interp *interp,
1268
                            Tk_Window tkwin, Tk_Uid string));
1269
EXTERN Tk_Cursor        Tk_GetCursorFromData _ANSI_ARGS_((Tcl_Interp *interp,
1270
                            Tk_Window tkwin, char *source, char *mask,
1271
                            int width, int height, int xHot, int yHot,
1272
                            Tk_Uid fg, Tk_Uid bg));
1273
EXTERN Tk_Font          Tk_GetFont _ANSI_ARGS_((Tcl_Interp *interp,
1274
                            Tk_Window tkwin, CONST char *string));
1275
EXTERN Tk_Font          Tk_GetFontFromObj _ANSI_ARGS_((Tcl_Interp *interp,
1276
                            Tk_Window tkwin, Tcl_Obj *objPtr));
1277
EXTERN void             Tk_GetFontMetrics _ANSI_ARGS_((Tk_Font font,
1278
                            Tk_FontMetrics *fmPtr));
1279
EXTERN GC               Tk_GetGC _ANSI_ARGS_((Tk_Window tkwin,
1280
                            unsigned long valueMask, XGCValues *valuePtr));
1281
/* CYGNUS LOCAL.  */
1282
EXTERN GC               Tk_GetGCColor _ANSI_ARGS_((Tk_Window tkwin,
1283
                            unsigned long valueMask, XGCValues *valuePtr,
1284
                            XColor *foreground, XColor *background));
1285
EXTERN Tk_Image         Tk_GetImage _ANSI_ARGS_((Tcl_Interp *interp,
1286
                            Tk_Window tkwin, char *name,
1287
                            Tk_ImageChangedProc *changeProc,
1288
                            ClientData clientData));
1289
EXTERN ClientData       Tk_GetImageMasterData _ANSI_ARGS_ ((Tcl_Interp *interp,
1290
                            char *name, Tk_ImageType **typePtrPtr));
1291
EXTERN Tk_ItemType *    Tk_GetItemTypes _ANSI_ARGS_((void));
1292
EXTERN int              Tk_GetJoinStyle _ANSI_ARGS_((Tcl_Interp *interp,
1293
                            char *string, int *joinPtr));
1294
EXTERN int              Tk_GetJustify _ANSI_ARGS_((Tcl_Interp *interp,
1295
                            char *string, Tk_Justify *justifyPtr));
1296
EXTERN int              Tk_GetNumMainWindows _ANSI_ARGS_((void));
1297
EXTERN Tk_Uid           Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
1298
                            char *className));
1299
EXTERN int              Tk_GetPixels _ANSI_ARGS_((Tcl_Interp *interp,
1300
                            Tk_Window tkwin, char *string, int *intPtr));
1301
EXTERN Pixmap           Tk_GetPixmap _ANSI_ARGS_((Display *display, Drawable d,
1302
                            int width, int height, int depth));
1303
EXTERN int              Tk_GetRelief _ANSI_ARGS_((Tcl_Interp *interp,
1304
                            char *name, int *reliefPtr));
1305
EXTERN void             Tk_GetRootCoords _ANSI_ARGS_ ((Tk_Window tkwin,
1306
                            int *xPtr, int *yPtr));
1307
EXTERN int              Tk_GetScrollInfo _ANSI_ARGS_((Tcl_Interp *interp,
1308
                            int argc, char **argv, double *dblPtr,
1309
                            int *intPtr));
1310
EXTERN int              Tk_GetScreenMM _ANSI_ARGS_((Tcl_Interp *interp,
1311
                            Tk_Window tkwin, char *string, double *doublePtr));
1312
EXTERN int              Tk_GetSelection _ANSI_ARGS_((Tcl_Interp *interp,
1313
                            Tk_Window tkwin, Atom selection, Atom target,
1314
                            Tk_GetSelProc *proc, ClientData clientData));
1315
EXTERN Tk_Uid           Tk_GetUid _ANSI_ARGS_((CONST char *string));
1316
EXTERN Visual *         Tk_GetVisual _ANSI_ARGS_((Tcl_Interp *interp,
1317
                            Tk_Window tkwin, char *string, int *depthPtr,
1318
                            Colormap *colormapPtr));
1319
EXTERN void             Tk_GetVRootGeometry _ANSI_ARGS_((Tk_Window tkwin,
1320
                            int *xPtr, int *yPtr, int *widthPtr,
1321
                            int *heightPtr));
1322
EXTERN int              Tk_Grab _ANSI_ARGS_((Tcl_Interp *interp,
1323
                            Tk_Window tkwin, int grabGlobal));
1324
EXTERN void             Tk_HandleEvent _ANSI_ARGS_((XEvent *eventPtr));
1325
EXTERN Tk_Window        Tk_IdToWindow _ANSI_ARGS_((Display *display,
1326
                            Window window));
1327
EXTERN void             Tk_ImageChanged _ANSI_ARGS_((
1328
                            Tk_ImageMaster master, int x, int y,
1329
                            int width, int height, int imageWidth,
1330
                            int imageHeight));
1331
EXTERN int              Tk_Init _ANSI_ARGS_((Tcl_Interp *interp));
1332
EXTERN Atom             Tk_InternAtom _ANSI_ARGS_((Tk_Window tkwin,
1333
                            char *name));
1334
EXTERN int              Tk_IntersectTextLayout _ANSI_ARGS_((
1335
                            Tk_TextLayout layout, int x, int y, int width,
1336
                            int height));
1337
EXTERN void             Tk_Main _ANSI_ARGS_((int argc, char **argv,
1338
                            Tcl_AppInitProc *appInitProc));
1339
EXTERN void             Tk_MainLoop _ANSI_ARGS_((void));
1340
EXTERN void             Tk_MaintainGeometry _ANSI_ARGS_((Tk_Window slave,
1341
                            Tk_Window master, int x, int y, int width,
1342
                            int height));
1343
EXTERN Tk_Window        Tk_MainWindow _ANSI_ARGS_((Tcl_Interp *interp));
1344
EXTERN void             Tk_MakeWindowExist _ANSI_ARGS_((Tk_Window tkwin));
1345
EXTERN void             Tk_ManageGeometry _ANSI_ARGS_((Tk_Window tkwin,
1346
                            Tk_GeomMgr *mgrPtr, ClientData clientData));
1347
EXTERN void             Tk_MapWindow _ANSI_ARGS_((Tk_Window tkwin));
1348
EXTERN int              Tk_MeasureChars _ANSI_ARGS_((Tk_Font tkfont,
1349
                            CONST char *source, int maxChars, int maxPixels,
1350
                            int flags, int *lengthPtr));
1351
EXTERN void             Tk_MoveResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
1352
                            int x, int y, int width, int height));
1353
EXTERN void             Tk_MoveWindow _ANSI_ARGS_((Tk_Window tkwin, int x,
1354
                            int y));
1355
EXTERN void             Tk_MoveToplevelWindow _ANSI_ARGS_((Tk_Window tkwin,
1356
                            int x, int y));
1357
EXTERN char *           Tk_NameOf3DBorder _ANSI_ARGS_((Tk_3DBorder border));
1358
EXTERN char *           Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor));
1359
EXTERN char *           Tk_NameOfBitmap _ANSI_ARGS_((Display *display,
1360
                            Pixmap bitmap));
1361
EXTERN char *           Tk_NameOfCapStyle _ANSI_ARGS_((int cap));
1362
EXTERN char *           Tk_NameOfColor _ANSI_ARGS_((XColor *colorPtr));
1363
EXTERN char *           Tk_NameOfCursor _ANSI_ARGS_((Display *display,
1364
                            Tk_Cursor cursor));
1365
EXTERN char *           Tk_NameOfFont _ANSI_ARGS_((Tk_Font font));
1366
EXTERN char *           Tk_NameOfImage _ANSI_ARGS_((
1367
                            Tk_ImageMaster imageMaster));
1368
EXTERN char *           Tk_NameOfJoinStyle _ANSI_ARGS_((int join));
1369
EXTERN char *           Tk_NameOfJustify _ANSI_ARGS_((Tk_Justify justify));
1370
EXTERN char *           Tk_NameOfRelief _ANSI_ARGS_((int relief));
1371
EXTERN Tk_Window        Tk_NameToWindow _ANSI_ARGS_((Tcl_Interp *interp,
1372
                            char *pathName, Tk_Window tkwin));
1373
EXTERN void             Tk_OwnSelection _ANSI_ARGS_((Tk_Window tkwin,
1374
                            Atom selection, Tk_LostSelProc *proc,
1375
                            ClientData clientData));
1376
EXTERN int              Tk_ParseArgv _ANSI_ARGS_((Tcl_Interp *interp,
1377
                            Tk_Window tkwin, int *argcPtr, char **argv,
1378
                            Tk_ArgvInfo *argTable, int flags));
1379
EXTERN void             Tk_PhotoPutBlock _ANSI_ARGS_((Tk_PhotoHandle handle,
1380
                            Tk_PhotoImageBlock *blockPtr, int x, int y,
1381
                            int width, int height));
1382
EXTERN void             Tk_PhotoPutZoomedBlock _ANSI_ARGS_((
1383
                            Tk_PhotoHandle handle,
1384
                            Tk_PhotoImageBlock *blockPtr, int x, int y,
1385
                            int width, int height, int zoomX, int zoomY,
1386
                            int subsampleX, int subsampleY));
1387
EXTERN int              Tk_PhotoGetImage _ANSI_ARGS_((Tk_PhotoHandle handle,
1388
                            Tk_PhotoImageBlock *blockPtr));
1389
EXTERN void             Tk_PhotoBlank _ANSI_ARGS_((Tk_PhotoHandle handle));
1390
EXTERN void             Tk_PhotoExpand _ANSI_ARGS_((Tk_PhotoHandle handle,
1391
                            int width, int height ));
1392
EXTERN void             Tk_PhotoGetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
1393
                            int *widthPtr, int *heightPtr));
1394
EXTERN void             Tk_PhotoSetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
1395
                            int width, int height));
1396
EXTERN int              Tk_PointToChar _ANSI_ARGS_((Tk_TextLayout layout,
1397
                            int x, int y));
1398
EXTERN int              Tk_PostscriptFontName _ANSI_ARGS_((Tk_Font tkfont,
1399
                            Tcl_DString *dsPtr));
1400
EXTERN void             Tk_PreserveColormap _ANSI_ARGS_((Display *display,
1401
                            Colormap colormap));
1402
EXTERN void             Tk_QueueWindowEvent _ANSI_ARGS_((XEvent *eventPtr,
1403
                            Tcl_QueuePosition position));
1404
EXTERN void             Tk_RedrawImage _ANSI_ARGS_((Tk_Image image, int imageX,
1405
                            int imageY, int width, int height,
1406
                            Drawable drawable, int drawableX, int drawableY));
1407
EXTERN void             Tk_ResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
1408
                            int width, int height));
1409
EXTERN int              Tk_RestackWindow _ANSI_ARGS_((Tk_Window tkwin,
1410
                            int aboveBelow, Tk_Window other));
1411
EXTERN Tk_RestrictProc *Tk_RestrictEvents _ANSI_ARGS_((Tk_RestrictProc *proc,
1412
                            ClientData arg, ClientData *prevArgPtr));
1413
EXTERN int              Tk_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
1414
EXTERN char *           Tk_SetAppName _ANSI_ARGS_((Tk_Window tkwin,
1415
                            char *name));
1416
EXTERN void             Tk_SetBackgroundFromBorder _ANSI_ARGS_((
1417
                            Tk_Window tkwin, Tk_3DBorder border));
1418
EXTERN void             Tk_SetClass _ANSI_ARGS_((Tk_Window tkwin,
1419
                            char *className));
1420
EXTERN void             Tk_SetGrid _ANSI_ARGS_((Tk_Window tkwin,
1421
                            int reqWidth, int reqHeight, int gridWidth,
1422
                            int gridHeight));
1423
EXTERN void             Tk_SetInternalBorder _ANSI_ARGS_((Tk_Window tkwin,
1424
                            int width));
1425
EXTERN void             Tk_SetWindowBackground _ANSI_ARGS_((Tk_Window tkwin,
1426
                            unsigned long pixel));
1427
EXTERN void             Tk_SetWindowBackgroundPixmap _ANSI_ARGS_((
1428
                            Tk_Window tkwin, Pixmap pixmap));
1429
EXTERN void             Tk_SetWindowBorder _ANSI_ARGS_((Tk_Window tkwin,
1430
                            unsigned long pixel));
1431
EXTERN void             Tk_SetWindowBorderWidth _ANSI_ARGS_((Tk_Window tkwin,
1432
                            int width));
1433
EXTERN void             Tk_SetWindowBorderPixmap _ANSI_ARGS_((Tk_Window tkwin,
1434
                            Pixmap pixmap));
1435
EXTERN void             Tk_SetWindowColormap _ANSI_ARGS_((Tk_Window tkwin,
1436
                            Colormap colormap));
1437
EXTERN int              Tk_SetWindowVisual _ANSI_ARGS_((Tk_Window tkwin,
1438
                            Visual *visual, int depth,
1439
                            Colormap colormap));
1440
EXTERN void             Tk_SizeOfBitmap _ANSI_ARGS_((Display *display,
1441
                            Pixmap bitmap, int *widthPtr,
1442
                            int *heightPtr));
1443
EXTERN void             Tk_SizeOfImage _ANSI_ARGS_((Tk_Image image,
1444
                            int *widthPtr, int *heightPtr));
1445
EXTERN int              Tk_StrictMotif _ANSI_ARGS_((Tk_Window tkwin));
1446
EXTERN void             Tk_TextLayoutToPostscript _ANSI_ARGS_((
1447
                            Tcl_Interp *interp, Tk_TextLayout layout));
1448
EXTERN int              Tk_TextWidth _ANSI_ARGS_((Tk_Font font,
1449
                            CONST char *string, int numChars));
1450
EXTERN void             Tk_UndefineCursor _ANSI_ARGS_((Tk_Window window));
1451
EXTERN void             Tk_UnderlineChars _ANSI_ARGS_((Display *display,
1452
                            Drawable drawable, GC gc, Tk_Font tkfont,
1453
                            CONST char *source, int x, int y, int firstChar,
1454
                            int lastChar));
1455
EXTERN void             Tk_UnderlineTextLayout _ANSI_ARGS_((
1456
                            Display *display, Drawable drawable, GC gc,
1457
                            Tk_TextLayout layout, int x, int y,
1458
                            int underline));
1459
EXTERN void             Tk_Ungrab _ANSI_ARGS_((Tk_Window tkwin));
1460
EXTERN void             Tk_UnmaintainGeometry _ANSI_ARGS_((Tk_Window slave,
1461
                            Tk_Window master));
1462
EXTERN void             Tk_UnmapWindow _ANSI_ARGS_((Tk_Window tkwin));
1463
EXTERN void             Tk_UnsetGrid _ANSI_ARGS_((Tk_Window tkwin));
1464
EXTERN void             Tk_UpdatePointer _ANSI_ARGS_((Tk_Window tkwin,
1465
                            int x, int y, int state));
1466
 
1467
/*
1468
 * Tcl commands exported by Tk:
1469
 */
1470
 
1471
EXTERN int              Tk_BellObjCmd _ANSI_ARGS_((ClientData clientData,
1472
                            Tcl_Interp *interp, int objc,
1473
                            Tcl_Obj *CONST objv[]));
1474
EXTERN int              Tk_BindCmd _ANSI_ARGS_((ClientData clientData,
1475
                            Tcl_Interp *interp, int argc, char **argv));
1476
EXTERN int              Tk_BindtagsCmd _ANSI_ARGS_((ClientData clientData,
1477
                            Tcl_Interp *interp, int argc, char **argv));
1478
EXTERN int              Tk_ButtonCmd _ANSI_ARGS_((ClientData clientData,
1479
                            Tcl_Interp *interp, int argc, char **argv));
1480
EXTERN int              Tk_CanvasCmd _ANSI_ARGS_((ClientData clientData,
1481
                            Tcl_Interp *interp, int argc, char **argv));
1482
EXTERN int              Tk_CheckbuttonCmd _ANSI_ARGS_((ClientData clientData,
1483
                            Tcl_Interp *interp, int argc, char **argv));
1484
EXTERN int              Tk_ClipboardCmd _ANSI_ARGS_((ClientData clientData,
1485
                            Tcl_Interp *interp, int argc, char **argv));
1486
EXTERN int              Tk_ChooseColorCmd _ANSI_ARGS_((ClientData clientData,
1487
                            Tcl_Interp *interp, int argc, char **argv));
1488
EXTERN int              Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData,
1489
                            Tcl_Interp *interp, int argc, char **argv));
1490
EXTERN int              Tk_EntryCmd _ANSI_ARGS_((ClientData clientData,
1491
                            Tcl_Interp *interp, int argc, char **argv));
1492
EXTERN int              Tk_EventCmd _ANSI_ARGS_((ClientData clientData,
1493
                            Tcl_Interp *interp, int argc, char **argv));
1494
EXTERN int              Tk_FrameCmd _ANSI_ARGS_((ClientData clientData,
1495
                            Tcl_Interp *interp, int argc, char **argv));
1496
EXTERN int              Tk_FocusCmd _ANSI_ARGS_((ClientData clientData,
1497
                            Tcl_Interp *interp, int argc, char **argv));
1498
EXTERN int              Tk_FontObjCmd _ANSI_ARGS_((ClientData clientData,
1499
                            Tcl_Interp *interp, int objc,
1500
                            Tcl_Obj *CONST objv[]));
1501
EXTERN int              Tk_GetOpenFileCmd _ANSI_ARGS_((ClientData clientData,
1502
                            Tcl_Interp *interp, int argc, char **argv));
1503
EXTERN int              Tk_GetSaveFileCmd _ANSI_ARGS_((ClientData clientData,
1504
                            Tcl_Interp *interp, int argc, char **argv));
1505
EXTERN int              Tk_GrabCmd _ANSI_ARGS_((ClientData clientData,
1506
                            Tcl_Interp *interp, int argc, char **argv));
1507
EXTERN int              Tk_GridCmd _ANSI_ARGS_((ClientData clientData,
1508
                            Tcl_Interp *interp, int argc, char **argv));
1509
EXTERN int              Tk_ImageCmd _ANSI_ARGS_((ClientData clientData,
1510
                            Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
1511
EXTERN int              Tk_LabelCmd _ANSI_ARGS_((ClientData clientData,
1512
                            Tcl_Interp *interp, int argc, char **argv));
1513
EXTERN int              Tk_ListboxCmd _ANSI_ARGS_((ClientData clientData,
1514
                            Tcl_Interp *interp, int argc, char **argv));
1515
EXTERN int              Tk_LowerCmd _ANSI_ARGS_((ClientData clientData,
1516
                            Tcl_Interp *interp, int argc, char **argv));
1517
EXTERN int              Tk_MenuCmd _ANSI_ARGS_((ClientData clientData,
1518
                            Tcl_Interp *interp, int argc, char **argv));
1519
EXTERN int              Tk_MenubuttonCmd _ANSI_ARGS_((ClientData clientData,
1520
                            Tcl_Interp *interp, int argc, char **argv));
1521
EXTERN int              Tk_MessageBoxCmd _ANSI_ARGS_((ClientData clientData,
1522
                            Tcl_Interp *interp, int argc, char **argv));
1523
EXTERN int              Tk_MessageCmd _ANSI_ARGS_((ClientData clientData,
1524
                            Tcl_Interp *interp, int argc, char **argv));
1525
EXTERN int              Tk_OptionCmd _ANSI_ARGS_((ClientData clientData,
1526
                            Tcl_Interp *interp, int argc, char **argv));
1527
EXTERN int              Tk_PackCmd _ANSI_ARGS_((ClientData clientData,
1528
                            Tcl_Interp *interp, int argc, char **argv));
1529
EXTERN int              Tk_PlaceCmd _ANSI_ARGS_((ClientData clientData,
1530
                            Tcl_Interp *interp, int argc, char **argv));
1531
EXTERN int              Tk_RadiobuttonCmd _ANSI_ARGS_((ClientData clientData,
1532
                            Tcl_Interp *interp, int argc, char **argv));
1533
EXTERN int              Tk_RaiseCmd _ANSI_ARGS_((ClientData clientData,
1534
                            Tcl_Interp *interp, int argc, char **argv));
1535
EXTERN int              Tk_ScaleCmd _ANSI_ARGS_((ClientData clientData,
1536
                            Tcl_Interp *interp, int argc, char **argv));
1537
EXTERN int              Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
1538
                            Tcl_Interp *interp, int argc, char **argv));
1539
EXTERN int              Tk_SelectionCmd _ANSI_ARGS_((ClientData clientData,
1540
                            Tcl_Interp *interp, int argc, char **argv));
1541
EXTERN int              Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
1542
                            Tcl_Interp *interp, int argc, char **argv));
1543
EXTERN int              Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
1544
                            Tcl_Interp *interp, int argc, char **argv));
1545
EXTERN int              Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData,
1546
                            Tcl_Interp *interp, int objc,
1547
                            Tcl_Obj *CONST objv[]));
1548
EXTERN int              Tk_TkwaitCmd _ANSI_ARGS_((ClientData clientData,
1549
                            Tcl_Interp *interp, int argc, char **argv));
1550
EXTERN int              Tk_ToplevelCmd _ANSI_ARGS_((ClientData clientData,
1551
                            Tcl_Interp *interp, int argc, char **argv));
1552
EXTERN int              Tk_UpdateCmd _ANSI_ARGS_((ClientData clientData,
1553
                            Tcl_Interp *interp, int argc, char **argv));
1554
EXTERN int              Tk_WinfoObjCmd _ANSI_ARGS_((ClientData clientData,
1555
                            Tcl_Interp *interp, int objc,
1556
                            Tcl_Obj *CONST objv[]));
1557
EXTERN int              Tk_WmCmd _ANSI_ARGS_((ClientData clientData,
1558
                            Tcl_Interp *interp, int argc, char **argv));
1559
 
1560
#endif /* RESOURCE_INCLUDED */
1561
 
1562
#undef TCL_STORAGE_CLASS
1563
#define TCL_STORAGE_CLASS DLLIMPORT
1564
 
1565
#endif /* _TK */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.