Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | /* |
2 | * tkPlatDecls.h -- | |
3 | * | |
4 | * Declarations of functions in the platform-specific public Tcl API. | |
5 | * | |
6 | * Copyright (c) 1998-1999 by Scriptics Corporation. | |
7 | * | |
8 | * See the file "license.terms" for information on usage and redistribution | |
9 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. | |
10 | * | |
11 | * RCS: @(#) $Id: tkPlatDecls.h,v 1.7 2002/08/31 06:12:23 das Exp $ | |
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 | * WARNING: This file is automatically generated by the tools/genStubs.tcl | |
24 | * script. Any modifications to the function declarations below should be made | |
25 | * in the generic/tk.decls script. | |
26 | */ | |
27 | ||
28 | /* !BEGIN!: Do not edit below this line. */ | |
29 | ||
30 | /* | |
31 | * Exported function declarations: | |
32 | */ | |
33 | ||
34 | #ifdef __WIN32__ | |
35 | /* 0 */ | |
36 | EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin, | |
37 | HWND hwnd)); | |
38 | /* 1 */ | |
39 | EXTERN HINSTANCE Tk_GetHINSTANCE _ANSI_ARGS_((void)); | |
40 | /* 2 */ | |
41 | EXTERN HWND Tk_GetHWND _ANSI_ARGS_((Window window)); | |
42 | /* 3 */ | |
43 | EXTERN Tk_Window Tk_HWNDToWindow _ANSI_ARGS_((HWND hwnd)); | |
44 | /* 4 */ | |
45 | EXTERN void Tk_PointerEvent _ANSI_ARGS_((HWND hwnd, int x, int y)); | |
46 | /* 5 */ | |
47 | EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd, | |
48 | UINT message, WPARAM wParam, LPARAM lParam, | |
49 | LRESULT * result)); | |
50 | #endif /* __WIN32__ */ | |
51 | #ifdef MAC_TCL | |
52 | /* 0 */ | |
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 | /* 1 */ | |
60 | EXTERN void Tk_MacTurnOffMenus _ANSI_ARGS_((void)); | |
61 | /* 2 */ | |
62 | EXTERN void Tk_MacTkOwnsCursor _ANSI_ARGS_((int tkOwnsIt)); | |
63 | /* 3 */ | |
64 | EXTERN void TkMacInitMenus _ANSI_ARGS_((Tcl_Interp * interp)); | |
65 | /* 4 */ | |
66 | EXTERN void TkMacInitAppleEvents _ANSI_ARGS_(( | |
67 | Tcl_Interp * interp)); | |
68 | /* 5 */ | |
69 | EXTERN int TkMacConvertEvent _ANSI_ARGS_(( | |
70 | EventRecord * eventPtr)); | |
71 | /* 6 */ | |
72 | EXTERN int TkMacConvertTkEvent _ANSI_ARGS_(( | |
73 | EventRecord * eventPtr, Window window)); | |
74 | /* 7 */ | |
75 | EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin, | |
76 | int x, int y, int width, int height, | |
77 | int flags)); | |
78 | /* 8 */ | |
79 | EXTERN void TkMacInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr)); | |
80 | /* 9 */ | |
81 | EXTERN int TkMacHaveAppearance _ANSI_ARGS_((void)); | |
82 | /* 10 */ | |
83 | EXTERN GWorldPtr TkMacGetDrawablePort _ANSI_ARGS_((Drawable drawable)); | |
84 | #endif /* MAC_TCL */ | |
85 | #ifdef MAC_OSX_TK | |
86 | /* 0 */ | |
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 | /* 1 */ | |
94 | EXTERN void Tk_MacOSXTurnOffMenus _ANSI_ARGS_((void)); | |
95 | /* 2 */ | |
96 | EXTERN void Tk_MacOSXTkOwnsCursor _ANSI_ARGS_((int tkOwnsIt)); | |
97 | /* 3 */ | |
98 | EXTERN void TkMacOSXInitMenus _ANSI_ARGS_((Tcl_Interp * interp)); | |
99 | /* 4 */ | |
100 | EXTERN void TkMacOSXInitAppleEvents _ANSI_ARGS_(( | |
101 | Tcl_Interp * interp)); | |
102 | /* 5 */ | |
103 | EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin, | |
104 | int x, int y, int width, int height, | |
105 | int flags)); | |
106 | /* 6 */ | |
107 | EXTERN void TkMacOSXInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr)); | |
108 | /* 7 */ | |
109 | EXTERN GWorldPtr TkMacOSXGetDrawablePort _ANSI_ARGS_(( | |
110 | Drawable drawable)); | |
111 | /* 8 */ | |
112 | EXTERN ControlRef TkMacOSXGetRootControl _ANSI_ARGS_(( | |
113 | Drawable drawable)); | |
114 | /* 9 */ | |
115 | EXTERN void Tk_MacOSXSetupTkNotifier _ANSI_ARGS_((void)); | |
116 | /* 10 */ | |
117 | EXTERN int Tk_MacOSXIsAppInFront _ANSI_ARGS_((void)); | |
118 | #endif /* MAC_OSX_TK */ | |
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)); /* 0 */ | |
126 | HINSTANCE (*tk_GetHINSTANCE) _ANSI_ARGS_((void)); /* 1 */ | |
127 | HWND (*tk_GetHWND) _ANSI_ARGS_((Window window)); /* 2 */ | |
128 | Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((HWND hwnd)); /* 3 */ | |
129 | void (*tk_PointerEvent) _ANSI_ARGS_((HWND hwnd, int x, int y)); /* 4 */ | |
130 | int (*tk_TranslateWinEvent) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result)); /* 5 */ | |
131 | #endif /* __WIN32__ */ | |
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)); /* 0 */ | |
134 | void (*tk_MacTurnOffMenus) _ANSI_ARGS_((void)); /* 1 */ | |
135 | void (*tk_MacTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt)); /* 2 */ | |
136 | void (*tkMacInitMenus) _ANSI_ARGS_((Tcl_Interp * interp)); /* 3 */ | |
137 | void (*tkMacInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp)); /* 4 */ | |
138 | int (*tkMacConvertEvent) _ANSI_ARGS_((EventRecord * eventPtr)); /* 5 */ | |
139 | int (*tkMacConvertTkEvent) _ANSI_ARGS_((EventRecord * eventPtr, Window window)); /* 6 */ | |
140 | void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags)); /* 7 */ | |
141 | void (*tkMacInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr)); /* 8 */ | |
142 | int (*tkMacHaveAppearance) _ANSI_ARGS_((void)); /* 9 */ | |
143 | GWorldPtr (*tkMacGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); /* 10 */ | |
144 | #endif /* MAC_TCL */ | |
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)); /* 0 */ | |
147 | void (*tk_MacOSXTurnOffMenus) _ANSI_ARGS_((void)); /* 1 */ | |
148 | void (*tk_MacOSXTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt)); /* 2 */ | |
149 | void (*tkMacOSXInitMenus) _ANSI_ARGS_((Tcl_Interp * interp)); /* 3 */ | |
150 | void (*tkMacOSXInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp)); /* 4 */ | |
151 | void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags)); /* 5 */ | |
152 | void (*tkMacOSXInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr)); /* 6 */ | |
153 | GWorldPtr (*tkMacOSXGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); /* 7 */ | |
154 | ControlRef (*tkMacOSXGetRootControl) _ANSI_ARGS_((Drawable drawable)); /* 8 */ | |
155 | void (*tk_MacOSXSetupTkNotifier) _ANSI_ARGS_((void)); /* 9 */ | |
156 | int (*tk_MacOSXIsAppInFront) _ANSI_ARGS_((void)); /* 10 */ | |
157 | #endif /* MAC_OSX_TK */ | |
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 | * Inline function declarations: | |
172 | */ | |
173 | ||
174 | #ifdef __WIN32__ | |
175 | #ifndef Tk_AttachHWND | |
176 | #define Tk_AttachHWND \ | |
177 | (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ | |
178 | #endif | |
179 | #ifndef Tk_GetHINSTANCE | |
180 | #define Tk_GetHINSTANCE \ | |
181 | (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ | |
182 | #endif | |
183 | #ifndef Tk_GetHWND | |
184 | #define Tk_GetHWND \ | |
185 | (tkPlatStubsPtr->tk_GetHWND) /* 2 */ | |
186 | #endif | |
187 | #ifndef Tk_HWNDToWindow | |
188 | #define Tk_HWNDToWindow \ | |
189 | (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ | |
190 | #endif | |
191 | #ifndef Tk_PointerEvent | |
192 | #define Tk_PointerEvent \ | |
193 | (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ | |
194 | #endif | |
195 | #ifndef Tk_TranslateWinEvent | |
196 | #define Tk_TranslateWinEvent \ | |
197 | (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ | |
198 | #endif | |
199 | #endif /* __WIN32__ */ | |
200 | #ifdef MAC_TCL | |
201 | #ifndef Tk_MacSetEmbedHandler | |
202 | #define Tk_MacSetEmbedHandler \ | |
203 | (tkPlatStubsPtr->tk_MacSetEmbedHandler) /* 0 */ | |
204 | #endif | |
205 | #ifndef Tk_MacTurnOffMenus | |
206 | #define Tk_MacTurnOffMenus \ | |
207 | (tkPlatStubsPtr->tk_MacTurnOffMenus) /* 1 */ | |
208 | #endif | |
209 | #ifndef Tk_MacTkOwnsCursor | |
210 | #define Tk_MacTkOwnsCursor \ | |
211 | (tkPlatStubsPtr->tk_MacTkOwnsCursor) /* 2 */ | |
212 | #endif | |
213 | #ifndef TkMacInitMenus | |
214 | #define TkMacInitMenus \ | |
215 | (tkPlatStubsPtr->tkMacInitMenus) /* 3 */ | |
216 | #endif | |
217 | #ifndef TkMacInitAppleEvents | |
218 | #define TkMacInitAppleEvents \ | |
219 | (tkPlatStubsPtr->tkMacInitAppleEvents) /* 4 */ | |
220 | #endif | |
221 | #ifndef TkMacConvertEvent | |
222 | #define TkMacConvertEvent \ | |
223 | (tkPlatStubsPtr->tkMacConvertEvent) /* 5 */ | |
224 | #endif | |
225 | #ifndef TkMacConvertTkEvent | |
226 | #define TkMacConvertTkEvent \ | |
227 | (tkPlatStubsPtr->tkMacConvertTkEvent) /* 6 */ | |
228 | #endif | |
229 | #ifndef TkGenWMConfigureEvent | |
230 | #define TkGenWMConfigureEvent \ | |
231 | (tkPlatStubsPtr->tkGenWMConfigureEvent) /* 7 */ | |
232 | #endif | |
233 | #ifndef TkMacInvalClipRgns | |
234 | #define TkMacInvalClipRgns \ | |
235 | (tkPlatStubsPtr->tkMacInvalClipRgns) /* 8 */ | |
236 | #endif | |
237 | #ifndef TkMacHaveAppearance | |
238 | #define TkMacHaveAppearance \ | |
239 | (tkPlatStubsPtr->tkMacHaveAppearance) /* 9 */ | |
240 | #endif | |
241 | #ifndef TkMacGetDrawablePort | |
242 | #define TkMacGetDrawablePort \ | |
243 | (tkPlatStubsPtr->tkMacGetDrawablePort) /* 10 */ | |
244 | #endif | |
245 | #endif /* MAC_TCL */ | |
246 | #ifdef MAC_OSX_TK | |
247 | #ifndef Tk_MacOSXSetEmbedHandler | |
248 | #define Tk_MacOSXSetEmbedHandler \ | |
249 | (tkPlatStubsPtr->tk_MacOSXSetEmbedHandler) /* 0 */ | |
250 | #endif | |
251 | #ifndef Tk_MacOSXTurnOffMenus | |
252 | #define Tk_MacOSXTurnOffMenus \ | |
253 | (tkPlatStubsPtr->tk_MacOSXTurnOffMenus) /* 1 */ | |
254 | #endif | |
255 | #ifndef Tk_MacOSXTkOwnsCursor | |
256 | #define Tk_MacOSXTkOwnsCursor \ | |
257 | (tkPlatStubsPtr->tk_MacOSXTkOwnsCursor) /* 2 */ | |
258 | #endif | |
259 | #ifndef TkMacOSXInitMenus | |
260 | #define TkMacOSXInitMenus \ | |
261 | (tkPlatStubsPtr->tkMacOSXInitMenus) /* 3 */ | |
262 | #endif | |
263 | #ifndef TkMacOSXInitAppleEvents | |
264 | #define TkMacOSXInitAppleEvents \ | |
265 | (tkPlatStubsPtr->tkMacOSXInitAppleEvents) /* 4 */ | |
266 | #endif | |
267 | #ifndef TkGenWMConfigureEvent | |
268 | #define TkGenWMConfigureEvent \ | |
269 | (tkPlatStubsPtr->tkGenWMConfigureEvent) /* 5 */ | |
270 | #endif | |
271 | #ifndef TkMacOSXInvalClipRgns | |
272 | #define TkMacOSXInvalClipRgns \ | |
273 | (tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */ | |
274 | #endif | |
275 | #ifndef TkMacOSXGetDrawablePort | |
276 | #define TkMacOSXGetDrawablePort \ | |
277 | (tkPlatStubsPtr->tkMacOSXGetDrawablePort) /* 7 */ | |
278 | #endif | |
279 | #ifndef TkMacOSXGetRootControl | |
280 | #define TkMacOSXGetRootControl \ | |
281 | (tkPlatStubsPtr->tkMacOSXGetRootControl) /* 8 */ | |
282 | #endif | |
283 | #ifndef Tk_MacOSXSetupTkNotifier | |
284 | #define Tk_MacOSXSetupTkNotifier \ | |
285 | (tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */ | |
286 | #endif | |
287 | #ifndef Tk_MacOSXIsAppInFront | |
288 | #define Tk_MacOSXIsAppInFront \ | |
289 | (tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */ | |
290 | #endif | |
291 | #endif /* MAC_OSX_TK */ | |
292 | ||
293 | #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ | |
294 | ||
295 | /* !END!: Do not edit above this line. */ | |
296 | ||
297 | #undef TCL_STORAGE_CLASS | |
298 | #define TCL_STORAGE_CLASS DLLIMPORT | |
299 | ||
300 | #endif /* _TKPLATDECLS */ |