Release 981025.
[wine/gsoc-2012-control.git] / programs / progman / progman.h
blobc2dea1fe36f045cbc1f72fb761c5361d41e9bbdd
1 /*
2 * Program Manager
4 * Copyright 1996 Ulrich Schmid
5 */
7 #ifndef PROGMAN_H
8 #define PROGMAN_H
10 #define MAX_STRING_LEN 255
11 #define MAX_PATHNAME_LEN 1024
12 #define MAX_LANGUAGE_NUMBER (PM_LAST_LANGUAGE - PM_FIRST_LANGUAGE)
14 #ifndef RC_INVOKED
16 #include "windows.h"
18 /* Fallback icon */
19 #ifdef WINELIB
20 #define DEFAULTICON OIC_WINEICON
21 #else
22 #define DEFAULTICON OIC_LANDSCAPE
23 #endif
25 /* Icon index in M$ Window's progman.exe */
26 #define PROGMAN_ICON_INDEX 0
27 #define GROUP_ICON_INDEX 6
28 #define DEFAULT_ICON_INDEX 7
30 #define DEF_GROUP_WIN_XPOS 100
31 #define DEF_GROUP_WIN_YPOS 100
32 #define DEF_GROUP_WIN_WIDTH 300
33 #define DEF_GROUP_WIN_HEIGHT 200
35 typedef struct
37 HLOCAL hGroup;
38 HLOCAL hPrior;
39 HLOCAL hNext;
40 HWND hWnd;
41 /**/ /* Numbers are byte indexes in *.grp */
43 /**/ /* Program entry */
44 INT x, y; /* 0 - 3 */
45 INT nIconIndex; /* 4 - 5 */
46 HICON hIcon;
47 /* icon flags ??? */ /* 6 - 7 */
48 /* iconANDsize */ /* 8 - 9 */
49 /* iconXORsize */ /* 10 - 11 */
50 /* pointer to IconInfo */ /* 12 - 13 */
51 /* pointer to iconXORbits */ /* 14 - 15 */ /* sometimes iconANDbits ?! */
52 /* pointer to iconANDbits */ /* 16 - 17 */ /* sometimes iconXORbits ?! */
53 HLOCAL hName; /* 18 - 19 */
54 HLOCAL hCmdLine; /* 20 - 21 */
55 HLOCAL hIconFile; /* 22 - 23 */
56 HLOCAL hWorkDir; /* Extension 0x8101 */
57 INT nHotKey; /* Extension 0x8102 */
58 /* Modifier: bit 8... */
59 INT nCmdShow; /* Extension 0x8103 */
61 /**/ /* IconInfo */
62 /* HotSpot x ??? */ /* 0 - 1 */
63 /* HotSpot y ??? */ /* 2 - 3 */
64 /* Width */ /* 4 - 5 */
65 /* Height */ /* 6 - 7 */
66 /* WidthBytes ??? */ /* 8 - 9 */
67 /* Planes */ /* 10 - 10 */
68 /* BitsPerPixel */ /* 11 - 11 */
69 } PROGRAM;
71 typedef struct
73 HLOCAL hPrior;
74 HLOCAL hNext;
75 HWND hWnd;
76 HLOCAL hGrpFile;
77 HLOCAL hActiveProgram;
78 BOOL bFileNameModified;
79 BOOL bOverwriteFileOk;
80 INT seqnum;
82 /**/ /* Absolute */
83 /* magic `PMCC' */ /* 0 - 3 */
84 /* checksum */ /* 4 - 5 */
85 /* Extension ptr */ /* 6 - 7 */
86 INT nCmdShow; /* 8 - 9 */
87 INT x, y; /* 10 - 13 */
88 INT width, height; /* 14 - 17 */
89 INT iconx, icony; /* 18 - 21 */
90 HLOCAL hName; /* 22 - 23 */
91 /* unknown */ /* 24 - 31 */
92 /* number of programs */ /* 32 - 33 */
93 HLOCAL hPrograms; /* 34 ... */
95 /**/ /* Extensions */
96 /* Extension type */ /* 0 - 1 */
97 /* Program number */ /* 2 - 3 */
98 /* Size of entry */ /* 4 - 5 */
99 /* Data */ /* 6 ... */
101 /* magic `PMCC' */ /* Extension 0x8000 */
102 /* End of Extensions */ /* Extension 0xffff */
103 } GROUP;
105 typedef struct
107 HANDLE hInstance;
108 HANDLE hAccel;
109 HWND hMainWnd;
110 HWND hMDIWnd;
111 HICON hMainIcon;
112 HICON hGroupIcon;
113 HICON hDefaultIcon;
114 HMENU hMainMenu;
115 HMENU hFileMenu;
116 HMENU hOptionMenu;
117 HMENU hWindowsMenu;
118 HMENU hLanguageMenu;
119 LPCSTR lpszIniFile;
120 LPCSTR lpszIcoFile;
121 BOOL bAutoArrange;
122 BOOL bSaveSettings;
123 BOOL bMinOnRun;
124 HLOCAL hGroups;
125 LPCSTR lpszLanguage;
126 UINT wStringTableOffset;
127 HLOCAL hActiveGroup;
128 } GLOBALS;
130 extern GLOBALS Globals;
132 INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type);
133 INT MAIN_MessageBoxIDS_s(UINT ids_text_s, LPCSTR str, UINT ids_title, WORD type);
134 VOID MAIN_ReplaceString(HLOCAL *handle, LPSTR replacestring);
136 HLOCAL GRPFILE_ReadGroupFile(const char* path);
137 BOOL GRPFILE_WriteGroupFile(HLOCAL hGroup);
139 ATOM GROUP_RegisterGroupWinClass(void);
140 HLOCAL GROUP_AddGroup(LPCSTR lpszName, LPCSTR lpszGrpFile, INT showcmd,
141 INT x, INT y, INT width, INT heiht,
142 INT iconx, INT icony,
143 BOOL bModifiedFileName, BOOL bOverwriteFileOk,
144 /* FIXME shouldn't be necessary */
145 BOOL bSuppressShowWindow);
146 VOID GROUP_NewGroup(void);
147 VOID GROUP_ModifyGroup(HLOCAL hGroup);
148 VOID GROUP_DeleteGroup(HLOCAL hGroup);
149 /* FIXME shouldn't be necessary */
150 VOID GROUP_ShowGroupWindow(HLOCAL hGroup);
151 HLOCAL GROUP_FirstGroup(void);
152 HLOCAL GROUP_NextGroup(HLOCAL hGroup);
153 HLOCAL GROUP_ActiveGroup(void);
154 HWND GROUP_GroupWnd(HLOCAL hGroup);
155 LPCSTR GROUP_GroupName(HLOCAL hGroup);
157 ATOM PROGRAM_RegisterProgramWinClass(void);
158 HLOCAL PROGRAM_AddProgram(HLOCAL hGroup, HICON hIcon, LPCSTR lpszName,
159 INT x, INT y, LPCSTR lpszCmdLine,
160 LPCSTR lpszIconFile, INT nIconIndex,
161 LPCSTR lpszWorkDir, INT nHotKey, INT nCmdShow);
162 VOID PROGRAM_NewProgram(HLOCAL hGroup);
163 VOID PROGRAM_ModifyProgram(HLOCAL hProgram);
164 VOID PROGRAM_CopyMoveProgram(HLOCAL hProgram, BOOL bMove);
165 VOID PROGRAM_DeleteProgram(HLOCAL hProgram, BOOL BUpdateGrpFile);
166 HLOCAL PROGRAM_FirstProgram(HLOCAL hGroup);
167 HLOCAL PROGRAM_NextProgram(HLOCAL hProgram);
168 HLOCAL PROGRAM_ActiveProgram(HLOCAL hGroup);
169 LPCSTR PROGRAM_ProgramName(HLOCAL hProgram);
170 VOID PROGRAM_ExecuteProgram(HLOCAL hLocal);
172 INT DIALOG_New(INT nDefault);
173 HLOCAL DIALOG_CopyMove(LPCSTR lpszProgramName, LPCSTR lpszGroupName, BOOL bMove);
174 BOOL DIALOG_Delete(UINT ids_format_s, LPCSTR lpszName);
175 BOOL DIALOG_GroupAttributes(LPSTR lpszTitle, LPSTR lpszPath, INT nSize);
176 BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine,
177 LPSTR lpszWorkDir, LPSTR lpszIconFile,
178 HICON *lphIcon, INT *nIconIndex,
179 INT *lpnHotKey, INT *lpnCmdShow, INT nSize);
180 VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile,
181 INT *lpnIconIndex, INT nSize);
182 VOID DIALOG_Execute(void);
184 VOID STRING_SelectLanguageByName(LPCSTR);
185 VOID STRING_SelectLanguageByNumber(UINT);
187 /* Class names */
188 extern CHAR STRING_MAIN_WIN_CLASS_NAME[];
189 extern CHAR STRING_MDI_WIN_CLASS_NAME[];
190 extern CHAR STRING_GROUP_WIN_CLASS_NAME[];
191 extern CHAR STRING_PROGRAM_WIN_CLASS_NAME[];
193 /* Resource names */
194 extern CHAR STRING_ACCEL[];
195 extern CHAR STRING_MAIN_Xx[];
196 extern CHAR STRING_NEW_Xx[];
197 extern CHAR STRING_OPEN_Xx[];
198 extern CHAR STRING_MOVE_Xx[];
199 extern CHAR STRING_COPY_Xx[];
200 extern CHAR STRING_DELETE_Xx[];
201 extern CHAR STRING_GROUP_Xx[];
202 extern CHAR STRING_PROGRAM_Xx[];
203 extern CHAR STRING_SYMBOL_Xx[];
204 extern CHAR STRING_EXECUTE_Xx[];
206 #define STRINGID(id) (0x##id + Globals.wStringTableOffset)
208 #else /* RC_INVOKED */
210 #define STRINGID(id) id
212 #endif
214 /* Stringtable index */
215 #define IDS_LANGUAGE_ID STRINGID(00)
216 #define IDS_LANGUAGE_MENU_ITEM STRINGID(01)
217 #define IDS_PROGRAM_MANAGER STRINGID(02)
218 #define IDS_ERROR STRINGID(03)
219 #define IDS_WARNING STRINGID(04)
220 #define IDS_INFO STRINGID(05)
221 #define IDS_DELETE STRINGID(06)
222 #define IDS_DELETE_GROUP_s STRINGID(07)
223 #define IDS_DELETE_PROGRAM_s STRINGID(08)
224 #define IDS_NOT_IMPLEMENTED STRINGID(09)
225 #define IDS_FILE_READ_ERROR_s STRINGID(0a)
226 #define IDS_FILE_WRITE_ERROR_s STRINGID(0b)
227 #define IDS_GRPFILE_READ_ERROR_s STRINGID(0c)
228 #define IDS_OUT_OF_MEMORY STRINGID(0d)
229 #define IDS_WINHELP_ERROR STRINGID(0e)
230 #define IDS_UNKNOWN_FEATURE_s STRINGID(0f)
231 #define IDS_FILE_NOT_OVERWRITTEN_s STRINGID(10)
232 #define IDS_SAVE_GROUP_AS_s STRINGID(11)
233 #define IDS_NO_HOT_KEY STRINGID(12)
234 #define IDS_ALL_FILES STRINGID(13)
235 #define IDS_PROGRAMS STRINGID(14)
236 #define IDS_LIBRARIES_DLL STRINGID(15)
237 #define IDS_SYMBOL_FILES STRINGID(16)
238 #define IDS_SYMBOLS_ICO STRINGID(17)
240 /* Menu */
242 #define PM_NEW 100
243 #define PM_OPEN 101
244 #define PM_MOVE 102
245 #define PM_COPY 103
246 #define PM_DELETE 104
247 #define PM_ATTRIBUTES 105
248 #define PM_EXECUTE 107
249 #define PM_EXIT 108
251 #define PM_AUTO_ARRANGE 200
252 #define PM_MIN_ON_RUN 201
253 #define PM_SAVE_SETTINGS 203
255 #define PM_OVERLAP 300
256 #define PM_SIDE_BY_SIDE 301
257 #define PM_ARRANGE 302
258 #define PM_FIRST_CHILD 3030
260 #define PM_FIRST_LANGUAGE 400
261 #define PM_LAST_LANGUAGE 499
263 #define PM_CONTENTS 501
264 #define PM_SEARCH 502
265 #define PM_HELPONHELP 503
266 #define PM_TUTORIAL 504
268 #define PM_LICENSE 510
269 #define PM_NO_WARRANTY 511
270 #define PM_ABOUT_WINE 512
272 /* Dialog `New' */
274 /* RADIOBUTTON: The next two must be in sequence */
275 #define PM_NEW_GROUP 1000
276 #define PM_NEW_PROGRAM 1001
277 #define PM_NEW_GROUP_TXT 1002
278 #define PM_NEW_PROGRAM_TXT 1003
280 /* Dialogs `Copy', `Move' */
282 #define PM_PROGRAM 1200
283 #define PM_FROM_GROUP 1201
284 #define PM_TO_GROUP 1202
285 #define PM_TO_GROUP_TXT 1203
287 /* Dialogs `Group attributes' */
289 #define PM_DESCRIPTION 1500
290 #define PM_DESCRIPTION_TXT 1501
291 #define PM_FILE 1502
292 #define PM_FILE_TXT 1503
294 /* Dialogs `Program attributes' */
295 #define PM_COMMAND_LINE 1510
296 #define PM_COMMAND_LINE_TXT 1511
297 #define PM_DIRECTORY 1512
298 #define PM_DIRECTORY_TXT 1513
299 #define PM_HOT_KEY 1514
300 #define PM_HOT_KEY_TXT 1515
301 #define PM_ICON 1516
302 #define PM_OTHER_SYMBOL 1517
304 /* Dialog `Symbol' */
306 #define PM_ICON_FILE 1520
307 #define PM_ICON_FILE_TXT 1521
308 #define PM_SYMBOL_LIST 1522
309 #define PM_SYMBOL_LIST_TXT 1523
311 /* Dialog `Execute' */
313 #define PM_COMMAND 1600
314 #define PM_SYMBOL 1601
315 #define PM_BROWSE 1602
316 #define PM_HELP 1603
318 #endif /* PROGMAN_H */
320 /* Local Variables: */
321 /* c-file-style: "GNU" */
322 /* End: */