More portability fixes (thanks to Juergen Lock).
[wine.git] / include / wine / obj_shellview.h
blob63a3f0d935558e4280936549dd492ed63141b2e2
1 /************************************************************
2 * IShellView
3 */
5 #ifndef __WINE_WINE_OBJ_SHELLVIEW_H
6 #define __WINE_WINE_OBJ_SHELLVIEW_H
8 #include "winbase.h"
9 #include "winuser.h"
10 #include "wine/obj_base.h"
11 #include "wine/obj_inplace.h"
12 #include "wine/obj_shellfolder.h"
13 #include "prsht.h" /* LPFNADDPROPSHEETPAGE */
15 #ifdef __cplusplus
16 extern "C" {
17 #endif /* defined(__cplusplus) */
19 /****************************************************************************
20 * IShellBrowser is here defined because of a cyclic dependance between
21 * IShellBrowser and IShellView
23 typedef struct IShellBrowser IShellBrowser, *LPSHELLBROWSER;
25 DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
26 typedef struct IShellView IShellView, *LPSHELLVIEW;
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
36 /* shellview get item object flags */
37 #define SVGIO_BACKGROUND 0x00000000
38 #define SVGIO_SELECTION 0x00000001
39 #define SVGIO_ALLVIEW 0x00000002
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).
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
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 #define FCIDM_SHVIEW_BIGICON 0x7029
65 #define FCIDM_SHVIEW_SMALLICON 0x702A
66 #define FCIDM_SHVIEW_LISTVIEW 0x702B
67 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
68 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
69 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
70 #define FCIDM_SHVIEW_HELP 0x7041
72 #define FCIDM_SHVIEWLAST 0x7fff
73 #define FCIDM_BROWSERFIRST 0xA000
74 /* undocumented toolbar items from stddlg's*/
75 #define FCIDM_TB_UPFOLDER 0xA001
76 #define FCIDM_TB_NEWFOLDER 0xA002
77 #define FCIDM_TB_SMALLICON 0xA003
78 #define FCIDM_TB_REPORTVIEW 0xA004
80 #define FCIDM_BROWSERLAST 0xbf00
81 #define FCIDM_GLOBALFIRST 0x8000
82 #define FCIDM_GLOBALLAST 0x9fff
85 * Global submenu IDs and separator IDs
87 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
88 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
89 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
90 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
91 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
92 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
93 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
94 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
95 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
96 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
98 /* control IDs known to the view */
99 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
100 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
102 /* uState values for IShellView::UIActivate */
103 typedef enum
104 { SVUIA_DEACTIVATE = 0,
105 SVUIA_ACTIVATE_NOFOCUS = 1,
106 SVUIA_ACTIVATE_FOCUS = 2,
107 SVUIA_INPLACEACTIVATE = 3 /* new flag for IShellView2 */
108 } SVUIA_STATUS;
110 #define ICOM_INTERFACE IShellView
111 #define IShellView_METHODS \
112 ICOM_METHOD1(HRESULT, TranslateAccelerator, LPMSG, lpmsg) \
113 ICOM_METHOD1(HRESULT, EnableModeless, BOOL, fEnable) \
114 ICOM_METHOD1(HRESULT, UIActivate, UINT, uState) \
115 ICOM_METHOD(HRESULT, Refresh) \
116 ICOM_METHOD5(HRESULT, CreateViewWindow, IShellView*, lpPrevView, LPCFOLDERSETTINGS, lpfs, IShellBrowser*, psb, RECT*, prcView, HWND*, phWnd) \
117 ICOM_METHOD(HRESULT, DestroyViewWindow) \
118 ICOM_METHOD1(HRESULT, GetCurrentInfo, LPFOLDERSETTINGS, lpfs) \
119 ICOM_METHOD3(HRESULT, AddPropertySheetPages, DWORD, dwReserved, LPFNADDPROPSHEETPAGE, lpfn, LPARAM, lparam) \
120 ICOM_METHOD (HRESULT, SaveViewState) \
121 ICOM_METHOD2(HRESULT, SelectItem, LPCITEMIDLIST, pidlItem, UINT, uFlags) \
122 ICOM_METHOD3(HRESULT, GetItemObject, UINT, uItem, REFIID, riid, LPVOID*, ppv)
123 #define IShellView_IMETHODS \
124 IOleWindow_IMETHODS \
125 IShellView_METHODS
126 ICOM_DEFINE(IShellView,IOleWindow)
127 #undef ICOM_INTERFACE
129 /*** IUnknown methods ***/
130 #define IShellView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
131 #define IShellView_AddRef(p) ICOM_CALL(AddRef,p)
132 #define IShellView_Release(p) ICOM_CALL(Release,p)
133 /*** IShellView methods ***/
134 #define IShellView_GetWindow(p,a) ICOM_CALL1(GetWindow,p,a)
135 #define IShellView_ContextSensitiveHelp(p,a) ICOM_CALL1(ContextSensitiveHelp,p,a)
136 #define IShellView_TranslateAccelerator(p,a) ICOM_CALL1(TranslateAccelerator,p,a)
137 #define IShellView_EnableModeless(p,a) ICOM_CALL1(EnableModeless,p,a)
138 #define IShellView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
139 #define IShellView_Refresh(p) ICOM_CALL(Refresh,p)
140 #define IShellView_CreateViewWindow(p,a,b,c,d,e) ICOM_CALL5(CreateViewWindow,p,a,b,c,d,e)
141 #define IShellView_DestroyViewWindow(p) ICOM_CALL(DestroyViewWindow,p)
142 #define IShellView_GetCurrentInfo(p,a) ICOM_CALL1(GetCurrentInfo,p,a)
143 #define IShellView_AddPropertySheetPages(p,a,b,c) ICOM_CALL3(AddPropertySheetPages,p,a,b,c)
144 #define IShellView_SaveViewState(p) ICOM_CALL(SaveViewState,p)
145 #define IShellView_SelectItem(p,a,b) ICOM_CALL2(SelectItem,p,a,b)
146 #define IShellView_GetItemObject(p,a,b,c) ICOM_CALL3(GetItemObject,p,a,b,c)
148 #ifdef __cplusplus
149 } /* extern "C" */
150 #endif /* defined(__cplusplus) */
152 #endif /* __WINE_WINE_OBJ_SHELLVIEW_H */