Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * tkInt.h -- | |
3 | * | |
4 | * Declarations for things used internally by the Tk | |
5 | * procedures but not exported outside the module. | |
6 | * | |
7 | * Copyright (c) 1990-1994 The Regents of the University of California. | |
8 | * Copyright (c) 1994-1997 Sun Microsystems, Inc. | |
9 | * Copyright (c) 1998 by Scriptics Corporation. | |
10 | * | |
11 | * See the file "license.terms" for information on usage and redistribution | |
12 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. | |
13 | * | |
14 | * RCS: $Id: tkInt.h,v 1.8 1998/09/30 19:01:20 rjohnson Exp $ | |
15 | */ | |
16 | ||
17 | #ifndef _TKINT | |
18 | #define _TKINT | |
19 | ||
20 | #ifndef _TK | |
21 | #include "tk.h" | |
22 | #endif | |
23 | #ifdef BUILD_tk | |
24 | # undef TCL_STORAGE_CLASS | |
25 | # define TCL_STORAGE_CLASS DLLEXPORT | |
26 | #endif | |
27 | ||
28 | /* | |
29 | * Opaque type declarations: | |
30 | */ | |
31 | ||
32 | typedef struct TkColormap TkColormap; | |
33 | typedef struct TkGrabEvent TkGrabEvent; | |
34 | typedef struct TkpCursor_ *TkpCursor; | |
35 | typedef struct TkRegion_ *TkRegion; | |
36 | typedef struct TkStressedCmap TkStressedCmap; | |
37 | typedef struct TkBindInfo_ *TkBindInfo; | |
38 | ||
39 | /* | |
40 | * Procedure types. | |
41 | */ | |
42 | ||
43 | typedef int (TkBindEvalProc) _ANSI_ARGS_((ClientData clientData, | |
44 | Tcl_Interp *interp, XEvent *eventPtr, Tk_Window tkwin, | |
45 | KeySym keySym)); | |
46 | typedef void (TkBindFreeProc) _ANSI_ARGS_((ClientData clientData)); | |
47 | typedef Window (TkClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin, | |
48 | Window parent, ClientData instanceData)); | |
49 | typedef void (TkClassGeometryProc) _ANSI_ARGS_((ClientData instanceData)); | |
50 | typedef void (TkClassModalProc) _ANSI_ARGS_((Tk_Window tkwin, | |
51 | XEvent *eventPtr)); | |
52 | ||
53 | ||
54 | /* | |
55 | * Widget class procedures used to implement platform specific widget | |
56 | * behavior. | |
57 | */ | |
58 | ||
59 | typedef struct TkClassProcs { | |
60 | TkClassCreateProc *createProc; | |
61 | /* Procedure to invoke when the | |
62 | platform-dependent window needs to be | |
63 | created. */ | |
64 | TkClassGeometryProc *geometryProc; | |
65 | /* Procedure to invoke when the geometry of a | |
66 | window needs to be recalculated as a result | |
67 | of some change in the system. */ | |
68 | TkClassModalProc *modalProc; | |
69 | /* Procedure to invoke after all bindings on a | |
70 | widget have been triggered in order to | |
71 | handle a modal loop. */ | |
72 | } TkClassProcs; | |
73 | ||
74 | /* | |
75 | * One of the following structures is maintained for each cursor in | |
76 | * use in the system. This structure is used by tkCursor.c and the | |
77 | * various system specific cursor files. | |
78 | */ | |
79 | ||
80 | typedef struct TkCursor { | |
81 | Tk_Cursor cursor; /* System specific identifier for cursor. */ | |
82 | int refCount; /* Number of active uses of cursor. */ | |
83 | Tcl_HashTable *otherTable; /* Second table (other than idTable) used | |
84 | * to index this entry. */ | |
85 | Tcl_HashEntry *hashPtr; /* Entry in otherTable for this structure | |
86 | * (needed when deleting). */ | |
87 | } TkCursor; | |
88 | ||
89 | /* | |
90 | * One of the following structures is maintained for each display | |
91 | * containing a window managed by Tk: | |
92 | */ | |
93 | ||
94 | typedef struct TkDisplay { | |
95 | Display *display; /* Xlib's info about display. */ | |
96 | struct TkDisplay *nextPtr; /* Next in list of all displays. */ | |
97 | char *name; /* Name of display (with any screen | |
98 | * identifier removed). Malloc-ed. */ | |
99 | Time lastEventTime; /* Time of last event received for this | |
100 | * display. */ | |
101 | ||
102 | /* | |
103 | * Information used primarily by tkBind.c: | |
104 | */ | |
105 | ||
106 | int bindInfoStale; /* Non-zero means the variables in this | |
107 | * part of the structure are potentially | |
108 | * incorrect and should be recomputed. */ | |
109 | unsigned int modeModMask; /* Has one bit set to indicate the modifier | |
110 | * corresponding to "mode shift". If no | |
111 | * such modifier, than this is zero. */ | |
112 | unsigned int metaModMask; /* Has one bit set to indicate the modifier | |
113 | * corresponding to the "Meta" key. If no | |
114 | * such modifier, then this is zero. */ | |
115 | unsigned int altModMask; /* Has one bit set to indicate the modifier | |
116 | * corresponding to the "Meta" key. If no | |
117 | * such modifier, then this is zero. */ | |
118 | enum {LU_IGNORE, LU_CAPS, LU_SHIFT} lockUsage; | |
119 | /* Indicates how to interpret lock modifier. */ | |
120 | int numModKeyCodes; /* Number of entries in modKeyCodes array | |
121 | * below. */ | |
122 | KeyCode *modKeyCodes; /* Pointer to an array giving keycodes for | |
123 | * all of the keys that have modifiers | |
124 | * associated with them. Malloc'ed, but | |
125 | * may be NULL. */ | |
126 | ||
127 | /* | |
128 | * Information used by tkError.c only: | |
129 | */ | |
130 | ||
131 | struct TkErrorHandler *errorPtr; | |
132 | /* First in list of error handlers | |
133 | * for this display. NULL means | |
134 | * no handlers exist at present. */ | |
135 | int deleteCount; /* Counts # of handlers deleted since | |
136 | * last time inactive handlers were | |
137 | * garbage-collected. When this number | |
138 | * gets big, handlers get cleaned up. */ | |
139 | ||
140 | /* | |
141 | * Information used by tkSend.c only: | |
142 | */ | |
143 | ||
144 | Tk_Window commTkwin; /* Window used for communication | |
145 | * between interpreters during "send" | |
146 | * commands. NULL means send info hasn't | |
147 | * been initialized yet. */ | |
148 | Atom commProperty; /* X's name for comm property. */ | |
149 | Atom registryProperty; /* X's name for property containing | |
150 | * registry of interpreter names. */ | |
151 | Atom appNameProperty; /* X's name for property used to hold the | |
152 | * application name on each comm window. */ | |
153 | ||
154 | /* | |
155 | * Information used by tkSelect.c and tkClipboard.c only: | |
156 | */ | |
157 | ||
158 | struct TkSelectionInfo *selectionInfoPtr; | |
159 | /* First in list of selection information | |
160 | * records. Each entry contains information | |
161 | * about the current owner of a particular | |
162 | * selection on this display. */ | |
163 | Atom multipleAtom; /* Atom for MULTIPLE. None means | |
164 | * selection stuff isn't initialized. */ | |
165 | Atom incrAtom; /* Atom for INCR. */ | |
166 | Atom targetsAtom; /* Atom for TARGETS. */ | |
167 | Atom timestampAtom; /* Atom for TIMESTAMP. */ | |
168 | Atom textAtom; /* Atom for TEXT. */ | |
169 | Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */ | |
170 | Atom applicationAtom; /* Atom for TK_APPLICATION. */ | |
171 | Atom windowAtom; /* Atom for TK_WINDOW. */ | |
172 | Atom clipboardAtom; /* Atom for CLIPBOARD. */ | |
173 | ||
174 | Tk_Window clipWindow; /* Window used for clipboard ownership and to | |
175 | * retrieve selections between processes. NULL | |
176 | * means clipboard info hasn't been | |
177 | * initialized. */ | |
178 | int clipboardActive; /* 1 means we currently own the clipboard | |
179 | * selection, 0 means we don't. */ | |
180 | struct TkMainInfo *clipboardAppPtr; | |
181 | /* Last application that owned clipboard. */ | |
182 | struct TkClipboardTarget *clipTargetPtr; | |
183 | /* First in list of clipboard type information | |
184 | * records. Each entry contains information | |
185 | * about the buffers for a given selection | |
186 | * target. */ | |
187 | ||
188 | /* | |
189 | * Information used by tkAtom.c only: | |
190 | */ | |
191 | ||
192 | int atomInit; /* 0 means stuff below hasn't been | |
193 | * initialized yet. */ | |
194 | Tcl_HashTable nameTable; /* Maps from names to Atom's. */ | |
195 | Tcl_HashTable atomTable; /* Maps from Atom's back to names. */ | |
196 | ||
197 | /* | |
198 | * Information used by tkCursor.c only: | |
199 | */ | |
200 | ||
201 | Font cursorFont; /* Font to use for standard cursors. | |
202 | * None means font not loaded yet. */ | |
203 | ||
204 | /* | |
205 | * Information used by tkGrab.c only: | |
206 | */ | |
207 | ||
208 | struct TkWindow *grabWinPtr; | |
209 | /* Window in which the pointer is currently | |
210 | * grabbed, or NULL if none. */ | |
211 | struct TkWindow *eventualGrabWinPtr; | |
212 | /* Value that grabWinPtr will have once the | |
213 | * grab event queue (below) has been | |
214 | * completely emptied. */ | |
215 | struct TkWindow *buttonWinPtr; | |
216 | /* Window in which first mouse button was | |
217 | * pressed while grab was in effect, or NULL | |
218 | * if no such press in effect. */ | |
219 | struct TkWindow *serverWinPtr; | |
220 | /* If no application contains the pointer then | |
221 | * this is NULL. Otherwise it contains the | |
222 | * last window for which we've gotten an | |
223 | * Enter or Leave event from the server (i.e. | |
224 | * the last window known to have contained | |
225 | * the pointer). Doesn't reflect events | |
226 | * that were synthesized in tkGrab.c. */ | |
227 | TkGrabEvent *firstGrabEventPtr; | |
228 | /* First in list of enter/leave events | |
229 | * synthesized by grab code. These events | |
230 | * must be processed in order before any other | |
231 | * events are processed. NULL means no such | |
232 | * events. */ | |
233 | TkGrabEvent *lastGrabEventPtr; | |
234 | /* Last in list of synthesized events, or NULL | |
235 | * if list is empty. */ | |
236 | int grabFlags; /* Miscellaneous flag values. See definitions | |
237 | * in tkGrab.c. */ | |
238 | ||
239 | /* | |
240 | * Information used by tkXId.c only: | |
241 | */ | |
242 | ||
243 | struct TkIdStack *idStackPtr; | |
244 | /* First in list of chunks of free resource | |
245 | * identifiers, or NULL if there are no free | |
246 | * resources. */ | |
247 | XID (*defaultAllocProc) _ANSI_ARGS_((Display *display)); | |
248 | /* Default resource allocator for display. */ | |
249 | struct TkIdStack *windowStackPtr; | |
250 | /* First in list of chunks of window | |
251 | * identifers that can't be reused right | |
252 | * now. */ | |
253 | int idCleanupScheduled; /* 1 means a call to WindowIdCleanup has | |
254 | * already been scheduled, 0 means it | |
255 | * hasn't. */ | |
256 | ||
257 | /* | |
258 | * Information maintained by tkWindow.c for use later on by tkXId.c: | |
259 | */ | |
260 | ||
261 | ||
262 | int destroyCount; /* Number of Tk_DestroyWindow operations | |
263 | * in progress. */ | |
264 | unsigned long lastDestroyRequest; | |
265 | /* Id of most recent XDestroyWindow request; | |
266 | * can re-use ids in windowStackPtr when | |
267 | * server has seen this request and event | |
268 | * queue is empty. */ | |
269 | ||
270 | /* | |
271 | * Information used by tkVisual.c only: | |
272 | */ | |
273 | ||
274 | TkColormap *cmapPtr; /* First in list of all non-default colormaps | |
275 | * allocated for this display. */ | |
276 | ||
277 | /* | |
278 | * Information used by tkFocus.c only: | |
279 | */ | |
280 | ||
281 | struct TkWindow *implicitWinPtr; | |
282 | /* If the focus arrived at a toplevel window | |
283 | * implicitly via an Enter event (rather | |
284 | * than via a FocusIn event), this points | |
285 | * to the toplevel window. Otherwise it is | |
286 | * NULL. */ | |
287 | struct TkWindow *focusPtr; /* Points to the window on this display that | |
288 | * should be receiving keyboard events. When | |
289 | * multiple applications on the display have | |
290 | * the focus, this will refer to the | |
291 | * innermost window in the innermost | |
292 | * application. This information isn't used | |
293 | * under Unix or Windows, but it's needed on | |
294 | * the Macintosh. */ | |
295 | ||
296 | /* | |
297 | * Used by tkColor.c only: | |
298 | */ | |
299 | ||
300 | TkStressedCmap *stressPtr; /* First in list of colormaps that have | |
301 | * filled up, so we have to pick an | |
302 | * approximate color. */ | |
303 | ||
304 | /* | |
305 | * Used by tkEvent.c only: | |
306 | */ | |
307 | ||
308 | struct TkWindowEvent *delayedMotionPtr; | |
309 | /* Points to a malloc-ed motion event | |
310 | * whose processing has been delayed in | |
311 | * the hopes that another motion event | |
312 | * will come along right away and we can | |
313 | * merge the two of them together. NULL | |
314 | * means that there is no delayed motion | |
315 | * event. */ | |
316 | ||
317 | /* | |
318 | * Miscellaneous information: | |
319 | */ | |
320 | ||
321 | #ifdef TK_USE_INPUT_METHODS | |
322 | XIM inputMethod; /* Input method for this display */ | |
323 | #endif /* TK_USE_INPUT_METHODS */ | |
324 | Tcl_HashTable winTable; /* Maps from X window ids to TkWindow ptrs. */ | |
325 | ||
326 | int refCount; /* Reference count of how many Tk applications | |
327 | * are using this display. Used to clean up | |
328 | * the display when we no longer have any | |
329 | * Tk applications using it. | |
330 | */ | |
331 | int mouseButtonState; /* current mouse button state for this | |
332 | * display */ | |
333 | int warpInProgress; | |
334 | Window warpWindow; | |
335 | int warpX; | |
336 | int warpY; | |
337 | } TkDisplay; | |
338 | ||
339 | /* | |
340 | * One of the following structures exists for each error handler | |
341 | * created by a call to Tk_CreateErrorHandler. The structure | |
342 | * is managed by tkError.c. | |
343 | */ | |
344 | ||
345 | typedef struct TkErrorHandler { | |
346 | TkDisplay *dispPtr; /* Display to which handler applies. */ | |
347 | unsigned long firstRequest; /* Only errors with serial numbers | |
348 | * >= to this are considered. */ | |
349 | unsigned long lastRequest; /* Only errors with serial numbers | |
350 | * <= to this are considered. This | |
351 | * field is filled in when XUnhandle | |
352 | * is called. -1 means XUnhandle | |
353 | * hasn't been called yet. */ | |
354 | int error; /* Consider only errors with this | |
355 | * error_code (-1 means consider | |
356 | * all errors). */ | |
357 | int request; /* Consider only errors with this | |
358 | * major request code (-1 means | |
359 | * consider all major codes). */ | |
360 | int minorCode; /* Consider only errors with this | |
361 | * minor request code (-1 means | |
362 | * consider all minor codes). */ | |
363 | Tk_ErrorProc *errorProc; /* Procedure to invoke when a matching | |
364 | * error occurs. NULL means just ignore | |
365 | * errors. */ | |
366 | ClientData clientData; /* Arbitrary value to pass to | |
367 | * errorProc. */ | |
368 | struct TkErrorHandler *nextPtr; | |
369 | /* Pointer to next older handler for | |
370 | * this display, or NULL for end of | |
371 | * list. */ | |
372 | } TkErrorHandler; | |
373 | ||
374 | /* | |
375 | * One of the following structures exists for each event handler | |
376 | * created by calling Tk_CreateEventHandler. This information | |
377 | * is used by tkEvent.c only. | |
378 | */ | |
379 | ||
380 | typedef struct TkEventHandler { | |
381 | unsigned long mask; /* Events for which to invoke | |
382 | * proc. */ | |
383 | Tk_EventProc *proc; /* Procedure to invoke when an event | |
384 | * in mask occurs. */ | |
385 | ClientData clientData; /* Argument to pass to proc. */ | |
386 | struct TkEventHandler *nextPtr; | |
387 | /* Next in list of handlers | |
388 | * associated with window (NULL means | |
389 | * end of list). */ | |
390 | } TkEventHandler; | |
391 | ||
392 | /* | |
393 | * Tk keeps one of the following data structures for each main | |
394 | * window (created by a call to Tk_CreateMainWindow). It stores | |
395 | * information that is shared by all of the windows associated | |
396 | * with a particular main window. | |
397 | */ | |
398 | ||
399 | typedef struct TkMainInfo { | |
400 | int refCount; /* Number of windows whose "mainPtr" fields | |
401 | * point here. When this becomes zero, can | |
402 | * free up the structure (the reference | |
403 | * count is zero because windows can get | |
404 | * deleted in almost any order; the main | |
405 | * window isn't necessarily the last one | |
406 | * deleted). */ | |
407 | struct TkWindow *winPtr; /* Pointer to main window. */ | |
408 | Tcl_Interp *interp; /* Interpreter associated with application. */ | |
409 | Tcl_HashTable nameTable; /* Hash table mapping path names to TkWindow | |
410 | * structs for all windows related to this | |
411 | * main window. Managed by tkWindow.c. */ | |
412 | Tk_BindingTable bindingTable; | |
413 | /* Used in conjunction with "bind" command | |
414 | * to bind events to Tcl commands. */ | |
415 | TkBindInfo bindInfo; /* Information used by tkBind.c on a per | |
416 | * interpreter basis. */ | |
417 | struct TkFontInfo *fontInfoPtr; | |
418 | /* Hold named font tables. Used only by | |
419 | * tkFont.c. */ | |
420 | ||
421 | /* | |
422 | * Information used only by tkFocus.c and tk*Embed.c: | |
423 | */ | |
424 | ||
425 | struct TkToplevelFocusInfo *tlFocusPtr; | |
426 | /* First in list of records containing focus | |
427 | * information for each top-level in the | |
428 | * application. Used only by tkFocus.c. */ | |
429 | struct TkDisplayFocusInfo *displayFocusPtr; | |
430 | /* First in list of records containing focus | |
431 | * information for each display that this | |
432 | * application has ever used. Used only | |
433 | * by tkFocus.c. */ | |
434 | ||
435 | struct ElArray *optionRootPtr; | |
436 | /* Top level of option hierarchy for this | |
437 | * main window. NULL means uninitialized. | |
438 | * Managed by tkOption.c. */ | |
439 | Tcl_HashTable imageTable; /* Maps from image names to Tk_ImageMaster | |
440 | * structures. Managed by tkImage.c. */ | |
441 | int strictMotif; /* This is linked to the tk_strictMotif | |
442 | * global variable. */ | |
443 | struct TkMainInfo *nextPtr; /* Next in list of all main windows managed by | |
444 | * this process. */ | |
445 | } TkMainInfo; | |
446 | ||
447 | /* | |
448 | * Tk keeps the following data structure for each of it's builtin | |
449 | * bitmaps. This structure is only used by tkBitmap.c and other | |
450 | * platform specific bitmap files. | |
451 | */ | |
452 | ||
453 | typedef struct { | |
454 | char *source; /* Bits for bitmap. */ | |
455 | int width, height; /* Dimensions of bitmap. */ | |
456 | int native; /* 0 means generic (X style) bitmap, | |
457 | * 1 means native style bitmap. */ | |
458 | } TkPredefBitmap; | |
459 | ||
460 | /* | |
461 | * Tk keeps one of the following structures for each window. | |
462 | * Some of the information (like size and location) is a shadow | |
463 | * of information managed by the X server, and some is special | |
464 | * information used here, such as event and geometry management | |
465 | * information. This information is (mostly) managed by tkWindow.c. | |
466 | * WARNING: the declaration below must be kept consistent with the | |
467 | * Tk_FakeWin structure in tk.h. If you change one, be sure to | |
468 | * change the other!! | |
469 | */ | |
470 | ||
471 | typedef struct TkWindow { | |
472 | ||
473 | /* | |
474 | * Structural information: | |
475 | */ | |
476 | ||
477 | Display *display; /* Display containing window. */ | |
478 | TkDisplay *dispPtr; /* Tk's information about display | |
479 | * for window. */ | |
480 | int screenNum; /* Index of screen for window, among all | |
481 | * those for dispPtr. */ | |
482 | Visual *visual; /* Visual to use for window. If not default, | |
483 | * MUST be set before X window is created. */ | |
484 | int depth; /* Number of bits/pixel. */ | |
485 | Window window; /* X's id for window. NULL means window | |
486 | * hasn't actually been created yet, or it's | |
487 | * been deleted. */ | |
488 | struct TkWindow *childList; /* First in list of child windows, | |
489 | * or NULL if no children. List is in | |
490 | * stacking order, lowest window first.*/ | |
491 | struct TkWindow *lastChildPtr; | |
492 | /* Last in list of child windows (highest | |
493 | * in stacking order), or NULL if no | |
494 | * children. */ | |
495 | struct TkWindow *parentPtr; /* Pointer to parent window (logical | |
496 | * parent, not necessarily X parent). NULL | |
497 | * means either this is the main window, or | |
498 | * the window's parent has already been | |
499 | * deleted. */ | |
500 | struct TkWindow *nextPtr; /* Next higher sibling (in stacking order) | |
501 | * in list of children with same parent. NULL | |
502 | * means end of list. */ | |
503 | TkMainInfo *mainPtr; /* Information shared by all windows | |
504 | * associated with a particular main | |
505 | * window. NULL means this window is | |
506 | * a rogue that isn't associated with | |
507 | * any application (at present, this | |
508 | * only happens for the dummy windows | |
509 | * used for "send" communication). */ | |
510 | ||
511 | /* | |
512 | * Name and type information for the window: | |
513 | */ | |
514 | ||
515 | char *pathName; /* Path name of window (concatenation | |
516 | * of all names between this window and | |
517 | * its top-level ancestor). This is a | |
518 | * pointer into an entry in | |
519 | * mainPtr->nameTable. NULL means that | |
520 | * the window hasn't been completely | |
521 | * created yet. */ | |
522 | Tk_Uid nameUid; /* Name of the window within its parent | |
523 | * (unique within the parent). */ | |
524 | Tk_Uid classUid; /* Class of the window. NULL means window | |
525 | * hasn't been given a class yet. */ | |
526 | ||
527 | /* | |
528 | * Geometry and other attributes of window. This information | |
529 | * may not be updated on the server immediately; stuff that | |
530 | * hasn't been reflected in the server yet is called "dirty". | |
531 | * At present, information can be dirty only if the window | |
532 | * hasn't yet been created. | |
533 | */ | |
534 | ||
535 | XWindowChanges changes; /* Geometry and other info about | |
536 | * window. */ | |
537 | unsigned int dirtyChanges; /* Bits indicate fields of "changes" | |
538 | * that are dirty. */ | |
539 | XSetWindowAttributes atts; /* Current attributes of window. */ | |
540 | unsigned long dirtyAtts; /* Bits indicate fields of "atts" | |
541 | * that are dirty. */ | |
542 | ||
543 | unsigned int flags; /* Various flag values: these are all | |
544 | * defined in tk.h (confusing, but they're | |
545 | * needed there for some query macros). */ | |
546 | ||
547 | /* | |
548 | * Information kept by the event manager (tkEvent.c): | |
549 | */ | |
550 | ||
551 | TkEventHandler *handlerList;/* First in list of event handlers | |
552 | * declared for this window, or | |
553 | * NULL if none. */ | |
554 | #ifdef TK_USE_INPUT_METHODS | |
555 | XIC inputContext; /* Input context (for input methods). */ | |
556 | #endif /* TK_USE_INPUT_METHODS */ | |
557 | ||
558 | /* | |
559 | * Information used for event bindings (see "bind" and "bindtags" | |
560 | * commands in tkCmds.c): | |
561 | */ | |
562 | ||
563 | ClientData *tagPtr; /* Points to array of tags used for bindings | |
564 | * on this window. Each tag is a Tk_Uid. | |
565 | * Malloc'ed. NULL means no tags. */ | |
566 | int numTags; /* Number of tags at *tagPtr. */ | |
567 | ||
568 | /* | |
569 | * Information used by tkOption.c to manage options for the | |
570 | * window. | |
571 | */ | |
572 | ||
573 | int optionLevel; /* -1 means no option information is | |
574 | * currently cached for this window. | |
575 | * Otherwise this gives the level in | |
576 | * the option stack at which info is | |
577 | * cached. */ | |
578 | /* | |
579 | * Information used by tkSelect.c to manage the selection. | |
580 | */ | |
581 | ||
582 | struct TkSelHandler *selHandlerList; | |
583 | /* First in list of handlers for | |
584 | * returning the selection in various | |
585 | * forms. */ | |
586 | ||
587 | /* | |
588 | * Information used by tkGeometry.c for geometry management. | |
589 | */ | |
590 | ||
591 | Tk_GeomMgr *geomMgrPtr; /* Information about geometry manager for | |
592 | * this window. */ | |
593 | ClientData geomData; /* Argument for geometry manager procedures. */ | |
594 | int reqWidth, reqHeight; /* Arguments from last call to | |
595 | * Tk_GeometryRequest, or 0's if | |
596 | * Tk_GeometryRequest hasn't been | |
597 | * called. */ | |
598 | int internalBorderWidth; /* Width of internal border of window | |
599 | * (0 means no internal border). Geometry | |
600 | * managers should not normally place children | |
601 | * on top of the border. */ | |
602 | ||
603 | /* | |
604 | * Information maintained by tkWm.c for window manager communication. | |
605 | */ | |
606 | ||
607 | struct TkWmInfo *wmInfoPtr; /* For top-level windows (and also | |
608 | * for special Unix menubar and wrapper | |
609 | * windows), points to structure with | |
610 | * wm-related info (see tkWm.c). For | |
611 | * other windows, this is NULL. */ | |
612 | ||
613 | /* | |
614 | * Information used by widget classes. | |
615 | */ | |
616 | ||
617 | TkClassProcs *classProcsPtr; | |
618 | ClientData instanceData; | |
619 | ||
620 | /* | |
621 | * Platform specific information private to each port. | |
622 | */ | |
623 | ||
624 | struct TkWindowPrivate *privatePtr; | |
625 | } TkWindow; | |
626 | ||
627 | /* | |
628 | * The following structure is used as a two way map between integers | |
629 | * and strings, usually to map between an internal C representation | |
630 | * and the strings used in Tcl. | |
631 | */ | |
632 | ||
633 | typedef struct TkStateMap { | |
634 | int numKey; /* Integer representation of a value. */ | |
635 | char *strKey; /* String representation of a value. */ | |
636 | } TkStateMap; | |
637 | ||
638 | /* | |
639 | * This structure is used by the Mac and Window porting layers as | |
640 | * the internal representation of a clip_mask in a GC. | |
641 | */ | |
642 | ||
643 | typedef struct TkpClipMask { | |
644 | int type; /* One of TKP_CLIP_PIXMAP or TKP_CLIP_REGION */ | |
645 | union { | |
646 | Pixmap pixmap; | |
647 | TkRegion region; | |
648 | } value; | |
649 | } TkpClipMask; | |
650 | ||
651 | #define TKP_CLIP_PIXMAP 0 | |
652 | #define TKP_CLIP_REGION 1 | |
653 | ||
654 | /* | |
655 | * Pointer to first entry in list of all displays currently known. | |
656 | */ | |
657 | ||
658 | extern TkDisplay *tkDisplayList; | |
659 | ||
660 | /* | |
661 | * Return values from TkGrabState: | |
662 | */ | |
663 | ||
664 | #define TK_GRAB_NONE 0 | |
665 | #define TK_GRAB_IN_TREE 1 | |
666 | #define TK_GRAB_ANCESTOR 2 | |
667 | #define TK_GRAB_EXCLUDED 3 | |
668 | ||
669 | /* | |
670 | * The macro below is used to modify a "char" value (e.g. by casting | |
671 | * it to an unsigned character) so that it can be used safely with | |
672 | * macros such as isspace. | |
673 | */ | |
674 | ||
675 | #define UCHAR(c) ((unsigned char) (c)) | |
676 | ||
677 | /* | |
678 | * The following symbol is used in the mode field of FocusIn events | |
679 | * generated by an embedded application to request the input focus from | |
680 | * its container. | |
681 | */ | |
682 | ||
683 | #define EMBEDDED_APP_WANTS_FOCUS (NotifyNormal + 20) | |
684 | ||
685 | /* | |
686 | * Miscellaneous variables shared among Tk modules but not exported | |
687 | * to the outside world: | |
688 | */ | |
689 | typedef void TkDelayedEventProc _ANSI_ARGS_((void)); | |
690 | typedef void tkHandleEventProc_t _ANSI_ARGS_((XEvent* eventPtr)); | |
691 | ||
692 | extern Tk_Uid tkActiveUid; | |
693 | extern Tk_SmoothMethod tkBezierSmoothMethod; | |
694 | EXTERN Tk_ImageType tkBitmapImageType; | |
695 | EXTERN Tk_ImageType tkPixmapImageType; | |
696 | extern Tk_Uid tkDisabledUid; | |
697 | EXTERN Tk_PhotoImageFormat tkImgFmtGIF; | |
698 | extern tkHandleEventProc_t *tkHandleEventProc; | |
699 | EXTERN Tk_PhotoImageFormat tkImgFmtPPM; | |
700 | extern TkMainInfo *tkMainWindowList; | |
701 | extern Tk_Uid tkNormalUid; | |
702 | EXTERN Tk_ImageType tkPhotoImageType; | |
703 | extern Tcl_HashTable tkPredefBitmapTable; | |
704 | extern int tkSendSerial; | |
705 | ||
706 | /* | |
707 | * Internal procedures shared among Tk modules but not exported | |
708 | * to the outside world: | |
709 | */ | |
710 | ||
711 | EXTERN char * TkAlignImageData _ANSI_ARGS_((XImage *image, | |
712 | int alignment, int bitOrder)); | |
713 | EXTERN TkWindow * TkAllocWindow _ANSI_ARGS_((TkDisplay *dispPtr, | |
714 | int screenNum, TkWindow *parentPtr)); | |
715 | EXTERN void TkBezierPoints _ANSI_ARGS_((double control[], | |
716 | int numSteps, double *coordPtr)); | |
717 | EXTERN void TkBezierScreenPoints _ANSI_ARGS_((Tk_Canvas canvas, | |
718 | double control[], int numSteps, | |
719 | XPoint *xPointPtr)); | |
720 | EXTERN void TkBindDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
721 | EXTERN void TkBindEventProc _ANSI_ARGS_((TkWindow *winPtr, | |
722 | XEvent *eventPtr)); | |
723 | EXTERN void TkBindFree _ANSI_ARGS_((TkMainInfo *mainPtr)); | |
724 | EXTERN void TkBindInit _ANSI_ARGS_((TkMainInfo *mainPtr)); | |
725 | EXTERN int TkCanvasGetCoordObj _ANSI_ARGS_((Tcl_Interp *interp, | |
726 | Tk_Canvas canvas, Tcl_Obj *obj, | |
727 | double *doublePtr)); | |
728 | EXTERN void TkChangeEventWindow _ANSI_ARGS_((XEvent *eventPtr, | |
729 | TkWindow *winPtr)); | |
730 | EXTERN void TkClassOption _ANSI_ARGS_((Tk_Window tkwin, | |
731 | char *defaultname, int *argcp, Arg **argvp)); | |
732 | EXTERN void TkClassOptionObj _ANSI_ARGS_((Tk_Window tkwin, | |
733 | char *defaultname, int *objcp, Tcl_Obj * CONST **objvp)); | |
734 | #ifndef TkClipBox | |
735 | EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn, | |
736 | XRectangle* rect_return)); | |
737 | #endif | |
738 | EXTERN int TkClipInit _ANSI_ARGS_((Tcl_Interp *interp, | |
739 | TkDisplay *dispPtr)); | |
740 | EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, | |
741 | Tk_Window tkwin, int padX, int padY, | |
742 | int innerWidth, int innerHeight, int *xPtr, | |
743 | int *yPtr)); | |
744 | EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp, | |
745 | char *script)); | |
746 | EXTERN unsigned long TkCreateBindingProcedure _ANSI_ARGS_(( | |
747 | Tcl_Interp *interp, Tk_BindingTable bindingTable, | |
748 | ClientData object, char *eventString, | |
749 | TkBindEvalProc *evalProc, TkBindFreeProc *freeProc, | |
750 | ClientData clientData)); | |
751 | EXTERN TkCursor * TkCreateCursorFromData _ANSI_ARGS_((Tk_Window tkwin, | |
752 | char *source, char *mask, int width, int height, | |
753 | int xHot, int yHot, XColor fg, XColor bg)); | |
754 | EXTERN int TkCreateFrame _ANSI_ARGS_((ClientData clientData, | |
755 | Tcl_Interp *interp, int argc, Tcl_Obj **objv, | |
756 | int toplevel, char *appName)); | |
757 | EXTERN Tk_Window TkCreateMainWindow _ANSI_ARGS_((Tcl_Interp *interp, | |
758 | char *screenName, char *baseName)); | |
759 | #ifndef TkCreateRegion | |
760 | EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void)); | |
761 | #endif | |
762 | EXTERN Time TkCurrentTime _ANSI_ARGS_((TkDisplay *dispPtr)); | |
763 | EXTERN int TkDeadAppCmd _ANSI_ARGS_((ClientData clientData, | |
764 | Tcl_Interp *interp, int argc, Tcl_Obj **objv)); | |
765 | EXTERN void TkDeleteAllImages _ANSI_ARGS_((TkMainInfo *mainPtr)); | |
766 | #ifndef TkDestroyRegion | |
767 | EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn)); | |
768 | #endif | |
769 | EXTERN void TkDoConfigureNotify _ANSI_ARGS_((TkWindow *winPtr)); | |
770 | EXTERN void TkDrawInsetFocusHighlight _ANSI_ARGS_(( | |
771 | Tk_Window tkwin, GC gc, int width, | |
772 | Drawable drawable, int padding)); | |
773 | EXTERN void TkEventDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
774 | EXTERN void TkFillPolygon _ANSI_ARGS_((Tk_Canvas canvas, | |
775 | double *coordPtr, int numPoints, Display *display, | |
776 | Drawable drawable, GC gc, GC outlineGC)); | |
777 | EXTERN int TkFindStateNum _ANSI_ARGS_((Tcl_Interp *interp, | |
778 | CONST char *option, CONST TkStateMap *mapPtr, | |
779 | CONST char *strKey)); | |
780 | EXTERN int TkFindStateNumObj _ANSI_ARGS_((Tcl_Interp *interp, | |
781 | Tcl_Obj *optionPtr, CONST TkStateMap *mapPtr, | |
782 | Tcl_Obj *keyPtr)); | |
783 | EXTERN char * TkFindStateString _ANSI_ARGS_(( | |
784 | CONST TkStateMap *mapPtr, int numKey)); | |
785 | EXTERN void TkFocusDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
786 | EXTERN int TkFocusFilterEvent _ANSI_ARGS_((TkWindow *winPtr, | |
787 | XEvent *eventPtr)); | |
788 | EXTERN TkWindow * TkFocusKeyEvent _ANSI_ARGS_((TkWindow *winPtr, | |
789 | XEvent *eventPtr)); | |
790 | EXTERN void TkFontPkgInit _ANSI_ARGS_((TkMainInfo *mainPtr)); | |
791 | EXTERN void TkFontPkgFree _ANSI_ARGS_((TkMainInfo *mainPtr)); | |
792 | EXTERN void TkFreeBindingTags _ANSI_ARGS_((TkWindow *winPtr)); | |
793 | EXTERN void TkFreeCursor _ANSI_ARGS_((TkCursor *cursorPtr)); | |
794 | EXTERN void TkFreeWindowId _ANSI_ARGS_((TkDisplay *dispPtr, | |
795 | Window w)); | |
796 | EXTERN void TkGenerateActivateEvents _ANSI_ARGS_(( | |
797 | TkWindow *winPtr, int active)); | |
798 | EXTERN char * TkGetBitmapData _ANSI_ARGS_((Tcl_Interp *interp, | |
799 | char *string, char *fileName, int *widthPtr, | |
800 | int *heightPtr, int *hotXPtr, int *hotYPtr)); | |
801 | EXTERN void TkGetButtPoints _ANSI_ARGS_((double p1[], double p2[], | |
802 | double width, int project, double m1[], | |
803 | double m2[])); | |
804 | EXTERN TkCursor * TkGetCursorByName _ANSI_ARGS_((Tcl_Interp *interp, | |
805 | Tk_Window tkwin, Arg string)); | |
806 | EXTERN char * TkGetDefaultScreenName _ANSI_ARGS_((Tcl_Interp *interp, | |
807 | char *screenName)); | |
808 | EXTERN TkDisplay * TkGetDisplay _ANSI_ARGS_((Display *display)); | |
809 | EXTERN int TkGetDisplayOf _ANSI_ARGS_((Tcl_Interp *interp, | |
810 | int objc, Tcl_Obj *CONST objv[], | |
811 | Tk_Window *tkwinPtr)); | |
812 | EXTERN TkWindow * TkGetFocusWin _ANSI_ARGS_((TkWindow *winPtr)); | |
813 | EXTERN int TkGetInterpNames _ANSI_ARGS_((Tcl_Interp *interp, | |
814 | Tk_Window tkwin)); | |
815 | EXTERN int TkGetMiterPoints _ANSI_ARGS_((double p1[], double p2[], | |
816 | double p3[], double width, double m1[], | |
817 | double m2[])); | |
818 | EXTERN int TkGetPixelsFromObj _ANSI_ARGS_((Tcl_Interp *interp, | |
819 | Tk_Window tkwin, Tcl_Obj *obj, int *intPtr)); | |
820 | EXTERN void TkGetPointerCoords _ANSI_ARGS_((Tk_Window tkwin, | |
821 | int *xPtr, int *yPtr)); | |
822 | EXTERN int TkGetProlog _ANSI_ARGS_((Tcl_Interp *interp)); | |
823 | EXTERN int TkGetScreenMMFromObj _ANSI_ARGS_((Tcl_Interp *interp, | |
824 | Tk_Window tkwin, Tcl_Obj *obj, double *doublePtr)); | |
825 | EXTERN void TkGetServerInfo _ANSI_ARGS_((Tcl_Interp *interp, | |
826 | Tk_Window tkwin)); | |
827 | EXTERN void TkGrabDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
828 | EXTERN int TkGrabState _ANSI_ARGS_((TkWindow *winPtr)); | |
829 | EXTERN void TkIncludePoint _ANSI_ARGS_((Tk_Item *itemPtr, | |
830 | double *pointPtr)); | |
831 | EXTERN void TkInitXId _ANSI_ARGS_((TkDisplay *dispPtr)); | |
832 | EXTERN void TkInOutEvents _ANSI_ARGS_((XEvent *eventPtr, | |
833 | TkWindow *sourcePtr, TkWindow *destPtr, | |
834 | int leaveType, int enterType, | |
835 | Tcl_QueuePosition position)); | |
836 | EXTERN void TkInstallFrameMenu _ANSI_ARGS_((Tk_Window tkwin)); | |
837 | #ifndef TkIntersectRegion | |
838 | EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra, | |
839 | TkRegion srcb, TkRegion dr_return)); | |
840 | #endif | |
841 | EXTERN char * TkKeysymToString _ANSI_ARGS_((KeySym keysym)); | |
842 | EXTERN int TkLineToArea _ANSI_ARGS_((double end1Ptr[2], | |
843 | double end2Ptr[2], double rectPtr[4])); | |
844 | EXTERN double TkLineToPoint _ANSI_ARGS_((double end1Ptr[2], | |
845 | double end2Ptr[2], double pointPtr[2])); | |
846 | EXTERN int TkMakeBezierCurve _ANSI_ARGS_((Tk_Canvas canvas, | |
847 | double *pointPtr, int numPoints, int numSteps, | |
848 | XPoint xPoints[], double dblPoints[])); | |
849 | EXTERN void TkMakeBezierPostscript _ANSI_ARGS_((Tcl_Interp *interp, | |
850 | Tk_Canvas canvas, double *pointPtr, | |
851 | int numPoints, int numSteps)); | |
852 | EXTERN void TkOptionClassChanged _ANSI_ARGS_((TkWindow *winPtr)); | |
853 | EXTERN void TkOptionDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
854 | EXTERN int TkOvalToArea _ANSI_ARGS_((double *ovalPtr, | |
855 | double *rectPtr)); | |
856 | EXTERN double TkOvalToPoint _ANSI_ARGS_((double ovalPtr[4], | |
857 | double width, int filled, double pointPtr[2])); | |
858 | EXTERN int TkpChangeFocus _ANSI_ARGS_((TkWindow *winPtr, | |
859 | int force)); | |
860 | EXTERN void TkpCloseDisplay _ANSI_ARGS_((TkDisplay *dispPtr)); | |
861 | EXTERN void TkpClaimFocus _ANSI_ARGS_((TkWindow *topLevelPtr, | |
862 | int force)); | |
863 | #ifndef TkpCmapStressed | |
864 | EXTERN int TkpCmapStressed _ANSI_ARGS_((Tk_Window tkwin, | |
865 | Colormap colormap)); | |
866 | #endif | |
867 | #ifndef TkpCreateNativeBitmap | |
868 | EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display *display, | |
869 | char * source)); | |
870 | #endif | |
871 | #ifndef TkpDefineNativeBitmaps | |
872 | EXTERN void TkpDefineNativeBitmaps _ANSI_ARGS_((void)); | |
873 | #endif | |
874 | EXTERN void TkpDisplayWarning _ANSI_ARGS_((char *msg, | |
875 | char *title)); | |
876 | EXTERN void TkpGetAppName _ANSI_ARGS_((Tcl_Interp *interp, | |
877 | Tcl_DString *name)); | |
878 | EXTERN unsigned long TkpGetMS _ANSI_ARGS_((void)); | |
879 | #ifndef TkpGetNativeAppBitmap | |
880 | EXTERN Pixmap TkpGetNativeAppBitmap _ANSI_ARGS_((Display *display, | |
881 | char *name, int *width, int *height)); | |
882 | #endif | |
883 | EXTERN TkWindow * TkpGetOtherWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
884 | EXTERN TkWindow * TkpGetWrapperWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
885 | EXTERN int TkpInit _ANSI_ARGS_((Tcl_Interp *interp)); | |
886 | EXTERN void TkpInitializeMenuBindings _ANSI_ARGS_(( | |
887 | Tcl_Interp *interp, Tk_BindingTable bindingTable)); | |
888 | EXTERN void TkpMakeContainer _ANSI_ARGS_((Tk_Window tkwin)); | |
889 | EXTERN void TkpMakeMenuWindow _ANSI_ARGS_((Tk_Window tkwin, | |
890 | int transient)); | |
891 | EXTERN Window TkpMakeWindow _ANSI_ARGS_((TkWindow *winPtr, | |
892 | Window parent)); | |
893 | EXTERN void TkpMenuNotifyToplevelCreate _ANSI_ARGS_(( | |
894 | Tcl_Interp *, char *menuName)); | |
895 | EXTERN TkDisplay * TkpOpenDisplay _ANSI_ARGS_((char *display_name)); | |
896 | EXTERN void TkPointerDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
897 | EXTERN int TkPointerEvent _ANSI_ARGS_((XEvent *eventPtr, | |
898 | TkWindow *winPtr)); | |
899 | EXTERN int TkPolygonToArea _ANSI_ARGS_((double *polyPtr, | |
900 | int numPoints, double *rectPtr)); | |
901 | EXTERN double TkPolygonToPoint _ANSI_ARGS_((double *polyPtr, | |
902 | int numPoints, double *pointPtr)); | |
903 | EXTERN int TkPositionInTree _ANSI_ARGS_((TkWindow *winPtr, | |
904 | TkWindow *treePtr)); | |
905 | EXTERN int TkPostscriptImage _ANSI_ARGS_((Tcl_Interp *interp, | |
906 | Tk_Window tkwin, Tk_PostscriptInfo psInfo, | |
907 | XImage *ximage, int x, int y, int width, | |
908 | int height)); | |
909 | ||
910 | #ifndef TkpPrintWindowId | |
911 | EXTERN void TkpPrintWindowId _ANSI_ARGS_((char *buf, | |
912 | Window window)); | |
913 | #endif | |
914 | EXTERN void TkpRedirectKeyEvent _ANSI_ARGS_((TkWindow *winPtr, | |
915 | XEvent *eventPtr)); | |
916 | #ifndef TkpScanWindowId | |
917 | EXTERN int TkpScanWindowId _ANSI_ARGS_((Tcl_Interp *interp, | |
918 | Arg string, int *idPtr)); | |
919 | #endif | |
920 | EXTERN void TkpSetCapture _ANSI_ARGS_((TkWindow *winPtr)); | |
921 | EXTERN void TkpSetCursor _ANSI_ARGS_((TkpCursor cursor)); | |
922 | EXTERN void TkpSetMainMenubar _ANSI_ARGS_((Tcl_Interp *interp, | |
923 | Tk_Window tkwin, char *menuName)); | |
924 | #ifndef TkpSync | |
925 | EXTERN void TkpSync _ANSI_ARGS_((Display *display)); | |
926 | #endif | |
927 | EXTERN int TkpTestembedCmd _ANSI_ARGS_((ClientData clientData, | |
928 | Tcl_Interp *interp, int argc, Tcl_Obj **objv)); | |
929 | EXTERN int TkpUseWindow _ANSI_ARGS_((Tcl_Interp *interp, | |
930 | Tk_Window tkwin, Arg string)); | |
931 | #ifndef TkPutImage | |
932 | EXTERN void TkPutImage _ANSI_ARGS_((unsigned long *colors, | |
933 | int ncolors, Display* display, Drawable d, | |
934 | GC gc, XImage* image, int src_x, int src_y, | |
935 | int dest_x, int dest_y, unsigned int width, | |
936 | unsigned int height)); | |
937 | #endif | |
938 | EXTERN int TkpWindowWasRecentlyDeleted _ANSI_ARGS_((Window win, | |
939 | TkDisplay *dispPtr)); | |
940 | EXTERN void TkpWmSetState _ANSI_ARGS_((TkWindow *winPtr, | |
941 | int state)); | |
942 | EXTERN void TkQueueEventForAllChildren _ANSI_ARGS_(( | |
943 | TkWindow *winPtr, XEvent *eventPtr)); | |
944 | EXTERN int TkReadBitmapFile _ANSI_ARGS_((Tcl_Interp *interp, | |
945 | Display* display, | |
946 | Drawable d, CONST char* filename, | |
947 | unsigned int* width_return, | |
948 | unsigned int* height_return, | |
949 | Pixmap* bitmap_return, | |
950 | int* x_hot_return, int* y_hot_return)); | |
951 | #ifndef TkRectInRegion | |
952 | EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn, | |
953 | int x, int y, unsigned int width, | |
954 | unsigned int height)); | |
955 | #endif | |
956 | EXTERN int TkScrollWindow _ANSI_ARGS_((Tk_Window tkwin, GC gc, | |
957 | int x, int y, int width, int height, int dx, | |
958 | int dy, TkRegion damageRgn)); | |
959 | EXTERN void TkSelDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
960 | EXTERN void TkSelEventProc _ANSI_ARGS_((Tk_Window tkwin, | |
961 | XEvent *eventPtr)); | |
962 | EXTERN void TkSelInit _ANSI_ARGS_((Tk_Window tkwin)); | |
963 | EXTERN void TkSelPropProc _ANSI_ARGS_((XEvent *eventPtr)); | |
964 | EXTERN void TkSetClassProcs _ANSI_ARGS_((Tk_Window tkwin, | |
965 | TkClassProcs *procs, ClientData instanceData)); | |
966 | #ifndef TkSetPixmapColormap | |
967 | EXTERN void TkSetPixmapColormap _ANSI_ARGS_((Pixmap pixmap, | |
968 | Colormap colormap)); | |
969 | #endif | |
970 | #ifndef TkSetRegion | |
971 | EXTERN void TkSetRegion _ANSI_ARGS_((Display* display, GC gc, | |
972 | TkRegion rgn)); | |
973 | #endif | |
974 | EXTERN void TkSetWindowMenuBar _ANSI_ARGS_((Tcl_Interp *interp, | |
975 | Tk_Window tkwin, Arg oldMenuName, | |
976 | Arg menuName)); | |
977 | EXTERN int TkSmoothParseProc _ANSI_ARGS_((ClientData clientData, | |
978 | Tcl_Interp *interp, Tk_Window tkwin, | |
979 | Arg value, char *recordPtr, int offset)); | |
980 | EXTERN Arg TkSmoothPrintProc _ANSI_ARGS_((ClientData clientData, | |
981 | Tk_Window tkwin, char *recordPtr, int offset, | |
982 | Tcl_FreeProc **freeProcPtr)); | |
983 | EXTERN KeySym TkStringToKeysym _ANSI_ARGS_((char *name)); | |
984 | EXTERN int TkThickPolyLineToArea _ANSI_ARGS_((double *coordPtr, | |
985 | int numPoints, double width, int capStyle, | |
986 | int joinStyle, double *rectPtr)); | |
987 | #ifndef TkUnionRectWithRegion | |
988 | EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle* rect, | |
989 | TkRegion src, TkRegion dr_return)); | |
990 | #endif | |
991 | EXTERN void TkWmAddToColormapWindows _ANSI_ARGS_(( | |
992 | TkWindow *winPtr)); | |
993 | EXTERN void TkWmDeadWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
994 | EXTERN TkWindow * TkWmFocusToplevel _ANSI_ARGS_((TkWindow *winPtr)); | |
995 | EXTERN void TkWmMapWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
996 | EXTERN void TkWmNewWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
997 | EXTERN void TkWmProtocolEventProc _ANSI_ARGS_((TkWindow *winPtr, | |
998 | XEvent *evenvPtr)); | |
999 | EXTERN void TkWmRemoveFromColormapWindows _ANSI_ARGS_(( | |
1000 | TkWindow *winPtr)); | |
1001 | EXTERN void TkWmRestackToplevel _ANSI_ARGS_((TkWindow *winPtr, | |
1002 | int aboveBelow, TkWindow *otherPtr)); | |
1003 | EXTERN void TkWmSetClass _ANSI_ARGS_((TkWindow *winPtr)); | |
1004 | EXTERN void TkWmUnmapWindow _ANSI_ARGS_((TkWindow *winPtr)); | |
1005 | ||
1006 | /* | |
1007 | * Unsupported commands. | |
1008 | */ | |
1009 | EXTERN int TkUnsupported1Cmd _ANSI_ARGS_((ClientData clientData, | |
1010 | Tcl_Interp *interp, int argc, Tcl_Obj **objv)); | |
1011 | ||
1012 | /* | |
1013 | * Canvas-related procedures that are shared among Tk modules but not | |
1014 | * exported to the outside world: | |
1015 | */ | |
1016 | ||
1017 | struct TkCanvas; | |
1018 | extern int TkCanvPostscriptCmd _ANSI_ARGS_((struct TkCanvas *canvasPtr, | |
1019 | Tcl_Interp *interp, int argc, Tcl_Obj **objv)); | |
1020 | ||
1021 | # undef TCL_STORAGE_CLASS | |
1022 | # define TCL_STORAGE_CLASS DLLIMPORT | |
1023 | ||
1024 | #endif /* _TKINT */ |