1 /* 2 * ReactOS kernel 3 * Copyright (C) 2002, 2003 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 text-mode setup 22 * FILE: base/setup/usetup/partlist.h 23 * PURPOSE: Partition list functions 24 * PROGRAMMER: 25 */ 26 27 #pragma once 28 29 // #include "../lib/utils/partlist.h" 30 31 typedef enum _FORMATMACHINESTATE 32 { 33 Start, 34 FormatSystemPartition, 35 FormatInstallPartition, 36 FormatOtherPartition, 37 FormatDone, 38 // CheckSystemPartition, 39 // CheckInstallPartition, 40 // CheckOtherPartition, 41 // CheckDone 42 } FORMATMACHINESTATE, *PFORMATMACHINESTATE; 43 44 typedef struct _PARTLIST_UI 45 { 46 PPARTLIST List; 47 48 /* 49 * Selected partition. 50 * 51 * NOTE that when CurrentPartition != NULL, then CurrentPartition->DiskEntry 52 * must be the same as CurrentDisk. We should however keep the two members 53 * separated as we can have a selected disk without any partition. 54 */ 55 PDISKENTRY CurrentDisk; 56 PPARTENTRY CurrentPartition; 57 58 // PLIST_ENTRY FirstShown; 59 // PLIST_ENTRY LastShown; 60 61 SHORT Left; 62 SHORT Top; 63 SHORT Right; 64 SHORT Bottom; 65 66 SHORT Line; 67 SHORT Offset; 68 69 // BOOL Redraw; 70 } PARTLIST_UI, *PPARTLIST_UI; 71 72 73 VOID 74 GetPartitionTypeString( 75 IN PPARTENTRY PartEntry, 76 OUT PSTR strBuffer, 77 IN ULONG cchBuffer); 78 79 VOID 80 PartitionDescription( 81 IN PPARTENTRY PartEntry, 82 OUT PSTR strBuffer, 83 IN SIZE_T cchBuffer); 84 85 VOID 86 DiskDescription( 87 IN PDISKENTRY DiskEntry, 88 OUT PSTR strBuffer, 89 IN SIZE_T cchBuffer); 90 91 VOID 92 InitPartitionListUi( 93 IN OUT PPARTLIST_UI ListUi, 94 IN PPARTLIST List, 95 IN PPARTENTRY CurrentEntry OPTIONAL, 96 IN SHORT Left, 97 IN SHORT Top, 98 IN SHORT Right, 99 IN SHORT Bottom); 100 101 VOID 102 ScrollDownPartitionList( 103 IN PPARTLIST_UI ListUi); 104 105 VOID 106 ScrollUpPartitionList( 107 IN PPARTLIST_UI ListUi); 108 109 VOID 110 DrawPartitionList( 111 IN PPARTLIST_UI ListUi); 112 113 /* EOF */ 114