4 * Copyright (C) 1999 Juergen Schmied
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_WINE_OBJ_SHELLVIEW_H
22 #define __WINE_WINE_OBJ_SHELLVIEW_H
26 #endif /* defined(__cplusplus) */
28 /****************************************************************************
29 * IShellBrowser is here defined because of a cyclic dependance between
30 * IShellBrowser and IShellView
32 typedef struct IShellBrowser IShellBrowser, *LPSHELLBROWSER;
34 typedef struct IShellView IShellView, *LPSHELLVIEW;
36 /* shellview select item flags*/
37 #define SVSI_DESELECT 0x0000
38 #define SVSI_SELECT 0x0001
39 #define SVSI_EDIT 0x0003 /* includes select */
40 #define SVSI_DESELECTOTHERS 0x0004
41 #define SVSI_ENSUREVISIBLE 0x0008
42 #define SVSI_FOCUSED 0x0010
44 /* shellview get item object flags */
45 #define SVGIO_BACKGROUND 0x00000000
46 #define SVGIO_SELECTION 0x00000001
47 #define SVGIO_ALLVIEW 0x00000002
49 /* The explorer dispatches WM_COMMAND messages based on the range of
50 command/menuitem IDs. All the IDs of menuitems that the view (right
51 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
52 won't dispatch them). The view should not deal with any menuitems
53 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
54 version of the shell).
56 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
57 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
58 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
60 #define FCIDM_SHVIEWFIRST 0x0000
62 #define FCIDM_SHVIEW_ARRANGE 0x7001
63 #define FCIDM_SHVIEW_DELETE 0x7011
64 #define FCIDM_SHVIEW_PROPERTIES 0x7013
65 #define FCIDM_SHVIEW_CUT 0x7018
66 #define FCIDM_SHVIEW_COPY 0x7019
67 #define FCIDM_SHVIEW_INSERT 0x701A
68 #define FCIDM_SHVIEW_UNDO 0x701B
69 #define FCIDM_SHVIEW_INSERTLINK 0x701C
70 #define FCIDM_SHVIEW_SELECTALL 0x7021
71 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
73 #define FCIDM_SHVIEW_BIGICON 0x7029
74 #define FCIDM_SHVIEW_SMALLICON 0x702A
75 #define FCIDM_SHVIEW_LISTVIEW 0x702B
76 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
77 /* 0x7030-0x703f are used by the shellbrowser */
78 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
79 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
81 #define FCIDM_SHVIEW_HELP 0x7041
82 #define FCIDM_SHVIEW_RENAME 0x7050
83 #define FCIDM_SHVIEW_CREATELINK 0x7051
84 #define FCIDM_SHVIEW_NEWLINK 0x7052
85 #define FCIDM_SHVIEW_NEWFOLDER 0x7053
87 #define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */
88 #define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */
89 #define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */
91 #define FCIDM_SHVIEWLAST 0x7fff
92 #define FCIDM_BROWSERFIRST 0xA000
93 /* undocumented toolbar items from stddlg's*/
94 #define FCIDM_TB_UPFOLDER 0xA001
95 #define FCIDM_TB_NEWFOLDER 0xA002
96 #define FCIDM_TB_SMALLICON 0xA003
97 #define FCIDM_TB_REPORTVIEW 0xA004
98 #define FCIDM_TB_DESKTOP 0xA005 /* FIXME */
100 #define FCIDM_BROWSERLAST 0xbf00
101 #define FCIDM_GLOBALFIRST 0x8000
102 #define FCIDM_GLOBALLAST 0x9fff
105 * Global submenu IDs and separator IDs
107 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
108 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
109 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
110 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
111 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
112 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
113 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
114 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
115 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
116 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
118 /* control IDs known to the view */
119 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
120 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
122 /* uState values for IShellView::UIActivate */
124 { SVUIA_DEACTIVATE = 0,
125 SVUIA_ACTIVATE_NOFOCUS = 1,
126 SVUIA_ACTIVATE_FOCUS = 2,
127 SVUIA_INPLACEACTIVATE = 3 /* new flag for IShellView2 */
130 #define ICOM_INTERFACE IShellView
131 #define IShellView_METHODS \
132 ICOM_METHOD1(HRESULT, TranslateAccelerator, LPMSG, lpmsg) \
133 ICOM_METHOD1(HRESULT, EnableModeless, BOOL, fEnable) \
134 ICOM_METHOD1(HRESULT, UIActivate, UINT, uState) \
135 ICOM_METHOD(HRESULT, Refresh) \
136 ICOM_METHOD5(HRESULT, CreateViewWindow, IShellView*, lpPrevView, LPCFOLDERSETTINGS, lpfs, IShellBrowser*, psb, RECT*, prcView, HWND*, phWnd) \
137 ICOM_METHOD(HRESULT, DestroyViewWindow) \
138 ICOM_METHOD1(HRESULT, GetCurrentInfo, LPFOLDERSETTINGS, lpfs) \
139 ICOM_METHOD3(HRESULT, AddPropertySheetPages, DWORD, dwReserved, LPFNADDPROPSHEETPAGE, lpfn, LPARAM, lparam) \
140 ICOM_METHOD (HRESULT, SaveViewState) \
141 ICOM_METHOD2(HRESULT, SelectItem, LPCITEMIDLIST, pidlItem, UINT, uFlags) \
142 ICOM_METHOD3(HRESULT, GetItemObject, UINT, uItem, REFIID, riid, LPVOID*, ppv) \
143 ICOM_METHOD1(HRESULT, EditItem, LPCITEMIDLIST, pidlItem)
144 #define IShellView_IMETHODS \
145 IOleWindow_IMETHODS \
147 ICOM_DEFINE(IShellView,IOleWindow)
148 #undef ICOM_INTERFACE
150 /*** IUnknown methods ***/
151 #define IShellView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
152 #define IShellView_AddRef(p) ICOM_CALL(AddRef,p)
153 #define IShellView_Release(p) ICOM_CALL(Release,p)
154 /*** IShellView methods ***/
155 #define IShellView_GetWindow(p,a) ICOM_CALL1(GetWindow,p,a)
156 #define IShellView_ContextSensitiveHelp(p,a) ICOM_CALL1(ContextSensitiveHelp,p,a)
157 #define IShellView_TranslateAccelerator(p,a) ICOM_CALL1(TranslateAccelerator,p,a)
158 #define IShellView_EnableModeless(p,a) ICOM_CALL1(EnableModeless,p,a)
159 #define IShellView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
160 #define IShellView_Refresh(p) ICOM_CALL(Refresh,p)
161 #define IShellView_CreateViewWindow(p,a,b,c,d,e) ICOM_CALL5(CreateViewWindow,p,a,b,c,d,e)
162 #define IShellView_DestroyViewWindow(p) ICOM_CALL(DestroyViewWindow,p)
163 #define IShellView_GetCurrentInfo(p,a) ICOM_CALL1(GetCurrentInfo,p,a)
164 #define IShellView_AddPropertySheetPages(p,a,b,c) ICOM_CALL3(AddPropertySheetPages,p,a,b,c)
165 #define IShellView_SaveViewState(p) ICOM_CALL(SaveViewState,p)
166 #define IShellView_SelectItem(p,a,b) ICOM_CALL2(SelectItem,p,a,b)
167 #define IShellView_GetItemObject(p,a,b,c) ICOM_CALL3(GetItemObject,p,a,b,c)
169 #define IShellView_EditItem(p,a) ICOM_CALL1(EditItem,p,a)
173 #endif /* defined(__cplusplus) */
175 #endif /* __WINE_WINE_OBJ_SHELLVIEW_H */