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