| 1 | /* $Id: obj_contextmenu.h,v 1.6 2000-08-18 02:04:16 phaller Exp $ */
|
|---|
| 2 | /************************************************************
|
|---|
| 3 | * IContextMenu
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | #ifndef __WINE_WINE_OBJ_CONTEXTMENU_H
|
|---|
| 7 | #define __WINE_WINE_OBJ_CONTEXTMENU_H
|
|---|
| 8 |
|
|---|
| 9 | #include "winbase.h"
|
|---|
| 10 | #include "winuser.h"
|
|---|
| 11 | #include "wine/obj_base.h"
|
|---|
| 12 |
|
|---|
| 13 | #ifdef __cplusplus
|
|---|
| 14 | extern "C" {
|
|---|
| 15 | #endif /* defined(__cplusplus) */
|
|---|
| 16 |
|
|---|
| 17 | typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
|
|---|
| 18 |
|
|---|
| 19 | /* default menu items*/
|
|---|
| 20 | #define IDM_EXPLORE 0
|
|---|
| 21 | #define IDM_OPEN 1
|
|---|
| 22 | #define IDM_RENAME 2
|
|---|
| 23 | #define IDM_LAST IDM_RENAME
|
|---|
| 24 |
|
|---|
| 25 | /* QueryContextMenu uFlags */
|
|---|
| 26 | #define CMF_NORMAL 0x00000000
|
|---|
| 27 | #define CMF_DEFAULTONLY 0x00000001
|
|---|
| 28 | #define CMF_VERBSONLY 0x00000002
|
|---|
| 29 | #define CMF_EXPLORE 0x00000004
|
|---|
| 30 | #define CMF_NOVERBS 0x00000008
|
|---|
| 31 | #define CMF_CANRENAME 0x00000010
|
|---|
| 32 | #define CMF_NODEFAULT 0x00000020
|
|---|
| 33 | #define CMF_INCLUDESTATIC 0x00000040
|
|---|
| 34 | #define CMF_RESERVED 0xffff0000 /* View specific */
|
|---|
| 35 |
|
|---|
| 36 | /* GetCommandString uFlags */
|
|---|
| 37 | #define GCS_VERBA 0x00000000 /* canonical verb */
|
|---|
| 38 | #define GCS_HELPTEXTA 0x00000001 /* help text (for status bar) */
|
|---|
| 39 | #define GCS_VALIDATEA 0x00000002 /* validate command exists */
|
|---|
| 40 | #define GCS_VERBW 0x00000004 /* canonical verb (unicode) */
|
|---|
| 41 | #define GCS_HELPTEXTW 0x00000005 /* help text (unicode version) */
|
|---|
| 42 | #define GCS_VALIDATEW 0x00000006 /* validate command exists (unicode) */
|
|---|
| 43 | #define GCS_UNICODE 0x00000004 /* for bit testing - Unicode string */
|
|---|
| 44 |
|
|---|
| 45 | #define GCS_VERB GCS_VERBA
|
|---|
| 46 | #define GCS_HELPTEXT GCS_HELPTEXTA
|
|---|
| 47 | #define GCS_VALIDATE GCS_VALIDATEA
|
|---|
| 48 |
|
|---|
| 49 | #define CMDSTR_NEWFOLDERA "NewFolder"
|
|---|
| 50 | #define CMDSTR_VIEWLISTA "ViewList"
|
|---|
| 51 | #define CMDSTR_VIEWDETAILSA "ViewDetails"
|
|---|
| 52 | #define CMDSTR_NEWFOLDERW L"NewFolder"
|
|---|
| 53 | #define CMDSTR_VIEWLISTW L"ViewList"
|
|---|
| 54 | #define CMDSTR_VIEWDETAILSW L"ViewDetails"
|
|---|
| 55 |
|
|---|
| 56 | #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
|
|---|
| 57 | #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
|
|---|
| 58 | #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
|
|---|
| 59 |
|
|---|
| 60 | #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
|
|---|
| 61 | #define CMIC_MASK_ICON SEE_MASK_ICON
|
|---|
| 62 | #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
|
|---|
| 63 | #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
|
|---|
| 64 | #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
|
|---|
| 65 | #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
|
|---|
| 66 | #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
|
|---|
| 67 | #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
|
|---|
| 68 | #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
|
|---|
| 69 |
|
|---|
| 70 | #define CMIC_MASK_PTINVOKE 0x20000000
|
|---|
| 71 |
|
|---|
| 72 | /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
|
|---|
| 73 | typedef struct tagCMINVOKECOMMANDINFO
|
|---|
| 74 | { DWORD cbSize; /* sizeof(CMINVOKECOMMANDINFO) */
|
|---|
| 75 | DWORD fMask; /* any combination of CMIC_MASK_* */
|
|---|
| 76 | HWND hwnd; /* might be NULL (indicating no owner window) */
|
|---|
| 77 | LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
|
|---|
| 78 | LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
|
|---|
| 79 | LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
|
|---|
| 80 | INT nShow; /* one of SW_ values for ShowWindow() API */
|
|---|
| 81 |
|
|---|
| 82 | DWORD dwHotKey;
|
|---|
| 83 | HANDLE hIcon;
|
|---|
| 84 | } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
|
|---|
| 85 |
|
|---|
| 86 | typedef struct tagCMInvokeCommandInfoEx
|
|---|
| 87 | { DWORD cbSize; /* must be sizeof(CMINVOKECOMMANDINFOEX) */
|
|---|
| 88 | DWORD fMask; /* any combination of CMIC_MASK_* */
|
|---|
| 89 | HWND hwnd; /* might be NULL (indicating no owner window) */
|
|---|
| 90 | LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
|
|---|
| 91 | LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
|
|---|
| 92 | LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
|
|---|
| 93 | INT nShow; /* one of SW_ values for ShowWindow() API */
|
|---|
| 94 |
|
|---|
| 95 | DWORD dwHotKey;
|
|---|
| 96 |
|
|---|
| 97 | HANDLE hIcon;
|
|---|
| 98 | LPCSTR lpTitle; /* For CreateProcess-StartupInfo.lpTitle */
|
|---|
| 99 | LPCWSTR lpVerbW; /* Unicode verb (for those who can use it) */
|
|---|
| 100 | LPCWSTR lpParametersW; /* Unicode parameters (for those who can use it) */
|
|---|
| 101 | LPCWSTR lpDirectoryW; /* Unicode directory (for those who can use it) */
|
|---|
| 102 | LPCWSTR lpTitleW; /* Unicode title (for those who can use it) */
|
|---|
| 103 | POINT ptInvoke; /* Point where it's invoked */
|
|---|
| 104 |
|
|---|
| 105 | } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
|
|---|
| 106 |
|
|---|
| 107 | #define ICOM_INTERFACE IContextMenu
|
|---|
| 108 | #define IContextMenu_METHODS \
|
|---|
| 109 | ICOM_METHOD5(HRESULT, QueryContextMenu, HMENU, hmenu, UINT, indexMenu, UINT, idCmdFirst, UINT, idCmdLast, UINT, uFlags) \
|
|---|
| 110 | ICOM_METHOD1(HRESULT, InvokeCommand, LPCMINVOKECOMMANDINFO, lpici) \
|
|---|
| 111 | ICOM_METHOD5(HRESULT, GetCommandString, UINT, idCmd, UINT, uType, UINT*, pwReserved, LPSTR, pszName, UINT, cchMax) \
|
|---|
| 112 | ICOM_METHOD3(HRESULT, HandleMenuMsg, UINT, uMsg, WPARAM, wParam, LPARAM, lParam) \
|
|---|
| 113 | void * guard; /*possibly another nasty entry from ContextMenu3 ?*/
|
|---|
| 114 | #define IContextMenu_IMETHODS \
|
|---|
| 115 | IUnknown_IMETHODS \
|
|---|
| 116 | IContextMenu_METHODS
|
|---|
| 117 | ICOM_DEFINE(IContextMenu,IUnknown)
|
|---|
| 118 | #undef ICOM_INTERFACE
|
|---|
| 119 |
|
|---|
| 120 | #ifdef ICOM_CINTERFACE
|
|---|
| 121 | #define IContextMenu_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 122 | #define IContextMenu_AddRef(p) ICOM_CALL(AddRef,p)
|
|---|
| 123 | #define IContextMenu_Release(p) ICOM_CALL(Release,p)
|
|---|
| 124 | #define IContextMenu_QueryContextMenu(p,a,b,c,d,e) ICOM_CALL5(QueryContextMenu,p,a,b,c,d,e)
|
|---|
| 125 | #define IContextMenu_InvokeCommand(p,a) ICOM_CALL1(InvokeCommand,p,a)
|
|---|
| 126 | #define IContextMenu_GetCommandString(p,a,b,c,d,e) ICOM_CALL5(GetCommandString,p,a,b,c,d,e)
|
|---|
| 127 | #define IContextMenu_HandleMenuMsg(p,a,b,c) ICOM_CALL3(HandleMenuMsg,p,a,b,c)
|
|---|
| 128 | #endif
|
|---|
| 129 |
|
|---|
| 130 | #ifdef __cplusplus
|
|---|
| 131 | } /* extern "C" */
|
|---|
| 132 | #endif /* defined(__cplusplus) */
|
|---|
| 133 |
|
|---|
| 134 | #endif /* __WINE_WINE_OBJ_CONTEXTMENU_H */
|
|---|