📄 tkint.h
字号:
/* * tkInt.h -- * * Declarations for things used internally by the Tk * procedures but not exported outside the module. * * Copyright (c) 1990-1993 The Regents of the University of California. * All rights reserved. * * Permission is hereby granted, without written agreement and without * license or royalty fees, to use, copy, modify, and distribute this * software and its documentation for any purpose, provided that the * above copyright notice and the following two paragraphs appear in * all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * * $Header: /home/MPI/cvsMaster/mpich/mpe/profiling/nupshot/tkInt.h,v 1.1.1.1 1997/09/17 20:39:00 gropp Exp $ SPRITE (Berkeley) */#ifndef _TKINT#define _TKINT#ifndef _XLIB_H_#include <X11/Xlib.h>#endif#ifndef _XUTIL_H#include <X11/Xutil.h>#endif#ifndef _TK#include "tk.h"#endif#ifndef _TCL#include "tcl.h"#endif/* * Opaque type declarations: */typedef struct Tk_PostscriptInfo Tk_PostscriptInfo;typedef struct TkGrabEvent TkGrabEvent;/* * One of the following structures is maintained for each display * containing a window managed by Tk: */typedef struct TkDisplay { Display *display; /* Xlib's info about display. */ struct TkDisplay *nextPtr; /* Next in list of all displays. */ char *name; /* Name of display (with any screen * identifier removed). Malloc-ed. */ Time lastEventTime; /* Time of last event received for this * display. */ /* * Information used by tkFocus.c and tkEvent.c: */ struct TkWindow *focusTopLevelPtr; /* Pointer to the top-level window that * currently contains the focus for this * display. NULL means none of the * top-levels managed by this application * contains the focus. */ int focussedOnEnter; /* Non-zero means the focus was set * implicitly from an Enter event rather * than from a FocusIn event. */ /* * Information used primarily by tkBind.c: */ int bindInfoStale; /* Non-zero means the variables in this * part of the structure are potentially * incorrect and should be recomputed. */ unsigned int modeModMask; /* Has one bit set to indicate the modifier * corresponding to "mode shift". If no * such modifier, than this is zero. */ unsigned int ignoreModMask; /* If any of the following modifiers are * present in an event but not in the * corresponding pattern, they don't prevent * the pattern from matching the event. */ enum {IGNORE, CAPS, SHIFT} lockUsage; /* Indicates how to interpret lock modifier. */ int numModKeyCodes; /* Number of entries in modKeyCodes array * below. */ KeyCode *modKeyCodes; /* Pointer to an array giving keycodes for * all of the keys that have modifiers * associated with them. Malloc'ed, but * may be NULL. */ /* * Information used by tkError.c only: */ struct TkErrorHandler *errorPtr; /* First in list of error handlers * for this display. NULL means * no handlers exist at present. */ int deleteCount; /* Counts # of handlers deleted since * last time inactive handlers were * garbage-collected. When this number * gets big, handlers get cleaned up. */ int (*defaultHandler) _ANSI_ARGS_((Display *display, XErrorEvent *eventPtr)); /* X's default event handler: invoked * if an error occurs that we can't handle * ourselves. */ /* * Information used by tkSend.c only: */ Tk_Window commWindow; /* Window used for communication * between interpreters during "send" * commands. NULL means send info hasn't * been initialized yet. */ Atom commProperty; /* X's name for comm property. */ Atom registryProperty; /* X's name for property containing * registry of interpreter names. */ int serverSecure; /* Non-zero means the server appears to * be reasonably secure; zero means we * should reject incoming sends because * they can't be trusted. */ /* * Information used by tkSelect.c only: */ Tk_Window selectionOwner; /* Current owner of selection, or * NULL if selection isn't owned by * a window in this process. */ int selectionSerial; /* Serial number of last XSelectionSetOwner * request we made to server (used to * filter out redundant SelectionClear * events. */ Time selectionTime; /* Timestamp used to acquire selection. */ Atom multipleAtom; /* Atom for MULTIPLE. None means * selection stuff isn't initialized. */ Atom incrAtom; /* Atom for INCR. */ Atom targetsAtom; /* Atom for TARGETS. */ Atom timestampAtom; /* Atom for TIMESTAMP. */ Atom textAtom; /* Atom for TEXT. */ Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */ Atom applicationAtom; /* Atom for APPLICATION. */ Atom windowNameAtom; /* Atom for WINDOW_NAME. */ /* * Information used by tkAtom.c only: */ int atomInit; /* 0 means stuff below hasn't been * initialized yet. */ Tcl_HashTable nameTable; /* Maps from names to Atom's. */ Tcl_HashTable atomTable; /* Maps from Atom's back to names. */ /* * Information used by tkCursor.c only: */ Font cursorFont; /* Font to use for standard cursors. * None means font not loaded yet. */ /* * Information used by tkGrab.c only: */ struct TkWindow *grabWinPtr; /* Window in which the pointer is currently * grabbed, or NULL if none. */ struct TkWindow *eventualGrabWinPtr; /* Value that grabWinPtr will have once the * grab event queue (below) has been * completely emptied. */ struct TkWindow *buttonWinPtr; /* Window in which first mouse button was * pressed while grab was in effect, or NULL * if no such press in effect. */ struct TkWindow *serverWinPtr; /* If no application contains the pointer then * this is NULL. Otherwise it contains the * last window for which we've gotten an * Enter or Leave event from the server (i.e. * the last window known to have contained * the pointer). Doesn't reflect events * that were synthesized in tkGrab.c. */ TkGrabEvent *firstGrabEventPtr; /* First in list of enter/leave events * synthesized by grab code. These events * must be processed in order before any other * events are processed. NULL means no such * events. */ TkGrabEvent *lastGrabEventPtr; /* Last in list of synthesized events, or NULL * if list is empty. */ int grabFlags; /* Miscellaneous flag values. See definitions * in tkGrab.c. */ /* * Miscellaneous information: */ Tk_ColorModel *colorModels; /* Array of color models, one per screen; * indicates whether windows should attempt * to use full color for display, just mono, * etc. Malloc'ed. */} TkDisplay;/* * One of the following structures exists for each error handler * created by a call to Tk_CreateErrorHandler. The structure * is managed by tkError.c. */typedef struct TkErrorHandler { TkDisplay *dispPtr; /* Display to which handler applies. */ unsigned long firstRequest; /* Only errors with serial numbers * >= to this are considered. */ unsigned long lastRequest; /* Only errors with serial numbers * <= to this are considered. This * field is filled in when XUnhandle * is called. -1 means XUnhandle * hasn't been called yet. */ int error; /* Consider only errors with this * error_code (-1 means consider * all errors). */ int request; /* Consider only errors with this * major request code (-1 means * consider all major codes). */ int minorCode; /* Consider only errors with this * minor request code (-1 means * consider all minor codes). */ Tk_ErrorProc *errorProc; /* Procedure to invoke when a matching * error occurs. NULL means just ignore * errors. */ ClientData clientData; /* Arbitrary value to pass to * errorProc. */ struct TkErrorHandler *nextPtr; /* Pointer to next older handler for * this display, or NULL for end of * list. */} TkErrorHandler;/* * One of the following structures exists for each event handler * created by calling Tk_CreateEventHandler. This information * is used by tkEvent.c only. */typedef struct TkEventHandler { unsigned long mask; /* Events for which to invoke * proc. */ Tk_EventProc *proc; /* Procedure to invoke when an event * in mask occurs. */ ClientData clientData; /* Argument to pass to proc. */ struct TkEventHandler *nextPtr; /* Next in list of handlers * associated with window (NULL means * end of list). */} TkEventHandler;/* * One of the following structures exists for each selection * handler created by calling Tk_CreateSelHandler. This * information is used by tkSelect.c only. */typedef struct TkSelHandler { Atom target; /* Target type for selection * conversion, such as TARGETS or * STRING. */ Atom format; /* Format in which selection * info will be returned, such * as STRING or ATOM. */ Tk_SelectionProc *proc; /* Procedure to generate selection * in this format. */ ClientData clientData; /* Argument to pass to proc. */ int size; /* Size of units returned by proc * (8 for STRING, 32 for almost * anything else). */ struct TkSelHandler *nextPtr; /* Next selection handler associated * with same window (NULL for end of * list). */} TkSelHandler;/* * Tk keeps one of the following data structures for each main * window (created by a call to Tk_CreateMainWindow). It stores * information that is shared by all of the windows associated * with a particular main window. */typedef struct TkMainInfo { struct TkWindow *winPtr; /* Pointer to main window. */ Tcl_Interp *interp; /* Interpreter associated with application. */ Tcl_HashTable nameTable; /* Hash table mapping path names to TkWindow * structs for all windows related to this * main window. Managed by tkWindow.c. */ Tk_BindingTable bindingTable; /* Used in conjunction with "bind" command * to bind events to Tcl commands. */ struct TkWindow *focusPtr; /* Identifies window that currently has the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -