summaryrefslogtreecommitdiffstats
path: root/generic/tkPlatDecls.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkPlatDecls.h')
-rw-r--r--generic/tkPlatDecls.h187
1 files changed, 40 insertions, 147 deletions
diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h
index c7584c7..74f4ccd 100644
--- a/generic/tkPlatDecls.h
+++ b/generic/tkPlatDecls.h
@@ -23,6 +23,10 @@
* in the generic/tk.decls script.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* !BEGIN!: Do not edit below this line. */
/*
@@ -30,144 +34,75 @@
*/
#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef Tk_AttachHWND_TCL_DECLARED
-#define Tk_AttachHWND_TCL_DECLARED
/* 0 */
-EXTERN Window Tk_AttachHWND(Tk_Window tkwin, VOID *hwnd);
-#endif
-#ifndef Tk_GetHINSTANCE_TCL_DECLARED
-#define Tk_GetHINSTANCE_TCL_DECLARED
+EXTERN Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd);
/* 1 */
-EXTERN VOID * Tk_GetHINSTANCE(void);
-#endif
-#ifndef Tk_GetHWND_TCL_DECLARED
-#define Tk_GetHWND_TCL_DECLARED
+EXTERN void * Tk_GetHINSTANCE(void);
/* 2 */
-EXTERN VOID * Tk_GetHWND(Window window);
-#endif
-#ifndef Tk_HWNDToWindow_TCL_DECLARED
-#define Tk_HWNDToWindow_TCL_DECLARED
+EXTERN void * Tk_GetHWND(Window window);
/* 3 */
-EXTERN Tk_Window Tk_HWNDToWindow(VOID *hwnd);
-#endif
-#ifndef Tk_PointerEvent_TCL_DECLARED
-#define Tk_PointerEvent_TCL_DECLARED
+EXTERN Tk_Window Tk_HWNDToWindow(void *hwnd);
/* 4 */
-EXTERN void Tk_PointerEvent(VOID *hwnd, int x, int y);
-#endif
-#ifndef Tk_TranslateWinEvent_TCL_DECLARED
-#define Tk_TranslateWinEvent_TCL_DECLARED
+EXTERN void Tk_PointerEvent(void *hwnd, int x, int y);
/* 5 */
-EXTERN int Tk_TranslateWinEvent(VOID *hwnd,
+EXTERN int Tk_TranslateWinEvent(void *hwnd,
unsigned int message, int wParam, int lParam,
int *result);
-#endif
#endif /* UNIX */
#ifdef __WIN32__ /* WIN */
-#ifndef Tk_AttachHWND_TCL_DECLARED
-#define Tk_AttachHWND_TCL_DECLARED
/* 0 */
EXTERN Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd);
-#endif
-#ifndef Tk_GetHINSTANCE_TCL_DECLARED
-#define Tk_GetHINSTANCE_TCL_DECLARED
/* 1 */
EXTERN HINSTANCE Tk_GetHINSTANCE(void);
-#endif
-#ifndef Tk_GetHWND_TCL_DECLARED
-#define Tk_GetHWND_TCL_DECLARED
/* 2 */
EXTERN HWND Tk_GetHWND(Window window);
-#endif
-#ifndef Tk_HWNDToWindow_TCL_DECLARED
-#define Tk_HWNDToWindow_TCL_DECLARED
/* 3 */
EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd);
-#endif
-#ifndef Tk_PointerEvent_TCL_DECLARED
-#define Tk_PointerEvent_TCL_DECLARED
/* 4 */
EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y);
-#endif
-#ifndef Tk_TranslateWinEvent_TCL_DECLARED
-#define Tk_TranslateWinEvent_TCL_DECLARED
/* 5 */
EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam,
LRESULT *result);
-#endif
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
-#ifndef Tk_AttachHWND_TCL_DECLARED
-#define Tk_AttachHWND_TCL_DECLARED
/* 0 */
-EXTERN Window Tk_AttachHWND(Tk_Window tkwin, VOID *hwnd);
-#endif
-#ifndef Tk_GetHINSTANCE_TCL_DECLARED
-#define Tk_GetHINSTANCE_TCL_DECLARED
+EXTERN Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd);
/* 1 */
-EXTERN VOID * Tk_GetHINSTANCE(void);
-#endif
-#ifndef Tk_GetHWND_TCL_DECLARED
-#define Tk_GetHWND_TCL_DECLARED
+EXTERN void * Tk_GetHINSTANCE(void);
/* 2 */
-EXTERN VOID * Tk_GetHWND(Window window);
-#endif
-#ifndef Tk_HWNDToWindow_TCL_DECLARED
-#define Tk_HWNDToWindow_TCL_DECLARED
+EXTERN void * Tk_GetHWND(Window window);
/* 3 */
-EXTERN Tk_Window Tk_HWNDToWindow(VOID *hwnd);
-#endif
-#ifndef Tk_PointerEvent_TCL_DECLARED
-#define Tk_PointerEvent_TCL_DECLARED
+EXTERN Tk_Window Tk_HWNDToWindow(void *hwnd);
/* 4 */
-EXTERN void Tk_PointerEvent(VOID *hwnd, int x, int y);
-#endif
-#ifndef Tk_TranslateWinEvent_TCL_DECLARED
-#define Tk_TranslateWinEvent_TCL_DECLARED
+EXTERN void Tk_PointerEvent(void *hwnd, int x, int y);
/* 5 */
-EXTERN int Tk_TranslateWinEvent(VOID *hwnd,
+EXTERN int Tk_TranslateWinEvent(void *hwnd,
unsigned int message, int wParam, int lParam,
int *result);
-#endif
-#ifndef TkMacOSXInvalClipRgns_TCL_DECLARED
-#define TkMacOSXInvalClipRgns_TCL_DECLARED
/* 6 */
EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin);
-#endif
-#ifndef TkMacOSXGetDrawablePort_TCL_DECLARED
-#define TkMacOSXGetDrawablePort_TCL_DECLARED
/* 7 */
-EXTERN GWorldPtr TkMacOSXGetDrawablePort(Drawable drawable);
-#endif
-#ifndef TkMacOSXGetRootControl_TCL_DECLARED
-#define TkMacOSXGetRootControl_TCL_DECLARED
+EXTERN void * TkMacOSXGetDrawablePort(Drawable drawable);
/* 8 */
-EXTERN ControlRef TkMacOSXGetRootControl(Drawable drawable);
-#endif
-#ifndef Tk_MacOSXSetupTkNotifier_TCL_DECLARED
-#define Tk_MacOSXSetupTkNotifier_TCL_DECLARED
+EXTERN void * TkMacOSXGetRootControl(Drawable drawable);
/* 9 */
EXTERN void Tk_MacOSXSetupTkNotifier(void);
-#endif
-#ifndef Tk_MacOSXIsAppInFront_TCL_DECLARED
-#define Tk_MacOSXIsAppInFront_TCL_DECLARED
/* 10 */
EXTERN int Tk_MacOSXIsAppInFront(void);
-#endif
#endif /* AQUA */
typedef struct TkPlatStubs {
int magic;
- struct TkPlatStubHooks *hooks;
+ 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 */
+ 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 */
@@ -178,15 +113,15 @@ typedef struct TkPlatStubs {
int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
- 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 */
+ 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 */
- GWorldPtr (*tkMacOSXGetDrawablePort) (Drawable drawable); /* 7 */
- ControlRef (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */
+ void * (*tkMacOSXGetDrawablePort) (Drawable drawable); /* 7 */
+ void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */
void (*tk_MacOSXSetupTkNotifier) (void); /* 9 */
int (*tk_MacOSXIsAppInFront) (void); /* 10 */
#endif /* AQUA */
@@ -195,120 +130,78 @@ typedef struct TkPlatStubs {
#ifdef __cplusplus
extern "C" {
#endif
-extern TkPlatStubs *tkPlatStubsPtr;
+extern const TkPlatStubs *tkPlatStubsPtr;
#ifdef __cplusplus
}
#endif
-#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
+#if defined(USE_TK_STUBS)
/*
* Inline function declarations:
*/
#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */
-#ifndef Tk_AttachHWND
#define Tk_AttachHWND \
(tkPlatStubsPtr->tk_AttachHWND) /* 0 */
-#endif
-#ifndef Tk_GetHINSTANCE
#define Tk_GetHINSTANCE \
(tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */
-#endif
-#ifndef Tk_GetHWND
#define Tk_GetHWND \
(tkPlatStubsPtr->tk_GetHWND) /* 2 */
-#endif
-#ifndef Tk_HWNDToWindow
#define Tk_HWNDToWindow \
(tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */
-#endif
-#ifndef Tk_PointerEvent
#define Tk_PointerEvent \
(tkPlatStubsPtr->tk_PointerEvent) /* 4 */
-#endif
-#ifndef Tk_TranslateWinEvent
#define Tk_TranslateWinEvent \
(tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */
-#endif
#endif /* UNIX */
#ifdef __WIN32__ /* WIN */
-#ifndef Tk_AttachHWND
#define Tk_AttachHWND \
(tkPlatStubsPtr->tk_AttachHWND) /* 0 */
-#endif
-#ifndef Tk_GetHINSTANCE
#define Tk_GetHINSTANCE \
(tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */
-#endif
-#ifndef Tk_GetHWND
#define Tk_GetHWND \
(tkPlatStubsPtr->tk_GetHWND) /* 2 */
-#endif
-#ifndef Tk_HWNDToWindow
#define Tk_HWNDToWindow \
(tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */
-#endif
-#ifndef Tk_PointerEvent
#define Tk_PointerEvent \
(tkPlatStubsPtr->tk_PointerEvent) /* 4 */
-#endif
-#ifndef Tk_TranslateWinEvent
#define Tk_TranslateWinEvent \
(tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */
-#endif
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
-#ifndef Tk_AttachHWND
#define Tk_AttachHWND \
(tkPlatStubsPtr->tk_AttachHWND) /* 0 */
-#endif
-#ifndef Tk_GetHINSTANCE
#define Tk_GetHINSTANCE \
(tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */
-#endif
-#ifndef Tk_GetHWND
#define Tk_GetHWND \
(tkPlatStubsPtr->tk_GetHWND) /* 2 */
-#endif
-#ifndef Tk_HWNDToWindow
#define Tk_HWNDToWindow \
(tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */
-#endif
-#ifndef Tk_PointerEvent
#define Tk_PointerEvent \
(tkPlatStubsPtr->tk_PointerEvent) /* 4 */
-#endif
-#ifndef Tk_TranslateWinEvent
#define Tk_TranslateWinEvent \
(tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */
-#endif
-#ifndef TkMacOSXInvalClipRgns
#define TkMacOSXInvalClipRgns \
(tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */
-#endif
-#ifndef TkMacOSXGetDrawablePort
#define TkMacOSXGetDrawablePort \
(tkPlatStubsPtr->tkMacOSXGetDrawablePort) /* 7 */
-#endif
-#ifndef TkMacOSXGetRootControl
#define TkMacOSXGetRootControl \
(tkPlatStubsPtr->tkMacOSXGetRootControl) /* 8 */
-#endif
-#ifndef Tk_MacOSXSetupTkNotifier
#define Tk_MacOSXSetupTkNotifier \
(tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */
-#endif
-#ifndef Tk_MacOSXIsAppInFront
#define Tk_MacOSXIsAppInFront \
(tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */
-#endif
#endif /* AQUA */
-#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
+#endif /* defined(USE_TK_STUBS) */
/* !END!: Do not edit above this line. */
+#ifdef __cplusplus
+}
+#endif
+
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT