508d9652c0d6d8367addf75f515f66b0a62e49c3
[reactos.git] / base / setup / reactos / reactos.h
1 /*
2 * ReactOS applications
3 * Copyright (C) 2004-2008 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS GUI first stage setup application
22 * FILE: base/setup/reactos/reactos.c
23 * PROGRAMMERS: Matthias Kupfer
24 * Dmitry Chapyshev (dmitry@reactos.org)
25 */
26
27 #ifndef _REACTOS_PCH_
28 #define _REACTOS_PCH_
29
30 /* C Headers */
31 #include <stdlib.h>
32 #include <stdarg.h>
33 #include <tchar.h>
34
35 /* PSDK/NDK */
36 #define WIN32_NO_STATUS
37 #include <windef.h>
38 #include <winbase.h>
39 #include <winreg.h>
40 #include <wingdi.h>
41 #include <winuser.h>
42
43 #include <strsafe.h>
44
45 #include <commctrl.h>
46 /**/#include <setupapi.h>/**/
47 #include <devguid.h>
48
49 #define NTOS_MODE_USER
50 #include <ndk/cmtypes.h> // For CM_DISK stuff
51 #include <ndk/iofuncs.h> // For NtCreate/OpenFile
52 #include <ndk/rtlfuncs.h>
53
54
55 /* Setup library headers */
56 // #include <reactos/rosioctl.h>
57 #include <../lib/setuplib.h>
58
59 #if 0
60 typedef struct _KBLAYOUT
61 {
62 TCHAR LayoutId[9];
63 TCHAR LayoutName[128];
64 TCHAR DllName[128];
65 } KBLAYOUT, *PKBLAYOUT;
66 #endif
67
68
69 typedef struct _SETUPDATA
70 {
71 /* General */
72 HINSTANCE hInstance;
73 BOOL bUnattend;
74
75 HFONT hTitleFont;
76
77 TCHAR szAbortMessage[512];
78 TCHAR szAbortTitle[64];
79
80 USETUP_DATA USetupData;
81
82 BOOLEAN RepairUpdateFlag; // flag for update/repair an installed reactos
83
84 PPARTLIST PartitionList;
85 PNTOS_INSTALLATION CurrentInstallation;
86 PGENERIC_LIST NtOsInstallsList;
87
88
89 /* Settings */
90 LONG DestPartSize; // if partition doesn't exist, size of partition
91 LONG FSType; // file system type on partition
92 LONG FormatPart; // type of format the partition
93
94 LONG SelectedLangId; // selected language (table index)
95 LONG SelectedKBLayout; // selected keyboard layout (table index)
96 LONG SelectedComputer; // selected computer type (table index)
97 LONG SelectedDisplay; // selected display type (table index)
98 LONG SelectedKeyboard; // selected keyboard type (table index)
99
100 /* txtsetup.sif data */
101 // LONG DefaultLang; // default language (table index)
102 // LONG DefaultKBLayout; // default keyboard layout (table index)
103 PCWSTR SelectedLanguageId;
104 WCHAR DefaultLanguage[20]; // Copy of string inside LanguageList
105 WCHAR DefaultKBLayout[20]; // Copy of string inside KeyboardList
106
107 } SETUPDATA, *PSETUPDATA;
108
109 extern HANDLE ProcessHeap;
110 extern BOOLEAN IsUnattendedSetup;
111
112
113 typedef struct _IMGINFO
114 {
115 HBITMAP hBitmap;
116 INT cxSource;
117 INT cySource;
118 } IMGINFO, *PIMGINFO;
119
120
121 /*
122 * Attempts to convert a pure NT file path into a corresponding Win32 path.
123 * Adapted from GetInstallSourceWin32() in dll/win32/syssetup/wizard.c
124 */
125 BOOL
126 ConvertNtPathToWin32Path(
127 OUT PWSTR pwszPath,
128 IN DWORD cchPathMax,
129 IN PCWSTR pwszNTPath);
130
131
132 /* drivepage.c */
133
134 BOOL
135 CreateListViewColumns(
136 IN HINSTANCE hInstance,
137 IN HWND hWndListView,
138 IN const UINT* pIDs,
139 IN const INT* pColsWidth,
140 IN const INT* pColsAlign,
141 IN UINT nNumOfColumns);
142
143 INT_PTR
144 CALLBACK
145 DriveDlgProc(
146 HWND hwndDlg,
147 UINT uMsg,
148 WPARAM wParam,
149 LPARAM lParam);
150
151 #endif /* _REACTOS_PCH_ */
152
153 /* EOP */