From 76232afd665458d10f1e9dce1033e633cb3c6dea Mon Sep 17 00:00:00 2001 From: chengyemao Date: Tue, 28 Dec 2004 08:44:47 +0000 Subject: Added functions to support embedded menu widget FossilOrigin-Name: 50e2db17a136a02b1827c37180c87ab435cc3188 --- generic/tkPlatDecls.h | 22 +++++++++++++++++++++- generic/tkStubInit.c | 4 +++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index ec5363a..419b1bc 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPlatDecls.h,v 1.9 2004/03/17 18:15:43 das Exp $ + * RCS: @(#) $Id: tkPlatDecls.h,v 1.10 2004/12/28 08:44:48 chengyemao Exp $ */ #ifndef _TKPLATDECLS @@ -65,6 +65,16 @@ EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result)); #endif +#ifndef Tk_GetMenuHWND_TCL_DECLARED +#define Tk_GetMenuHWND_TCL_DECLARED +/* 6 */ +EXTERN HWND Tk_GetMenuHWND _ANSI_ARGS_((Tk_Window tkwin)); +#endif +#ifndef Tk_GetEmbeddedMenuHWND_TCL_DECLARED +#define Tk_GetEmbeddedMenuHWND_TCL_DECLARED +/* 7 */ +EXTERN HWND Tk_GetEmbeddedMenuHWND _ANSI_ARGS_((Tk_Window tkwin)); +#endif #endif /* __WIN32__ */ #ifdef MAC_OSX_TK #ifndef Tk_MacOSXSetEmbedHandler_TCL_DECLARED @@ -145,6 +155,8 @@ typedef struct TkPlatStubs { Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((HWND hwnd)); /* 3 */ void (*tk_PointerEvent) _ANSI_ARGS_((HWND hwnd, int x, int y)); /* 4 */ int (*tk_TranslateWinEvent) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result)); /* 5 */ + HWND (*tk_GetMenuHWND) _ANSI_ARGS_((Tk_Window tkwin)); /* 6 */ + HWND (*tk_GetEmbeddedMenuHWND) _ANSI_ARGS_((Tk_Window tkwin)); /* 7 */ #endif /* __WIN32__ */ #ifdef MAC_OSX_TK void (*tk_MacOSXSetEmbedHandler) _ANSI_ARGS_((Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacOSXEmbedGetClipProc * getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc)); /* 0 */ @@ -200,6 +212,14 @@ extern TkPlatStubs *tkPlatStubsPtr; #define Tk_TranslateWinEvent \ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif +#ifndef Tk_GetMenuHWND +#define Tk_GetMenuHWND \ + (tkPlatStubsPtr->tk_GetMenuHWND) /* 6 */ +#endif +#ifndef Tk_GetEmbeddedMenuHWND +#define Tk_GetEmbeddedMenuHWND \ + (tkPlatStubsPtr->tk_GetEmbeddedMenuHWND) /* 7 */ +#endif #endif /* __WIN32__ */ #ifdef MAC_OSX_TK #ifndef Tk_MacOSXSetEmbedHandler diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index ace250f..fe27b33 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStubInit.c,v 1.47 2004/12/17 14:30:46 chengyemao Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.48 2004/12/28 08:44:48 chengyemao Exp $ */ #include "tkInt.h" @@ -628,6 +628,8 @@ TkPlatStubs tkPlatStubs = { Tk_HWNDToWindow, /* 3 */ Tk_PointerEvent, /* 4 */ Tk_TranslateWinEvent, /* 5 */ + Tk_GetMenuHWND, /* 6 */ + Tk_GetEmbeddedMenuHWND, /* 7 */ #endif /* __WIN32__ */ #ifdef MAC_OSX_TK Tk_MacOSXSetEmbedHandler, /* 0 */ -- cgit v0.12