]> cvs.zerfleddert.de Git - micropolis/blob - src/tk/tk.h
src/tclx/ucbsrc/makefile: Micropolis build fixes for recent macOS
[micropolis] / src / tk / tk.h
1 /*
2 * tk.h --
3 *
4 * Declarations for Tk-related things that are visible
5 * outside of the Tk module itself.
6 *
7 * Copyright 1989-1992 Regents of the University of California.
8 * Permission to use, copy, modify, and distribute this
9 * software and its documentation for any purpose and without
10 * fee is hereby granted, provided that the above copyright
11 * notice appear in all copies. The University of California
12 * makes no representations about the suitability of this
13 * software for any purpose. It is provided "as is" without
14 * express or implied warranty.
15 *
16 * $Header: /user6/ouster/wish/RCS/tk.h,v 1.90 92/08/20 16:36:30 ouster Exp $ SPRITE (Berkeley)
17 */
18
19 #ifndef _TK
20 #define _TK
21
22 #ifndef _TCL
23 #include <tcl.h>
24 #endif
25 #ifndef _XLIB_H
26 #include <X11/Xlib.h>
27 #endif
28 #ifdef __STDC__
29
30 /* This is so gcc's stddef.h doesn't clash with sunos4.1.1's stdtypes.h */
31 #ifdef __sys_stdtypes_h
32 #define _PTRDIFF_T
33 #define _SIZE_T
34 #define _WCHAR_T
35 #endif
36
37 #include <stddef.h>
38 #endif
39
40 /*
41 * Dummy types that are used by clients:
42 */
43
44 typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler;
45 typedef struct Tk_TimerToken_ *Tk_TimerToken;
46 typedef struct Tk_Window_ *Tk_Window;
47 typedef struct Tk_3DBorder_ *Tk_3DBorder;
48 typedef struct Tk_BindingTable_ *Tk_BindingTable;
49
50 /*
51 * Additional types exported to clients.
52 */
53
54 typedef char *Tk_Uid;
55
56 /*
57 * Structure used to specify how to handle argv options.
58 */
59
60 typedef struct {
61 char *key; /* The key string that flags the option in the
62 * argv array. */
63 int type; /* Indicates option type; see below. */
64 char *src; /* Value to be used in setting dst; usage
65 * depends on type. */
66 char *dst; /* Address of value to be modified; usage
67 * depends on type. */
68 char *help; /* Documentation message describing this option. */
69 } Tk_ArgvInfo;
70
71 /*
72 * Legal values for the type field of a Tk_ArgvInfo: see the user
73 * documentation for details.
74 */
75
76 #define TK_ARGV_CONSTANT 15
77 #define TK_ARGV_INT 16
78 #define TK_ARGV_STRING 17
79 #define TK_ARGV_UID 18
80 #define TK_ARGV_REST 19
81 #define TK_ARGV_FLOAT 20
82 #define TK_ARGV_FUNC 21
83 #define TK_ARGV_GENFUNC 22
84 #define TK_ARGV_HELP 23
85 #define TK_ARGV_CONST_OPTION 24
86 #define TK_ARGV_OPTION_VALUE 25
87 #define TK_ARGV_OPTION_NAME_VALUE 26
88 #define TK_ARGV_END 27
89
90 /*
91 * Flag bits for passing to Tk_ParseArgv:
92 */
93
94 #define TK_ARGV_NO_DEFAULTS 0x1
95 #define TK_ARGV_NO_LEFTOVERS 0x2
96 #define TK_ARGV_NO_ABBREV 0x4
97 #define TK_ARGV_DONT_SKIP_FIRST_ARG 0x8
98
99 /*
100 * Structure used to describe application-specific configuration
101 * options: indicates procedures to call to parse an option and
102 * to return a text string describing an option.
103 */
104
105 typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData,
106 Tcl_Interp *interp, Tk_Window tkwin, char *value, char *widgRec,
107 int offset));
108 typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData,
109 Tk_Window tkwin, char *widgRec, int offset,
110 Tcl_FreeProc **freeProcPtr));
111
112 typedef struct Tk_CustomOption {
113 Tk_OptionParseProc *parseProc; /* Procedure to call to parse an
114 * option and store it in converted
115 * form. */
116 Tk_OptionPrintProc *printProc; /* Procedure to return a printable
117 * string describing an existing
118 * option. */
119 ClientData clientData; /* Arbitrary one-word value used by
120 * option parser: passed to
121 * parseProc and printProc. */
122 } Tk_CustomOption;
123
124 /*
125 * Structure used to specify information for Tk_ConfigureWidget. Each
126 * structure gives complete information for one option, including
127 * how the option is specified on the command line, where it appears
128 * in the option database, etc.
129 */
130
131 typedef struct Tk_ConfigSpec {
132 int type; /* Type of option, such as TK_CONFIG_COLOR;
133 * see definitions below. Last option in
134 * table must have type TK_CONFIG_END. */
135 char *argvName; /* Switch used to specify option in argv.
136 * NULL means this spec is part of a group. */
137 char *dbName; /* Name for option in option database. */
138 char *dbClass; /* Class for option in database. */
139 char *defValue; /* Default value for option if not
140 * specified in command line or database. */
141 int offset; /* Where in widget record to store value;
142 * use Tk_Offset macro to generate values
143 * for this. */
144 int specFlags; /* Any combination of the values defined
145 * below; other bits are used internally
146 * by tkConfig.c. */
147 Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is
148 * a pointer to info about how to parse and
149 * print the option. Otherwise it is
150 * irrelevant. */
151 } Tk_ConfigSpec;
152
153 /*
154 * Type values for Tk_ConfigSpec structures. See the user
155 * documentation for details.
156 */
157
158 #define TK_CONFIG_BOOLEAN 1
159 #define TK_CONFIG_INT 2
160 #define TK_CONFIG_DOUBLE 3
161 #define TK_CONFIG_STRING 4
162 #define TK_CONFIG_UID 5
163 #define TK_CONFIG_COLOR 6
164 #define TK_CONFIG_FONT 7
165 #define TK_CONFIG_BITMAP 8
166 #define TK_CONFIG_BORDER 9
167 #define TK_CONFIG_RELIEF 10
168 #define TK_CONFIG_CURSOR 11
169 #define TK_CONFIG_ACTIVE_CURSOR 12
170 #define TK_CONFIG_JUSTIFY 13
171 #define TK_CONFIG_ANCHOR 14
172 #define TK_CONFIG_SYNONYM 15
173 #define TK_CONFIG_CAP_STYLE 16
174 #define TK_CONFIG_JOIN_STYLE 17
175 #define TK_CONFIG_PIXELS 18
176 #define TK_CONFIG_MM 19
177 #define TK_CONFIG_WINDOW 20
178 #define TK_CONFIG_CUSTOM 21
179 #define TK_CONFIG_END 22
180 #define TK_CONFIG_PIXMAP 30
181
182 /*
183 * Macro to use to fill in "offset" fields of Tk_ConfigInfos.
184 * Computes number of bytes from beginning of structure to a
185 * given field.
186 */
187
188 #ifdef offsetof
189 #define Tk_Offset(type, field) ((int) offsetof(type, field))
190 #else
191 #define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
192 #endif
193
194 /*
195 * Possible values for flags argument to Tk_ConfigureWidget:
196 */
197
198 #define TK_CONFIG_ARGV_ONLY 1
199
200 /*
201 * Possible flag values for Tk_ConfigInfo structures. Any bits at
202 * or above TK_CONFIG_USER_BIT may be used by clients for selecting
203 * certain entries. Before changing any values here, coordinate with
204 * tkConfig.c (internal-use-only flags are defined there).
205 */
206
207 #define TK_CONFIG_COLOR_ONLY 1
208 #define TK_CONFIG_MONO_ONLY 2
209 #define TK_CONFIG_NULL_OK 4
210 #define TK_CONFIG_DONT_SET_DEFAULT 8
211 #define TK_CONFIG_OPTION_SPECIFIED 0x10
212 #define TK_CONFIG_USER_BIT 0x100
213
214 /*
215 * Bits to pass to Tk_CreateFileHandler to indicate what sorts
216 * of events are of interest:
217 */
218
219 #define TK_READABLE 1
220 #define TK_WRITABLE 2
221 #define TK_EXCEPTION 4
222
223 /*
224 * Flag values to pass to Tk_DoOneEvent to disable searches
225 * for some kinds of events:
226 */
227
228 #define TK_DONT_WAIT 1
229 #define TK_X_EVENTS 2
230 #define TK_FILE_EVENTS 4
231 #define TK_TIMER_EVENTS 8
232 #define TK_IDLE_EVENTS 0x10
233 #define TK_ALL_EVENTS 0x1e
234
235 /*
236 * Priority levels to pass to Tk_AddOption:
237 */
238
239 #define TK_WIDGET_DEFAULT_PRIO 20
240 #define TK_STARTUP_FILE_PRIO 40
241 #define TK_USER_DEFAULT_PRIO 60
242 #define TK_INTERACTIVE_PRIO 80
243 #define TK_MAX_PRIO 100
244
245 /*
246 * Relief values returned by Tk_GetRelief:
247 */
248
249 #define TK_RELIEF_RAISED 1
250 #define TK_RELIEF_FLAT 2
251 #define TK_RELIEF_SUNKEN 4
252
253 /*
254 * Special EnterNotify/LeaveNotify "mode" for use in events
255 * generated by tkShare.c. Pick a high enough value that it's
256 * unlikely to conflict with existing values (like NotifyNormal)
257 * or any new values defined in the future.
258 */
259
260 #define TK_NOTIFY_SHARE 20
261
262 /*
263 * Enumerated type for describing a point by which to anchor something:
264 */
265
266 typedef enum {
267 TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE,
268 TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW,
269 TK_ANCHOR_CENTER
270 } Tk_Anchor;
271
272 /*
273 * Enumerated type for describing a style of justification:
274 */
275
276 typedef enum {
277 TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT,
278 TK_JUSTIFY_CENTER, TK_JUSTIFY_FILL
279 } Tk_Justify;
280 \f
281 /*
282 *--------------------------------------------------------------
283 *
284 * Macros for querying Tk_Window structures. See the
285 * manual entries for documentation.
286 *
287 *--------------------------------------------------------------
288 */
289
290 #define Tk_Display(tkwin) (((Tk_FakeWin *) (tkwin))->display)
291 #define Tk_ScreenNumber(tkwin) (((Tk_FakeWin *) (tkwin))->screenNum)
292 #define Tk_Screen(tkwin) (ScreenOfDisplay(Tk_Display(tkwin), \
293 Tk_ScreenNumber(tkwin)))
294 #define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window)
295 #define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName)
296 #define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid)
297 #define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid)
298 #define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x)
299 #define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y)
300 #define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width)
301 #define Tk_Height(tkwin) \
302 (((Tk_FakeWin *) (tkwin))->changes.height)
303 #define Tk_Changes(tkwin) (&((Tk_FakeWin *) (tkwin))->changes)
304 #define Tk_Attributes(tkwin) (&((Tk_FakeWin *) (tkwin))->atts)
305 #define Tk_IsMapped(tkwin) \
306 (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED)
307 #define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth)
308 #define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight)
309 #define Tk_InternalBorderWidth(tkwin) \
310 (((Tk_FakeWin *) (tkwin))->internalBorderWidth)
311 #define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr)
312
313 /*
314 * The structure below is needed by the macros above so that they can
315 * access the fields of a Tk_Window. The fields not needed by the macros
316 * are declared as "dummyX". The structure has its own type in order to
317 * prevent applications from accessing Tk_Window fields except using
318 * official macros. WARNING!! The structure definition must be kept
319 * consistent with the TkWindow structure in tkInt.h. If you change one,
320 * then change the other. See the declaration in tkInt.h for
321 * documentation on what the fields are used for internally.
322 */
323
324 typedef struct Tk_FakeWin {
325 Display *display;
326 char *dummy1;
327 int screenNum;
328 Window window;
329 char *dummy2;
330 Tk_Window parentPtr;
331 char *dummy4;
332 char *dummy5;
333 char *pathName;
334 Tk_Uid nameUid;
335 Tk_Uid classUid;
336 XWindowChanges changes;
337 unsigned int dummy6;
338 XSetWindowAttributes atts;
339 unsigned long dummy7;
340 unsigned int flags;
341 char *dummy8;
342 char *dummy9;
343 ClientData dummy10;
344 int dummy12;
345 char *dummy13;
346 char *dummy14;
347 ClientData dummy15;
348 char *dummy16;
349 ClientData dummy17;
350 int reqWidth, reqHeight;
351 int internalBorderWidth;
352 char *dummyX;
353 } Tk_FakeWin;
354
355 /*
356 * Flag values for TkWindow (and Tk_FakeWin) structures are:
357 *
358 * TK_MAPPED: 1 means window is currently mapped,
359 * 0 means unmapped.
360 * TK_RECURSIVE_DESTROY: 1 means a recursive destroy is in
361 * progress, so some cleanup operations
362 * can be omitted.
363 * TK_TOP_LEVEL: 1 means this is a top-level window (it
364 * was or will be created as a child of
365 * a root window).
366 * TK_ALREADY_DEAD: 1 means the window is in the process of
367 * being destroyed already.
368 * TK_NEED_CONFIG_NOTIFY: 1 means that the window has been reconfigured
369 * before it was made to exist. At the time of
370 * making it exist a ConfigureNotify event needs
371 * to be generated.
372 * TK_GRAB_FLAG: Used to manage grabs. See tkGrab.c for
373 * details.
374 */
375
376 #define TK_MAPPED 1
377 #define TK_RECURSIVE_DESTROY 2
378 #define TK_TOP_LEVEL 4
379 #define TK_ALREADY_DEAD 8
380 #define TK_NEED_CONFIG_NOTIFY 0x10
381 #define TK_GRAB_FLAG 0x20
382 \f
383 /*
384 *--------------------------------------------------------------
385 *
386 * Additional procedure types defined by Tk.
387 *
388 *--------------------------------------------------------------
389 */
390
391 typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData,
392 XErrorEvent *errEventPtr));
393 typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData,
394 XEvent *eventPtr));
395 typedef void (Tk_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
396 typedef void (Tk_FocusProc) _ANSI_ARGS_((ClientData clientData, int gotFocus));
397 typedef void (Tk_FreeProc) _ANSI_ARGS_((ClientData clientData));
398 typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData,
399 XEvent *eventPtr));
400 typedef void (Tk_GeometryProc) _ANSI_ARGS_((ClientData clientData,
401 Tk_Window tkwin));
402 typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData,
403 Tcl_Interp *interp, char *portion));
404 typedef void (Tk_IdleProc) _ANSI_ARGS_((ClientData clientData));
405 typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData));
406 typedef Bool (Tk_RestrictProc) _ANSI_ARGS_((Display *display, XEvent *eventPtr,
407 char *arg));
408 typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData,
409 int offset, char *buffer, int maxBytes));
410 typedef void (Tk_TimerProc) _ANSI_ARGS_((ClientData clientData));
411 \f
412 /*
413 *--------------------------------------------------------------
414 *
415 * Exported procedures and variables.
416 *
417 *--------------------------------------------------------------
418 */
419
420 extern XColor * Tk_3DBorderColor _ANSI_ARGS_((Tk_3DBorder border));
421 extern void Tk_AddOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
422 char *value, int priority));
423 extern void Tk_BindEvent _ANSI_ARGS_((Tk_BindingTable bindingTable,
424 XEvent *eventPtr, Tk_Window tkwin, int numObjects,
425 ClientData *objectPtr));
426 extern void Tk_CancelIdleCall _ANSI_ARGS_((Tk_IdleProc *idleProc,
427 ClientData clientData));
428 extern void Tk_ChangeWindowAttributes _ANSI_ARGS_((Tk_Window tkwin,
429 unsigned long valueMask,
430 XSetWindowAttributes *attsPtr));
431 extern int Tk_ConfigureInfo _ANSI_ARGS_((Tcl_Interp *interp,
432 Tk_Window tkwin, Tk_ConfigSpec *specs,
433 char *widgRec, char *argvName, int flags));
434 extern int Tk_ConfigureWidget _ANSI_ARGS_((Tcl_Interp *interp,
435 Tk_Window tkwin, Tk_ConfigSpec *specs,
436 int argc, char **argv, char *widgRec,
437 int flags));
438 extern Tk_Window Tk_CoordsToWindow _ANSI_ARGS_((int rootX, int rootY,
439 Tk_Window tkwin));
440 extern unsigned long Tk_CreateBinding _ANSI_ARGS_((Tcl_Interp *interp,
441 Tk_BindingTable bindingTable, ClientData object,
442 char *eventString, char *command, int append));
443 extern Tk_BindingTable Tk_CreateBindingTable _ANSI_ARGS_((Tcl_Interp *interp));
444 extern Tk_ErrorHandler Tk_CreateErrorHandler _ANSI_ARGS_((Display *display,
445 int error, int request, int minorCode,
446 Tk_ErrorProc *errorProc, ClientData clientData));
447 extern void Tk_CreateEventHandler _ANSI_ARGS_((Tk_Window token,
448 unsigned long mask, Tk_EventProc *proc,
449 ClientData clientData));
450 extern void Tk_CreateFileHandler _ANSI_ARGS_((int fd, int mask,
451 Tk_FileProc *proc, ClientData clientData));
452 extern void Tk_CreateFocusHandler _ANSI_ARGS_((Tk_Window tkwin,
453 Tk_FocusProc *proc, ClientData clientData));
454 extern void Tk_CreateGenericHandler _ANSI_ARGS_((
455 Tk_GenericProc *proc, ClientData clientData));
456 extern Tk_Window Tk_CreateMainWindow _ANSI_ARGS_((Tcl_Interp *interp,
457 char *screenName, char *baseName));
458 extern void Tk_CreateSelHandler _ANSI_ARGS_((Tk_Window tkwin,
459 Atom target, Tk_SelectionProc *proc,
460 ClientData clientData, Atom format));
461 extern Tk_TimerToken Tk_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
462 Tk_TimerProc *proc, ClientData clientData));
463 // Added by Don to support finer timer resolution.
464 extern Tk_TimerToken Tk_CreateMicroTimerHandler _ANSI_ARGS_((int seconds,
465 int microseconds, Tk_TimerProc *proc, ClientData clientData));
466 extern Tk_Window Tk_CreateWindow _ANSI_ARGS_((Tcl_Interp *interp,
467 Tk_Window parent, char *name, char *screenName));
468 extern Tk_Window Tk_CreateWindowFromPath _ANSI_ARGS_((
469 Tcl_Interp *interp, Tk_Window tkwin,
470 char *pathName, char *screenName));
471 extern int Tk_DefineBitmap _ANSI_ARGS_((Tcl_Interp *interp,
472 Tk_Uid name, char *source, unsigned int width,
473 unsigned int height));
474 extern int Tk_DefinePixmap _ANSI_ARGS_((Tcl_Interp *interp,
475 Tk_Uid name, Tk_Window, Pixmap pixmap,
476 char *source, unsigned int width,
477 unsigned int height));
478 extern void Tk_DefineCursor _ANSI_ARGS_((Tk_Window window,
479 Cursor cursor));
480 extern void Tk_DeleteAllBindings _ANSI_ARGS_((
481 Tk_BindingTable bindingTable, ClientData object));
482 extern int Tk_DeleteBinding _ANSI_ARGS_((Tcl_Interp *interp,
483 Tk_BindingTable bindingTable, ClientData object,
484 char *eventString));
485 extern void Tk_DeleteBindingTable _ANSI_ARGS_((
486 Tk_BindingTable bindingTable));
487 extern void Tk_DeleteErrorHandler _ANSI_ARGS_((
488 Tk_ErrorHandler handler));
489 extern void Tk_DeleteEventHandler _ANSI_ARGS_((Tk_Window token,
490 unsigned long mask, Tk_EventProc *proc,
491 ClientData clientData));
492 extern void Tk_DeleteFileHandler _ANSI_ARGS_((int fd));
493 extern void Tk_DeleteGenericHandler _ANSI_ARGS_((
494 Tk_GenericProc *proc, ClientData clientData));
495 extern void Tk_DeleteTimerHandler _ANSI_ARGS_((
496 Tk_TimerToken token));
497 extern void Tk_DestroyWindow _ANSI_ARGS_((Tk_Window tkwin));
498 extern char * Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin));
499 extern int Tk_DoOneEvent _ANSI_ARGS_((int flags));
500 extern void Tk_DoWhenIdle _ANSI_ARGS_((Tk_IdleProc *proc,
501 ClientData clientData));
502 extern void Tk_Draw3DPolygon _ANSI_ARGS_((Display *display,
503 Drawable drawable, Tk_3DBorder border,
504 XPoint *pointPtr, int numPoints, int borderWidth,
505 int leftRelief));
506 extern void Tk_Draw3DRectangle _ANSI_ARGS_((Display *display,
507 Drawable drawable, Tk_3DBorder border, int x,
508 int y, int width, int height, int borderWidth,
509 int relief));
510 extern void Tk_EventuallyFree _ANSI_ARGS_((ClientData clientData,
511 Tk_FreeProc *freeProc));
512 extern void Tk_Fill3DPolygon _ANSI_ARGS_((Display *display,
513 Drawable drawable, Tk_3DBorder border,
514 XPoint *pointPtr, int numPoints, int borderWidth,
515 int leftRelief));
516 extern void Tk_Fill3DRectangle _ANSI_ARGS_((Display *display,
517 Drawable drawable, Tk_3DBorder border, int x,
518 int y, int width, int height, int borderWidth,
519 int relief));
520 extern void Tk_Free3DBorder _ANSI_ARGS_((Tk_3DBorder border));
521 extern void Tk_FreeBitmap _ANSI_ARGS_((Pixmap bitmap));
522 extern void Tk_FreePixmap _ANSI_ARGS_((Pixmap bitmap));
523 extern void Tk_FreeColor _ANSI_ARGS_((XColor *colorPtr));
524 extern int Tk_IndexOfScreen _ANSI_ARGS_((Screen *screen));
525 extern int Tk_DefaultDepth _ANSI_ARGS_((Screen *screen));
526 extern Visual *Tk_DefaultVisual _ANSI_ARGS_((Screen *screen));
527 extern Colormap Tk_DefaultColormap _ANSI_ARGS_((Screen *screen));
528 extern Window Tk_DefaultRootWindow _ANSI_ARGS_((Display *dpy));
529 extern GC Tk_DefaultGC _ANSI_ARGS_((Screen *screen));
530 extern Pixmap Tk_DefaultPixmap _ANSI_ARGS_((Screen *screen));
531 extern void Tk_FreeCursor _ANSI_ARGS_((Cursor cursor));
532 extern void Tk_FreeFontStruct _ANSI_ARGS_((
533 XFontStruct *fontStructPtr));
534 extern void Tk_FreeGC _ANSI_ARGS_((GC gc));
535 extern void Tk_GeometryRequest _ANSI_ARGS_((Tk_Window tkwin,
536 int reqWidth, int reqHeight));
537 extern Tk_3DBorder Tk_Get3DBorder _ANSI_ARGS_((Tcl_Interp *interp,
538 Tk_Window tkwin, Colormap colormap,
539 Tk_Uid colorName));
540 extern void Tk_GetAllBindings _ANSI_ARGS_((Tcl_Interp *interp,
541 Tk_BindingTable bindingTable, ClientData object));
542 extern int Tk_GetAnchor _ANSI_ARGS_((Tcl_Interp *interp,
543 char *string, Tk_Anchor *anchorPtr));
544 extern char * Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin,
545 Atom atom));
546 extern char * Tk_GetBinding _ANSI_ARGS_((Tcl_Interp *interp,
547 Tk_BindingTable bindingTable, ClientData object,
548 char *eventString));
549 extern Pixmap Tk_GetBitmap _ANSI_ARGS_((Tcl_Interp *interp,
550 Tk_Window tkwin, Tk_Uid string));
551 extern Pixmap Tk_GetPixmap _ANSI_ARGS_((Tcl_Interp *interp,
552 Tk_Window tkwin, Tk_Uid string));
553 extern Pixmap Tk_GetBitmapFromData _ANSI_ARGS_((Tcl_Interp *interp,
554 Tk_Window tkwin, char *source,
555 unsigned int width, unsigned int height));
556 extern Pixmap Tk_GetPixmapFromData _ANSI_ARGS_((Tcl_Interp *interp,
557 Tk_Window tkwin, char *source,
558 unsigned int width, unsigned int height));
559 extern int Tk_GetCapStyle _ANSI_ARGS_((Tcl_Interp *interp,
560 char *string, int *capPtr));
561 extern XColor * Tk_GetColor _ANSI_ARGS_((Tcl_Interp *interp,
562 Tk_Window tkwin, Colormap colormap, Tk_Uid name));
563 extern XColor * Tk_GetColorByValue _ANSI_ARGS_((Tcl_Interp *interp,
564 Tk_Window tkwin, Colormap colormap,
565 XColor *colorPtr));
566 extern Cursor Tk_GetCursor _ANSI_ARGS_((Tcl_Interp *interp,
567 Tk_Window tkwin, Tk_Uid string));
568 extern Cursor Tk_GetCursorFromData _ANSI_ARGS_((Tcl_Interp *interp,
569 Tk_Window tkwin, char *source, char *mask,
570 unsigned int width, unsigned int height,
571 int xHot, int yHot, Tk_Uid fg, Tk_Uid bg));
572 extern XFontStruct * Tk_GetFontStruct _ANSI_ARGS_((Tcl_Interp *interp,
573 Tk_Window tkwin, Tk_Uid name));
574 extern GC Tk_GetGC _ANSI_ARGS_((Tk_Window tkwin,
575 unsigned long valueMask, XGCValues *valuePtr));
576 extern int Tk_GetJoinStyle _ANSI_ARGS_((Tcl_Interp *interp,
577 char *string, int *joinPtr));
578 extern int Tk_GetJustify _ANSI_ARGS_((Tcl_Interp *interp,
579 char *string, Tk_Justify *justifyPtr));
580 extern Tk_Uid Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin, char *name,
581 char *className));
582 extern int Tk_GetPixels _ANSI_ARGS_((Tcl_Interp *interp,
583 Tk_Window tkwin, char *string, int *intPtr));
584 extern int Tk_GetRelief _ANSI_ARGS_((Tcl_Interp *interp,
585 char *name, int *reliefPtr));
586 extern void Tk_GetRootCoords _ANSI_ARGS_ ((Tk_Window tkwin,
587 int *xPtr, int *yPtr));
588 extern int Tk_GetScreenMM _ANSI_ARGS_((Tcl_Interp *interp,
589 Tk_Window tkwin, char *string, double *doublePtr));
590 extern int Tk_GetSelection _ANSI_ARGS_((Tcl_Interp *interp,
591 Tk_Window tkwin, Atom target, Tk_GetSelProc *proc,
592 ClientData clientData));
593 extern Tk_Uid Tk_GetUid _ANSI_ARGS_((char *string));
594 extern int Tk_Grab _ANSI_ARGS_((Tcl_Interp *interp,
595 Tk_Window tkwin, int grabGlobal));
596 extern void Tk_HandleEvent _ANSI_ARGS_((XEvent *eventPtr));
597 extern Atom Tk_InternAtom _ANSI_ARGS_((Tk_Window tkwin,
598 char *name));
599 extern void Tk_MainLoop _ANSI_ARGS_((void));
600 extern void Tk_MakeWindowExist _ANSI_ARGS_((Tk_Window tkwin));
601 extern void Tk_ManageGeometry _ANSI_ARGS_((Tk_Window tkwin,
602 Tk_GeometryProc *proc, ClientData clientData));
603 extern void Tk_MapWindow _ANSI_ARGS_((Tk_Window tkwin));
604 extern void Tk_MoveResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
605 int x, int y, unsigned int width,
606 unsigned int height));
607 extern void Tk_MoveWindow _ANSI_ARGS_((Tk_Window tkwin, int x,
608 int y));
609 extern char * Tk_NameOf3DBorder _ANSI_ARGS_((Tk_3DBorder border));
610 extern char * Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor));
611 extern char * Tk_NameOfBitmap _ANSI_ARGS_((Pixmap bitmap));
612 extern char * Tk_NameOfPixmap _ANSI_ARGS_((Pixmap bitmap));
613 extern char * Tk_NameOfCapStyle _ANSI_ARGS_((int cap));
614 extern char * Tk_NameOfColor _ANSI_ARGS_((XColor *colorPtr));
615 extern char * Tk_NameOfCursor _ANSI_ARGS_((Cursor cursor));
616 extern char * Tk_NameOfFontStruct _ANSI_ARGS_((
617 XFontStruct *fontStructPtr));
618 extern char * Tk_NameOfJoinStyle _ANSI_ARGS_((int join));
619 extern char * Tk_NameOfJustify _ANSI_ARGS_((Tk_Justify justify));
620 extern char * Tk_NameOfRelief _ANSI_ARGS_((int relief));
621 extern Tk_Window Tk_NameToWindow _ANSI_ARGS_((Tcl_Interp *interp,
622 char *pathName, Tk_Window tkwin));
623 extern void Tk_OwnSelection _ANSI_ARGS_((Tk_Window tkwin,
624 Tk_LostSelProc *proc, ClientData clientData));
625 extern int Tk_ParseArgv _ANSI_ARGS_((Tcl_Interp *interp,
626 Tk_Window tkwin, int *argcPtr, char **argv,
627 Tk_ArgvInfo *argTable, int flags));
628 extern void Tk_Preserve _ANSI_ARGS_((ClientData clientData));
629 extern int Tk_RegisterInterp _ANSI_ARGS_((Tcl_Interp *interp,
630 char *name, Tk_Window tkwin));
631 extern void Tk_Release _ANSI_ARGS_((ClientData clientData));
632 extern void Tk_ResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
633 unsigned int width, unsigned int height));
634 extern Tk_RestrictProc *Tk_RestrictEvents _ANSI_ARGS_((Tk_RestrictProc *proc,
635 char *arg, char **prevArgPtr));
636 extern void Tk_SetBackgroundFromBorder _ANSI_ARGS_((
637 Tk_Window tkwin, Tk_3DBorder border));
638 extern void Tk_SetClass _ANSI_ARGS_((Tk_Window tkwin,
639 char *className));
640 extern void Tk_SetGrid _ANSI_ARGS_((Tk_Window tkwin,
641 int reqWidth, int reqHeight, int gridWidth,
642 int gridHeight));
643 extern void Tk_SetInternalBorder _ANSI_ARGS_((Tk_Window tkwin,
644 int width));
645 extern void Tk_SetWindowBackground _ANSI_ARGS_((Tk_Window tkwin,
646 unsigned long pixel));
647 extern void Tk_SetWindowBackgroundPixmap _ANSI_ARGS_((
648 Tk_Window tkwin, Pixmap pixmap));
649 extern void Tk_SetWindowBorder _ANSI_ARGS_((Tk_Window tkwin,
650 unsigned long pixel));
651 extern void Tk_SetWindowBorderWidth _ANSI_ARGS_((Tk_Window tkwin,
652 int width));
653 extern void Tk_SetWindowBorderPixmap _ANSI_ARGS_((Tk_Window tkwin,
654 Pixmap pixmap));
655 extern void Tk_ShareEvents _ANSI_ARGS_((Tk_Window tkwin,
656 Tk_Uid groupId));
657 extern void Tk_SizeOfBitmap _ANSI_ARGS_((Pixmap bitmap,
658 unsigned int *widthPtr, unsigned int *heightPtr));
659 extern void Tk_SizeOfPixmap _ANSI_ARGS_((Pixmap bitmap,
660 unsigned int *widthPtr, unsigned int *heightPtr));
661 extern void Tk_Sleep _ANSI_ARGS_((int ms));
662 extern void Tk_UndefineCursor _ANSI_ARGS_((Tk_Window window));
663 extern int Tk_UndefinePixmap _ANSI_ARGS_((Tcl_Interp *interp,
664 Tk_Uid name, Tk_Window tkwin));
665 extern void Tk_Ungrab _ANSI_ARGS_((Tk_Window tkwin));
666 extern void Tk_UnmapWindow _ANSI_ARGS_((Tk_Window tkwin));
667 extern void Tk_UnshareEvents _ANSI_ARGS_((Tk_Window tkwin,
668 Tk_Uid groupId));
669
670
671 extern int tk_NumMainWindows;
672
673 /*
674 * Added by dhopkins for OLPC Micropolis gtk.Socket integration.
675 */
676 extern Window tk_RootWindow;
677
678 /*
679 * Tcl commands exported by Tk:
680 */
681
682 extern int Tk_AfterCmd _ANSI_ARGS_((ClientData clientData,
683 Tcl_Interp *interp, int argc, char **argv));
684 extern int Tk_ApplicationCmd _ANSI_ARGS_((ClientData clientData,
685 Tcl_Interp *interp, int argc, char **argv));
686 extern int Tk_BindCmd _ANSI_ARGS_((ClientData clientData,
687 Tcl_Interp *interp, int argc, char **argv));
688 extern int Tk_ButtonCmd _ANSI_ARGS_((ClientData clientData,
689 Tcl_Interp *interp, int argc, char **argv));
690 extern int Tk_CanvasCmd _ANSI_ARGS_((ClientData clientData,
691 Tcl_Interp *interp, int argc, char **argv));
692 extern int Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData,
693 Tcl_Interp *interp, int argc, char **argv));
694 extern int Tk_EntryCmd _ANSI_ARGS_((ClientData clientData,
695 Tcl_Interp *interp, int argc, char **argv));
696 extern int Tk_FrameCmd _ANSI_ARGS_((ClientData clientData,
697 Tcl_Interp *interp, int argc, char **argv));
698 extern int Tk_FocusCmd _ANSI_ARGS_((ClientData clientData,
699 Tcl_Interp *interp, int argc, char **argv));
700 extern int Tk_GrabCmd _ANSI_ARGS_((ClientData clientData,
701 Tcl_Interp *interp, int argc, char **argv));
702 extern int Tk_ListboxCmd _ANSI_ARGS_((ClientData clientData,
703 Tcl_Interp *interp, int argc, char **argv));
704 extern int Tk_MenuCmd _ANSI_ARGS_((ClientData clientData,
705 Tcl_Interp *interp, int argc, char **argv));
706 extern int Tk_MenubuttonCmd _ANSI_ARGS_((ClientData clientData,
707 Tcl_Interp *interp, int argc, char **argv));
708 extern int Tk_MessageCmd _ANSI_ARGS_((ClientData clientData,
709 Tcl_Interp *interp, int argc, char **argv));
710 extern int Tk_OptionCmd _ANSI_ARGS_((ClientData clientData,
711 Tcl_Interp *interp, int argc, char **argv));
712 extern int Tk_PackCmd _ANSI_ARGS_((ClientData clientData,
713 Tcl_Interp *interp, int argc, char **argv));
714 extern int Tk_PlaceCmd _ANSI_ARGS_((ClientData clientData,
715 Tcl_Interp *interp, int argc, char **argv));
716 extern int Tk_ScaleCmd _ANSI_ARGS_((ClientData clientData,
717 Tcl_Interp *interp, int argc, char **argv));
718 extern int Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
719 Tcl_Interp *interp, int argc, char **argv));
720 extern int Tk_SelectionCmd _ANSI_ARGS_((ClientData clientData,
721 Tcl_Interp *interp, int argc, char **argv));
722 extern int Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
723 Tcl_Interp *interp, int argc, char **argv));
724 extern int Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
725 Tcl_Interp *interp, int argc, char **argv));
726 extern int Tk_TkwaitCmd _ANSI_ARGS_((ClientData clientData,
727 Tcl_Interp *interp, int argc, char **argv));
728 extern int Tk_UpdateCmd _ANSI_ARGS_((ClientData clientData,
729 Tcl_Interp *interp, int argc, char **argv));
730 extern int Tk_WinfoCmd _ANSI_ARGS_((ClientData clientData,
731 Tcl_Interp *interp, int argc, char **argv));
732 extern int Tk_WmCmd _ANSI_ARGS_((ClientData clientData,
733 Tcl_Interp *interp, int argc, char **argv));
734 extern int Tcp_AcceptCmd _ANSI_ARGS_((ClientData clientData,
735 Tcl_Interp *interp, int argc, char **argv));
736 extern int Tcp_ConnectCmd _ANSI_ARGS_((ClientData clientData,
737 Tcl_Interp *interp, int argc, char **argv));
738 extern int Tcp_ShutdownCmd _ANSI_ARGS_((ClientData clientData,
739 Tcl_Interp *interp, int argc, char **argv));
740 extern int Tcp_FileHandlerCmd _ANSI_ARGS_((ClientData clientData,
741 Tcl_Interp *interp, int argc, char **argv));
742
743 #endif /* _TK */
Impressum, Datenschutz