2002-12-06 21:39:04 +00:00
|
|
|
/*
|
|
|
|
* ReactOS kernel
|
|
|
|
* Copyright (C) 2002 ReactOS Team
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
2009-10-27 10:34:16 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2002-12-06 21:39:04 +00:00
|
|
|
*/
|
2013-03-16 20:08:56 +00:00
|
|
|
/*
|
2002-12-06 21:39:04 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS text-mode setup
|
2015-09-13 16:40:36 +00:00
|
|
|
* FILE: base/setup/usetup/progress.h
|
2002-12-06 21:39:04 +00:00
|
|
|
* PURPOSE: Partition list functions
|
2018-05-27 19:33:07 +00:00
|
|
|
* PROGRAMMER:
|
2002-12-06 21:39:04 +00:00
|
|
|
*/
|
|
|
|
|
2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2002-12-06 21:39:04 +00:00
|
|
|
|
2018-08-26 18:40:34 +00:00
|
|
|
struct _PROGRESSBAR;
|
|
|
|
|
|
|
|
typedef BOOLEAN
|
|
|
|
(NTAPI *PUPDATE_PROGRESS)(
|
|
|
|
IN struct _PROGRESSBAR* Bar,
|
2018-08-27 21:55:58 +00:00
|
|
|
IN BOOLEAN AlwaysUpdate,
|
2018-08-26 18:40:34 +00:00
|
|
|
OUT PSTR Buffer,
|
|
|
|
IN SIZE_T cchBufferSize);
|
|
|
|
|
2018-08-26 18:31:14 +00:00
|
|
|
typedef struct _PROGRESSBAR
|
2002-12-06 21:39:04 +00:00
|
|
|
{
|
2018-08-26 18:31:14 +00:00
|
|
|
/* Border and text positions */
|
2014-05-12 16:14:19 +00:00
|
|
|
SHORT Left;
|
|
|
|
SHORT Top;
|
|
|
|
SHORT Right;
|
|
|
|
SHORT Bottom;
|
|
|
|
SHORT TextTop;
|
|
|
|
SHORT TextRight;
|
2002-12-06 21:39:04 +00:00
|
|
|
|
2014-05-12 16:14:19 +00:00
|
|
|
SHORT Width;
|
2002-12-06 21:39:04 +00:00
|
|
|
|
2018-08-26 18:31:14 +00:00
|
|
|
/* Maximum and current step counts */
|
2014-05-12 16:14:19 +00:00
|
|
|
ULONG StepCount;
|
|
|
|
ULONG CurrentStep;
|
2007-10-19 23:21:45 +00:00
|
|
|
|
2018-08-26 18:31:14 +00:00
|
|
|
/* User-specific displayed bar progress/position */
|
2018-08-26 18:40:34 +00:00
|
|
|
PUPDATE_PROGRESS UpdateProgressProc;
|
|
|
|
ULONG Progress;
|
2018-08-26 18:31:14 +00:00
|
|
|
SHORT Pos;
|
|
|
|
|
|
|
|
/* Static progress bar cues */
|
|
|
|
BOOLEAN DoubleEdge;
|
2018-08-21 13:49:54 +00:00
|
|
|
SHORT ProgressColour;
|
2018-08-26 18:31:14 +00:00
|
|
|
PCSTR DescriptionText;
|
2018-08-26 18:40:34 +00:00
|
|
|
PCSTR ProgressFormatText;
|
2004-02-23 11:58:27 +00:00
|
|
|
} PROGRESSBAR, *PPROGRESSBAR;
|
2002-12-06 21:39:04 +00:00
|
|
|
|
2018-08-26 18:31:14 +00:00
|
|
|
|
2002-12-06 21:39:04 +00:00
|
|
|
/* FUNCTIONS ****************************************************************/
|
|
|
|
|
2018-08-21 13:49:54 +00:00
|
|
|
PPROGRESSBAR
|
|
|
|
CreateProgressBarEx(
|
2018-08-26 18:31:14 +00:00
|
|
|
IN SHORT Left,
|
|
|
|
IN SHORT Top,
|
|
|
|
IN SHORT Right,
|
|
|
|
IN SHORT Bottom,
|
|
|
|
IN SHORT TextTop,
|
|
|
|
IN SHORT TextRight,
|
2018-08-21 13:49:54 +00:00
|
|
|
IN BOOLEAN DoubleEdge,
|
2018-08-26 18:31:14 +00:00
|
|
|
IN SHORT ProgressColour,
|
2018-08-27 21:55:58 +00:00
|
|
|
IN ULONG StepCount,
|
2018-08-26 18:40:34 +00:00
|
|
|
IN PCSTR DescriptionText OPTIONAL,
|
|
|
|
IN PCSTR ProgressFormatText OPTIONAL,
|
|
|
|
IN PUPDATE_PROGRESS UpdateProgressProc OPTIONAL);
|
2018-08-21 13:49:54 +00:00
|
|
|
|
2004-02-23 11:58:27 +00:00
|
|
|
PPROGRESSBAR
|
2014-05-12 16:14:19 +00:00
|
|
|
CreateProgressBar(
|
2018-08-26 18:31:14 +00:00
|
|
|
IN SHORT Left,
|
|
|
|
IN SHORT Top,
|
|
|
|
IN SHORT Right,
|
|
|
|
IN SHORT Bottom,
|
|
|
|
IN SHORT TextTop,
|
|
|
|
IN SHORT TextRight,
|
|
|
|
IN BOOLEAN DoubleEdge,
|
|
|
|
IN PCSTR DescriptionText OPTIONAL);
|
2002-12-06 21:39:04 +00:00
|
|
|
|
|
|
|
VOID
|
2014-05-12 16:14:19 +00:00
|
|
|
DestroyProgressBar(
|
2018-08-26 18:31:14 +00:00
|
|
|
IN OUT PPROGRESSBAR Bar);
|
2002-12-06 21:39:04 +00:00
|
|
|
|
|
|
|
VOID
|
2014-05-12 16:14:19 +00:00
|
|
|
ProgressSetStepCount(
|
2018-08-26 18:31:14 +00:00
|
|
|
IN PPROGRESSBAR Bar,
|
|
|
|
IN ULONG StepCount);
|
2002-12-06 21:39:04 +00:00
|
|
|
|
|
|
|
VOID
|
2014-05-12 16:14:19 +00:00
|
|
|
ProgressNextStep(
|
2018-08-26 18:31:14 +00:00
|
|
|
IN PPROGRESSBAR Bar);
|
2004-02-23 11:58:27 +00:00
|
|
|
|
|
|
|
VOID
|
2014-05-12 16:14:19 +00:00
|
|
|
ProgressSetStep(
|
2018-08-26 18:31:14 +00:00
|
|
|
IN PPROGRESSBAR Bar,
|
|
|
|
IN ULONG Step);
|
2002-12-06 21:39:04 +00:00
|
|
|
|
2003-02-27 14:42:43 +00:00
|
|
|
/* EOF */
|