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