diff options
Diffstat (limited to 'generic/tkPlatDecls.h')
-rw-r--r-- | generic/tkPlatDecls.h | 94 |
1 files changed, 64 insertions, 30 deletions
diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index 49274d4..74f4ccd 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -33,6 +33,22 @@ extern "C" { * Exported function declarations: */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +/* 0 */ +EXTERN Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd); +/* 1 */ +EXTERN void * Tk_GetHINSTANCE(void); +/* 2 */ +EXTERN void * Tk_GetHWND(Window window); +/* 3 */ +EXTERN Tk_Window Tk_HWNDToWindow(void *hwnd); +/* 4 */ +EXTERN void Tk_PointerEvent(void *hwnd, int x, int y); +/* 5 */ +EXTERN int Tk_TranslateWinEvent(void *hwnd, + unsigned int message, int wParam, int lParam, + int *result); +#endif /* UNIX */ #ifdef __WIN32__ /* WIN */ /* 0 */ EXTERN Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd); @@ -51,23 +67,19 @@ EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message, #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* 0 */ -EXTERN void Tk_MacOSXSetEmbedHandler( - Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, - Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, - Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, - Tk_MacOSXEmbedGetClipProc *getClipProc, - Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc); +EXTERN Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd); /* 1 */ -EXTERN void Tk_MacOSXTurnOffMenus(void); +EXTERN void * Tk_GetHINSTANCE(void); /* 2 */ -EXTERN void Tk_MacOSXTkOwnsCursor(int tkOwnsIt); +EXTERN void * Tk_GetHWND(Window window); /* 3 */ -EXTERN void TkMacOSXInitMenus(Tcl_Interp *interp); +EXTERN Tk_Window Tk_HWNDToWindow(void *hwnd); /* 4 */ -EXTERN void TkMacOSXInitAppleEvents(Tcl_Interp *interp); +EXTERN void Tk_PointerEvent(void *hwnd, int x, int y); /* 5 */ -EXTERN void TkGenWMConfigureEvent(Tk_Window tkwin, int x, int y, - int width, int height, int flags); +EXTERN int Tk_TranslateWinEvent(void *hwnd, + unsigned int message, int wParam, int lParam, + int *result); /* 6 */ EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin); /* 7 */ @@ -84,6 +96,14 @@ typedef struct TkPlatStubs { int magic; const struct TkPlatStubHooks *hooks; +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Window (*tk_AttachHWND) (Tk_Window tkwin, void *hwnd); /* 0 */ + void * (*tk_GetHINSTANCE) (void); /* 1 */ + void * (*tk_GetHWND) (Window window); /* 2 */ + Tk_Window (*tk_HWNDToWindow) (void *hwnd); /* 3 */ + void (*tk_PointerEvent) (void *hwnd, int x, int y); /* 4 */ + int (*tk_TranslateWinEvent) (void *hwnd, unsigned int message, int wParam, int lParam, int *result); /* 5 */ +#endif /* UNIX */ #ifdef __WIN32__ /* WIN */ Window (*tk_AttachHWND) (Tk_Window tkwin, HWND hwnd); /* 0 */ HINSTANCE (*tk_GetHINSTANCE) (void); /* 1 */ @@ -93,12 +113,12 @@ typedef struct TkPlatStubs { int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - void (*tk_MacOSXSetEmbedHandler) (Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, Tk_MacOSXEmbedGetClipProc *getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc); /* 0 */ - void (*tk_MacOSXTurnOffMenus) (void); /* 1 */ - void (*tk_MacOSXTkOwnsCursor) (int tkOwnsIt); /* 2 */ - void (*tkMacOSXInitMenus) (Tcl_Interp *interp); /* 3 */ - void (*tkMacOSXInitAppleEvents) (Tcl_Interp *interp); /* 4 */ - void (*tkGenWMConfigureEvent) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 5 */ + Window (*tk_AttachHWND) (Tk_Window tkwin, void *hwnd); /* 0 */ + void * (*tk_GetHINSTANCE) (void); /* 1 */ + void * (*tk_GetHWND) (Window window); /* 2 */ + Tk_Window (*tk_HWNDToWindow) (void *hwnd); /* 3 */ + void (*tk_PointerEvent) (void *hwnd, int x, int y); /* 4 */ + int (*tk_TranslateWinEvent) (void *hwnd, unsigned int message, int wParam, int lParam, int *result); /* 5 */ void (*tkMacOSXInvalClipRgns) (Tk_Window tkwin); /* 6 */ void * (*tkMacOSXGetDrawablePort) (Drawable drawable); /* 7 */ void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */ @@ -121,6 +141,20 @@ extern const TkPlatStubs *tkPlatStubsPtr; * Inline function declarations: */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#define Tk_AttachHWND \ + (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ +#define Tk_GetHINSTANCE \ + (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ +#define Tk_GetHWND \ + (tkPlatStubsPtr->tk_GetHWND) /* 2 */ +#define Tk_HWNDToWindow \ + (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ +#define Tk_PointerEvent \ + (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ +#define Tk_TranslateWinEvent \ + (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ +#endif /* UNIX */ #ifdef __WIN32__ /* WIN */ #define Tk_AttachHWND \ (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ @@ -136,18 +170,18 @@ extern const TkPlatStubs *tkPlatStubsPtr; (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ -#define Tk_MacOSXSetEmbedHandler \ - (tkPlatStubsPtr->tk_MacOSXSetEmbedHandler) /* 0 */ -#define Tk_MacOSXTurnOffMenus \ - (tkPlatStubsPtr->tk_MacOSXTurnOffMenus) /* 1 */ -#define Tk_MacOSXTkOwnsCursor \ - (tkPlatStubsPtr->tk_MacOSXTkOwnsCursor) /* 2 */ -#define TkMacOSXInitMenus \ - (tkPlatStubsPtr->tkMacOSXInitMenus) /* 3 */ -#define TkMacOSXInitAppleEvents \ - (tkPlatStubsPtr->tkMacOSXInitAppleEvents) /* 4 */ -#define TkGenWMConfigureEvent \ - (tkPlatStubsPtr->tkGenWMConfigureEvent) /* 5 */ +#define Tk_AttachHWND \ + (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ +#define Tk_GetHINSTANCE \ + (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ +#define Tk_GetHWND \ + (tkPlatStubsPtr->tk_GetHWND) /* 2 */ +#define Tk_HWNDToWindow \ + (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ +#define Tk_PointerEvent \ + (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ +#define Tk_TranslateWinEvent \ + (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #define TkMacOSXInvalClipRgns \ (tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */ #define TkMacOSXGetDrawablePort \ |