/[dtapublic]/projs/trunk/shared_source/c_tk_base_7_5_w_mods/tkint.h
ViewVC logotype

Annotation of /projs/trunk/shared_source/c_tk_base_7_5_w_mods/tkint.h

Parent Directory Parent Directory | Revision Log Revision Log


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

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25