00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _TKPLATDECLS
00015 #define _TKPLATDECLS
00016
00017 #ifdef BUILD_tk
00018 #undef TCL_STORAGE_CLASS
00019 #define TCL_STORAGE_CLASS DLLEXPORT
00020 #endif
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifdef __WIN32__
00036
00037 EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin,
00038 HWND hwnd));
00039
00040 EXTERN HINSTANCE Tk_GetHINSTANCE _ANSI_ARGS_((void));
00041
00042 EXTERN HWND Tk_GetHWND _ANSI_ARGS_((Window window));
00043
00044 EXTERN Tk_Window Tk_HWNDToWindow _ANSI_ARGS_((HWND hwnd));
00045
00046 EXTERN void Tk_PointerEvent _ANSI_ARGS_((HWND hwnd, int x, int y));
00047
00048 EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd,
00049 UINT message, WPARAM wParam, LPARAM lParam,
00050 LRESULT * result));
00051 #endif
00052 #ifdef MAC_TCL
00053
00054 EXTERN void Tk_MacSetEmbedHandler _ANSI_ARGS_((
00055 Tk_MacEmbedRegisterWinProc * registerWinProcPtr,
00056 Tk_MacEmbedGetGrafPortProc * getPortProcPtr,
00057 Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr,
00058 Tk_MacEmbedGetClipProc * getClipProc,
00059 Tk_MacEmbedGetOffsetInParentProc * getOffsetProc));
00060
00061 EXTERN void Tk_MacTurnOffMenus _ANSI_ARGS_((void));
00062
00063 EXTERN void Tk_MacTkOwnsCursor _ANSI_ARGS_((int tkOwnsIt));
00064
00065 EXTERN void TkMacInitMenus _ANSI_ARGS_((Tcl_Interp * interp));
00066
00067 EXTERN void TkMacInitAppleEvents _ANSI_ARGS_((
00068 Tcl_Interp * interp));
00069
00070 EXTERN int TkMacConvertEvent _ANSI_ARGS_((
00071 EventRecord * eventPtr));
00072
00073 EXTERN int TkMacConvertTkEvent _ANSI_ARGS_((
00074 EventRecord * eventPtr, Window window));
00075
00076 EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin,
00077 int x, int y, int width, int height,
00078 int flags));
00079
00080 EXTERN void TkMacInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr));
00081
00082 EXTERN int TkMacHaveAppearance _ANSI_ARGS_((void));
00083
00084 EXTERN GWorldPtr TkMacGetDrawablePort _ANSI_ARGS_((Drawable drawable));
00085 #endif
00086
00087 typedef struct TkPlatStubs {
00088 int magic;
00089 struct TkPlatStubHooks *hooks;
00090
00091 #ifdef __WIN32__
00092 Window (*tk_AttachHWND) _ANSI_ARGS_((Tk_Window tkwin, HWND hwnd));
00093 HINSTANCE (*tk_GetHINSTANCE) _ANSI_ARGS_((void));
00094 HWND (*tk_GetHWND) _ANSI_ARGS_((Window window));
00095 Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((HWND hwnd));
00096 void (*tk_PointerEvent) _ANSI_ARGS_((HWND hwnd, int x, int y));
00097 int (*tk_TranslateWinEvent) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result));
00098 #endif
00099 #ifdef MAC_TCL
00100 void (*tk_MacSetEmbedHandler) _ANSI_ARGS_((Tk_MacEmbedRegisterWinProc * registerWinProcPtr, Tk_MacEmbedGetGrafPortProc * getPortProcPtr, Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacEmbedGetClipProc * getClipProc, Tk_MacEmbedGetOffsetInParentProc * getOffsetProc));
00101 void (*tk_MacTurnOffMenus) _ANSI_ARGS_((void));
00102 void (*tk_MacTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt));
00103 void (*tkMacInitMenus) _ANSI_ARGS_((Tcl_Interp * interp));
00104 void (*tkMacInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp));
00105 int (*tkMacConvertEvent) _ANSI_ARGS_((EventRecord * eventPtr));
00106 int (*tkMacConvertTkEvent) _ANSI_ARGS_((EventRecord * eventPtr, Window window));
00107 void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags));
00108 void (*tkMacInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr));
00109 int (*tkMacHaveAppearance) _ANSI_ARGS_((void));
00110 GWorldPtr (*tkMacGetDrawablePort) _ANSI_ARGS_((Drawable drawable));
00111 #endif
00112 } TkPlatStubs;
00113
00114 #ifdef __cplusplus
00115 extern "C" {
00116 #endif
00117 extern TkPlatStubs *tkPlatStubsPtr;
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121
00122 #if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
00123
00124
00125
00126
00127
00128 #ifdef __WIN32__
00129 #ifndef Tk_AttachHWND
00130 #define Tk_AttachHWND \
00131 (tkPlatStubsPtr->tk_AttachHWND)
00132 #endif
00133 #ifndef Tk_GetHINSTANCE
00134 #define Tk_GetHINSTANCE \
00135 (tkPlatStubsPtr->tk_GetHINSTANCE)
00136 #endif
00137 #ifndef Tk_GetHWND
00138 #define Tk_GetHWND \
00139 (tkPlatStubsPtr->tk_GetHWND)
00140 #endif
00141 #ifndef Tk_HWNDToWindow
00142 #define Tk_HWNDToWindow \
00143 (tkPlatStubsPtr->tk_HWNDToWindow)
00144 #endif
00145 #ifndef Tk_PointerEvent
00146 #define Tk_PointerEvent \
00147 (tkPlatStubsPtr->tk_PointerEvent)
00148 #endif
00149 #ifndef Tk_TranslateWinEvent
00150 #define Tk_TranslateWinEvent \
00151 (tkPlatStubsPtr->tk_TranslateWinEvent)
00152 #endif
00153 #endif
00154 #ifdef MAC_TCL
00155 #ifndef Tk_MacSetEmbedHandler
00156 #define Tk_MacSetEmbedHandler \
00157 (tkPlatStubsPtr->tk_MacSetEmbedHandler)
00158 #endif
00159 #ifndef Tk_MacTurnOffMenus
00160 #define Tk_MacTurnOffMenus \
00161 (tkPlatStubsPtr->tk_MacTurnOffMenus)
00162 #endif
00163 #ifndef Tk_MacTkOwnsCursor
00164 #define Tk_MacTkOwnsCursor \
00165 (tkPlatStubsPtr->tk_MacTkOwnsCursor)
00166 #endif
00167 #ifndef TkMacInitMenus
00168 #define TkMacInitMenus \
00169 (tkPlatStubsPtr->tkMacInitMenus)
00170 #endif
00171 #ifndef TkMacInitAppleEvents
00172 #define TkMacInitAppleEvents \
00173 (tkPlatStubsPtr->tkMacInitAppleEvents)
00174 #endif
00175 #ifndef TkMacConvertEvent
00176 #define TkMacConvertEvent \
00177 (tkPlatStubsPtr->tkMacConvertEvent)
00178 #endif
00179 #ifndef TkMacConvertTkEvent
00180 #define TkMacConvertTkEvent \
00181 (tkPlatStubsPtr->tkMacConvertTkEvent)
00182 #endif
00183 #ifndef TkGenWMConfigureEvent
00184 #define TkGenWMConfigureEvent \
00185 (tkPlatStubsPtr->tkGenWMConfigureEvent)
00186 #endif
00187 #ifndef TkMacInvalClipRgns
00188 #define TkMacInvalClipRgns \
00189 (tkPlatStubsPtr->tkMacInvalClipRgns)
00190 #endif
00191 #ifndef TkMacHaveAppearance
00192 #define TkMacHaveAppearance \
00193 (tkPlatStubsPtr->tkMacHaveAppearance)
00194 #endif
00195 #ifndef TkMacGetDrawablePort
00196 #define TkMacGetDrawablePort \
00197 (tkPlatStubsPtr->tkMacGetDrawablePort)
00198 #endif
00199 #endif
00200
00201 #endif
00202
00203
00204
00205 #undef TCL_STORAGE_CLASS
00206 #define TCL_STORAGE_CLASS DLLIMPORT
00207
00208 #endif