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 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/progress.h 23 * PURPOSE: Partition list functions 24 * PROGRAMMER: 25 */ 26 27 #pragma once 28 29 struct _PROGRESSBAR; 30 31 typedef BOOLEAN 32 (NTAPI *PUPDATE_PROGRESS)( 33 IN struct _PROGRESSBAR* Bar, 34 IN BOOLEAN AlwaysUpdate, 35 OUT PSTR Buffer, 36 IN SIZE_T cchBufferSize); 37 38 typedef struct _PROGRESSBAR 39 { 40 /* Border and text positions */ 41 SHORT Left; 42 SHORT Top; 43 SHORT Right; 44 SHORT Bottom; 45 SHORT TextTop; 46 SHORT TextRight; 47 48 SHORT Width; 49 50 /* Maximum and current step counts */ 51 ULONG StepCount; 52 ULONG CurrentStep; 53 54 /* User-specific displayed bar progress/position */ 55 PUPDATE_PROGRESS UpdateProgressProc; 56 ULONG Progress; 57 SHORT Pos; 58 59 /* Static progress bar cues */ 60 BOOLEAN DoubleEdge; 61 SHORT ProgressColour; 62 PCSTR DescriptionText; 63 PCSTR ProgressFormatText; 64 } PROGRESSBAR, *PPROGRESSBAR; 65 66 67 /* FUNCTIONS ****************************************************************/ 68 69 PPROGRESSBAR 70 CreateProgressBarEx( 71 IN SHORT Left, 72 IN SHORT Top, 73 IN SHORT Right, 74 IN SHORT Bottom, 75 IN SHORT TextTop, 76 IN SHORT TextRight, 77 IN BOOLEAN DoubleEdge, 78 IN SHORT ProgressColour, 79 IN ULONG StepCount, 80 IN PCSTR DescriptionText OPTIONAL, 81 IN PCSTR ProgressFormatText OPTIONAL, 82 IN PUPDATE_PROGRESS UpdateProgressProc OPTIONAL); 83 84 PPROGRESSBAR 85 CreateProgressBar( 86 IN SHORT Left, 87 IN SHORT Top, 88 IN SHORT Right, 89 IN SHORT Bottom, 90 IN SHORT TextTop, 91 IN SHORT TextRight, 92 IN BOOLEAN DoubleEdge, 93 IN PCSTR DescriptionText OPTIONAL); 94 95 VOID 96 DestroyProgressBar( 97 IN OUT PPROGRESSBAR Bar); 98 99 VOID 100 ProgressSetStepCount( 101 IN PPROGRESSBAR Bar, 102 IN ULONG StepCount); 103 104 VOID 105 ProgressNextStep( 106 IN PPROGRESSBAR Bar); 107 108 VOID 109 ProgressSetStep( 110 IN PPROGRESSBAR Bar, 111 IN ULONG Step); 112 113 /* EOF */ 114