File indexing completed on 2025-01-17 09:56:12
0001
0002
0003
0004
0005 #ifndef _TTKDECLS
0006 #define _TTKDECLS
0007
0008 #if defined(USE_TTK_STUBS)
0009
0010 extern const char *TtkInitializeStubs(
0011 Tcl_Interp *, const char *version, int epoch, int revision);
0012 #define Ttk_InitStubs(interp) TtkInitializeStubs( \
0013 interp, TTK_VERSION, TTK_STUBS_EPOCH, TTK_STUBS_REVISION)
0014 #else
0015
0016 #define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "Ttk", TTK_VERSION, 0, NULL)
0017
0018 #endif
0019
0020
0021
0022
0023 #define TTK_STUBS_EPOCH 0
0024 #define TTK_STUBS_REVISION 31
0025
0026 #ifdef __cplusplus
0027 extern "C" {
0028 #endif
0029
0030
0031
0032
0033
0034
0035 TTKAPI Ttk_Theme Ttk_GetTheme(Tcl_Interp *interp, const char *name);
0036
0037 TTKAPI Ttk_Theme Ttk_GetDefaultTheme(Tcl_Interp *interp);
0038
0039 TTKAPI Ttk_Theme Ttk_GetCurrentTheme(Tcl_Interp *interp);
0040
0041 TTKAPI Ttk_Theme Ttk_CreateTheme(Tcl_Interp *interp, const char *name,
0042 Ttk_Theme parent);
0043
0044 TTKAPI void Ttk_RegisterCleanup(Tcl_Interp *interp,
0045 void *deleteData,
0046 Ttk_CleanupProc *cleanupProc);
0047
0048 TTKAPI int Ttk_RegisterElementSpec(Ttk_Theme theme,
0049 const char *elementName,
0050 Ttk_ElementSpec *elementSpec,
0051 void *clientData);
0052
0053 TTKAPI Ttk_ElementClass * Ttk_RegisterElement(Tcl_Interp *interp,
0054 Ttk_Theme theme, const char *elementName,
0055 Ttk_ElementSpec *elementSpec,
0056 void *clientData);
0057
0058 TTKAPI int Ttk_RegisterElementFactory(Tcl_Interp *interp,
0059 const char *name,
0060 Ttk_ElementFactory factoryProc,
0061 void *clientData);
0062
0063 TTKAPI void Ttk_RegisterLayout(Ttk_Theme theme,
0064 const char *className,
0065 Ttk_LayoutSpec layoutSpec);
0066
0067
0068 TTKAPI int Ttk_GetStateSpecFromObj(Tcl_Interp *interp,
0069 Tcl_Obj *objPtr, Ttk_StateSpec *spec_rtn);
0070
0071 TTKAPI Tcl_Obj * Ttk_NewStateSpecObj(unsigned int onbits,
0072 unsigned int offbits);
0073
0074 TTKAPI Ttk_StateMap Ttk_GetStateMapFromObj(Tcl_Interp *interp,
0075 Tcl_Obj *objPtr);
0076
0077 TTKAPI Tcl_Obj * Ttk_StateMapLookup(Tcl_Interp *interp,
0078 Ttk_StateMap map, Ttk_State state);
0079
0080 TTKAPI int Ttk_StateTableLookup(Ttk_StateTable map[],
0081 Ttk_State state);
0082
0083
0084
0085
0086
0087
0088 TTKAPI int Ttk_GetPaddingFromObj(Tcl_Interp *interp,
0089 Tk_Window tkwin, Tcl_Obj *objPtr,
0090 Ttk_Padding *pad_rtn);
0091
0092 TTKAPI int Ttk_GetBorderFromObj(Tcl_Interp *interp,
0093 Tcl_Obj *objPtr, Ttk_Padding *pad_rtn);
0094
0095 TTKAPI int Ttk_GetStickyFromObj(Tcl_Interp *interp,
0096 Tcl_Obj *objPtr, Ttk_Sticky *sticky_rtn);
0097
0098 TTKAPI Ttk_Padding Ttk_MakePadding(short l, short t, short r, short b);
0099
0100 TTKAPI Ttk_Padding Ttk_UniformPadding(short borderWidth);
0101
0102 TTKAPI Ttk_Padding Ttk_AddPadding(Ttk_Padding pad1, Ttk_Padding pad2);
0103
0104 TTKAPI Ttk_Padding Ttk_RelievePadding(Ttk_Padding padding, int relief,
0105 int n);
0106
0107 TTKAPI Ttk_Box Ttk_MakeBox(int x, int y, int width, int height);
0108
0109 TTKAPI int Ttk_BoxContains(Ttk_Box box, int x, int y);
0110
0111 TTKAPI Ttk_Box Ttk_PackBox(Ttk_Box *cavity, int w, int h,
0112 Ttk_Side side);
0113
0114 TTKAPI Ttk_Box Ttk_StickBox(Ttk_Box parcel, int w, int h,
0115 Ttk_Sticky sticky);
0116
0117 TTKAPI Ttk_Box Ttk_AnchorBox(Ttk_Box parcel, int w, int h,
0118 Tk_Anchor anchor);
0119
0120 TTKAPI Ttk_Box Ttk_PadBox(Ttk_Box b, Ttk_Padding p);
0121
0122 TTKAPI Ttk_Box Ttk_ExpandBox(Ttk_Box b, Ttk_Padding p);
0123
0124 TTKAPI Ttk_Box Ttk_PlaceBox(Ttk_Box *cavity, int w, int h,
0125 Ttk_Side side, Ttk_Sticky sticky);
0126
0127 TTKAPI Tcl_Obj * Ttk_NewBoxObj(Ttk_Box box);
0128
0129
0130
0131
0132
0133 TTKAPI int Ttk_GetOrientFromObj(Tcl_Interp *interp,
0134 Tcl_Obj *objPtr, int *orient);
0135
0136 typedef struct TtkStubs {
0137 int magic;
0138 int epoch;
0139 int revision;
0140 void *hooks;
0141
0142 Ttk_Theme (*ttk_GetTheme) (Tcl_Interp *interp, const char *name);
0143 Ttk_Theme (*ttk_GetDefaultTheme) (Tcl_Interp *interp);
0144 Ttk_Theme (*ttk_GetCurrentTheme) (Tcl_Interp *interp);
0145 Ttk_Theme (*ttk_CreateTheme) (Tcl_Interp *interp, const char *name, Ttk_Theme parent);
0146 void (*ttk_RegisterCleanup) (Tcl_Interp *interp, void *deleteData, Ttk_CleanupProc *cleanupProc);
0147 int (*ttk_RegisterElementSpec) (Ttk_Theme theme, const char *elementName, Ttk_ElementSpec *elementSpec, void *clientData);
0148 Ttk_ElementClass * (*ttk_RegisterElement) (Tcl_Interp *interp, Ttk_Theme theme, const char *elementName, Ttk_ElementSpec *elementSpec, void *clientData);
0149 int (*ttk_RegisterElementFactory) (Tcl_Interp *interp, const char *name, Ttk_ElementFactory factoryProc, void *clientData);
0150 void (*ttk_RegisterLayout) (Ttk_Theme theme, const char *className, Ttk_LayoutSpec layoutSpec);
0151 void (*reserved9)(void);
0152 int (*ttk_GetStateSpecFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_StateSpec *spec_rtn);
0153 Tcl_Obj * (*ttk_NewStateSpecObj) (unsigned int onbits, unsigned int offbits);
0154 Ttk_StateMap (*ttk_GetStateMapFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr);
0155 Tcl_Obj * (*ttk_StateMapLookup) (Tcl_Interp *interp, Ttk_StateMap map, Ttk_State state);
0156 int (*ttk_StateTableLookup) (Ttk_StateTable map[], Ttk_State state);
0157 void (*reserved15)(void);
0158 void (*reserved16)(void);
0159 void (*reserved17)(void);
0160 void (*reserved18)(void);
0161 void (*reserved19)(void);
0162 int (*ttk_GetPaddingFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Ttk_Padding *pad_rtn);
0163 int (*ttk_GetBorderFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Padding *pad_rtn);
0164 int (*ttk_GetStickyFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Sticky *sticky_rtn);
0165 Ttk_Padding (*ttk_MakePadding) (short l, short t, short r, short b);
0166 Ttk_Padding (*ttk_UniformPadding) (short borderWidth);
0167 Ttk_Padding (*ttk_AddPadding) (Ttk_Padding pad1, Ttk_Padding pad2);
0168 Ttk_Padding (*ttk_RelievePadding) (Ttk_Padding padding, int relief, int n);
0169 Ttk_Box (*ttk_MakeBox) (int x, int y, int width, int height);
0170 int (*ttk_BoxContains) (Ttk_Box box, int x, int y);
0171 Ttk_Box (*ttk_PackBox) (Ttk_Box *cavity, int w, int h, Ttk_Side side);
0172 Ttk_Box (*ttk_StickBox) (Ttk_Box parcel, int w, int h, Ttk_Sticky sticky);
0173 Ttk_Box (*ttk_AnchorBox) (Ttk_Box parcel, int w, int h, Tk_Anchor anchor);
0174 Ttk_Box (*ttk_PadBox) (Ttk_Box b, Ttk_Padding p);
0175 Ttk_Box (*ttk_ExpandBox) (Ttk_Box b, Ttk_Padding p);
0176 Ttk_Box (*ttk_PlaceBox) (Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky);
0177 Tcl_Obj * (*ttk_NewBoxObj) (Ttk_Box box);
0178 void (*reserved36)(void);
0179 void (*reserved37)(void);
0180 void (*reserved38)(void);
0181 void (*reserved39)(void);
0182 int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient);
0183 } TtkStubs;
0184
0185 extern const TtkStubs *ttkStubsPtr;
0186
0187 #ifdef __cplusplus
0188 }
0189 #endif
0190
0191 #if defined(USE_TTK_STUBS)
0192
0193
0194
0195
0196
0197 #define Ttk_GetTheme \
0198 (ttkStubsPtr->ttk_GetTheme)
0199 #define Ttk_GetDefaultTheme \
0200 (ttkStubsPtr->ttk_GetDefaultTheme)
0201 #define Ttk_GetCurrentTheme \
0202 (ttkStubsPtr->ttk_GetCurrentTheme)
0203 #define Ttk_CreateTheme \
0204 (ttkStubsPtr->ttk_CreateTheme)
0205 #define Ttk_RegisterCleanup \
0206 (ttkStubsPtr->ttk_RegisterCleanup)
0207 #define Ttk_RegisterElementSpec \
0208 (ttkStubsPtr->ttk_RegisterElementSpec)
0209 #define Ttk_RegisterElement \
0210 (ttkStubsPtr->ttk_RegisterElement)
0211 #define Ttk_RegisterElementFactory \
0212 (ttkStubsPtr->ttk_RegisterElementFactory)
0213 #define Ttk_RegisterLayout \
0214 (ttkStubsPtr->ttk_RegisterLayout)
0215
0216 #define Ttk_GetStateSpecFromObj \
0217 (ttkStubsPtr->ttk_GetStateSpecFromObj)
0218 #define Ttk_NewStateSpecObj \
0219 (ttkStubsPtr->ttk_NewStateSpecObj)
0220 #define Ttk_GetStateMapFromObj \
0221 (ttkStubsPtr->ttk_GetStateMapFromObj)
0222 #define Ttk_StateMapLookup \
0223 (ttkStubsPtr->ttk_StateMapLookup)
0224 #define Ttk_StateTableLookup \
0225 (ttkStubsPtr->ttk_StateTableLookup)
0226
0227
0228
0229
0230
0231 #define Ttk_GetPaddingFromObj \
0232 (ttkStubsPtr->ttk_GetPaddingFromObj)
0233 #define Ttk_GetBorderFromObj \
0234 (ttkStubsPtr->ttk_GetBorderFromObj)
0235 #define Ttk_GetStickyFromObj \
0236 (ttkStubsPtr->ttk_GetStickyFromObj)
0237 #define Ttk_MakePadding \
0238 (ttkStubsPtr->ttk_MakePadding)
0239 #define Ttk_UniformPadding \
0240 (ttkStubsPtr->ttk_UniformPadding)
0241 #define Ttk_AddPadding \
0242 (ttkStubsPtr->ttk_AddPadding)
0243 #define Ttk_RelievePadding \
0244 (ttkStubsPtr->ttk_RelievePadding)
0245 #define Ttk_MakeBox \
0246 (ttkStubsPtr->ttk_MakeBox)
0247 #define Ttk_BoxContains \
0248 (ttkStubsPtr->ttk_BoxContains)
0249 #define Ttk_PackBox \
0250 (ttkStubsPtr->ttk_PackBox)
0251 #define Ttk_StickBox \
0252 (ttkStubsPtr->ttk_StickBox)
0253 #define Ttk_AnchorBox \
0254 (ttkStubsPtr->ttk_AnchorBox)
0255 #define Ttk_PadBox \
0256 (ttkStubsPtr->ttk_PadBox)
0257 #define Ttk_ExpandBox \
0258 (ttkStubsPtr->ttk_ExpandBox)
0259 #define Ttk_PlaceBox \
0260 (ttkStubsPtr->ttk_PlaceBox)
0261 #define Ttk_NewBoxObj \
0262 (ttkStubsPtr->ttk_NewBoxObj)
0263
0264
0265
0266
0267 #define Ttk_GetOrientFromObj \
0268 (ttkStubsPtr->ttk_GetOrientFromObj)
0269
0270 #endif
0271
0272
0273
0274 #endif