| 1 | /* $Id: obj_shellview.h,v 1.7 2000-08-18 02:04:23 phaller Exp $ */
|
|---|
| 2 | /************************************************************
|
|---|
| 3 | * IShellView
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | #ifndef __WINE_WINE_OBJ_SHELLVIEW_H
|
|---|
| 7 | #define __WINE_WINE_OBJ_SHELLVIEW_H
|
|---|
| 8 |
|
|---|
| 9 | #include "winbase.h"
|
|---|
| 10 | #include "winuser.h"
|
|---|
| 11 | #include "wine/obj_base.h"
|
|---|
| 12 | #include "wine/obj_inplace.h"
|
|---|
| 13 | #include "wine/obj_shellfolder.h"
|
|---|
| 14 | #include "prsht.h" /* LPFNADDPROPSHEETPAGE */
|
|---|
| 15 |
|
|---|
| 16 | #ifdef __cplusplus
|
|---|
| 17 | extern "C" {
|
|---|
| 18 | #endif /* defined(__cplusplus) */
|
|---|
| 19 |
|
|---|
| 20 | /****************************************************************************
|
|---|
| 21 | * IShellBrowser is here defined because of a cyclic dependance between
|
|---|
| 22 | * IShellBrowser and IShellView
|
|---|
| 23 | */
|
|---|
| 24 | typedef struct IShellBrowser IShellBrowser, *LPSHELLBROWSER;
|
|---|
| 25 |
|
|---|
| 26 | typedef struct IShellView IShellView, *LPSHELLVIEW;
|
|---|
| 27 |
|
|---|
| 28 | /* shellview select item flags*/
|
|---|
| 29 | #define SVSI_DESELECT 0x0000
|
|---|
| 30 | #define SVSI_SELECT 0x0001
|
|---|
| 31 | #define SVSI_EDIT 0x0003 /* includes select */
|
|---|
| 32 | #define SVSI_DESELECTOTHERS 0x0004
|
|---|
| 33 | #define SVSI_ENSUREVISIBLE 0x0008
|
|---|
| 34 | #define SVSI_FOCUSED 0x0010
|
|---|
| 35 |
|
|---|
| 36 | /* shellview get item object flags */
|
|---|
| 37 | #define SVGIO_BACKGROUND 0x00000000
|
|---|
| 38 | #define SVGIO_SELECTION 0x00000001
|
|---|
| 39 | #define SVGIO_ALLVIEW 0x00000002
|
|---|
| 40 |
|
|---|
| 41 | /* The explorer dispatches WM_COMMAND messages based on the range of
|
|---|
| 42 | command/menuitem IDs. All the IDs of menuitems that the view (right
|
|---|
| 43 | pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
|
|---|
| 44 | won't dispatch them). The view should not deal with any menuitems
|
|---|
| 45 | in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
|
|---|
| 46 | version of the shell).
|
|---|
| 47 |
|
|---|
| 48 | FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
|
|---|
| 49 | FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
|
|---|
| 50 | FCIDM_GLOBAL/LAST for the explorer's submenu IDs
|
|---|
| 51 | */
|
|---|
| 52 | #define FCIDM_SHVIEWFIRST 0x0000
|
|---|
| 53 | /* undocumented */
|
|---|
| 54 | #define FCIDM_SHVIEW_ARRANGE 0x7001
|
|---|
| 55 | #define FCIDM_SHVIEW_DELETE 0x7011
|
|---|
| 56 | #define FCIDM_SHVIEW_PROPERTIES 0x7013
|
|---|
| 57 | #define FCIDM_SHVIEW_CUT 0x7018
|
|---|
| 58 | #define FCIDM_SHVIEW_COPY 0x7019
|
|---|
| 59 | #define FCIDM_SHVIEW_INSERT 0x701A
|
|---|
| 60 | #define FCIDM_SHVIEW_UNDO 0x701B
|
|---|
| 61 | #define FCIDM_SHVIEW_INSERTLINK 0x701C
|
|---|
| 62 | #define FCIDM_SHVIEW_SELECTALL 0x7021
|
|---|
| 63 | #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
|
|---|
| 64 |
|
|---|
| 65 | #define FCIDM_SHVIEW_BIGICON 0x7029
|
|---|
| 66 | #define FCIDM_SHVIEW_SMALLICON 0x702A
|
|---|
| 67 | #define FCIDM_SHVIEW_LISTVIEW 0x702B
|
|---|
| 68 | #define FCIDM_SHVIEW_REPORTVIEW 0x702C
|
|---|
| 69 | /* 0x7030-0x703f are used by the shellbrowser */
|
|---|
| 70 | #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
|
|---|
| 71 | #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
|
|---|
| 72 |
|
|---|
| 73 | #define FCIDM_SHVIEW_HELP 0x7041
|
|---|
| 74 | #define FCIDM_SHVIEW_RENAME 0x7050
|
|---|
| 75 | #define FCIDM_SHVIEW_CREATELINK 0x7051
|
|---|
| 76 | #define FCIDM_SHVIEW_NEWLINK 0x7052
|
|---|
| 77 | #define FCIDM_SHVIEW_NEWFOLDER 0x7053
|
|---|
| 78 |
|
|---|
| 79 | #define FCIDM_SHVIEW_REFRESH 0x7100 /* fixme */
|
|---|
| 80 | #define FCIDM_SHVIEW_EXPLORE 0x7101 /* fixme */
|
|---|
| 81 | #define FCIDM_SHVIEW_OPEN 0x7102 /* fixme */
|
|---|
| 82 |
|
|---|
| 83 | #define FCIDM_SHVIEWLAST 0x7fff
|
|---|
| 84 | #define FCIDM_BROWSERFIRST 0xA000
|
|---|
| 85 | /* undocumented toolbar items from stddlg's*/
|
|---|
| 86 | #define FCIDM_TB_UPFOLDER 0xA001
|
|---|
| 87 | #define FCIDM_TB_NEWFOLDER 0xA002
|
|---|
| 88 | #define FCIDM_TB_SMALLICON 0xA003
|
|---|
| 89 | #define FCIDM_TB_REPORTVIEW 0xA004
|
|---|
| 90 | #define FCIDM_TB_DESKTOP 0xA005 /* fixme */
|
|---|
| 91 |
|
|---|
| 92 | #define FCIDM_BROWSERLAST 0xbf00
|
|---|
| 93 | #define FCIDM_GLOBALFIRST 0x8000
|
|---|
| 94 | #define FCIDM_GLOBALLAST 0x9fff
|
|---|
| 95 |
|
|---|
| 96 | /*
|
|---|
| 97 | * Global submenu IDs and separator IDs
|
|---|
| 98 | */
|
|---|
| 99 | #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
|
|---|
| 100 | #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
|
|---|
| 101 | #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
|
|---|
| 102 | #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
|
|---|
| 103 | #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
|
|---|
| 104 | #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
|
|---|
| 105 | #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
|
|---|
| 106 | #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
|
|---|
| 107 | #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
|
|---|
| 108 | #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
|
|---|
| 109 |
|
|---|
| 110 | /* control IDs known to the view */
|
|---|
| 111 | #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
|
|---|
| 112 | #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
|
|---|
| 113 |
|
|---|
| 114 | /* uState values for IShellView::UIActivate */
|
|---|
| 115 | typedef enum
|
|---|
| 116 | { SVUIA_DEACTIVATE = 0,
|
|---|
| 117 | SVUIA_ACTIVATE_NOFOCUS = 1,
|
|---|
| 118 | SVUIA_ACTIVATE_FOCUS = 2,
|
|---|
| 119 | SVUIA_INPLACEACTIVATE = 3 /* new flag for IShellView2 */
|
|---|
| 120 | } SVUIA_STATUS;
|
|---|
| 121 |
|
|---|
| 122 | #define ICOM_INTERFACE IShellView
|
|---|
| 123 | #define IShellView_METHODS \
|
|---|
| 124 | ICOM_METHOD1(HRESULT, TranslateAccelerator, LPMSG, lpmsg) \
|
|---|
| 125 | ICOM_METHOD1(HRESULT, EnableModeless, BOOL, fEnable) \
|
|---|
| 126 | ICOM_METHOD1(HRESULT, UIActivate, UINT, uState) \
|
|---|
| 127 | ICOM_METHOD(HRESULT, Refresh) \
|
|---|
| 128 | ICOM_METHOD5(HRESULT, CreateViewWindow, IShellView*, lpPrevView, LPCFOLDERSETTINGS, lpfs, IShellBrowser*, psb, RECT*, prcView, HWND*, phWnd) \
|
|---|
| 129 | ICOM_METHOD(HRESULT, DestroyViewWindow) \
|
|---|
| 130 | ICOM_METHOD1(HRESULT, GetCurrentInfo, LPFOLDERSETTINGS, lpfs) \
|
|---|
| 131 | ICOM_METHOD3(HRESULT, AddPropertySheetPages, DWORD, dwReserved, LPFNADDPROPSHEETPAGE, lpfn, LPARAM, lparam) \
|
|---|
| 132 | ICOM_METHOD (HRESULT, SaveViewState) \
|
|---|
| 133 | ICOM_METHOD2(HRESULT, SelectItem, LPCITEMIDLIST, pidlItem, UINT, uFlags) \
|
|---|
| 134 | ICOM_METHOD3(HRESULT, GetItemObject, UINT, uItem, REFIID, riid, LPVOID*, ppv) \
|
|---|
| 135 | ICOM_METHOD1(HRESULT, EditItem, LPCITEMIDLIST, pidlItem)
|
|---|
| 136 | #define IShellView_IMETHODS \
|
|---|
| 137 | IOleWindow_IMETHODS \
|
|---|
| 138 | IShellView_METHODS
|
|---|
| 139 | ICOM_DEFINE(IShellView,IOleWindow)
|
|---|
| 140 | #undef ICOM_INTERFACE
|
|---|
| 141 |
|
|---|
| 142 | /*** IUnknown methods ***/
|
|---|
| 143 | #define IShellView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 144 | #define IShellView_AddRef(p) ICOM_CALL(AddRef,p)
|
|---|
| 145 | #define IShellView_Release(p) ICOM_CALL(Release,p)
|
|---|
| 146 | /*** IShellView methods ***/
|
|---|
| 147 | #define IShellView_GetWindow(p,a) ICOM_CALL1(GetWindow,p,a)
|
|---|
| 148 | #define IShellView_ContextSensitiveHelp(p,a) ICOM_CALL1(ContextSensitiveHelp,p,a)
|
|---|
| 149 | #define IShellView_TranslateAccelerator(p,a) ICOM_CALL1(TranslateAccelerator,p,a)
|
|---|
| 150 | #define IShellView_EnableModeless(p,a) ICOM_CALL1(EnableModeless,p,a)
|
|---|
| 151 | #define IShellView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
|
|---|
| 152 | #define IShellView_Refresh(p) ICOM_CALL(Refresh,p)
|
|---|
| 153 | #define IShellView_CreateViewWindow(p,a,b,c,d,e) ICOM_CALL5(CreateViewWindow,p,a,b,c,d,e)
|
|---|
| 154 | #define IShellView_DestroyViewWindow(p) ICOM_CALL(DestroyViewWindow,p)
|
|---|
| 155 | #define IShellView_GetCurrentInfo(p,a) ICOM_CALL1(GetCurrentInfo,p,a)
|
|---|
| 156 | #define IShellView_AddPropertySheetPages(p,a,b,c) ICOM_CALL3(AddPropertySheetPages,p,a,b,c)
|
|---|
| 157 | #define IShellView_SaveViewState(p) ICOM_CALL(SaveViewState,p)
|
|---|
| 158 | #define IShellView_SelectItem(p,a,b) ICOM_CALL2(SelectItem,p,a,b)
|
|---|
| 159 | #define IShellView_GetItemObject(p,a,b,c) ICOM_CALL3(GetItemObject,p,a,b,c)
|
|---|
| 160 | /* WINE specific */
|
|---|
| 161 | #define IShellView_EditItem(p,a)ICOM_CALL1(EditItem,p,a)
|
|---|
| 162 |
|
|---|
| 163 | #ifdef __cplusplus
|
|---|
| 164 | } /* extern "C" */
|
|---|
| 165 | #endif /* defined(__cplusplus) */
|
|---|
| 166 |
|
|---|
| 167 | #endif /* __WINE_WINE_OBJ_SHELLVIEW_H */
|
|---|