ole32: Constify a variable (and fix a typo concerning its level of indirection).
[wine/multimedia.git] / programs / progman / progman.h
blob59004b9ca42235d41df155bec05237fde6d401e2
1 /*
2 * Program Manager
4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef PROGMAN_H
23 #define PROGMAN_H
25 #define MAX_STRING_LEN 255
26 #define MAX_PATHNAME_LEN 1024
27 #define MAX_LANGUAGE_NUMBER (PM_LAST_LANGUAGE - PM_FIRST_LANGUAGE)
29 #include "windows.h"
31 /* Fallback icon */
32 #define DEFAULTICON OIC_WINLOGO
34 /* Icon index in M$ Window's progman.exe */
35 #define PROGMAN_ICON_INDEX 0
36 #define GROUP_ICON_INDEX 6
37 #define DEFAULT_ICON_INDEX 7
39 #define DEF_GROUP_WIN_XPOS 100
40 #define DEF_GROUP_WIN_YPOS 100
41 #define DEF_GROUP_WIN_WIDTH 300
42 #define DEF_GROUP_WIN_HEIGHT 200
44 typedef struct
46 HLOCAL hGroup;
47 HLOCAL hPrior;
48 HLOCAL hNext;
49 HWND hWnd;
50 /**/ /* Numbers are byte indexes in *.grp */
52 /**/ /* Program entry */
53 INT x, y; /* 0 - 3 */
54 INT nIconIndex; /* 4 - 5 */
55 HICON hIcon;
56 /* icon flags ??? */ /* 6 - 7 */
57 /* iconANDsize */ /* 8 - 9 */
58 /* iconXORsize */ /* 10 - 11 */
59 /* pointer to IconInfo */ /* 12 - 13 */
60 /* pointer to iconXORbits */ /* 14 - 15 */ /* sometimes iconANDbits ?! */
61 /* pointer to iconANDbits */ /* 16 - 17 */ /* sometimes iconXORbits ?! */
62 HLOCAL hName; /* 18 - 19 */
63 HLOCAL hCmdLine; /* 20 - 21 */
64 HLOCAL hIconFile; /* 22 - 23 */
65 HLOCAL hWorkDir; /* Extension 0x8101 */
66 INT nHotKey; /* Extension 0x8102 */
67 /* Modifier: bit 8... */
68 INT nCmdShow; /* Extension 0x8103 */
70 /**/ /* IconInfo */
71 /* HotSpot x ??? */ /* 0 - 1 */
72 /* HotSpot y ??? */ /* 2 - 3 */
73 /* Width */ /* 4 - 5 */
74 /* Height */ /* 6 - 7 */
75 /* WidthBytes ??? */ /* 8 - 9 */
76 /* Planes */ /* 10 - 10 */
77 /* BitsPerPixel */ /* 11 - 11 */
78 } PROGRAM;
80 typedef struct
82 HLOCAL hPrior;
83 HLOCAL hNext;
84 HWND hWnd;
85 HLOCAL hGrpFile;
86 HLOCAL hActiveProgram;
87 BOOL bFileNameModified;
88 BOOL bOverwriteFileOk;
89 INT seqnum;
91 /**/ /* Absolute */
92 /* magic `PMCC' */ /* 0 - 3 */
93 /* checksum */ /* 4 - 5 */
94 /* Extension ptr */ /* 6 - 7 */
95 INT nCmdShow; /* 8 - 9 */
96 INT x, y; /* 10 - 13 */
97 INT width, height; /* 14 - 17 */
98 INT iconx, icony; /* 18 - 21 */
99 HLOCAL hName; /* 22 - 23 */
100 /* unknown */ /* 24 - 31 */
101 /* number of programs */ /* 32 - 33 */
102 HLOCAL hPrograms; /* 34 ... */
104 /**/ /* Extensions */
105 /* Extension type */ /* 0 - 1 */
106 /* Program number */ /* 2 - 3 */
107 /* Size of entry */ /* 4 - 5 */
108 /* Data */ /* 6 ... */
110 /* magic `PMCC' */ /* Extension 0x8000 */
111 /* End of Extensions */ /* Extension 0xffff */
112 } PROGGROUP;
114 typedef struct
116 HANDLE hInstance;
117 HANDLE hAccel;
118 HWND hMainWnd;
119 HWND hMDIWnd;
120 HICON hMainIcon;
121 HICON hGroupIcon;
122 HICON hDefaultIcon;
123 HMENU hMainMenu;
124 HMENU hFileMenu;
125 HMENU hOptionMenu;
126 HMENU hWindowsMenu;
127 HMENU hLanguageMenu;
128 LPCSTR lpszIniFile;
129 LPCSTR lpszIcoFile;
130 BOOL bAutoArrange;
131 BOOL bSaveSettings;
132 BOOL bMinOnRun;
133 HLOCAL hGroups;
134 HLOCAL hActiveGroup;
135 } GLOBALS;
137 extern GLOBALS Globals;
139 INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type);
140 INT MAIN_MessageBoxIDS_s(UINT ids_text_s, LPCSTR str, UINT ids_title, WORD type);
141 VOID MAIN_ReplaceString(HLOCAL *handle, LPSTR replacestring);
143 HLOCAL GRPFILE_ReadGroupFile(const char* path);
144 BOOL GRPFILE_WriteGroupFile(HLOCAL hGroup);
146 ATOM GROUP_RegisterGroupWinClass(void);
147 HLOCAL GROUP_AddGroup(LPCSTR lpszName, LPCSTR lpszGrpFile, INT showcmd,
148 INT x, INT y, INT width, INT heiht,
149 INT iconx, INT icony,
150 BOOL bModifiedFileName, BOOL bOverwriteFileOk,
151 /* FIXME shouldn't be necessary */
152 BOOL bSuppressShowWindow);
153 VOID GROUP_NewGroup(void);
154 VOID GROUP_ModifyGroup(HLOCAL hGroup);
155 VOID GROUP_DeleteGroup(HLOCAL hGroup);
156 /* FIXME shouldn't be necessary */
157 VOID GROUP_ShowGroupWindow(HLOCAL hGroup);
158 HLOCAL GROUP_FirstGroup(void);
159 HLOCAL GROUP_NextGroup(HLOCAL hGroup);
160 HLOCAL GROUP_ActiveGroup(void);
161 HWND GROUP_GroupWnd(HLOCAL hGroup);
162 LPCSTR GROUP_GroupName(HLOCAL hGroup);
164 ATOM PROGRAM_RegisterProgramWinClass(void);
165 HLOCAL PROGRAM_AddProgram(HLOCAL hGroup, HICON hIcon, LPCSTR lpszName,
166 INT x, INT y, LPCSTR lpszCmdLine,
167 LPCSTR lpszIconFile, INT nIconIndex,
168 LPCSTR lpszWorkDir, INT nHotKey, INT nCmdShow);
169 VOID PROGRAM_NewProgram(HLOCAL hGroup);
170 VOID PROGRAM_ModifyProgram(HLOCAL hProgram);
171 VOID PROGRAM_CopyMoveProgram(HLOCAL hProgram, BOOL bMove);
172 VOID PROGRAM_DeleteProgram(HLOCAL hProgram, BOOL BUpdateGrpFile);
173 HLOCAL PROGRAM_FirstProgram(HLOCAL hGroup);
174 HLOCAL PROGRAM_NextProgram(HLOCAL hProgram);
175 HLOCAL PROGRAM_ActiveProgram(HLOCAL hGroup);
176 LPCSTR PROGRAM_ProgramName(HLOCAL hProgram);
177 VOID PROGRAM_ExecuteProgram(HLOCAL hLocal);
179 INT DIALOG_New(INT nDefault);
180 HLOCAL DIALOG_CopyMove(LPCSTR lpszProgramName, LPCSTR lpszGroupName, BOOL bMove);
181 BOOL DIALOG_Delete(UINT ids_format_s, LPCSTR lpszName);
182 BOOL DIALOG_GroupAttributes(LPSTR lpszTitle, LPSTR lpszPath, INT nSize);
183 BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine,
184 LPSTR lpszWorkDir, LPSTR lpszIconFile,
185 HICON *lphIcon, INT *nIconIndex,
186 INT *lpnHotKey, INT *lpnCmdShow, INT nSize);
187 VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile,
188 INT *lpnIconIndex, INT nSize);
189 VOID DIALOG_Execute(void);
191 VOID STRING_LoadMenus(VOID);
193 /* Class names */
194 extern CHAR STRING_MAIN_WIN_CLASS_NAME[];
195 extern CHAR STRING_MDI_WIN_CLASS_NAME[];
196 extern CHAR STRING_GROUP_WIN_CLASS_NAME[];
197 extern CHAR STRING_PROGRAM_WIN_CLASS_NAME[];
199 /* Resource names */
200 extern CHAR STRING_ACCEL[];
201 extern CHAR STRING_MAIN[];
202 extern CHAR STRING_NEW[];
203 extern CHAR STRING_OPEN[];
204 extern CHAR STRING_MOVE[];
205 extern CHAR STRING_COPY[];
206 extern CHAR STRING_DELETE[];
207 extern CHAR STRING_GROUP[];
208 extern CHAR STRING_PROGRAM[];
209 extern CHAR STRING_SYMBOL[];
210 extern CHAR STRING_EXECUTE[];
212 /* Stringtable index */
213 #define IDS_PROGRAM_MANAGER 0x02
214 #define IDS_ERROR 0x03
215 #define IDS_WARNING 0x04
216 #define IDS_INFO 0x05
217 #define IDS_DELETE 0x06
218 #define IDS_DELETE_GROUP_s 0x07
219 #define IDS_DELETE_PROGRAM_s 0x08
220 #define IDS_NOT_IMPLEMENTED 0x09
221 #define IDS_FILE_READ_ERROR_s 0x0a
222 #define IDS_FILE_WRITE_ERROR_s 0x0b
223 #define IDS_GRPFILE_READ_ERROR_s 0x0c
224 #define IDS_OUT_OF_MEMORY 0x0d
225 #define IDS_WINHELP_ERROR 0x0e
226 #define IDS_UNKNOWN_FEATURE_s 0x0f
227 #define IDS_FILE_NOT_OVERWRITTEN_s 0x10
228 #define IDS_SAVE_GROUP_AS_s 0x11
229 #define IDS_NO_HOT_KEY 0x12
230 #define IDS_ALL_FILES 0x13
231 #define IDS_PROGRAMS 0x14
232 #define IDS_LIBRARIES_DLL 0x15
233 #define IDS_SYMBOL_FILES 0x16
234 #define IDS_SYMBOLS_ICO 0x17
236 #define IDS_LICENSE_CAPTION 0x20
237 #define IDS_LICENSE 0x21
238 #define IDS_WARRANTY_CAPTION 0x22
239 #define IDS_WARRANTY 0x23
241 /* Menu */
243 #define MAIN_MENU 0x109
244 #define PM_NEW 0x100
245 #define PM_OPEN 0x101
246 #define PM_MOVE 0x102
247 #define PM_COPY 0x103
248 #define PM_DELETE 0x104
249 #define PM_ATTRIBUTES 0x105
250 #define PM_EXECUTE 0x107
251 #define PM_EXIT 0x108
253 #define PM_AUTO_ARRANGE 0x110
254 #define PM_MIN_ON_RUN 0x111
255 #define PM_SAVE_SETTINGS 0x113
257 #define PM_OVERLAP 0x120
258 #define PM_SIDE_BY_SIDE 0x121
259 #define PM_ARRANGE 0x122
260 #define PM_FIRST_CHILD 0x3030
263 *#define PM_FIRST_LANGUAGE 0x400
264 *#define PM_LAST_LANGUAGE 0x499
267 #define PM_CONTENTS 0x131
268 #define PM_SEARCH 0x132
269 #define PM_HELPONHELP 0x133
270 #define PM_TUTORIAL 0x134
272 #define PM_LICENSE 0x140
273 #define PM_NO_WARRANTY 0x141
274 #define PM_ABOUT_WINE 0x142
276 /* Dialog `New' */
278 /* RADIOBUTTON: The next two must be in sequence */
279 #define PM_NEW_GROUP 0x150
280 #define PM_NEW_PROGRAM 0x151
281 #define PM_NEW_GROUP_TXT 0x152
282 #define PM_NEW_PROGRAM_TXT 0x153
284 /* Dialogs `Copy', `Move' */
286 #define PM_PROGRAM 0x160
287 #define PM_FROM_GROUP 0x161
288 #define PM_TO_GROUP 0x162
289 #define PM_TO_GROUP_TXT 0x163
291 /* Dialogs `Group attributes' */
293 #define PM_DESCRIPTION 0x170
294 #define PM_DESCRIPTION_TXT 0x171
295 #define PM_FILE 0x172
296 #define PM_FILE_TXT 0x173
298 /* Dialogs `Program attributes' */
299 #define PM_COMMAND_LINE 0x180
300 #define PM_COMMAND_LINE_TXT 0x181
301 #define PM_DIRECTORY 0x182
302 #define PM_DIRECTORY_TXT 0x183
303 #define PM_HOT_KEY 0x184
304 #define PM_HOT_KEY_TXT 0x185
305 #define PM_ICON 0x186
306 #define PM_OTHER_SYMBOL 0x187
308 /* Dialog `Symbol' */
310 #define PM_ICON_FILE 0x190
311 #define PM_ICON_FILE_TXT 0x191
312 #define PM_SYMBOL_LIST 0x192
313 #define PM_SYMBOL_LIST_TXT 0x193
315 /* Dialog `Execute' */
317 #define PM_COMMAND 0x1a0
318 #define PM_SYMBOL 0x1a1
319 #define PM_BROWSE 0x1a2
320 #define PM_HELP 0x1a3
322 #endif /* PROGMAN_H */
324 /* Local Variables: */
325 /* c-file-style: "GNU" */
326 /* End: */