/*1* tkInt.h --2*3* Declarations for things used internally by the Tk4* procedures but not exported outside the module.5*6* Copyright (c) 1990-1994 The Regents of the University of California.7* Copyright (c) 1994-1996 Sun Microsystems, Inc.8*9* See the file "license.terms" for information on usage and redistribution10* of this file, and for a DISCLAIMER OF ALL WARRANTIES.11*12* SCCS: @(#) tkInt.h 1.172 96/10/12 17:29:4813*/1415#ifndef _TKINT16#define _TKINT1718#ifndef _TK19#include "tk.h"20#endif21#ifndef _TCL22#include "tcl.h"23#endif24#ifndef _TKPORT25#include <tkPort.h>26#endif2728/*29* Opaque type declarations:30*/3132typedef struct TkColormap TkColormap;33typedef struct TkGrabEvent TkGrabEvent;34typedef struct Tk_PostscriptInfo Tk_PostscriptInfo;35typedef struct TkRegion_ *TkRegion;36typedef struct TkStressedCmap TkStressedCmap;3738/*39* One of the following structures is maintained for each cursor in40* use in the system. This structure is used by tkCursor.c and the41* various system specific cursor files.42*/4344typedef struct TkCursor {45Tk_Cursor cursor; /* System specific identifier for cursor. */46int refCount; /* Number of active uses of cursor. */47Tcl_HashTable *otherTable; /* Second table (other than idTable) used48* to index this entry. */49Tcl_HashEntry *hashPtr; /* Entry in otherTable for this structure50* (needed when deleting). */51} TkCursor;5253/*54* One of the following structures is maintained for each display55* containing a window managed by Tk:56*/5758typedef struct TkDisplay {59Display *display; /* Xlib's info about display. */60struct TkDisplay *nextPtr; /* Next in list of all displays. */61char *name; /* Name of display (with any screen62* identifier removed). Malloc-ed. */63Time lastEventTime; /* Time of last event received for this64* display. */6566/*67* Information used primarily by tkBind.c:68*/6970int bindInfoStale; /* Non-zero means the variables in this71* part of the structure are potentially72* incorrect and should be recomputed. */73unsigned int modeModMask; /* Has one bit set to indicate the modifier74* corresponding to "mode shift". If no75* such modifier, than this is zero. */76unsigned int metaModMask; /* Has one bit set to indicate the modifier77* corresponding to the "Meta" key. If no78* such modifier, then this is zero. */79unsigned int altModMask; /* Has one bit set to indicate the modifier80* corresponding to the "Meta" key. If no81* such modifier, then this is zero. */82enum {LU_IGNORE, LU_CAPS, LU_SHIFT} lockUsage;83/* Indicates how to interpret lock modifier. */84int numModKeyCodes; /* Number of entries in modKeyCodes array85* below. */86KeyCode *modKeyCodes; /* Pointer to an array giving keycodes for87* all of the keys that have modifiers88* associated with them. Malloc'ed, but89* may be NULL. */9091/*92* Information used by tkError.c only:93*/9495struct TkErrorHandler *errorPtr;96/* First in list of error handlers97* for this display. NULL means98* no handlers exist at present. */99int deleteCount; /* Counts # of handlers deleted since100* last time inactive handlers were101* garbage-collected. When this number102* gets big, handlers get cleaned up. */103104/*105* Information used by tkSend.c only:106*/107108Tk_Window commTkwin; /* Window used for communication109* between interpreters during "send"110* commands. NULL means send info hasn't111* been initialized yet. */112Atom commProperty; /* X's name for comm property. */113Atom registryProperty; /* X's name for property containing114* registry of interpreter names. */115Atom appNameProperty; /* X's name for property used to hold the116* application name on each comm window. */117118/*119* Information used by tkSelect.c and tkClipboard.c only:120*/121122struct TkSelectionInfo *selectionInfoPtr;123/* First in list of selection information124* records. Each entry contains information125* about the current owner of a particular126* selection on this display. */127Atom multipleAtom; /* Atom for MULTIPLE. None means128* selection stuff isn't initialized. */129Atom incrAtom; /* Atom for INCR. */130Atom targetsAtom; /* Atom for TARGETS. */131Atom timestampAtom; /* Atom for TIMESTAMP. */132Atom textAtom; /* Atom for TEXT. */133Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */134Atom applicationAtom; /* Atom for TK_APPLICATION. */135Atom windowAtom; /* Atom for TK_WINDOW. */136Atom clipboardAtom; /* Atom for CLIPBOARD. */137138Tk_Window clipWindow; /* Window used for clipboard ownership and to139* retrieve selections between processes. NULL140* means clipboard info hasn't been141* initialized. */142int clipboardActive; /* 1 means we currently own the clipboard143* selection, 0 means we don't. */144struct TkMainInfo *clipboardAppPtr;145/* Last application that owned clipboard. */146struct TkClipboardTarget *clipTargetPtr;147/* First in list of clipboard type information148* records. Each entry contains information149* about the buffers for a given selection150* target. */151152/*153* Information used by tkAtom.c only:154*/155156int atomInit; /* 0 means stuff below hasn't been157* initialized yet. */158Tcl_HashTable nameTable; /* Maps from names to Atom's. */159Tcl_HashTable atomTable; /* Maps from Atom's back to names. */160161/*162* Information used by tkCursor.c only:163*/164165Font cursorFont; /* Font to use for standard cursors.166* None means font not loaded yet. */167168/*169* Information used by tkGrab.c only:170*/171172struct TkWindow *grabWinPtr;173/* Window in which the pointer is currently174* grabbed, or NULL if none. */175struct TkWindow *eventualGrabWinPtr;176/* Value that grabWinPtr will have once the177* grab event queue (below) has been178* completely emptied. */179struct TkWindow *buttonWinPtr;180/* Window in which first mouse button was181* pressed while grab was in effect, or NULL182* if no such press in effect. */183struct TkWindow *serverWinPtr;184/* If no application contains the pointer then185* this is NULL. Otherwise it contains the186* last window for which we've gotten an187* Enter or Leave event from the server (i.e.188* the last window known to have contained189* the pointer). Doesn't reflect events190* that were synthesized in tkGrab.c. */191TkGrabEvent *firstGrabEventPtr;192/* First in list of enter/leave events193* synthesized by grab code. These events194* must be processed in order before any other195* events are processed. NULL means no such196* events. */197TkGrabEvent *lastGrabEventPtr;198/* Last in list of synthesized events, or NULL199* if list is empty. */200int grabFlags; /* Miscellaneous flag values. See definitions201* in tkGrab.c. */202203/*204* Information used by tkXId.c only:205*/206207struct TkIdStack *idStackPtr;208/* First in list of chunks of free resource209* identifiers, or NULL if there are no free210* resources. */211XID (*defaultAllocProc) _ANSI_ARGS_((Display *display));212/* Default resource allocator for display. */213struct TkIdStack *windowStackPtr;214/* First in list of chunks of window215* identifers that can't be reused right216* now. */217int idCleanupScheduled; /* 1 means a call to WindowIdCleanup has218* already been scheduled, 0 means it219* hasn't. */220221/*222* Information maintained by tkWindow.c for use later on by tkXId.c:223*/224225226int destroyCount; /* Number of Tk_DestroyWindow operations227* in progress. */228unsigned long lastDestroyRequest;229/* Id of most recent XDestroyWindow request;230* can re-use ids in windowStackPtr when231* server has seen this request and event232* queue is empty. */233234/*235* Information used by tkVisual.c only:236*/237238TkColormap *cmapPtr; /* First in list of all non-default colormaps239* allocated for this display. */240241/*242* Information used by tkFocus.c only:243*/244245struct TkWindow *focusWinPtr;246/* Window that currently has the focus for247* this display, or NULL if none. */248struct TkWindow *implicitWinPtr;249/* If the focus arrived at a toplevel window250* implicitly via an Enter event (rather251* than via a FocusIn event), this points252* to the toplevel window. Otherwise it is253* NULL. */254struct TkWindow *focusOnMapPtr;255/* This points to a toplevel window that is256* supposed to receive the X input focus as257* soon as it is mapped (needed to handle the258* fact that X won't allow the focus on an259* unmapped window). NULL means no delayed260* focus op in progress. */261int forceFocus; /* Associated with focusOnMapPtr: non-zero262* means claim the focus even if some other263* application currently has it. */264265/*266* Used by tkColor.c only:267*/268269TkStressedCmap *stressPtr; /* First in list of colormaps that have270* filled up, so we have to pick an271* approximate color. */272273/*274* Used by tkEvent.c only:275*/276277struct TkWindowEvent *delayedMotionPtr;278/* Points to a malloc-ed motion event279* whose processing has been delayed in280* the hopes that another motion event281* will come along right away and we can282* merge the two of them together. NULL283* means that there is no delayed motion284* event. */285286/*287* Miscellaneous information:288*/289290#ifdef TK_USE_INPUT_METHODS291XIM inputMethod; /* Input method for this display */292#endif /* TK_USE_INPUT_METHODS */293Tcl_HashTable winTable; /* Maps from X window ids to TkWindow ptrs. */294} TkDisplay;295296/*297* One of the following structures exists for each error handler298* created by a call to Tk_CreateErrorHandler. The structure299* is managed by tkError.c.300*/301302typedef struct TkErrorHandler {303TkDisplay *dispPtr; /* Display to which handler applies. */304unsigned long firstRequest; /* Only errors with serial numbers305* >= to this are considered. */306unsigned long lastRequest; /* Only errors with serial numbers307* <= to this are considered. This308* field is filled in when XUnhandle309* is called. -1 means XUnhandle310* hasn't been called yet. */311int error; /* Consider only errors with this312* error_code (-1 means consider313* all errors). */314int request; /* Consider only errors with this315* major request code (-1 means316* consider all major codes). */317int minorCode; /* Consider only errors with this318* minor request code (-1 means319* consider all minor codes). */320Tk_ErrorProc *errorProc; /* Procedure to invoke when a matching321* error occurs. NULL means just ignore322* errors. */323ClientData clientData; /* Arbitrary value to pass to324* errorProc. */325struct TkErrorHandler *nextPtr;326/* Pointer to next older handler for327* this display, or NULL for end of328* list. */329} TkErrorHandler;330331/*332* One of the following structures exists for each event handler333* created by calling Tk_CreateEventHandler. This information334* is used by tkEvent.c only.335*/336337typedef struct TkEventHandler {338unsigned long mask; /* Events for which to invoke339* proc. */340Tk_EventProc *proc; /* Procedure to invoke when an event341* in mask occurs. */342ClientData clientData; /* Argument to pass to proc. */343struct TkEventHandler *nextPtr;344/* Next in list of handlers345* associated with window (NULL means346* end of list). */347} TkEventHandler;348349/*350* Tk keeps one of the following data structures for each main351* window (created by a call to Tk_CreateMainWindow). It stores352* information that is shared by all of the windows associated353* with a particular main window.354*/355356typedef struct TkMainInfo {357int refCount; /* Number of windows whose "mainPtr" fields358* point here. When this becomes zero, can359* free up the structure (the reference360* count is zero because windows can get361* deleted in almost any order; the main362* window isn't necessarily the last one363* deleted). */364struct TkWindow *winPtr; /* Pointer to main window. */365Tcl_Interp *interp; /* Interpreter associated with application. */366Tcl_HashTable nameTable; /* Hash table mapping path names to TkWindow367* structs for all windows related to this368* main window. Managed by tkWindow.c. */369Tk_BindingTable bindingTable;370/* Used in conjunction with "bind" command371* to bind events to Tcl commands. */372struct TkVirtualEventTable *vetPtr;373/* Hold definitions of virtual events. */374struct TkFocusInfo *focusPtr;375/* First in list of records containing focus376* information for each top-level in the377* application. Used only by tkFocus.c. */378unsigned long focusSerial; /* Serial number of last request we made to379* change the focus. Used to identify380* stale focus notifications coming from the381* X server. */382struct TkWindow *lastFocusPtr;383/* The most recent window that was given the384* focus via "focus" command. Used to restore385* the focus when we get stale FocusIn386* events. */387struct ElArray *optionRootPtr;388/* Top level of option hierarchy for this389* main window. NULL means uninitialized.390* Managed by tkOption.c. */391Tcl_HashTable imageTable; /* Maps from image names to Tk_ImageMaster392* structures. Managed by tkImage.c. */393int strictMotif; /* This is linked to the tk_strictMotif394* global variable. */395struct TkMainInfo *nextPtr; /* Next in list of all main windows managed by396* this process. */397} TkMainInfo;398399/*400* Tk keeps one of the following structures for each window.401* Some of the information (like size and location) is a shadow402* of information managed by the X server, and some is special403* information used here, such as event and geometry management404* information. This information is (mostly) managed by tkWindow.c.405* WARNING: the declaration below must be kept consistent with the406* Tk_FakeWin structure in tk.h. If you change one, be sure to407* change the other!!408*/409410typedef struct TkWindow {411412/*413* Structural information:414*/415416Display *display; /* Display containing window. */417TkDisplay *dispPtr; /* Tk's information about display418* for window. */419int screenNum; /* Index of screen for window, among all420* those for dispPtr. */421Visual *visual; /* Visual to use for window. If not default,422* MUST be set before X window is created. */423int depth; /* Number of bits/pixel. */424Window window; /* X's id for window. NULL means window425* hasn't actually been created yet, or it's426* been deleted. */427struct TkWindow *childList; /* First in list of child windows,428* or NULL if no children. */429struct TkWindow *lastChildPtr;430/* Last in list of child windows, or NULL431* if no children. */432struct TkWindow *parentPtr; /* Pointer to parent window (logical433* parent, not necessarily X parent). NULL434* means either this is the main window, or435* the window's parent has already been436* deleted. */437struct TkWindow *nextPtr; /* Next in list of children with438* same parent (NULL if end of439* list). */440TkMainInfo *mainPtr; /* Information shared by all windows441* associated with a particular main442* window. NULL means this window is443* a rogue that isn't associated with444* any application (at present, this445* only happens for the dummy windows446* used for "send" communication). */447448/*449* Name and type information for the window:450*/451452char *pathName; /* Path name of window (concatenation453* of all names between this window and454* its top-level ancestor). This is a455* pointer into an entry in456* mainPtr->nameTable. NULL means that457* the window hasn't been completely458* created yet. */459Tk_Uid nameUid; /* Name of the window within its parent460* (unique within the parent). */461Tk_Uid classUid; /* Class of the window. NULL means window462* hasn't been given a class yet. */463464/*465* Geometry and other attributes of window. This information466* may not be updated on the server immediately; stuff that467* hasn't been reflected in the server yet is called "dirty".468* At present, information can be dirty only if the window469* hasn't yet been created.470*/471472XWindowChanges changes; /* Geometry and other info about473* window. */474unsigned int dirtyChanges; /* Bits indicate fields of "changes"475* that are dirty. */476XSetWindowAttributes atts; /* Current attributes of window. */477unsigned long dirtyAtts; /* Bits indicate fields of "atts"478* that are dirty. */479480unsigned int flags; /* Various flag values: these are all481* defined in tk.h (confusing, but they're482* needed there for some query macros). */483484/*485* Information kept by the event manager (tkEvent.c):486*/487488TkEventHandler *handlerList;/* First in list of event handlers489* declared for this window, or490* NULL if none. */491#ifdef TK_USE_INPUT_METHODS492XIC inputContext; /* Input context (for input methods). */493#endif /* TK_USE_INPUT_METHODS */494495/*496* Information used for event bindings (see "bind" and "bindtags"497* commands in tkCmds.c):498*/499500ClientData *tagPtr; /* Points to array of tags used for bindings501* on this window. Each tag is a Tk_Uid.502* Malloc'ed. NULL means no tags. */503int numTags; /* Number of tags at *tagPtr. */504505/*506* Information used by tkOption.c to manage options for the507* window.508*/509510int optionLevel; /* -1 means no option information is511* currently cached for this window.512* Otherwise this gives the level in513* the option stack at which info is514* cached. */515/*516* Information used by tkSelect.c to manage the selection.517*/518519struct TkSelHandler *selHandlerList;520/* First in list of handlers for521* returning the selection in various522* forms. */523524/*525* Information used by tkGeometry.c for geometry management.526*/527528Tk_GeomMgr *geomMgrPtr; /* Information about geometry manager for529* this window. */530ClientData geomData; /* Argument for geometry manager procedures. */531int reqWidth, reqHeight; /* Arguments from last call to532* Tk_GeometryRequest, or 0's if533* Tk_GeometryRequest hasn't been534* called. */535int internalBorderWidth; /* Width of internal border of window536* (0 means no internal border). Geometry537* managers should not normally place children538* on top of the border. */539540/*541* Information maintained by tkWm.c for window manager communication.542*/543544struct TkWmInfo *wmInfoPtr; /* For top-level windows, points to545* structure with wm-related info (see546* tkWm.c). For other windows, this547* is NULL. */548549/*550* Platform specific information private to each port.551*/552553struct TkWindowPrivate *privatePtr;554} TkWindow;555556/*557* The following structure is used as a two way map between integers558* and strings, usually to map between an internal C representation559* and the strings used in Tcl.560*/561562typedef struct TkStateMap {563int numKey; /* Integer representation of a value. */564char *strKey; /* String representation of a value. */565} TkStateMap;566567/*568* This structure is used by the Mac and Window porting layers as569* the internal representation of a clip_mask in a GC.570*/571572typedef struct TkpClipMask {573int type; /* One of TKP_CLIP_PIXMAP or TKP_CLIP_REGION */574union {575Pixmap pixmap;576TkRegion region;577} value;578} TkpClipMask;579580#define TKP_CLIP_PIXMAP 0581#define TKP_CLIP_REGION 1582583/*584* Pointer to first entry in list of all displays currently known.585*/586587extern TkDisplay *tkDisplayList;588589/*590* Flags passed to TkMeasureChars:591*/592593#define TK_WHOLE_WORDS 1594#define TK_AT_LEAST_ONE 2595#define TK_PARTIAL_OK 4596#define TK_NEWLINES_NOT_SPECIAL 8597#define TK_IGNORE_TABS 16598599/*600* Return values from TkGrabState:601*/602603#define TK_GRAB_NONE 0604#define TK_GRAB_IN_TREE 1605#define TK_GRAB_ANCESTOR 2606#define TK_GRAB_EXCLUDED 3607608/*609* The macro below is used to modify a "char" value (e.g. by casting610* it to an unsigned character) so that it can be used safely with611* macros such as isspace.612*/613614#define UCHAR(c) ((unsigned char) (c))615616/*617* Miscellaneous variables shared among Tk modules but not exported618* to the outside world:619*/620621extern Tk_Uid tkActiveUid;622extern Tk_ImageType tkBitmapImageType;623extern Tk_Uid tkDisabledUid;624extern Tk_PhotoImageFormat tkImgFmtGIF;625extern void (*tkHandleEventProc) _ANSI_ARGS_((626XEvent* eventPtr));627extern Tk_PhotoImageFormat tkImgFmtPPM;628extern TkMainInfo *tkMainWindowList;629extern Tk_Uid tkNormalUid;630extern Tk_ImageType tkPhotoImageType;631extern int tkSendSerial;632633/*634* Internal procedures shared among Tk modules but not exported635* to the outside world:636*/637638EXTERN char * TkAlignImageData _ANSI_ARGS_((XImage *image,639int alignment, int bitOrder));640EXTERN int TkAreaToPolygon _ANSI_ARGS_((double *polyPtr,641int numPoints, double *rectPtr));642EXTERN void TkBezierPoints _ANSI_ARGS_((double control[],643int numSteps, double *coordPtr));644EXTERN void TkBezierScreenPoints _ANSI_ARGS_((Tk_Canvas canvas,645double control[], int numSteps,646XPoint *xPointPtr));647EXTERN void TkBindEventProc _ANSI_ARGS_((TkWindow *winPtr,648XEvent *eventPtr));649EXTERN void TkBindFree _ANSI_ARGS_((TkMainInfo *mainPtr));650EXTERN void TkBindInit _ANSI_ARGS_((TkMainInfo *mainPtr));651EXTERN void TkChangeEventWindow _ANSI_ARGS_((XEvent *eventPtr,652TkWindow *winPtr));653#ifndef TkClipBox654EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn,655XRectangle* rect_return));656#endif657EXTERN int TkClipInit _ANSI_ARGS_((Tcl_Interp *interp,658TkDisplay *dispPtr));659EXTERN int TkCmapStressed _ANSI_ARGS_((Tk_Window tkwin,660Colormap colormap));661EXTERN void TkComputeTextGeometry _ANSI_ARGS_((662XFontStruct *fontStructPtr, char *string,663int numChars, int wrapLength, int *widthPtr,664int *heightPtr));665EXTERN void TkConsoleCreate _ANSI_ARGS_((void));666EXTERN int TkConsoleInit _ANSI_ARGS_((Tcl_Interp *interp));667EXTERN void TkConsolePrint _ANSI_ARGS_((Tcl_Interp *interp,668int devId, char *buffer, long size));669EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp,670char *script));671EXTERN TkCursor * TkCreateCursorFromData _ANSI_ARGS_((Tk_Window tkwin,672char *source, char *mask, int width, int height,673int xHot, int yHot, XColor fg, XColor bg));674EXTERN int TkCreateFrame _ANSI_ARGS_((ClientData clientData,675Tcl_Interp *interp, int argc, char **argv,676int toplevel, char *appName));677EXTERN Tk_Window TkCreateMainWindow _ANSI_ARGS_((Tcl_Interp *interp,678char *screenName, char *baseName));679#ifndef TkCreateRegion680EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void));681#endif682EXTERN Time TkCurrentTime _ANSI_ARGS_((TkDisplay *dispPtr));683EXTERN int TkDeadAppCmd _ANSI_ARGS_((ClientData clientData,684Tcl_Interp *interp, int argc, char **argv));685EXTERN void TkDeleteAllImages _ANSI_ARGS_((TkMainInfo *mainPtr));686#ifndef TkDestroyRegion687EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn));688#endif689EXTERN void TkDisplayChars _ANSI_ARGS_((Display *display,690Drawable drawable, GC gc,691XFontStruct *fontStructPtr, char *string,692int numChars, int x, int y, int tabOrigin,693int flags));694EXTERN void TkDisplayText _ANSI_ARGS_((Display *display,695Drawable drawable, XFontStruct *fontStructPtr,696char *string, int numChars, int x, int y,697int length, Tk_Justify justify, int underline,698GC gc));699EXTERN void TkEventCleanupProc _ANSI_ARGS_((700ClientData clientData, Tcl_Interp *interp));701EXTERN void TkEventDeadWindow _ANSI_ARGS_((TkWindow *winPtr));702EXTERN void TkFillPolygon _ANSI_ARGS_((Tk_Canvas canvas,703double *coordPtr, int numPoints, Display *display,704Drawable drawable, GC gc, GC outlineGC));705EXTERN int TkFindStateNum _ANSI_ARGS_((Tcl_Interp *interp,706CONST char *option, CONST TkStateMap *mapPtr,707CONST char *strKey));708EXTERN char * TkFindStateString _ANSI_ARGS_((709CONST TkStateMap *mapPtr, int numKey));710EXTERN void TkFocusDeadWindow _ANSI_ARGS_((TkWindow *winPtr));711EXTERN int TkFocusFilterEvent _ANSI_ARGS_((TkWindow *winPtr,712XEvent *eventPtr));713EXTERN void TkFreeBindingTags _ANSI_ARGS_((TkWindow *winPtr));714EXTERN void TkFreeWindowId _ANSI_ARGS_((TkDisplay *dispPtr,715Window w));716EXTERN void TkFreeCursor _ANSI_ARGS_((TkCursor *cursorPtr));717EXTERN char * TkGetBitmapData _ANSI_ARGS_((Tcl_Interp *interp,718char *string, char *fileName, int *widthPtr,719int *heightPtr, int *hotXPtr, int *hotYPtr));720EXTERN void TkGetButtPoints _ANSI_ARGS_((double p1[], double p2[],721double width, int project, double m1[],722double m2[]));723EXTERN TkCursor * TkGetCursorByName _ANSI_ARGS_((Tcl_Interp *interp,724Tk_Window tkwin, Tk_Uid string));725EXTERN char * TkGetDefaultScreenName _ANSI_ARGS_((Tcl_Interp *interp,726char *screenName));727EXTERN TkDisplay * TkGetDisplay _ANSI_ARGS_((Display *display));728EXTERN TkWindow * TkGetFocus _ANSI_ARGS_((TkWindow *winPtr));729EXTERN int TkGetInterpNames _ANSI_ARGS_((Tcl_Interp *interp,730Tk_Window tkwin));731EXTERN int TkGetMiterPoints _ANSI_ARGS_((double p1[], double p2[],732double p3[], double width, double m1[],733double m2[]));734#ifndef TkGetNativeProlog735EXTERN int TkGetNativeProlog _ANSI_ARGS_((Tcl_Interp *interp));736#endif737EXTERN void TkGetPointerCoords _ANSI_ARGS_((Tk_Window tkwin,738int *xPtr, int *yPtr));739EXTERN int TkGetProlog _ANSI_ARGS_((Tcl_Interp *interp));740EXTERN void TkGetServerInfo _ANSI_ARGS_((Tcl_Interp *interp,741Tk_Window tkwin));742EXTERN void TkGrabDeadWindow _ANSI_ARGS_((TkWindow *winPtr));743EXTERN int TkGrabState _ANSI_ARGS_((TkWindow *winPtr));744EXTERN TkWindow * TkIDToWindow _ANSI_ARGS_((Window window,745TkDisplay *display));746EXTERN void TkIncludePoint _ANSI_ARGS_((Tk_Item *itemPtr,747double *pointPtr));748EXTERN void TkInitXId _ANSI_ARGS_((TkDisplay *dispPtr));749EXTERN void TkInOutEvents _ANSI_ARGS_((XEvent *eventPtr,750TkWindow *sourcePtr, TkWindow *destPtr,751int leaveType, int enterType,752Tcl_QueuePosition position));753#ifndef TkIntersectRegion754EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra,755TkRegion srcb, TkRegion dr_return));756#endif757EXTERN char * TkKeysymToString _ANSI_ARGS_((KeySym keysym));758EXTERN int TkLineToArea _ANSI_ARGS_((double end1Ptr[2],759double end2Ptr[2], double rectPtr[4]));760EXTERN double TkLineToPoint _ANSI_ARGS_((double end1Ptr[2],761double end2Ptr[2], double pointPtr[2]));762EXTERN int TkMakeBezierCurve _ANSI_ARGS_((Tk_Canvas canvas,763double *pointPtr, int numPoints, int numSteps,764XPoint xPoints[], double dblPoints[]));765EXTERN void TkMakeBezierPostscript _ANSI_ARGS_((Tcl_Interp *interp,766Tk_Canvas canvas, double *pointPtr,767int numPoints));768EXTERN Window TkMakeWindow _ANSI_ARGS_((TkWindow *winPtr,769Window parent));770EXTERN int TkMeasureChars _ANSI_ARGS_((XFontStruct *fontStructPtr,771char *source, int maxChars, int startX, int maxX,772int tabOrigin, int flags, int *nextXPtr));773EXTERN void TkOptionClassChanged _ANSI_ARGS_((TkWindow *winPtr));774EXTERN void TkOptionDeadWindow _ANSI_ARGS_((TkWindow *winPtr));775EXTERN int TkOvalToArea _ANSI_ARGS_((double *ovalPtr,776double *rectPtr));777EXTERN double TkOvalToPoint _ANSI_ARGS_((double ovalPtr[4],778double width, int filled, double pointPtr[2]));779EXTERN int TkPlatformInit _ANSI_ARGS_((Tcl_Interp *interp));780EXTERN int TkPointerEvent _ANSI_ARGS_((XEvent *eventPtr,781TkWindow *winPtr));782EXTERN int TkPolygonToArea _ANSI_ARGS_((double *polyPtr,783int numPoints, double *rectPtr));784EXTERN double TkPolygonToPoint _ANSI_ARGS_((double *polyPtr,785int numPoints, double *pointPtr));786EXTERN int TkPositionInTree _ANSI_ARGS_((TkWindow *winPtr,787TkWindow *treePtr));788#ifndef TkPutImage789EXTERN void TkPutImage _ANSI_ARGS_((unsigned long *colors,790int ncolors, Display* display, Drawable d,791GC gc, XImage* image, int src_x, int src_y,792int dest_x, int dest_y, unsigned int width,793unsigned int height));794#endif795#ifndef TkRectInRegion796EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn,797int x, int y, unsigned int width,798unsigned int height));799#endif800EXTERN void TkQueueEventForAllChildren _ANSI_ARGS_((801Tk_Window tkwin, XEvent *eventPtr));802EXTERN int TkScrollWindow _ANSI_ARGS_((Tk_Window tkwin, GC gc,803int x, int y, int width, int height, int dx,804int dy, TkRegion damageRgn));805EXTERN void TkSelDeadWindow _ANSI_ARGS_((TkWindow *winPtr));806EXTERN void TkSelEventProc _ANSI_ARGS_((Tk_Window tkwin,807XEvent *eventPtr));808EXTERN void TkSelInit _ANSI_ARGS_((Tk_Window tkwin));809#ifndef TkSetPixmapColormap810EXTERN void TkSetPixmapColormap _ANSI_ARGS_((Pixmap pixmap,811Colormap colormap));812#endif813#ifndef TkSetRegion814EXTERN void TkSetRegion _ANSI_ARGS_((Display* display, GC gc,815TkRegion rgn));816#endif817EXTERN void TkSelPropProc _ANSI_ARGS_((XEvent *eventPtr));818EXTERN int TkThickPolyLineToArea _ANSI_ARGS_((double *coordPtr,819int numPoints, double width, int capStyle,820int joinStyle, double *rectPtr));821EXTERN KeySym TkStringToKeysym _ANSI_ARGS_((char *name));822EXTERN void TkUnderlineChars _ANSI_ARGS_((Display *display,823Drawable drawable, GC gc,824XFontStruct *fontStructPtr, char *string,825int x, int y, int tabOrigin, int flags,826int firstChar, int lastChar));827#ifndef TkUnionRectWithRegion828EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle* rect,829TkRegion src, TkRegion dr_return));830#endif831EXTERN void TkWmAddToColormapWindows _ANSI_ARGS_((832TkWindow *winPtr));833EXTERN void TkWmDeadWindow _ANSI_ARGS_((TkWindow *winPtr));834EXTERN void TkWmMapWindow _ANSI_ARGS_((TkWindow *winPtr));835EXTERN void TkWmNewWindow _ANSI_ARGS_((TkWindow *winPtr));836EXTERN void TkWmProtocolEventProc _ANSI_ARGS_((TkWindow *winPtr,837XEvent *evenvPtr));838EXTERN void TkWmRemoveFromColormapWindows _ANSI_ARGS_((839TkWindow *winPtr));840EXTERN void TkWmRestackToplevel _ANSI_ARGS_((TkWindow *winPtr,841int aboveBelow, TkWindow *otherPtr));842EXTERN void TkWmSetClass _ANSI_ARGS_((TkWindow *winPtr));843EXTERN void TkWmUnmapWindow _ANSI_ARGS_((TkWindow *winPtr));844EXTERN int TkXFileProc _ANSI_ARGS_((ClientData clientData,845int mask, int flags));846847/*848* Unsupported commands.849*/850EXTERN int TkUnsupported1Cmd _ANSI_ARGS_((ClientData clientData,851Tcl_Interp *interp, int argc, char **argv));852853#endif /* _TKINT */854855856