| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#ifndef _TKPLATDECLS |
| 15 |
#define _TKPLATDECLS |
| 16 |
|
| 17 |
#ifdef BUILD_tk |
| 18 |
#undef TCL_STORAGE_CLASS |
| 19 |
#define TCL_STORAGE_CLASS DLLEXPORT |
| 20 |
#endif |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
#ifdef __WIN32__ |
| 35 |
|
| 36 |
EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin, |
| 37 |
HWND hwnd)); |
| 38 |
|
| 39 |
EXTERN HINSTANCE Tk_GetHINSTANCE _ANSI_ARGS_((void)); |
| 40 |
|
| 41 |
EXTERN HWND Tk_GetHWND _ANSI_ARGS_((Window window)); |
| 42 |
|
| 43 |
EXTERN Tk_Window Tk_HWNDToWindow _ANSI_ARGS_((HWND hwnd)); |
| 44 |
|
| 45 |
EXTERN void Tk_PointerEvent _ANSI_ARGS_((HWND hwnd, int x, int y)); |
| 46 |
|
| 47 |
EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd, |
| 48 |
UINT message, WPARAM wParam, LPARAM lParam, |
| 49 |
LRESULT * result)); |
| 50 |
#endif |
| 51 |
#ifdef MAC_TCL |
| 52 |
|
| 53 |
EXTERN void Tk_MacSetEmbedHandler _ANSI_ARGS_(( |
| 54 |
Tk_MacEmbedRegisterWinProc * registerWinProcPtr, |
| 55 |
Tk_MacEmbedGetGrafPortProc * getPortProcPtr, |
| 56 |
Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr, |
| 57 |
Tk_MacEmbedGetClipProc * getClipProc, |
| 58 |
Tk_MacEmbedGetOffsetInParentProc * getOffsetProc)); |
| 59 |
|
| 60 |
EXTERN void Tk_MacTurnOffMenus _ANSI_ARGS_((void)); |
| 61 |
|
| 62 |
EXTERN void Tk_MacTkOwnsCursor _ANSI_ARGS_((int tkOwnsIt)); |
| 63 |
|
| 64 |
EXTERN void TkMacInitMenus _ANSI_ARGS_((Tcl_Interp * interp)); |
| 65 |
|
| 66 |
EXTERN void TkMacInitAppleEvents _ANSI_ARGS_(( |
| 67 |
Tcl_Interp * interp)); |
| 68 |
|
| 69 |
EXTERN int TkMacConvertEvent _ANSI_ARGS_(( |
| 70 |
EventRecord * eventPtr)); |
| 71 |
|
| 72 |
EXTERN int TkMacConvertTkEvent _ANSI_ARGS_(( |
| 73 |
EventRecord * eventPtr, Window window)); |
| 74 |
|
| 75 |
EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin, |
| 76 |
int x, int y, int width, int height, |
| 77 |
int flags)); |
| 78 |
|
| 79 |
EXTERN void TkMacInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr)); |
| 80 |
|
| 81 |
EXTERN int TkMacHaveAppearance _ANSI_ARGS_((void)); |
| 82 |
|
| 83 |
EXTERN GWorldPtr TkMacGetDrawablePort _ANSI_ARGS_((Drawable drawable)); |
| 84 |
#endif |
| 85 |
#ifdef MAC_OSX_TK |
| 86 |
|
| 87 |
EXTERN void Tk_MacOSXSetEmbedHandler _ANSI_ARGS_(( |
| 88 |
Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr, |
| 89 |
Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr, |
| 90 |
Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr, |
| 91 |
Tk_MacOSXEmbedGetClipProc * getClipProc, |
| 92 |
Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc)); |
| 93 |
|
| 94 |
EXTERN void Tk_MacOSXTurnOffMenus _ANSI_ARGS_((void)); |
| 95 |
|
| 96 |
EXTERN void Tk_MacOSXTkOwnsCursor _ANSI_ARGS_((int tkOwnsIt)); |
| 97 |
|
| 98 |
EXTERN void TkMacOSXInitMenus _ANSI_ARGS_((Tcl_Interp * interp)); |
| 99 |
|
| 100 |
EXTERN void TkMacOSXInitAppleEvents _ANSI_ARGS_(( |
| 101 |
Tcl_Interp * interp)); |
| 102 |
|
| 103 |
EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin, |
| 104 |
int x, int y, int width, int height, |
| 105 |
int flags)); |
| 106 |
|
| 107 |
EXTERN void TkMacOSXInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr)); |
| 108 |
|
| 109 |
EXTERN GWorldPtr TkMacOSXGetDrawablePort _ANSI_ARGS_(( |
| 110 |
Drawable drawable)); |
| 111 |
|
| 112 |
EXTERN ControlRef TkMacOSXGetRootControl _ANSI_ARGS_(( |
| 113 |
Drawable drawable)); |
| 114 |
|
| 115 |
EXTERN void Tk_MacOSXSetupTkNotifier _ANSI_ARGS_((void)); |
| 116 |
|
| 117 |
EXTERN int Tk_MacOSXIsAppInFront _ANSI_ARGS_((void)); |
| 118 |
#endif |
| 119 |
|
| 120 |
typedef struct TkPlatStubs { |
| 121 |
int magic; |
| 122 |
struct TkPlatStubHooks *hooks; |
| 123 |
|
| 124 |
#ifdef __WIN32__ |
| 125 |
Window (*tk_AttachHWND) _ANSI_ARGS_((Tk_Window tkwin, HWND hwnd)); |
| 126 |
HINSTANCE (*tk_GetHINSTANCE) _ANSI_ARGS_((void)); |
| 127 |
HWND (*tk_GetHWND) _ANSI_ARGS_((Window window)); |
| 128 |
Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((HWND hwnd)); |
| 129 |
void (*tk_PointerEvent) _ANSI_ARGS_((HWND hwnd, int x, int y)); |
| 130 |
int (*tk_TranslateWinEvent) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result)); |
| 131 |
#endif |
| 132 |
#ifdef MAC_TCL |
| 133 |
void (*tk_MacSetEmbedHandler) _ANSI_ARGS_((Tk_MacEmbedRegisterWinProc * registerWinProcPtr, Tk_MacEmbedGetGrafPortProc * getPortProcPtr, Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacEmbedGetClipProc * getClipProc, Tk_MacEmbedGetOffsetInParentProc * getOffsetProc)); |
| 134 |
void (*tk_MacTurnOffMenus) _ANSI_ARGS_((void)); |
| 135 |
void (*tk_MacTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt)); |
| 136 |
void (*tkMacInitMenus) _ANSI_ARGS_((Tcl_Interp * interp)); |
| 137 |
void (*tkMacInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp)); |
| 138 |
int (*tkMacConvertEvent) _ANSI_ARGS_((EventRecord * eventPtr)); |
| 139 |
int (*tkMacConvertTkEvent) _ANSI_ARGS_((EventRecord * eventPtr, Window window)); |
| 140 |
void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags)); |
| 141 |
void (*tkMacInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr)); |
| 142 |
int (*tkMacHaveAppearance) _ANSI_ARGS_((void)); |
| 143 |
GWorldPtr (*tkMacGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); |
| 144 |
#endif |
| 145 |
#ifdef MAC_OSX_TK |
| 146 |
void (*tk_MacOSXSetEmbedHandler) _ANSI_ARGS_((Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacOSXEmbedGetClipProc * getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc)); |
| 147 |
void (*tk_MacOSXTurnOffMenus) _ANSI_ARGS_((void)); |
| 148 |
void (*tk_MacOSXTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt)); |
| 149 |
void (*tkMacOSXInitMenus) _ANSI_ARGS_((Tcl_Interp * interp)); |
| 150 |
void (*tkMacOSXInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp)); |
| 151 |
void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags)); |
| 152 |
void (*tkMacOSXInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr)); |
| 153 |
GWorldPtr (*tkMacOSXGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); |
| 154 |
ControlRef (*tkMacOSXGetRootControl) _ANSI_ARGS_((Drawable drawable)); |
| 155 |
void (*tk_MacOSXSetupTkNotifier) _ANSI_ARGS_((void)); |
| 156 |
int (*tk_MacOSXIsAppInFront) _ANSI_ARGS_((void)); |
| 157 |
#endif |
| 158 |
} TkPlatStubs; |
| 159 |
|
| 160 |
#ifdef __cplusplus |
| 161 |
extern "C" { |
| 162 |
#endif |
| 163 |
extern TkPlatStubs *tkPlatStubsPtr; |
| 164 |
#ifdef __cplusplus |
| 165 |
} |
| 166 |
#endif |
| 167 |
|
| 168 |
#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
#ifdef __WIN32__ |
| 175 |
#ifndef Tk_AttachHWND |
| 176 |
#define Tk_AttachHWND \ |
| 177 |
(tkPlatStubsPtr->tk_AttachHWND) |
| 178 |
#endif |
| 179 |
#ifndef Tk_GetHINSTANCE |
| 180 |
#define Tk_GetHINSTANCE \ |
| 181 |
(tkPlatStubsPtr->tk_GetHINSTANCE) |
| 182 |
#endif |
| 183 |
#ifndef Tk_GetHWND |
| 184 |
#define Tk_GetHWND \ |
| 185 |
(tkPlatStubsPtr->tk_GetHWND) |
| 186 |
#endif |
| 187 |
#ifndef Tk_HWNDToWindow |
| 188 |
#define Tk_HWNDToWindow \ |
| 189 |
(tkPlatStubsPtr->tk_HWNDToWindow) |
| 190 |
#endif |
| 191 |
#ifndef Tk_PointerEvent |
| 192 |
#define Tk_PointerEvent \ |
| 193 |
(tkPlatStubsPtr->tk_PointerEvent) |
| 194 |
#endif |
| 195 |
#ifndef Tk_TranslateWinEvent |
| 196 |
#define Tk_TranslateWinEvent \ |
| 197 |
(tkPlatStubsPtr->tk_TranslateWinEvent) |
| 198 |
#endif |
| 199 |
#endif |
| 200 |
#ifdef MAC_TCL |
| 201 |
#ifndef Tk_MacSetEmbedHandler |
| 202 |
#define Tk_MacSetEmbedHandler \ |
| 203 |
(tkPlatStubsPtr->tk_MacSetEmbedHandler) |
| 204 |
#endif |
| 205 |
#ifndef Tk_MacTurnOffMenus |
| 206 |
#define Tk_MacTurnOffMenus \ |
| 207 |
(tkPlatStubsPtr->tk_MacTurnOffMenus) |
| 208 |
#endif |
| 209 |
#ifndef Tk_MacTkOwnsCursor |
| 210 |
#define Tk_MacTkOwnsCursor \ |
| 211 |
(tkPlatStubsPtr->tk_MacTkOwnsCursor) |
| 212 |
#endif |
| 213 |
#ifndef TkMacInitMenus |
| 214 |
#define TkMacInitMenus \ |
| 215 |
(tkPlatStubsPtr->tkMacInitMenus) |
| 216 |
#endif |
| 217 |
#ifndef TkMacInitAppleEvents |
| 218 |
#define TkMacInitAppleEvents \ |
| 219 |
(tkPlatStubsPtr->tkMacInitAppleEvents) |
| 220 |
#endif |
| 221 |
#ifndef TkMacConvertEvent |
| 222 |
#define TkMacConvertEvent \ |
| 223 |
(tkPlatStubsPtr->tkMacConvertEvent) |
| 224 |
#endif |
| 225 |
#ifndef TkMacConvertTkEvent |
| 226 |
#define TkMacConvertTkEvent \ |
| 227 |
(tkPlatStubsPtr->tkMacConvertTkEvent) |
| 228 |
#endif |
| 229 |
#ifndef TkGenWMConfigureEvent |
| 230 |
#define TkGenWMConfigureEvent \ |
| 231 |
(tkPlatStubsPtr->tkGenWMConfigureEvent) |
| 232 |
#endif |
| 233 |
#ifndef TkMacInvalClipRgns |
| 234 |
#define TkMacInvalClipRgns \ |
| 235 |
(tkPlatStubsPtr->tkMacInvalClipRgns) |
| 236 |
#endif |
| 237 |
#ifndef TkMacHaveAppearance |
| 238 |
#define TkMacHaveAppearance \ |
| 239 |
(tkPlatStubsPtr->tkMacHaveAppearance) |
| 240 |
#endif |
| 241 |
#ifndef TkMacGetDrawablePort |
| 242 |
#define TkMacGetDrawablePort \ |
| 243 |
(tkPlatStubsPtr->tkMacGetDrawablePort) |
| 244 |
#endif |
| 245 |
#endif |
| 246 |
#ifdef MAC_OSX_TK |
| 247 |
#ifndef Tk_MacOSXSetEmbedHandler |
| 248 |
#define Tk_MacOSXSetEmbedHandler \ |
| 249 |
(tkPlatStubsPtr->tk_MacOSXSetEmbedHandler) |
| 250 |
#endif |
| 251 |
#ifndef Tk_MacOSXTurnOffMenus |
| 252 |
#define Tk_MacOSXTurnOffMenus \ |
| 253 |
(tkPlatStubsPtr->tk_MacOSXTurnOffMenus) |
| 254 |
#endif |
| 255 |
#ifndef Tk_MacOSXTkOwnsCursor |
| 256 |
#define Tk_MacOSXTkOwnsCursor \ |
| 257 |
(tkPlatStubsPtr->tk_MacOSXTkOwnsCursor) |
| 258 |
#endif |
| 259 |
#ifndef TkMacOSXInitMenus |
| 260 |
#define TkMacOSXInitMenus \ |
| 261 |
(tkPlatStubsPtr->tkMacOSXInitMenus) |
| 262 |
#endif |
| 263 |
#ifndef TkMacOSXInitAppleEvents |
| 264 |
#define TkMacOSXInitAppleEvents \ |
| 265 |
(tkPlatStubsPtr->tkMacOSXInitAppleEvents) |
| 266 |
#endif |
| 267 |
#ifndef TkGenWMConfigureEvent |
| 268 |
#define TkGenWMConfigureEvent \ |
| 269 |
(tkPlatStubsPtr->tkGenWMConfigureEvent) |
| 270 |
#endif |
| 271 |
#ifndef TkMacOSXInvalClipRgns |
| 272 |
#define TkMacOSXInvalClipRgns \ |
| 273 |
(tkPlatStubsPtr->tkMacOSXInvalClipRgns) |
| 274 |
#endif |
| 275 |
#ifndef TkMacOSXGetDrawablePort |
| 276 |
#define TkMacOSXGetDrawablePort \ |
| 277 |
(tkPlatStubsPtr->tkMacOSXGetDrawablePort) |
| 278 |
#endif |
| 279 |
#ifndef TkMacOSXGetRootControl |
| 280 |
#define TkMacOSXGetRootControl \ |
| 281 |
(tkPlatStubsPtr->tkMacOSXGetRootControl) |
| 282 |
#endif |
| 283 |
#ifndef Tk_MacOSXSetupTkNotifier |
| 284 |
#define Tk_MacOSXSetupTkNotifier \ |
| 285 |
(tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) |
| 286 |
#endif |
| 287 |
#ifndef Tk_MacOSXIsAppInFront |
| 288 |
#define Tk_MacOSXIsAppInFront \ |
| 289 |
(tkPlatStubsPtr->tk_MacOSXIsAppInFront) |
| 290 |
#endif |
| 291 |
#endif |
| 292 |
|
| 293 |
#endif |
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
#undef TCL_STORAGE_CLASS |
| 298 |
#define TCL_STORAGE_CLASS DLLIMPORT |
| 299 |
|
| 300 |
#endif |