ReactOS 0.4.15-dev-8131-g4988de4
progman.h
Go to the documentation of this file.
1/*
2 * Program Manager
3 *
4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle
6 *
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.
11 *
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.
16 *
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
20 */
21
22/*
23 * PROJECT: ReactOS Program Manager
24 * COPYRIGHT: GPL - See COPYING in the top level directory
25 * FILE: base/shell/progman/progman.h
26 * PURPOSE: ProgMan header
27 * PROGRAMMERS: Ulrich Schmid
28 * Sylvain Petreolle
29 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
30 */
31
32#ifndef PROGMAN_H
33#define PROGMAN_H
34
35#include <stdio.h>
36#include <stdlib.h>
37
38#define WIN32_NO_STATUS
39#include <windef.h>
40#include <winbase.h>
41#include <winreg.h>
42#include <wingdi.h>
43#include <winuser.h>
44
45#include <shellapi.h>
46
47#include <commctrl.h>
48#include <richedit.h>
49
50#include <windowsx.h>
51#include <strsafe.h>
52
53#define MAX_STRING_LEN 255
54#define MAX_PATHNAME_LEN 1024
55#define MAX_LANGUAGE_NUMBER (PM_LAST_LANGUAGE - PM_FIRST_LANGUAGE)
56
57#include "resource.h"
58
59/* Fallback icon */
60#define DEFAULTICON OIC_WINLOGO
61
62#define DEF_GROUP_WIN_XPOS 100
63#define DEF_GROUP_WIN_YPOS 100
64#define DEF_GROUP_WIN_WIDTH 300
65#define DEF_GROUP_WIN_HEIGHT 200
66
67
68/*
69 * windowsx.h extensions
70 */
71#define EnableDlgItem(hDlg, nID, bEnable) \
72 EnableWindow(GetDlgItem((hDlg), (nID)), (bEnable))
73
74
75
76
77
78typedef struct _PROGRAM PROGRAM, *PPROGRAM;
80
82{
87
96 LPWSTR hWorkDir; /* Extension 0x8101 */
97 INT nHotKey; /* Extension 0x8102 */
98 INT nCmdShow; /* Extension 0x8103 */
99 BOOL bNewVDM; /* Extension 0x8104 */
100
103}; // PROGRAM, *PPROGRAM;
104
105typedef enum _GROUPFORMAT
106{
107 Win_311 = 0x0,
108 NT_Ansi = 0x1, // 0x02
109 NT_Unicode = 0x2, // 0x03
111
113{
117
124
127 // BOOL bFileNameModified;
141
144}; // PROGGROUP, *PPROGGROUP;
145
146
147typedef struct _GLOBALS
148{
150 HACCEL hAccel;
155 // HICON hGroupIcon;
163
172
178 // int field_74;
179 // int field_78;
180 // PROGGROUP* field_79;
182
183extern GLOBALS Globals;
184extern WCHAR szTitle[256];
185
186
187/*
188 * Memory management functions
189 */
190PVOID
192 IN SIZE_T dwBytes);
193
194BOOL
195Free(IN PVOID lpMem);
196
197PVOID
199 IN PVOID lpMem,
200 IN SIZE_T dwBytes);
201
202PVOID
204 IN PSIZE_T pdwBufferSize,
205 IN PVOID pData,
206 IN SIZE_T dwDataSize);
207
208
209INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type);
210INT MAIN_MessageBoxIDS_s(UINT ids_text, LPCWSTR str, UINT ids_title, WORD type);
212
213DWORD GRPFILE_ReadGroupFile(LPCWSTR lpszPath, BOOL bIsCommonGroup);
215
217PROGGROUP* GROUP_AddGroup(GROUPFORMAT format, BOOL bIsCommonGroup, LPCWSTR lpszName, LPCWSTR lpszGrpFile,
218 INT left, INT top, INT right, INT bottom, INT xMin, INT yMin, INT nCmdShow,
219 WORD cxIcon, WORD cyIcon, BOOL bOverwriteFileOk,
220 /* FIXME shouldn't be necessary */
221 BOOL bSuppressShowWindow);
222VOID GROUP_NewGroup(GROUPFORMAT format, BOOL bIsCommonGroup);
225/* FIXME shouldn't be necessary */
228
230 INT x, INT y, LPCWSTR lpszCmdLine, LPCWSTR lpszIconFile, INT nIconIndex,
231 LPCWSTR lpszWorkDir, INT nHotKey, INT nCmdShow, BOOL bNewVDM);
234VOID PROGRAM_CopyMoveProgram(PROGRAM* hProgram, BOOL bMove);
235VOID PROGRAM_DeleteProgram(PROGRAM* hProgram, BOOL bUpdateGrpFile);
238
239BOOL DIALOG_New(INT nDefault, PINT pnResult);
240PROGGROUP* DIALOG_CopyMove(PROGRAM* hProgram, BOOL bMove);
241BOOL DIALOG_Delete(UINT ids_text_s, LPCWSTR lpszName);
243BOOL DIALOG_ProgramAttributes(LPWSTR lpszTitle, LPWSTR lpszCmdLine, LPWSTR lpszWorkDir, LPWSTR lpszIconFile,
244 HICON* lphIcon, INT* lpnIconIndex, INT* lpnHotKey, INT* lpnCmdShow, BOOL* lpbNewVDM, INT nSize);
246
249
250/* Class names */
251#define STRING_MAIN_WIN_CLASS_NAME L"PMMain"
252#define STRING_GROUP_WIN_CLASS_NAME L"PMGroup"
253
254#endif /* PROGMAN_H */
WORD ATOM
Definition: dimm.idl:113
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726
static HICON
Definition: imagelist.c:84
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
BOOL DIALOG_Delete(UINT ids_text_s, LPCWSTR lpszName)
Definition: dialog.c:361
VOID GROUP_ShowGroupWindow(PROGGROUP *hGroup)
Definition: group.c:660
BOOL DIALOG_New(INT nDefault, PINT pnResult)
Definition: dialog.c:233
BOOL DIALOG_ProgramAttributes(LPWSTR lpszTitle, LPWSTR lpszCmdLine, LPWSTR lpszWorkDir, LPWSTR lpszIconFile, HICON *lphIcon, INT *lpnIconIndex, INT *lpnHotKey, INT *lpnCmdShow, BOOL *lpbNewVDM, INT nSize)
Definition: dialog.c:864
PROGGROUP * GROUP_AddGroup(GROUPFORMAT format, BOOL bIsCommonGroup, LPCWSTR lpszName, LPCWSTR lpszGrpFile, INT left, INT top, INT right, INT bottom, INT xMin, INT yMin, INT nCmdShow, WORD cxIcon, WORD cyIcon, BOOL bOverwriteFileOk, BOOL bSuppressShowWindow)
Definition: group.c:435
VOID PROGRAM_CopyMoveProgram(PROGRAM *hProgram, BOOL bMove)
Definition: program.c:236
INT MAIN_MessageBoxIDS_s(UINT ids_text, LPCWSTR str, UINT ids_title, WORD type)
Definition: main.c:1174
PROGGROUP * DIALOG_CopyMove(PROGRAM *hProgram, BOOL bMove)
Definition: dialog.c:343
_GROUPFORMAT
Definition: progman.h:106
@ NT_Ansi
Definition: progman.h:108
@ NT_Unicode
Definition: progman.h:109
@ Win_311
Definition: progman.h:107
ATOM GROUP_RegisterGroupWinClass(VOID)
Definition: group.c:369
WCHAR szTitle[256]
Definition: magnifier.c:35
VOID PROGRAM_ModifyProgram(PROGRAM *hProgram)
Definition: program.c:116
struct _GLOBALS * PGLOBALS
VOID STRING_LoadStrings(VOID)
Definition: string.c:36
VOID DIALOG_Execute(VOID)
Definition: dialog.c:1021
struct _PROGGROUP * PPROGGROUP
Definition: progman.h:79
BOOL DIALOG_GroupAttributes(GROUPFORMAT format, LPWSTR lpszTitle, LPWSTR lpszGrpFile, INT nSize)
Definition: dialog.c:484
VOID PROGRAM_DeleteProgram(PROGRAM *hProgram, BOOL bUpdateGrpFile)
Definition: program.c:289
PROGRAM * PROGRAM_AddProgram(PROGGROUP *hGroup, HICON hIcon, LPCWSTR lpszName, INT x, INT y, LPCWSTR lpszCmdLine, LPCWSTR lpszIconFile, INT nIconIndex, LPCWSTR lpszWorkDir, INT nHotKey, INT nCmdShow, BOOL bNewVDM)
Definition: program.c:157
INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type)
Definition: main.c:1159
VOID STRING_LoadMenus(VOID)
Definition: string.c:41
PROGRAM * PROGRAM_ActiveProgram(PROGGROUP *hGroup)
Definition: program.c:331
VOID PROGRAM_ExecuteProgram(PROGRAM *hProgram)
Definition: program.c:274
VOID GROUP_ModifyGroup(PROGGROUP *hGroup)
Definition: group.c:596
VOID GROUP_DeleteGroup(PROGGROUP *hGroup)
Definition: group.c:627
enum _GROUPFORMAT GROUPFORMAT
VOID GROUP_NewGroup(GROUPFORMAT format, BOOL bIsCommonGroup)
Definition: group.c:392
VOID MAIN_ReplaceString(LPWSTR *string, LPWSTR replace)
Definition: main.c:1192
DWORD GRPFILE_ReadGroupFile(LPCWSTR lpszPath, BOOL bIsCommonGroup)
Definition: grpfile.c:65
PVOID ReAlloc(IN DWORD dwFlags, IN PVOID lpMem, IN SIZE_T dwBytes)
Definition: main.c:76
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
PROGGROUP * GROUP_ActiveGroup(VOID)
Definition: group.c:671
VOID PROGRAM_NewProgram(PROGGROUP *hGroup)
Definition: program.c:80
PVOID AppendToBuffer(IN PVOID pBuffer, IN PSIZE_T pdwBufferSize, IN PVOID pData, IN SIZE_T dwDataSize)
Definition: main.c:84
struct _GLOBALS GLOBALS
BOOL GRPFILE_WriteGroupFile(PROGGROUP *hGroup)
Definition: grpfile.c:358
GLOBALS Globals
Definition: clipbrd.c:13
struct _PROGRAM * PPROGRAM
Definition: progman.h:78
PVOID pBuffer
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
Definition: replace.c:47
const WCHAR * str
HKEY hKeyPMCommonGroups
Definition: progman.h:166
HINSTANCE hInstance
Definition: progman.h:149
HMENU hMainMenu
Definition: progman.h:158
PROGGROUP * hGroups
Definition: progman.h:176
HWND hMDIWnd
Definition: progman.h:152
HICON hDefaultIcon
Definition: progman.h:153
HICON hCommonGroupIcon
Definition: progman.h:157
HMENU hOptionMenu
Definition: progman.h:160
HKEY hKeyCommonGroups
Definition: progman.h:171
HKEY hKeyPMSettings
Definition: progman.h:165
HICON hPersonalGroupIcon
Definition: progman.h:156
HKEY hKeyPMAnsiGroups
Definition: progman.h:167
HACCEL hAccel
Definition: progman.h:150
HKEY hKeyUnicodeGroups
Definition: progman.h:170
HKEY hKeyAnsiGroups
Definition: progman.h:169
HKEY hKeyProgMan
Definition: progman.h:164
BOOL bMinOnRun
Definition: progman.h:175
PROGGROUP * hActiveGroup
Definition: progman.h:177
BOOL bSaveSettings
Definition: progman.h:174
HICON hMainIcon
Definition: progman.h:154
HKEY hKeyPMUnicodeGroups
Definition: progman.h:168
HMENU hFileMenu
Definition: progman.h:159
HWND hMainWnd
Definition: progman.h:151
HMENU hLanguageMenu
Definition: progman.h:162
BOOL bAutoArrange
Definition: progman.h:173
HMENU hWindowsMenu
Definition: progman.h:161
INT nCmdShow
Definition: progman.h:131
PROGRAM * hPrograms
Definition: progman.h:139
INT seqnum
Definition: progman.h:130
HIMAGELIST hDragImageList
Definition: progman.h:120
BOOL bOverwriteFileOk
Definition: progman.h:128
POINT ptStart
Definition: progman.h:122
PROGRAM * hActiveProgram
Definition: progman.h:140
INT height
Definition: progman.h:135
BOOL bDragging
Definition: progman.h:123
INT width
Definition: progman.h:134
BOOL bIsCommonGroup
Definition: progman.h:126
LPWSTR hName
Definition: progman.h:138
INT iconx
Definition: progman.h:136
HICON hOldCursor
Definition: progman.h:121
HIMAGELIST hListLarge
Definition: progman.h:119
HWND hWnd
Definition: progman.h:116
HWND hListView
Definition: progman.h:118
PVOID Tags
Definition: progman.h:143
PROGGROUP * hPrior
Definition: progman.h:114
GROUPFORMAT format
Definition: progman.h:125
INT icony
Definition: progman.h:137
PROGGROUP * hNext
Definition: progman.h:115
SIZE_T TagsSize
Definition: progman.h:142
LPWSTR hGrpFile
Definition: progman.h:129
INT nCmdShow
Definition: progman.h:98
LPWSTR hName
Definition: progman.h:93
LPWSTR hCmdLine
Definition: progman.h:94
INT nHotKey
Definition: progman.h:97
PROGRAM * hPrior
Definition: progman.h:84
BOOL bNewVDM
Definition: progman.h:99
PROGRAM * hNext
Definition: progman.h:85
LPWSTR hWorkDir
Definition: progman.h:96
HICON hIcon
Definition: progman.h:92
HWND hWnd
Definition: progman.h:86
SIZE_T TagsSize
Definition: progman.h:101
PVOID Tags
Definition: progman.h:102
INT y
Definition: progman.h:90
INT nIconIndex
Definition: progman.h:91
INT x
Definition: progman.h:89
LPWSTR hIconFile
Definition: progman.h:95
PROGGROUP * hGroup
Definition: progman.h:83
INT iItem
Definition: progman.h:88
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2084
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
int * PINT
Definition: windef.h:177
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185