1 /************************************************************
5 * word95 gets a IContextMenu Interface and calls HandleMenuMsg()
6 * whitch should only a member of IContextMenu2.
9 #ifndef __WINE_WINE_OBJ_CONTEXTMENU_H
10 #define __WINE_WINE_OBJ_CONTEXTMENU_H
14 #endif /* defined(__cplusplus) */
16 typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
18 /* QueryContextMenu uFlags */
19 #define CMF_NORMAL 0x00000000
20 #define CMF_DEFAULTONLY 0x00000001
21 #define CMF_VERBSONLY 0x00000002
22 #define CMF_EXPLORE 0x00000004
23 #define CMF_NOVERBS 0x00000008
24 #define CMF_CANRENAME 0x00000010
25 #define CMF_NODEFAULT 0x00000020
26 #define CMF_INCLUDESTATIC 0x00000040
27 #define CMF_RESERVED 0xffff0000 /* View specific */
29 /* GetCommandString uFlags */
30 #define GCS_VERBA 0x00000000 /* canonical verb */
31 #define GCS_HELPTEXTA 0x00000001 /* help text (for status bar) */
32 #define GCS_VALIDATEA 0x00000002 /* validate command exists */
33 #define GCS_VERBW 0x00000004 /* canonical verb (unicode) */
34 #define GCS_HELPTEXTW 0x00000005 /* help text (unicode version) */
35 #define GCS_VALIDATEW 0x00000006 /* validate command exists (unicode) */
36 #define GCS_UNICODE 0x00000004 /* for bit testing - Unicode string */
38 #define GCS_VERB GCS_VERBA
39 #define GCS_HELPTEXT GCS_HELPTEXTA
40 #define GCS_VALIDATE GCS_VALIDATEA
42 #define CMDSTR_NEWFOLDERA "NewFolder"
43 #define CMDSTR_VIEWLISTA "ViewList"
44 #define CMDSTR_VIEWDETAILSA "ViewDetails"
45 #define CMDSTR_NEWFOLDERW L"NewFolder"
46 #define CMDSTR_VIEWLISTW L"ViewList"
47 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
49 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
50 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
51 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
53 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
54 #define CMIC_MASK_ICON SEE_MASK_ICON
55 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
56 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
57 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
58 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
59 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
60 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
61 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
63 #define CMIC_MASK_PTINVOKE 0x20000000
65 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
66 typedef struct tagCMINVOKECOMMANDINFO
67 { DWORD cbSize; /* sizeof(CMINVOKECOMMANDINFO) */
68 DWORD fMask; /* any combination of CMIC_MASK_* */
69 HWND hwnd; /* might be NULL (indicating no owner window) */
70 LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
71 LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
72 LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
73 INT nShow; /* one of SW_ values for ShowWindow() API */
77 } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
79 typedef struct tagCMInvokeCommandInfoEx
80 { DWORD cbSize; /* must be sizeof(CMINVOKECOMMANDINFOEX) */
81 DWORD fMask; /* any combination of CMIC_MASK_* */
82 HWND hwnd; /* might be NULL (indicating no owner window) */
83 LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
84 LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
85 LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
86 INT nShow; /* one of SW_ values for ShowWindow() API */
91 LPCSTR lpTitle; /* For CreateProcess-StartupInfo.lpTitle */
92 LPCWSTR lpVerbW; /* Unicode verb (for those who can use it) */
93 LPCWSTR lpParametersW; /* Unicode parameters (for those who can use it) */
94 LPCWSTR lpDirectoryW; /* Unicode directory (for those who can use it) */
95 LPCWSTR lpTitleW; /* Unicode title (for those who can use it) */
96 POINT ptInvoke; /* Point where it's invoked */
98 } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
100 #define ICOM_INTERFACE IContextMenu
101 #define IContextMenu_METHODS \
102 ICOM_METHOD5(HRESULT, QueryContextMenu, HMENU, hmenu, UINT, indexMenu, UINT, idCmdFirst, UINT, idCmdLast, UINT, uFlags) \
103 ICOM_METHOD1(HRESULT, InvokeCommand, LPCMINVOKECOMMANDINFO, lpici) \
104 ICOM_METHOD5(HRESULT, GetCommandString, UINT, idCmd, UINT, uType, UINT*, pwReserved, LPSTR, pszName, UINT, cchMax) \
105 ICOM_METHOD3(HRESULT, HandleMenuMsg, UINT, uMsg, WPARAM, wParam, LPARAM, lParam) \
106 void * guard; /*possibly another nasty entry from ContextMenu3 ?*/
107 #define IContextMenu_IMETHODS \
110 ICOM_DEFINE(IContextMenu,IUnknown)
111 #undef ICOM_INTERFACE
113 #define IContextMenu_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
114 #define IContextMenu_AddRef(p) ICOM_CALL(AddRef,p)
115 #define IContextMenu_Release(p) ICOM_CALL(Release,p)
116 #define IContextMenu_QueryContextMenu(p,a,b,c,d,e) ICOM_CALL5(QueryContextMenu,p,a,b,c,d,e)
117 #define IContextMenu_InvokeCommand(p,a) ICOM_CALL1(InvokeCommand,p,a)
118 #define IContextMenu_GetCommandString(p,a,b,c,d,e) ICOM_CALL5(GetCommandString,p,a,b,c,d,e)
119 #define IContextMenu_HandleMenuMsg(p,a,b,c) ICOM_CALL3(HandleMenuMsg,p,a,b,c)
123 #endif /* defined(__cplusplus) */
125 #endif /* __WINE_WINE_OBJ_CONTEXTMENU_H */