File indexing completed on 2025-01-17 09:56:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _TKINT
0016 #define _TKINT
0017
0018 #ifndef _TKPORT
0019 #include "tkPort.h"
0020 #endif
0021
0022
0023
0024
0025
0026
0027
0028 #include <stdio.h>
0029 #ifdef HAVE_SYS_TYPES_H
0030 # include <sys/types.h>
0031 #endif
0032 #ifdef HAVE_SYS_PARAM_H
0033 # include <sys/param.h>
0034 #endif
0035 #ifdef BYTE_ORDER
0036 # ifdef BIG_ENDIAN
0037 # if BYTE_ORDER == BIG_ENDIAN
0038 # undef WORDS_BIGENDIAN
0039 # define WORDS_BIGENDIAN 1
0040 # endif
0041 # endif
0042 # ifdef LITTLE_ENDIAN
0043 # if BYTE_ORDER == LITTLE_ENDIAN
0044 # undef WORDS_BIGENDIAN
0045 # endif
0046 # endif
0047 #endif
0048
0049
0050
0051
0052
0053
0054 #ifndef MODULE_SCOPE
0055 # ifdef __cplusplus
0056 # define MODULE_SCOPE extern "C"
0057 # else
0058 # define MODULE_SCOPE extern
0059 # endif
0060 #endif
0061
0062 #ifndef JOIN
0063 # define JOIN(a,b) JOIN1(a,b)
0064 # define JOIN1(a,b) a##b
0065 #endif
0066
0067 #ifndef TCL_UNUSED
0068 # if defined(__cplusplus)
0069 # define TCL_UNUSED(T) T
0070 # elif defined(__GNUC__) && (__GNUC__ > 2)
0071 # define TCL_UNUSED(T) T JOIN(dummy, __LINE__) __attribute__((unused))
0072 # else
0073 # define TCL_UNUSED(T) T JOIN(dummy, __LINE__)
0074 # endif
0075 #endif
0076
0077 #if defined(_WIN32) && (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7)
0078 # if TCL_UTF_MAX > 3
0079 # define Tcl_WCharToUtfDString(a,b,c) Tcl_WinTCharToUtf((TCHAR *)(a),(b)*sizeof(WCHAR),c)
0080 # define Tcl_UtfToWCharDString(a,b,c) (WCHAR *)Tcl_WinUtfToTChar(a,b,c)
0081 # else
0082 # define Tcl_WCharToUtfDString ((char * (*)(const WCHAR *, int len, Tcl_DString *))Tcl_UniCharToUtfDString)
0083 # define Tcl_UtfToWCharDString ((WCHAR * (*)(const char *, int len, Tcl_DString *))Tcl_UtfToUniCharDString)
0084 # endif
0085 #endif
0086
0087 #if defined(__GNUC__) && (__GNUC__ > 2)
0088 # define TKFLEXARRAY 0
0089 #else
0090 # define TKFLEXARRAY 1
0091 #endif
0092
0093 #ifndef Tcl_GetParent
0094 # define Tcl_GetParent Tcl_GetMaster
0095 #endif
0096
0097
0098
0099
0100
0101
0102
0103 #if !defined(INT2PTR) && !defined(PTR2INT)
0104 # if defined(HAVE_INTPTR_T) || defined(intptr_t)
0105 # define INT2PTR(p) ((void*)(intptr_t)(p))
0106 # define PTR2INT(p) ((int)(intptr_t)(p))
0107 # else
0108 # define INT2PTR(p) ((void*)(p))
0109 # define PTR2INT(p) ((int)(p))
0110 # endif
0111 #endif
0112 #if !defined(UINT2PTR) && !defined(PTR2UINT)
0113 # if defined(HAVE_UINTPTR_T) || defined(uintptr_t)
0114 # define UINT2PTR(p) ((void*)(uintptr_t)(p))
0115 # define PTR2UINT(p) ((unsigned int)(uintptr_t)(p))
0116 # else
0117 # define UINT2PTR(p) ((void*)(p))
0118 # define PTR2UINT(p) ((unsigned int)(p))
0119 # endif
0120 #endif
0121
0122 #ifndef TCL_Z_MODIFIER
0123 # if defined(_WIN64)
0124 # define TCL_Z_MODIFIER "I"
0125 # elif defined(__GNUC__) && !defined(_WIN32)
0126 # define TCL_Z_MODIFIER "z"
0127 # else
0128 # define TCL_Z_MODIFIER ""
0129 # endif
0130 #endif
0131
0132
0133
0134
0135
0136 typedef struct TkColormap TkColormap;
0137 typedef struct TkFontAttributes TkFontAttributes;
0138 typedef struct TkGrabEvent TkGrabEvent;
0139 typedef struct TkpCursor_ *TkpCursor;
0140 typedef struct TkRegion_ *TkRegion;
0141 typedef struct TkStressedCmap TkStressedCmap;
0142 typedef struct TkBindInfo_ *TkBindInfo;
0143 typedef struct Busy *TkBusy;
0144
0145
0146
0147
0148
0149
0150
0151 typedef struct TkCursor {
0152 Tk_Cursor cursor;
0153 Display *display;
0154
0155 int resourceRefCount;
0156
0157
0158
0159
0160
0161
0162
0163
0164 int objRefCount;
0165
0166 Tcl_HashTable *otherTable;
0167
0168 Tcl_HashEntry *hashPtr;
0169
0170 Tcl_HashEntry *idHashPtr;
0171
0172 struct TkCursor *nextPtr;
0173
0174
0175
0176 } TkCursor;
0177
0178
0179
0180
0181
0182
0183
0184
0185 typedef struct TkCaret {
0186 struct TkWindow *winPtr;
0187
0188 int x;
0189 int y;
0190 int height;
0191 } TkCaret;
0192
0193
0194
0195
0196
0197
0198
0199 typedef struct TkDisplay {
0200 Display *display;
0201 struct TkDisplay *nextPtr;
0202 char *name;
0203
0204 Time lastEventTime;
0205
0206
0207
0208
0209
0210
0211 int borderInit;
0212 Tcl_HashTable borderTable;
0213
0214
0215
0216
0217
0218
0219 int atomInit;
0220
0221 Tcl_HashTable nameTable;
0222 Tcl_HashTable atomTable;
0223
0224
0225
0226
0227
0228 int bindInfoStale;
0229
0230
0231 unsigned int modeModMask;
0232
0233
0234 unsigned int metaModMask;
0235
0236
0237 unsigned int altModMask;
0238
0239
0240 enum {LU_IGNORE, LU_CAPS, LU_SHIFT} lockUsage;
0241
0242
0243 int numModKeyCodes;
0244
0245 KeyCode *modKeyCodes;
0246
0247
0248
0249
0250
0251
0252
0253 int bitmapInit;
0254 int bitmapAutoNumber;
0255 Tcl_HashTable bitmapNameTable;
0256
0257
0258 Tcl_HashTable bitmapIdTable;
0259
0260 Tcl_HashTable bitmapDataTable;
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270 int numIdSearches;
0271 int numSlowSearches;
0272
0273
0274
0275
0276
0277 int colorInit;
0278 TkStressedCmap *stressPtr;
0279
0280
0281 Tcl_HashTable colorNameTable;
0282
0283
0284 Tcl_HashTable colorValueTable;
0285
0286
0287
0288
0289
0290
0291
0292 int cursorInit;
0293 Tcl_HashTable cursorNameTable;
0294
0295
0296 Tcl_HashTable cursorDataTable;
0297
0298
0299 Tcl_HashTable cursorIdTable;
0300
0301
0302 char cursorString[20];
0303 Font cursorFont;
0304
0305
0306
0307
0308
0309
0310 struct TkErrorHandler *errorPtr;
0311
0312
0313
0314 int deleteCount;
0315
0316
0317
0318
0319
0320
0321
0322
0323 struct TkWindowEvent *delayedMotionPtr;
0324
0325
0326
0327
0328
0329
0330
0331
0332
0333
0334
0335 int focusDebug;
0336
0337 struct TkWindow *implicitWinPtr;
0338
0339
0340
0341
0342 struct TkWindow *focusPtr;
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355 Tcl_HashTable gcValueTable;
0356
0357 Tcl_HashTable gcIdTable;
0358 int gcInit;
0359
0360
0361
0362
0363
0364
0365 Tcl_HashTable maintainHashTable;
0366
0367
0368
0369 int geomInit;
0370
0371 #define TkGetContainer(tkwin) (((TkWindow *)tkwin)->maintainerPtr != NULL ? \
0372 ((TkWindow *)tkwin)->maintainerPtr : ((TkWindow *)tkwin)->parentPtr)
0373
0374
0375
0376
0377
0378 Tcl_HashTable uidTable;
0379 int uidInit;
0380
0381
0382
0383
0384
0385 struct TkWindow *grabWinPtr;
0386
0387 struct TkWindow *eventualGrabWinPtr;
0388
0389
0390
0391 struct TkWindow *buttonWinPtr;
0392
0393
0394
0395 struct TkWindow *serverWinPtr;
0396
0397
0398
0399
0400
0401
0402
0403 TkGrabEvent *firstGrabEventPtr;
0404
0405
0406
0407
0408
0409 TkGrabEvent *lastGrabEventPtr;
0410
0411
0412 int grabFlags;
0413
0414
0415
0416
0417
0418
0419 int gridInit;
0420 Tcl_HashTable gridHashTable;
0421
0422
0423
0424
0425
0426
0427 int imageId;
0428
0429
0430
0431
0432
0433 int postCommandGeneration;
0434
0435
0436
0437
0438
0439 int packInit;
0440 Tcl_HashTable packerHashTable;
0441
0442
0443
0444
0445
0446
0447
0448 int placeInit;
0449 Tcl_HashTable masterTable;
0450
0451 Tcl_HashTable slaveTable;
0452
0453
0454
0455
0456
0457
0458 struct TkSelectionInfo *selectionInfoPtr;
0459
0460
0461
0462
0463 Atom multipleAtom;
0464
0465 Atom incrAtom;
0466 Atom targetsAtom;
0467 Atom timestampAtom;
0468 Atom textAtom;
0469 Atom compoundTextAtom;
0470 Atom applicationAtom;
0471 Atom windowAtom;
0472 Atom clipboardAtom;
0473 Atom utf8Atom;
0474 Atom atomPairAtom;
0475
0476 Tk_Window clipWindow;
0477
0478
0479
0480 int clipboardActive;
0481
0482 struct TkMainInfo *clipboardAppPtr;
0483
0484 struct TkClipboardTarget *clipTargetPtr;
0485
0486
0487
0488
0489
0490
0491
0492
0493
0494 Tk_Window commTkwin;
0495
0496
0497
0498 Atom commProperty;
0499 Atom registryProperty;
0500
0501 Atom appNameProperty;
0502
0503
0504
0505
0506
0507
0508 struct TkWmInfo *firstWmPtr;
0509 struct TkWmInfo *foregroundWmPtr;
0510
0511
0512
0513
0514
0515
0516 TkColormap *cmapPtr;
0517
0518
0519
0520
0521
0522
0523 #ifdef TK_USE_INPUT_METHODS
0524 XIM inputMethod;
0525 XIMStyle inputStyle;
0526 XFontSet inputXfs;
0527 #endif
0528 Tcl_HashTable winTable;
0529
0530 int refCount;
0531
0532
0533
0534
0535
0536
0537
0538
0539 int mouseButtonState;
0540
0541 Window mouseButtonWindow;
0542
0543 Tk_Window warpWindow;
0544 Tk_Window warpMainwin;
0545
0546 int warpX;
0547 int warpY;
0548
0549
0550
0551
0552
0553 unsigned int flags;
0554
0555 TkCaret caret;
0556
0557
0558 int iconDataSize;
0559 unsigned char *iconDataPtr;
0560 #ifdef TK_USE_INPUT_METHODS
0561 int ximGeneration;
0562 #endif
0563 } TkDisplay;
0564
0565
0566
0567
0568
0569
0570
0571
0572
0573
0574
0575
0576
0577 #define TK_DISPLAY_COLLAPSE_MOTION_EVENTS (1 << 0)
0578 #define TK_DISPLAY_USE_IM (1 << 1)
0579 #define TK_DISPLAY_WM_TRACING (1 << 3)
0580 #define TK_DISPLAY_IN_WARP (1 << 4)
0581 #define TK_DISPLAY_USE_XKB (1 << 5)
0582
0583
0584
0585
0586
0587
0588 typedef struct TkErrorHandler {
0589 TkDisplay *dispPtr;
0590 unsigned long firstRequest;
0591
0592 unsigned long lastRequest;
0593
0594
0595
0596 int error;
0597
0598 int request;
0599
0600
0601 int minorCode;
0602
0603
0604 Tk_ErrorProc *errorProc;
0605
0606 ClientData clientData;
0607 struct TkErrorHandler *nextPtr;
0608
0609
0610 } TkErrorHandler;
0611
0612
0613
0614
0615
0616
0617 typedef struct TkEventHandler {
0618 unsigned long mask;
0619 Tk_EventProc *proc;
0620
0621 ClientData clientData;
0622 struct TkEventHandler *nextPtr;
0623
0624
0625 } TkEventHandler;
0626
0627
0628
0629
0630
0631
0632
0633 typedef struct TkMainInfo {
0634 int refCount;
0635
0636
0637
0638
0639
0640 struct TkWindow *winPtr;
0641 Tcl_Interp *interp;
0642 Tcl_HashTable nameTable;
0643
0644
0645 long deletionEpoch;
0646 Tk_BindingTable bindingTable;
0647
0648
0649 TkBindInfo bindInfo;
0650
0651 struct TkFontInfo *fontInfoPtr;
0652
0653
0654
0655
0656
0657
0658
0659 struct TkToplevelFocusInfo *tlFocusPtr;
0660
0661
0662
0663 struct TkDisplayFocusInfo *displayFocusPtr;
0664
0665
0666
0667
0668
0669 struct ElArray *optionRootPtr;
0670
0671
0672
0673 Tcl_HashTable imageTable;
0674
0675 int strictMotif;
0676
0677 int alwaysShowSelection;
0678
0679 struct TkMainInfo *nextPtr;
0680
0681 Tcl_HashTable busyTable;
0682 } TkMainInfo;
0683
0684
0685
0686
0687
0688
0689
0690 typedef struct {
0691 const void *source;
0692 int width, height;
0693 int native;
0694
0695 } TkPredefBitmap;
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707 typedef struct TkWindow {
0708
0709
0710
0711
0712 Display *display;
0713 TkDisplay *dispPtr;
0714
0715 int screenNum;
0716
0717 Visual *visual;
0718
0719 int depth;
0720 Window window;
0721
0722
0723 struct TkWindow *childList;
0724
0725
0726 struct TkWindow *lastChildPtr;
0727
0728
0729 struct TkWindow *parentPtr;
0730
0731
0732
0733 struct TkWindow *nextPtr;
0734
0735
0736 TkMainInfo *mainPtr;
0737
0738
0739
0740
0741
0742
0743
0744
0745
0746
0747 char *pathName;
0748
0749
0750
0751
0752
0753 Tk_Uid nameUid;
0754
0755 Tk_Uid classUid;
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765 XWindowChanges changes;
0766 unsigned int dirtyChanges;
0767
0768 XSetWindowAttributes atts;
0769 unsigned long dirtyAtts;
0770
0771
0772 unsigned int flags;
0773
0774
0775
0776
0777
0778
0779
0780 TkEventHandler *handlerList;
0781
0782 #ifdef TK_USE_INPUT_METHODS
0783 XIC inputContext;
0784 #endif
0785
0786
0787
0788
0789
0790
0791 ClientData *tagPtr;
0792
0793
0794 int numTags;
0795
0796
0797
0798
0799
0800 int optionLevel;
0801
0802
0803
0804
0805
0806
0807
0808 struct TkSelHandler *selHandlerList;
0809
0810
0811
0812
0813
0814
0815
0816 const Tk_GeomMgr *geomMgrPtr;
0817
0818
0819 ClientData geomData;
0820 int reqWidth, reqHeight;
0821
0822
0823 int internalBorderLeft;
0824
0825
0826
0827
0828
0829
0830
0831
0832
0833 struct TkWmInfo *wmInfoPtr;
0834
0835
0836
0837
0838
0839
0840
0841
0842
0843 const Tk_ClassProcs *classProcsPtr;
0844 ClientData instanceData;
0845
0846
0847
0848
0849
0850 struct TkWindowPrivate *privatePtr;
0851
0852
0853
0854
0855
0856
0857 int internalBorderRight;
0858 int internalBorderTop;
0859 int internalBorderBottom;
0860
0861 int minReqWidth;
0862 int minReqHeight;
0863 #ifdef TK_USE_INPUT_METHODS
0864 int ximGeneration;
0865 #endif
0866 char *geomMgrName;
0867 struct TkWindow *maintainerPtr;
0868
0869
0870
0871 } TkWindow;
0872
0873
0874
0875
0876
0877
0878 typedef struct {
0879 XKeyEvent keyEvent;
0880 #ifdef _WIN32
0881 char trans_chars[XMaxTransChars];
0882
0883 unsigned char nbytes;
0884 #elif !defined(MAC_OSX_TK)
0885 char *charValuePtr;
0886
0887
0888
0889
0890 int charValueLen;
0891
0892 KeySym keysym;
0893
0894 #endif
0895 } TkKeyEvent;
0896
0897
0898
0899
0900
0901 #define TK_MAKE_MENU_TEAROFF 0
0902 #define TK_MAKE_MENU_POPUP 1
0903 #define TK_MAKE_MENU_DROPDOWN 2
0904
0905
0906
0907
0908
0909
0910 typedef struct TkEnsemble {
0911 const char *name;
0912 Tcl_ObjCmdProc *proc;
0913 const struct TkEnsemble *subensemble;
0914 } TkEnsemble;
0915
0916
0917
0918
0919
0920
0921
0922 typedef struct TkStateMap {
0923 int numKey;
0924 const char *strKey;
0925 } TkStateMap;
0926
0927
0928
0929
0930
0931
0932 typedef struct TkpClipMask {
0933 int type;
0934 union {
0935 Pixmap pixmap;
0936 TkRegion region;
0937 } value;
0938 } TkpClipMask;
0939
0940 #define TKP_CLIP_PIXMAP 0
0941 #define TKP_CLIP_REGION 1
0942
0943
0944
0945
0946
0947 #define TK_GRAB_NONE 0
0948 #define TK_GRAB_IN_TREE 1
0949 #define TK_GRAB_ANCESTOR 2
0950 #define TK_GRAB_EXCLUDED 3
0951
0952
0953
0954
0955
0956
0957
0958 #define TK_ISOLATE_END 32
0959
0960
0961
0962
0963
0964
0965
0966 #define UCHAR(c) ((unsigned char) (c))
0967
0968
0969
0970
0971
0972
0973 #define EMBEDDED_APP_WANTS_FOCUS (NotifyNormal + 20)
0974
0975
0976
0977
0978
0979
0980
0981 #define META_MASK (AnyModifier<<1)
0982 #define ALT_MASK (AnyModifier<<2)
0983 #define EXTENDED_MASK (AnyModifier<<3)
0984
0985
0986
0987
0988
0989
0990 #define ALL_BUTTONS \
0991 (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask)
0992
0993
0994 MODULE_SCOPE unsigned TkGetButtonMask(unsigned);
0995
0996
0997
0998
0999
1000
1001 MODULE_SCOPE const Tcl_ObjType tkBorderObjType;
1002 MODULE_SCOPE const Tcl_ObjType tkBitmapObjType;
1003 MODULE_SCOPE const Tcl_ObjType tkColorObjType;
1004 MODULE_SCOPE const Tcl_ObjType tkCursorObjType;
1005 MODULE_SCOPE const Tcl_ObjType tkFontObjType;
1006 MODULE_SCOPE const Tcl_ObjType tkStateKeyObjType;
1007 MODULE_SCOPE const Tcl_ObjType tkTextIndexType;
1008
1009
1010
1011
1012
1013
1014 MODULE_SCOPE const Tk_SmoothMethod tkBezierSmoothMethod;
1015 MODULE_SCOPE Tk_ImageType tkBitmapImageType;
1016 MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtGIF;
1017 MODULE_SCOPE void (*tkHandleEventProc) (XEvent* eventPtr);
1018 MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtPNG;
1019 MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtPPM;
1020 MODULE_SCOPE TkMainInfo *tkMainWindowList;
1021 MODULE_SCOPE Tk_ImageType tkPhotoImageType;
1022 MODULE_SCOPE Tcl_HashTable tkPredefBitmapTable;
1023
1024 MODULE_SCOPE const char *const tkWebColors[20];
1025
1026
1027
1028
1029
1030
1031 #ifndef PI
1032 #ifdef M_PI
1033 #define PI M_PI
1034 #else
1035 #define PI 3.14159265358979323846
1036 #endif
1037 #endif
1038
1039
1040
1041
1042
1043 #if defined(PURIFY) && defined(__clang__)
1044 #if __has_feature(attribute_analyzer_noreturn) && \
1045 !defined(Tcl_Panic) && defined(Tcl_Panic_TCL_DECLARED)
1046 void Tcl_Panic(const char *, ...) __attribute__((analyzer_noreturn));
1047 #endif
1048 #if !defined(CLANG_ASSERT)
1049 #define CLANG_ASSERT(x) assert(x)
1050 #endif
1051 #elif !defined(CLANG_ASSERT)
1052 #define CLANG_ASSERT(x)
1053 #endif
1054
1055
1056
1057
1058
1059
1060
1061 #define GENERATED_FOCUS_EVENT_MAGIC ((Bool) 0x547321ac)
1062
1063
1064
1065
1066
1067 #include "tkIntDecls.h"
1068
1069 #ifdef __cplusplus
1070 extern "C" {
1071 #endif
1072
1073
1074
1075
1076
1077 MODULE_SCOPE int Ttk_Init(Tcl_Interp *interp);
1078
1079
1080
1081
1082
1083
1084 MODULE_SCOPE int Tk_BellObjCmd(ClientData clientData,
1085 Tcl_Interp *interp, int objc,
1086 Tcl_Obj *const objv[]);
1087 MODULE_SCOPE int Tk_BindObjCmd(ClientData clientData,
1088 Tcl_Interp *interp, int objc,
1089 Tcl_Obj *const objv[]);
1090 MODULE_SCOPE int Tk_BindtagsObjCmd(ClientData clientData,
1091 Tcl_Interp *interp, int objc,
1092 Tcl_Obj *const objv[]);
1093 MODULE_SCOPE int Tk_BusyObjCmd(ClientData clientData,
1094 Tcl_Interp *interp, int objc,
1095 Tcl_Obj *const objv[]);
1096 MODULE_SCOPE int Tk_ButtonObjCmd(ClientData clientData,
1097 Tcl_Interp *interp, int objc,
1098 Tcl_Obj *const objv[]);
1099 MODULE_SCOPE int Tk_CanvasObjCmd(ClientData clientData,
1100 Tcl_Interp *interp, int argc,
1101 Tcl_Obj *const objv[]);
1102 MODULE_SCOPE int Tk_CheckbuttonObjCmd(ClientData clientData,
1103 Tcl_Interp *interp, int objc,
1104 Tcl_Obj *const objv[]);
1105 MODULE_SCOPE int Tk_ClipboardObjCmd(ClientData clientData,
1106 Tcl_Interp *interp, int objc,
1107 Tcl_Obj *const objv[]);
1108 MODULE_SCOPE int Tk_ChooseColorObjCmd(ClientData clientData,
1109 Tcl_Interp *interp, int objc,
1110 Tcl_Obj *const objv[]);
1111 MODULE_SCOPE int Tk_ChooseDirectoryObjCmd(ClientData clientData,
1112 Tcl_Interp *interp, int objc,
1113 Tcl_Obj *const objv[]);
1114 MODULE_SCOPE int Tk_DestroyObjCmd(ClientData clientData,
1115 Tcl_Interp *interp, int objc,
1116 Tcl_Obj *const objv[]);
1117 MODULE_SCOPE int Tk_EntryObjCmd(ClientData clientData,
1118 Tcl_Interp *interp, int objc,
1119 Tcl_Obj *const objv[]);
1120 MODULE_SCOPE int Tk_EventObjCmd(ClientData clientData,
1121 Tcl_Interp *interp, int objc,
1122 Tcl_Obj *const objv[]);
1123 MODULE_SCOPE int Tk_FrameObjCmd(ClientData clientData,
1124 Tcl_Interp *interp, int objc,
1125 Tcl_Obj *const objv[]);
1126 MODULE_SCOPE int Tk_FocusObjCmd(ClientData clientData,
1127 Tcl_Interp *interp, int objc,
1128 Tcl_Obj *const objv[]);
1129 MODULE_SCOPE int Tk_FontObjCmd(ClientData clientData,
1130 Tcl_Interp *interp, int objc,
1131 Tcl_Obj *const objv[]);
1132 MODULE_SCOPE int Tk_GetOpenFileObjCmd(ClientData clientData,
1133 Tcl_Interp *interp, int objc,
1134 Tcl_Obj *const objv[]);
1135 MODULE_SCOPE int Tk_GetSaveFileObjCmd(ClientData clientData,
1136 Tcl_Interp *interp, int objc,
1137 Tcl_Obj *const objv[]);
1138 MODULE_SCOPE int Tk_GrabObjCmd(ClientData clientData,
1139 Tcl_Interp *interp, int objc,
1140 Tcl_Obj *const objv[]);
1141 MODULE_SCOPE int Tk_GridObjCmd(ClientData clientData,
1142 Tcl_Interp *interp, int objc,
1143 Tcl_Obj *const objv[]);
1144 MODULE_SCOPE int Tk_ImageObjCmd(ClientData clientData,
1145 Tcl_Interp *interp, int objc,
1146 Tcl_Obj *const objv[]);
1147 MODULE_SCOPE int Tk_LabelObjCmd(ClientData clientData,
1148 Tcl_Interp *interp, int objc,
1149 Tcl_Obj *const objv[]);
1150 MODULE_SCOPE int Tk_LabelframeObjCmd(ClientData clientData,
1151 Tcl_Interp *interp, int objc,
1152 Tcl_Obj *const objv[]);
1153 MODULE_SCOPE int Tk_ListboxObjCmd(ClientData clientData,
1154 Tcl_Interp *interp, int objc,
1155 Tcl_Obj *const objv[]);
1156 MODULE_SCOPE int Tk_LowerObjCmd(ClientData clientData,
1157 Tcl_Interp *interp, int objc,
1158 Tcl_Obj *const objv[]);
1159 MODULE_SCOPE int Tk_MenuObjCmd(ClientData clientData,
1160 Tcl_Interp *interp, int objc,
1161 Tcl_Obj *const objv[]);
1162 MODULE_SCOPE int Tk_MenubuttonObjCmd(ClientData clientData,
1163 Tcl_Interp *interp, int objc,
1164 Tcl_Obj *const objv[]);
1165 MODULE_SCOPE int Tk_MessageBoxObjCmd(ClientData clientData,
1166 Tcl_Interp *interp, int objc,
1167 Tcl_Obj *const objv[]);
1168 MODULE_SCOPE int Tk_MessageObjCmd(ClientData clientData,
1169 Tcl_Interp *interp, int objc,
1170 Tcl_Obj *const objv[]);
1171 MODULE_SCOPE int Tk_PanedWindowObjCmd(ClientData clientData,
1172 Tcl_Interp *interp, int objc,
1173 Tcl_Obj *const objv[]);
1174 MODULE_SCOPE int Tk_OptionObjCmd(ClientData clientData,
1175 Tcl_Interp *interp, int objc,
1176 Tcl_Obj *const objv[]);
1177 MODULE_SCOPE int Tk_PackObjCmd(ClientData clientData,
1178 Tcl_Interp *interp, int objc,
1179 Tcl_Obj *const objv[]);
1180 MODULE_SCOPE int Tk_PlaceObjCmd(ClientData clientData,
1181 Tcl_Interp *interp, int objc,
1182 Tcl_Obj *const objv[]);
1183 MODULE_SCOPE int Tk_RadiobuttonObjCmd(ClientData clientData,
1184 Tcl_Interp *interp, int objc,
1185 Tcl_Obj *const objv[]);
1186 MODULE_SCOPE int Tk_RaiseObjCmd(ClientData clientData,
1187 Tcl_Interp *interp, int objc,
1188 Tcl_Obj *const objv[]);
1189 MODULE_SCOPE int Tk_ScaleObjCmd(ClientData clientData,
1190 Tcl_Interp *interp, int objc,
1191 Tcl_Obj *const objv[]);
1192 MODULE_SCOPE int Tk_ScrollbarObjCmd(ClientData clientData,
1193 Tcl_Interp *interp, int objc,
1194 Tcl_Obj *const objv[]);
1195 MODULE_SCOPE int Tk_SelectionObjCmd(ClientData clientData,
1196 Tcl_Interp *interp, int objc,
1197 Tcl_Obj *const objv[]);
1198 MODULE_SCOPE int Tk_SendObjCmd(ClientData clientData,
1199 Tcl_Interp *interp,int objc,
1200 Tcl_Obj *const objv[]);
1201 MODULE_SCOPE int Tk_SendObjCmd(ClientData clientData,
1202 Tcl_Interp *interp, int objc,
1203 Tcl_Obj *const objv[]);
1204 MODULE_SCOPE int Tk_SpinboxObjCmd(ClientData clientData,
1205 Tcl_Interp *interp, int objc,
1206 Tcl_Obj *const objv[]);
1207 MODULE_SCOPE int Tk_TextObjCmd(ClientData clientData,
1208 Tcl_Interp *interp, int objc,
1209 Tcl_Obj *const objv[]);
1210 MODULE_SCOPE int Tk_TkwaitObjCmd(ClientData clientData,
1211 Tcl_Interp *interp, int objc,
1212 Tcl_Obj *const objv[]);
1213 MODULE_SCOPE int Tk_ToplevelObjCmd(ClientData clientData,
1214 Tcl_Interp *interp, int objc,
1215 Tcl_Obj *const objv[]);
1216 MODULE_SCOPE int Tk_UpdateObjCmd(ClientData clientData,
1217 Tcl_Interp *interp, int objc,
1218 Tcl_Obj *const objv[]);
1219 MODULE_SCOPE int Tk_WinfoObjCmd(ClientData clientData,
1220 Tcl_Interp *interp, int objc,
1221 Tcl_Obj *const objv[]);
1222 MODULE_SCOPE int Tk_WmObjCmd(ClientData clientData, Tcl_Interp *interp,
1223 int objc, Tcl_Obj *const objv[]);
1224
1225 MODULE_SCOPE int Tk_GetDoublePixelsFromObj(Tcl_Interp *interp,
1226 Tk_Window tkwin, Tcl_Obj *objPtr,
1227 double *doublePtr);
1228 #define TkSetGeometryContainer TkSetGeometryMaster
1229 MODULE_SCOPE int TkSetGeometryContainer(Tcl_Interp *interp,
1230 Tk_Window tkwin, const char *name);
1231 #define TkFreeGeometryContainer TkFreeGeometryMaster
1232 MODULE_SCOPE void TkFreeGeometryContainer(Tk_Window tkwin,
1233 const char *name);
1234
1235 MODULE_SCOPE void TkEventInit(void);
1236 MODULE_SCOPE void TkRegisterObjTypes(void);
1237 MODULE_SCOPE int TkDeadAppObjCmd(ClientData clientData,
1238 Tcl_Interp *interp, int objc, Tcl_Obj *const argv[]);
1239 MODULE_SCOPE int TkCanvasGetCoordObj(Tcl_Interp *interp,
1240 Tk_Canvas canvas, Tcl_Obj *obj,
1241 double *doublePtr);
1242 MODULE_SCOPE int TkGetDoublePixels(Tcl_Interp *interp, Tk_Window tkwin,
1243 const char *string, double *doublePtr);
1244 MODULE_SCOPE int TkPostscriptImage(Tcl_Interp *interp, Tk_Window tkwin,
1245 Tk_PostscriptInfo psInfo, XImage *ximage,
1246 int x, int y, int width, int height);
1247 MODULE_SCOPE void TkMapTopFrame(Tk_Window tkwin);
1248 MODULE_SCOPE XEvent * TkpGetBindingXEvent(Tcl_Interp *interp);
1249 MODULE_SCOPE void TkCreateExitHandler(Tcl_ExitProc *proc,
1250 ClientData clientData);
1251 MODULE_SCOPE void TkDeleteExitHandler(Tcl_ExitProc *proc,
1252 ClientData clientData);
1253 MODULE_SCOPE Tcl_ExitProc TkFinalize;
1254 MODULE_SCOPE Tcl_ExitProc TkFinalizeThread;
1255 MODULE_SCOPE void TkpBuildRegionFromAlphaData(TkRegion region,
1256 unsigned x, unsigned y, unsigned width,
1257 unsigned height, unsigned char *dataPtr,
1258 unsigned pixelStride, unsigned lineStride);
1259 MODULE_SCOPE void TkAppendPadAmount(Tcl_Obj *bufferObj,
1260 const char *buffer, int pad1, int pad2);
1261 MODULE_SCOPE int TkParsePadAmount(Tcl_Interp *interp,
1262 Tk_Window tkwin, Tcl_Obj *objPtr,
1263 int *pad1Ptr, int *pad2Ptr);
1264 MODULE_SCOPE void TkFocusSplit(TkWindow *winPtr);
1265 MODULE_SCOPE void TkFocusJoin(TkWindow *winPtr);
1266 MODULE_SCOPE int TkpAlwaysShowSelection(Tk_Window tkwin);
1267 MODULE_SCOPE void TkpDrawCharsInContext(Display * display,
1268 Drawable drawable, GC gc, Tk_Font tkfont,
1269 const char *source, int numBytes, int rangeStart,
1270 int rangeLength, int x, int y);
1271 MODULE_SCOPE void TkpDrawAngledCharsInContext(Display * display,
1272 Drawable drawable, GC gc, Tk_Font tkfont,
1273 const char *source, int numBytes, int rangeStart,
1274 int rangeLength, double x, double y, double angle);
1275 MODULE_SCOPE int TkpMeasureCharsInContext(Tk_Font tkfont,
1276 const char *source, int numBytes, int rangeStart,
1277 int rangeLength, int maxLength, int flags,
1278 int *lengthPtr);
1279 MODULE_SCOPE void TkUnderlineCharsInContext(Display *display,
1280 Drawable drawable, GC gc, Tk_Font tkfont,
1281 const char *string, int numBytes, int x, int y,
1282 int firstByte, int lastByte);
1283 MODULE_SCOPE void TkpGetFontAttrsForChar(Tk_Window tkwin, Tk_Font tkfont,
1284 int c, struct TkFontAttributes *faPtr);
1285 MODULE_SCOPE Tcl_Obj * TkNewWindowObj(Tk_Window tkwin);
1286 MODULE_SCOPE void TkpShowBusyWindow(TkBusy busy);
1287 MODULE_SCOPE void TkpHideBusyWindow(TkBusy busy);
1288 MODULE_SCOPE void TkpMakeTransparentWindowExist(Tk_Window tkwin,
1289 Window parent);
1290 MODULE_SCOPE void TkpCreateBusy(Tk_FakeWin *winPtr, Tk_Window tkRef,
1291 Window *parentPtr, Tk_Window tkParent,
1292 TkBusy busy);
1293 MODULE_SCOPE int TkBackgroundEvalObjv(Tcl_Interp *interp,
1294 int objc, Tcl_Obj *const *objv, int flags);
1295 MODULE_SCOPE void TkSendVirtualEvent(Tk_Window tgtWin,
1296 const char *eventName, Tcl_Obj *detail);
1297 MODULE_SCOPE Tcl_Command TkMakeEnsemble(Tcl_Interp *interp,
1298 const char *nsname, const char *name,
1299 ClientData clientData, const TkEnsemble *map);
1300 MODULE_SCOPE int TkInitTkCmd(Tcl_Interp *interp,
1301 ClientData clientData);
1302 MODULE_SCOPE int TkInitFontchooser(Tcl_Interp *interp,
1303 ClientData clientData);
1304 MODULE_SCOPE void TkpWarpPointer(TkDisplay *dispPtr);
1305 MODULE_SCOPE void TkpCancelWarp(TkDisplay *dispPtr);
1306 MODULE_SCOPE int TkListCreateFrame(ClientData clientData,
1307 Tcl_Interp *interp, Tcl_Obj *listObj,
1308 int toplevel, Tcl_Obj *nameObj);
1309
1310 #ifdef _WIN32
1311 #define TkParseColor XParseColor
1312 #else
1313 MODULE_SCOPE Status TkParseColor (Display * display,
1314 Colormap map, const char* spec,
1315 XColor * colorPtr);
1316 #endif
1317 #ifdef HAVE_XFT
1318 MODULE_SCOPE void TkUnixSetXftClipRegion(TkRegion clipRegion);
1319 #endif
1320
1321 #if !defined(__cplusplus) && !defined(c_plusplus)
1322 # define c_class class
1323 #endif
1324
1325 #if TCL_UTF_MAX > 4
1326 # define TkUtfToUniChar Tcl_UtfToUniChar
1327 # define TkUniCharToUtf Tcl_UniCharToUtf
1328 # define TkUtfPrev Tcl_UtfPrev
1329 # define TkUtfAtIndex Tcl_UtfAtIndex
1330 #else
1331 MODULE_SCOPE int TkUtfToUniChar(const char *, int *);
1332 MODULE_SCOPE int TkUniCharToUtf(int, char *);
1333 MODULE_SCOPE const char *TkUtfPrev(const char *, const char *);
1334 MODULE_SCOPE const char *TkUtfAtIndex(const char *src, int index);
1335 #endif
1336
1337
1338
1339
1340
1341 MODULE_SCOPE int TkUnsupported1ObjCmd(ClientData clientData,
1342 Tcl_Interp *interp, int objc,
1343 Tcl_Obj *const objv[]);
1344
1345
1346
1347
1348 MODULE_SCOPE int SquareObjCmd(ClientData clientData,
1349 Tcl_Interp *interp, int objc,
1350 Tcl_Obj * const objv[]);
1351 MODULE_SCOPE int TkOldTestInit(Tcl_Interp *interp);
1352 #if !(defined(_WIN32) || defined(MAC_OSX_TK))
1353 #define TkplatformtestInit(x) TCL_OK
1354 #else
1355 MODULE_SCOPE int TkplatformtestInit(Tcl_Interp *interp);
1356 #endif
1357
1358 #ifdef __cplusplus
1359 }
1360 #endif
1361
1362 #endif
1363
1364
1365
1366
1367
1368
1369
1370