update for HEAD-2003021201
[reactos.git] / subsys / system / usetup / partlist.h
1 /*
2  *  ReactOS kernel
3  *  Copyright (C) 2002 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
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 /* $Id$
20  * COPYRIGHT:       See COPYING in the top level directory
21  * PROJECT:         ReactOS text-mode setup
22  * FILE:            subsys/system/usetup/partlist.h
23  * PURPOSE:         Partition list functions
24  * PROGRAMMER:      Eric Kohl
25  */
26
27 #ifndef __PARTLIST_H__
28 #define __PARTLIST_H__
29
30 typedef struct _PARTDATA
31 {
32   ULONGLONG DiskSize;
33   ULONG DiskNumber;
34   USHORT Port;
35   USHORT Bus;
36   USHORT Id;
37
38   ULONGLONG PartSize;
39   ULONG PartNumber;
40   ULONG PartType;
41
42   CHAR DriveLetter;
43
44   UNICODE_STRING DriverName;
45 } PARTDATA, *PPARTDATA;
46
47
48 typedef struct _PARTENTRY
49 {
50   ULONGLONG PartSize;
51   ULONG PartNumber;
52   ULONG PartType;
53   BOOLEAN Active;
54
55   CHAR DriveLetter;
56   CHAR VolumeLabel[17];
57   CHAR FileSystemName[9];
58
59   BOOL Unpartitioned;
60
61   BOOL Used;
62 } PARTENTRY, *PPARTENTRY;
63
64 typedef struct _DISKENTRY
65 {
66   ULONGLONG DiskSize;
67   ULONG DiskNumber;
68   USHORT Port;
69   USHORT Bus;
70   USHORT Id;
71   BOOL FixedDisk;
72
73   UNICODE_STRING DriverName;
74
75   ULONG PartCount;
76   PPARTENTRY PartArray;
77
78 } DISKENTRY, *PDISKENTRY;
79
80
81 typedef struct _PARTLIST
82 {
83   SHORT Left;
84   SHORT Top;
85   SHORT Right;
86   SHORT Bottom;
87
88   SHORT Line;
89
90   ULONG TopDisk;
91   ULONG TopPartition;
92
93   ULONG CurrentDisk;
94   ULONG CurrentPartition;
95
96   ULONG DiskCount;
97   PDISKENTRY DiskArray;
98
99 } PARTLIST, *PPARTLIST;
100
101
102
103
104 PPARTLIST
105 CreatePartitionList(SHORT Left,
106                     SHORT Top,
107                     SHORT Right,
108                     SHORT Bottom);
109
110 VOID
111 DestroyPartitionList(PPARTLIST List);
112
113 VOID
114 DrawPartitionList(PPARTLIST List);
115
116 VOID
117 ScrollDownPartitionList(PPARTLIST List);
118
119 VOID
120 ScrollUpPartitionList(PPARTLIST List);
121
122 BOOL
123 GetSelectedPartition(PPARTLIST List,
124                      PPARTDATA Data);
125
126 BOOL
127 GetActiveBootPartition(PPARTLIST List,
128                        PPARTDATA Data);
129
130 #endif /* __PARTLIST_H__ */
131
132 /* EOF */