jpayne@69
|
1 /*
|
jpayne@69
|
2 * tkPlatDecls.h --
|
jpayne@69
|
3 *
|
jpayne@69
|
4 * Declarations of functions in the platform-specific public Tcl API.
|
jpayne@69
|
5 *
|
jpayne@69
|
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
|
jpayne@69
|
7 *
|
jpayne@69
|
8 * See the file "license.terms" for information on usage and redistribution
|
jpayne@69
|
9 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
jpayne@69
|
10 */
|
jpayne@69
|
11
|
jpayne@69
|
12 #ifndef _TKPLATDECLS
|
jpayne@69
|
13 #define _TKPLATDECLS
|
jpayne@69
|
14
|
jpayne@69
|
15 #ifdef BUILD_tk
|
jpayne@69
|
16 #undef TCL_STORAGE_CLASS
|
jpayne@69
|
17 #define TCL_STORAGE_CLASS DLLEXPORT
|
jpayne@69
|
18 #endif
|
jpayne@69
|
19
|
jpayne@69
|
20 /*
|
jpayne@69
|
21 * WARNING: This file is automatically generated by the tools/genStubs.tcl
|
jpayne@69
|
22 * script. Any modifications to the function declarations below should be made
|
jpayne@69
|
23 * in the generic/tk.decls script.
|
jpayne@69
|
24 */
|
jpayne@69
|
25
|
jpayne@69
|
26 #ifdef __cplusplus
|
jpayne@69
|
27 extern "C" {
|
jpayne@69
|
28 #endif
|
jpayne@69
|
29
|
jpayne@69
|
30 /* !BEGIN!: Do not edit below this line. */
|
jpayne@69
|
31
|
jpayne@69
|
32 #ifdef __cplusplus
|
jpayne@69
|
33 extern "C" {
|
jpayne@69
|
34 #endif
|
jpayne@69
|
35
|
jpayne@69
|
36 /*
|
jpayne@69
|
37 * Exported function declarations:
|
jpayne@69
|
38 */
|
jpayne@69
|
39
|
jpayne@69
|
40 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
|
jpayne@69
|
41 /* 0 */
|
jpayne@69
|
42 EXTERN Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd);
|
jpayne@69
|
43 /* 1 */
|
jpayne@69
|
44 EXTERN HINSTANCE Tk_GetHINSTANCE(void);
|
jpayne@69
|
45 /* 2 */
|
jpayne@69
|
46 EXTERN HWND Tk_GetHWND(Window window);
|
jpayne@69
|
47 /* 3 */
|
jpayne@69
|
48 EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd);
|
jpayne@69
|
49 /* 4 */
|
jpayne@69
|
50 EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y);
|
jpayne@69
|
51 /* 5 */
|
jpayne@69
|
52 EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message,
|
jpayne@69
|
53 WPARAM wParam, LPARAM lParam,
|
jpayne@69
|
54 LRESULT *result);
|
jpayne@69
|
55 #endif /* WIN */
|
jpayne@69
|
56 #ifdef MAC_OSX_TK /* AQUA */
|
jpayne@69
|
57 /* 0 */
|
jpayne@69
|
58 EXTERN void Tk_MacOSXSetEmbedHandler(
|
jpayne@69
|
59 Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr,
|
jpayne@69
|
60 Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr,
|
jpayne@69
|
61 Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr,
|
jpayne@69
|
62 Tk_MacOSXEmbedGetClipProc *getClipProc,
|
jpayne@69
|
63 Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc);
|
jpayne@69
|
64 /* 1 */
|
jpayne@69
|
65 EXTERN void Tk_MacOSXTurnOffMenus(void);
|
jpayne@69
|
66 /* 2 */
|
jpayne@69
|
67 EXTERN void Tk_MacOSXTkOwnsCursor(int tkOwnsIt);
|
jpayne@69
|
68 /* 3 */
|
jpayne@69
|
69 EXTERN void TkMacOSXInitMenus(Tcl_Interp *interp);
|
jpayne@69
|
70 /* 4 */
|
jpayne@69
|
71 EXTERN void TkMacOSXInitAppleEvents(Tcl_Interp *interp);
|
jpayne@69
|
72 /* 5 */
|
jpayne@69
|
73 EXTERN void TkGenWMConfigureEvent(Tk_Window tkwin, int x, int y,
|
jpayne@69
|
74 int width, int height, int flags);
|
jpayne@69
|
75 /* 6 */
|
jpayne@69
|
76 EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin);
|
jpayne@69
|
77 /* 7 */
|
jpayne@69
|
78 EXTERN void * TkMacOSXGetDrawablePort(Drawable drawable);
|
jpayne@69
|
79 /* 8 */
|
jpayne@69
|
80 EXTERN void * TkMacOSXGetRootControl(Drawable drawable);
|
jpayne@69
|
81 /* 9 */
|
jpayne@69
|
82 EXTERN void Tk_MacOSXSetupTkNotifier(void);
|
jpayne@69
|
83 /* 10 */
|
jpayne@69
|
84 EXTERN int Tk_MacOSXIsAppInFront(void);
|
jpayne@69
|
85 /* 11 */
|
jpayne@69
|
86 EXTERN Tk_Window Tk_MacOSXGetTkWindow(void *w);
|
jpayne@69
|
87 /* 12 */
|
jpayne@69
|
88 EXTERN void * Tk_MacOSXGetCGContextForDrawable(Drawable drawable);
|
jpayne@69
|
89 /* 13 */
|
jpayne@69
|
90 EXTERN void * Tk_MacOSXGetNSWindowForDrawable(Drawable drawable);
|
jpayne@69
|
91 /* Slot 14 is reserved */
|
jpayne@69
|
92 /* Slot 15 is reserved */
|
jpayne@69
|
93 /* 16 */
|
jpayne@69
|
94 EXTERN void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y,
|
jpayne@69
|
95 int width, int height, int flags);
|
jpayne@69
|
96 #endif /* AQUA */
|
jpayne@69
|
97
|
jpayne@69
|
98 typedef struct TkPlatStubs {
|
jpayne@69
|
99 int magic;
|
jpayne@69
|
100 void *hooks;
|
jpayne@69
|
101
|
jpayne@69
|
102 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
|
jpayne@69
|
103 Window (*tk_AttachHWND) (Tk_Window tkwin, HWND hwnd); /* 0 */
|
jpayne@69
|
104 HINSTANCE (*tk_GetHINSTANCE) (void); /* 1 */
|
jpayne@69
|
105 HWND (*tk_GetHWND) (Window window); /* 2 */
|
jpayne@69
|
106 Tk_Window (*tk_HWNDToWindow) (HWND hwnd); /* 3 */
|
jpayne@69
|
107 void (*tk_PointerEvent) (HWND hwnd, int x, int y); /* 4 */
|
jpayne@69
|
108 int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */
|
jpayne@69
|
109 #endif /* WIN */
|
jpayne@69
|
110 #ifdef MAC_OSX_TK /* AQUA */
|
jpayne@69
|
111 void (*tk_MacOSXSetEmbedHandler) (Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, Tk_MacOSXEmbedGetClipProc *getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc); /* 0 */
|
jpayne@69
|
112 void (*tk_MacOSXTurnOffMenus) (void); /* 1 */
|
jpayne@69
|
113 void (*tk_MacOSXTkOwnsCursor) (int tkOwnsIt); /* 2 */
|
jpayne@69
|
114 void (*tkMacOSXInitMenus) (Tcl_Interp *interp); /* 3 */
|
jpayne@69
|
115 void (*tkMacOSXInitAppleEvents) (Tcl_Interp *interp); /* 4 */
|
jpayne@69
|
116 void (*tkGenWMConfigureEvent) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 5 */
|
jpayne@69
|
117 void (*tkMacOSXInvalClipRgns) (Tk_Window tkwin); /* 6 */
|
jpayne@69
|
118 void * (*tkMacOSXGetDrawablePort) (Drawable drawable); /* 7 */
|
jpayne@69
|
119 void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */
|
jpayne@69
|
120 void (*tk_MacOSXSetupTkNotifier) (void); /* 9 */
|
jpayne@69
|
121 int (*tk_MacOSXIsAppInFront) (void); /* 10 */
|
jpayne@69
|
122 Tk_Window (*tk_MacOSXGetTkWindow) (void *w); /* 11 */
|
jpayne@69
|
123 void * (*tk_MacOSXGetCGContextForDrawable) (Drawable drawable); /* 12 */
|
jpayne@69
|
124 void * (*tk_MacOSXGetNSWindowForDrawable) (Drawable drawable); /* 13 */
|
jpayne@69
|
125 void (*reserved14)(void);
|
jpayne@69
|
126 void (*reserved15)(void);
|
jpayne@69
|
127 void (*tkGenWMConfigureEvent_) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 16 */
|
jpayne@69
|
128 #endif /* AQUA */
|
jpayne@69
|
129 } TkPlatStubs;
|
jpayne@69
|
130
|
jpayne@69
|
131 extern const TkPlatStubs *tkPlatStubsPtr;
|
jpayne@69
|
132
|
jpayne@69
|
133 #ifdef __cplusplus
|
jpayne@69
|
134 }
|
jpayne@69
|
135 #endif
|
jpayne@69
|
136
|
jpayne@69
|
137 #if defined(USE_TK_STUBS)
|
jpayne@69
|
138
|
jpayne@69
|
139 /*
|
jpayne@69
|
140 * Inline function declarations:
|
jpayne@69
|
141 */
|
jpayne@69
|
142
|
jpayne@69
|
143 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
|
jpayne@69
|
144 #define Tk_AttachHWND \
|
jpayne@69
|
145 (tkPlatStubsPtr->tk_AttachHWND) /* 0 */
|
jpayne@69
|
146 #define Tk_GetHINSTANCE \
|
jpayne@69
|
147 (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */
|
jpayne@69
|
148 #define Tk_GetHWND \
|
jpayne@69
|
149 (tkPlatStubsPtr->tk_GetHWND) /* 2 */
|
jpayne@69
|
150 #define Tk_HWNDToWindow \
|
jpayne@69
|
151 (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */
|
jpayne@69
|
152 #define Tk_PointerEvent \
|
jpayne@69
|
153 (tkPlatStubsPtr->tk_PointerEvent) /* 4 */
|
jpayne@69
|
154 #define Tk_TranslateWinEvent \
|
jpayne@69
|
155 (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */
|
jpayne@69
|
156 #endif /* WIN */
|
jpayne@69
|
157 #ifdef MAC_OSX_TK /* AQUA */
|
jpayne@69
|
158 #define Tk_MacOSXSetEmbedHandler \
|
jpayne@69
|
159 (tkPlatStubsPtr->tk_MacOSXSetEmbedHandler) /* 0 */
|
jpayne@69
|
160 #define Tk_MacOSXTurnOffMenus \
|
jpayne@69
|
161 (tkPlatStubsPtr->tk_MacOSXTurnOffMenus) /* 1 */
|
jpayne@69
|
162 #define Tk_MacOSXTkOwnsCursor \
|
jpayne@69
|
163 (tkPlatStubsPtr->tk_MacOSXTkOwnsCursor) /* 2 */
|
jpayne@69
|
164 #define TkMacOSXInitMenus \
|
jpayne@69
|
165 (tkPlatStubsPtr->tkMacOSXInitMenus) /* 3 */
|
jpayne@69
|
166 #define TkMacOSXInitAppleEvents \
|
jpayne@69
|
167 (tkPlatStubsPtr->tkMacOSXInitAppleEvents) /* 4 */
|
jpayne@69
|
168 #define TkGenWMConfigureEvent \
|
jpayne@69
|
169 (tkPlatStubsPtr->tkGenWMConfigureEvent) /* 5 */
|
jpayne@69
|
170 #define TkMacOSXInvalClipRgns \
|
jpayne@69
|
171 (tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */
|
jpayne@69
|
172 #define TkMacOSXGetDrawablePort \
|
jpayne@69
|
173 (tkPlatStubsPtr->tkMacOSXGetDrawablePort) /* 7 */
|
jpayne@69
|
174 #define TkMacOSXGetRootControl \
|
jpayne@69
|
175 (tkPlatStubsPtr->tkMacOSXGetRootControl) /* 8 */
|
jpayne@69
|
176 #define Tk_MacOSXSetupTkNotifier \
|
jpayne@69
|
177 (tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */
|
jpayne@69
|
178 #define Tk_MacOSXIsAppInFront \
|
jpayne@69
|
179 (tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */
|
jpayne@69
|
180 #define Tk_MacOSXGetTkWindow \
|
jpayne@69
|
181 (tkPlatStubsPtr->tk_MacOSXGetTkWindow) /* 11 */
|
jpayne@69
|
182 #define Tk_MacOSXGetCGContextForDrawable \
|
jpayne@69
|
183 (tkPlatStubsPtr->tk_MacOSXGetCGContextForDrawable) /* 12 */
|
jpayne@69
|
184 #define Tk_MacOSXGetNSWindowForDrawable \
|
jpayne@69
|
185 (tkPlatStubsPtr->tk_MacOSXGetNSWindowForDrawable) /* 13 */
|
jpayne@69
|
186 /* Slot 14 is reserved */
|
jpayne@69
|
187 /* Slot 15 is reserved */
|
jpayne@69
|
188 #define TkGenWMConfigureEvent_ \
|
jpayne@69
|
189 (tkPlatStubsPtr->tkGenWMConfigureEvent_) /* 16 */
|
jpayne@69
|
190 #endif /* AQUA */
|
jpayne@69
|
191
|
jpayne@69
|
192 #endif /* defined(USE_TK_STUBS) */
|
jpayne@69
|
193
|
jpayne@69
|
194 /* !END!: Do not edit above this line. */
|
jpayne@69
|
195
|
jpayne@69
|
196 #ifdef __cplusplus
|
jpayne@69
|
197 }
|
jpayne@69
|
198 #endif
|
jpayne@69
|
199
|
jpayne@69
|
200 #undef TCL_STORAGE_CLASS
|
jpayne@69
|
201 #define TCL_STORAGE_CLASS DLLIMPORT
|
jpayne@69
|
202
|
jpayne@69
|
203 #undef TkGenWMConfigureEvent_
|
jpayne@69
|
204 #define Tk_MacOSXGetNSViewForDrawable TkMacOSXGetRootControl
|
jpayne@69
|
205
|
jpayne@69
|
206 #endif /* _TKPLATDECLS */
|