reactos/base/setup/usetup/mui.h

189 lines
4.7 KiB
C
Raw Normal View History

#pragma once
typedef struct
{
[USETUP] Implement resource ID text based strings for MUI (#2193) CORE-12683 Supersedes PR #612. * [USETUP] Implement the internal MUI routines for text manipulation based on its ID and implement text resource based IDs USETUP (the 1st stage text mode setup module) bases upon MUI (Multilingual User Interface) sub-component of USETUP which is responsible for the ability into translating the MUI pages (each page having corresponding properties like X, Y coordinates, text flags and text string buffer) in various languages. The only problem, as of now, is that whenever you want to modify a certain property of a page, such as removing a text from the said page in the screen, you've got to rely on using CONSOLE_* specific functions and calling with hardcoded parameters, namely the coordinates. This can become a problem as not every localized (translated) MUI page has the same properties for each language and this could lead to various issues. Therefore, assigning each entry with an ID you can remove a text by only giving its ID (and the entry page number) without having the need to specify the coordinates as the internal MUI routine, MUIGetEntry(), automatically retrieves the entry with respective data fields. The following commit implements: - MUIGetEntry() - MUIClearText() - MUIClearStyledText() - MUISetText() - MUISetStyledText() - Now the X and Y coordinate members of MUI_ENTRY are of SHORT integer type, for the sake of the general code as most of the coordination values, even the COORD structure itself, has the coordination points as SHORTs and not BYTEs. The following MUI functions will be used to manipulate text based resources depending on their ID from the corresponding MUI entry. * [USETUP] Make CONSOLE_ClearTextXY function public so that we can use across other files. * [USETUP] Implement the IDs for each text MUI entry in locale files. This mechanism follows the same principle of resource IDs in Win32 applications. Static text is merely a resource that doesn't get changed programmatically for whole of its lifetime whereas dynamic resources can change during the lifetime of the program depending on the algorithm (for example, hide that piece of text and set another one, etc.). * [USETUP] Remove the "Press ENTER to continue" message prompt when the partition formatting begins.
2020-01-19 16:58:13 +00:00
SHORT X;
SHORT Y;
PCSTR Buffer;
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib. [SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build. svn path=/branches/setup_improvements/; revision=75711 [SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources", and what concerns general language parameters (in the setuplib). It may be interesting to retrieve the language parameters from INF file (e.g. intl.inf) (suggested by Giannis). svn path=/branches/setup_improvements/; revision=75715 [SETUPLIB] Add the necessary headers to mui.c to be able to compile. [USETUP] Comment out the languages that don't have any resources. svn path=/branches/setup_improvements/; revision=75716 [SETUPLIB][USETUP] Adjust MUI and settings code. - Re-enable settings code concerning language, keyboards & layout in the setuplib, and remove the old code in usetup. - Remove useless code in setuplib's mui.c. - Rename usetup's MUI "LanguageList" into "ResourceList" so as to avoid colliding with the "LanguageList" of setuplib. - Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that I forgot previously, that caused the "LanguageList" of setuplib to be empty! The code compiles and works during my tests. svn path=/branches/setup_improvements/; revision=75717 [SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. svn path=/branches/setup_improvements/; revision=75719 [SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again. svn path=/branches/setup_improvements/; revision=75720 svn path=/branches/setup_improvements/; revision=75724 [USETUP] Code adaptations. - Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element. - Modify MUIGetOEMCodePage() call after r75719. - Use PCWSTR where needed. svn path=/branches/setup_improvements/; revision=75722 [USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721. svn path=/branches/setup_improvements/; revision=75723 [INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
DWORD Flags;
[USETUP] Implement resource ID text based strings for MUI (#2193) CORE-12683 Supersedes PR #612. * [USETUP] Implement the internal MUI routines for text manipulation based on its ID and implement text resource based IDs USETUP (the 1st stage text mode setup module) bases upon MUI (Multilingual User Interface) sub-component of USETUP which is responsible for the ability into translating the MUI pages (each page having corresponding properties like X, Y coordinates, text flags and text string buffer) in various languages. The only problem, as of now, is that whenever you want to modify a certain property of a page, such as removing a text from the said page in the screen, you've got to rely on using CONSOLE_* specific functions and calling with hardcoded parameters, namely the coordinates. This can become a problem as not every localized (translated) MUI page has the same properties for each language and this could lead to various issues. Therefore, assigning each entry with an ID you can remove a text by only giving its ID (and the entry page number) without having the need to specify the coordinates as the internal MUI routine, MUIGetEntry(), automatically retrieves the entry with respective data fields. The following commit implements: - MUIGetEntry() - MUIClearText() - MUIClearStyledText() - MUISetText() - MUISetStyledText() - Now the X and Y coordinate members of MUI_ENTRY are of SHORT integer type, for the sake of the general code as most of the coordination values, even the COORD structure itself, has the coordination points as SHORTs and not BYTEs. The following MUI functions will be used to manipulate text based resources depending on their ID from the corresponding MUI entry. * [USETUP] Make CONSOLE_ClearTextXY function public so that we can use across other files. * [USETUP] Implement the IDs for each text MUI entry in locale files. This mechanism follows the same principle of resource IDs in Win32 applications. Static text is merely a resource that doesn't get changed programmatically for whole of its lifetime whereas dynamic resources can change during the lifetime of the program depending on the algorithm (for example, hide that piece of text and set another one, etc.). * [USETUP] Remove the "Press ENTER to continue" message prompt when the partition formatting begins.
2020-01-19 16:58:13 +00:00
INT TextID;
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib. [SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build. svn path=/branches/setup_improvements/; revision=75711 [SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources", and what concerns general language parameters (in the setuplib). It may be interesting to retrieve the language parameters from INF file (e.g. intl.inf) (suggested by Giannis). svn path=/branches/setup_improvements/; revision=75715 [SETUPLIB] Add the necessary headers to mui.c to be able to compile. [USETUP] Comment out the languages that don't have any resources. svn path=/branches/setup_improvements/; revision=75716 [SETUPLIB][USETUP] Adjust MUI and settings code. - Re-enable settings code concerning language, keyboards & layout in the setuplib, and remove the old code in usetup. - Remove useless code in setuplib's mui.c. - Rename usetup's MUI "LanguageList" into "ResourceList" so as to avoid colliding with the "LanguageList" of setuplib. - Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that I forgot previously, that caused the "LanguageList" of setuplib to be empty! The code compiles and works during my tests. svn path=/branches/setup_improvements/; revision=75717 [SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. svn path=/branches/setup_improvements/; revision=75719 [SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again. svn path=/branches/setup_improvements/; revision=75720 svn path=/branches/setup_improvements/; revision=75724 [USETUP] Code adaptations. - Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element. - Modify MUIGetOEMCodePage() call after r75719. - Use PCWSTR where needed. svn path=/branches/setup_improvements/; revision=75722 [USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721. svn path=/branches/setup_improvements/; revision=75723 [INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
} MUI_ENTRY, *PMUI_ENTRY;
typedef struct
{
PCSTR ErrorText;
PCSTR ErrorStatus;
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib. [SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build. svn path=/branches/setup_improvements/; revision=75711 [SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources", and what concerns general language parameters (in the setuplib). It may be interesting to retrieve the language parameters from INF file (e.g. intl.inf) (suggested by Giannis). svn path=/branches/setup_improvements/; revision=75715 [SETUPLIB] Add the necessary headers to mui.c to be able to compile. [USETUP] Comment out the languages that don't have any resources. svn path=/branches/setup_improvements/; revision=75716 [SETUPLIB][USETUP] Adjust MUI and settings code. - Re-enable settings code concerning language, keyboards & layout in the setuplib, and remove the old code in usetup. - Remove useless code in setuplib's mui.c. - Rename usetup's MUI "LanguageList" into "ResourceList" so as to avoid colliding with the "LanguageList" of setuplib. - Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that I forgot previously, that caused the "LanguageList" of setuplib to be empty! The code compiles and works during my tests. svn path=/branches/setup_improvements/; revision=75717 [SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. svn path=/branches/setup_improvements/; revision=75719 [SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again. svn path=/branches/setup_improvements/; revision=75720 svn path=/branches/setup_improvements/; revision=75724 [USETUP] Code adaptations. - Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element. - Modify MUIGetOEMCodePage() call after r75719. - Use PCWSTR where needed. svn path=/branches/setup_improvements/; revision=75722 [USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721. svn path=/branches/setup_improvements/; revision=75723 [INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
} MUI_ERROR;
typedef struct
{
LONG Number;
MUI_ENTRY * MuiEntry;
} MUI_PAGE;
typedef struct
{
LONG Number;
PCSTR String;
} MUI_STRING;
typedef struct
{
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib. [SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build. svn path=/branches/setup_improvements/; revision=75711 [SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources", and what concerns general language parameters (in the setuplib). It may be interesting to retrieve the language parameters from INF file (e.g. intl.inf) (suggested by Giannis). svn path=/branches/setup_improvements/; revision=75715 [SETUPLIB] Add the necessary headers to mui.c to be able to compile. [USETUP] Comment out the languages that don't have any resources. svn path=/branches/setup_improvements/; revision=75716 [SETUPLIB][USETUP] Adjust MUI and settings code. - Re-enable settings code concerning language, keyboards & layout in the setuplib, and remove the old code in usetup. - Remove useless code in setuplib's mui.c. - Rename usetup's MUI "LanguageList" into "ResourceList" so as to avoid colliding with the "LanguageList" of setuplib. - Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that I forgot previously, that caused the "LanguageList" of setuplib to be empty! The code compiles and works during my tests. svn path=/branches/setup_improvements/; revision=75717 [SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. svn path=/branches/setup_improvements/; revision=75719 [SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again. svn path=/branches/setup_improvements/; revision=75720 svn path=/branches/setup_improvements/; revision=75724 [USETUP] Code adaptations. - Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element. - Modify MUIGetOEMCodePage() call after r75719. - Use PCWSTR where needed. svn path=/branches/setup_improvements/; revision=75722 [USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721. svn path=/branches/setup_improvements/; revision=75723 [INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
PCWSTR LanguageID;
PCWSTR LanguageDescriptor;
const MUI_PAGE * MuiPages;
const MUI_ERROR * MuiErrors;
const MUI_STRING * MuiStrings;
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib. [SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build. svn path=/branches/setup_improvements/; revision=75711 [SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources", and what concerns general language parameters (in the setuplib). It may be interesting to retrieve the language parameters from INF file (e.g. intl.inf) (suggested by Giannis). svn path=/branches/setup_improvements/; revision=75715 [SETUPLIB] Add the necessary headers to mui.c to be able to compile. [USETUP] Comment out the languages that don't have any resources. svn path=/branches/setup_improvements/; revision=75716 [SETUPLIB][USETUP] Adjust MUI and settings code. - Re-enable settings code concerning language, keyboards & layout in the setuplib, and remove the old code in usetup. - Remove useless code in setuplib's mui.c. - Rename usetup's MUI "LanguageList" into "ResourceList" so as to avoid colliding with the "LanguageList" of setuplib. - Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that I forgot previously, that caused the "LanguageList" of setuplib to be empty! The code compiles and works during my tests. svn path=/branches/setup_improvements/; revision=75717 [SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. svn path=/branches/setup_improvements/; revision=75719 [SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again. svn path=/branches/setup_improvements/; revision=75720 svn path=/branches/setup_improvements/; revision=75724 [USETUP] Code adaptations. - Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element. - Modify MUIGetOEMCodePage() call after r75719. - Use PCWSTR where needed. svn path=/branches/setup_improvements/; revision=75722 [USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721. svn path=/branches/setup_improvements/; revision=75723 [INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
} MUI_LANGUAGE_RESOURCE;
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib. [SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build. svn path=/branches/setup_improvements/; revision=75711 [SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources", and what concerns general language parameters (in the setuplib). It may be interesting to retrieve the language parameters from INF file (e.g. intl.inf) (suggested by Giannis). svn path=/branches/setup_improvements/; revision=75715 [SETUPLIB] Add the necessary headers to mui.c to be able to compile. [USETUP] Comment out the languages that don't have any resources. svn path=/branches/setup_improvements/; revision=75716 [SETUPLIB][USETUP] Adjust MUI and settings code. - Re-enable settings code concerning language, keyboards & layout in the setuplib, and remove the old code in usetup. - Remove useless code in setuplib's mui.c. - Rename usetup's MUI "LanguageList" into "ResourceList" so as to avoid colliding with the "LanguageList" of setuplib. - Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that I forgot previously, that caused the "LanguageList" of setuplib to be empty! The code compiles and works during my tests. svn path=/branches/setup_improvements/; revision=75717 [SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. svn path=/branches/setup_improvements/; revision=75719 [SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again. svn path=/branches/setup_improvements/; revision=75720 svn path=/branches/setup_improvements/; revision=75724 [USETUP] Code adaptations. - Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element. - Modify MUIGetOEMCodePage() call after r75719. - Use PCWSTR where needed. svn path=/branches/setup_improvements/; revision=75722 [USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721. svn path=/branches/setup_improvements/; revision=75723 [INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
#if 0
BOOLEAN
IsLanguageAvailable(
PWCHAR LanguageId);
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib. [SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build. svn path=/branches/setup_improvements/; revision=75711 [SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources", and what concerns general language parameters (in the setuplib). It may be interesting to retrieve the language parameters from INF file (e.g. intl.inf) (suggested by Giannis). svn path=/branches/setup_improvements/; revision=75715 [SETUPLIB] Add the necessary headers to mui.c to be able to compile. [USETUP] Comment out the languages that don't have any resources. svn path=/branches/setup_improvements/; revision=75716 [SETUPLIB][USETUP] Adjust MUI and settings code. - Re-enable settings code concerning language, keyboards & layout in the setuplib, and remove the old code in usetup. - Remove useless code in setuplib's mui.c. - Rename usetup's MUI "LanguageList" into "ResourceList" so as to avoid colliding with the "LanguageList" of setuplib. - Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that I forgot previously, that caused the "LanguageList" of setuplib to be empty! The code compiles and works during my tests. svn path=/branches/setup_improvements/; revision=75717 [SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. svn path=/branches/setup_improvements/; revision=75719 [SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library. Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again. svn path=/branches/setup_improvements/; revision=75720 svn path=/branches/setup_improvements/; revision=75724 [USETUP] Code adaptations. - Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element. - Modify MUIGetOEMCodePage() call after r75719. - Use PCWSTR where needed. svn path=/branches/setup_improvements/; revision=75722 [USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721. svn path=/branches/setup_improvements/; revision=75723 [INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
#endif
VOID
MUIDisplayPage(
ULONG PageNumber);
VOID
MUIClearPage(
ULONG PageNumber);
VOID
MUIDisplayErrorV(
IN ULONG ErrorNum,
OUT PINPUT_RECORD Ir,
IN ULONG WaitEvent,
IN va_list args);
VOID
__cdecl
MUIDisplayError(
ULONG ErrorNum,
PINPUT_RECORD Ir,
ULONG WaitEvent,
...);
VOID
SetConsoleCodePage(VOID);
PCSTR
MUIGetString(
ULONG Number);
[USETUP] Implement resource ID text based strings for MUI (#2193) CORE-12683 Supersedes PR #612. * [USETUP] Implement the internal MUI routines for text manipulation based on its ID and implement text resource based IDs USETUP (the 1st stage text mode setup module) bases upon MUI (Multilingual User Interface) sub-component of USETUP which is responsible for the ability into translating the MUI pages (each page having corresponding properties like X, Y coordinates, text flags and text string buffer) in various languages. The only problem, as of now, is that whenever you want to modify a certain property of a page, such as removing a text from the said page in the screen, you've got to rely on using CONSOLE_* specific functions and calling with hardcoded parameters, namely the coordinates. This can become a problem as not every localized (translated) MUI page has the same properties for each language and this could lead to various issues. Therefore, assigning each entry with an ID you can remove a text by only giving its ID (and the entry page number) without having the need to specify the coordinates as the internal MUI routine, MUIGetEntry(), automatically retrieves the entry with respective data fields. The following commit implements: - MUIGetEntry() - MUIClearText() - MUIClearStyledText() - MUISetText() - MUISetStyledText() - Now the X and Y coordinate members of MUI_ENTRY are of SHORT integer type, for the sake of the general code as most of the coordination values, even the COORD structure itself, has the coordination points as SHORTs and not BYTEs. The following MUI functions will be used to manipulate text based resources depending on their ID from the corresponding MUI entry. * [USETUP] Make CONSOLE_ClearTextXY function public so that we can use across other files. * [USETUP] Implement the IDs for each text MUI entry in locale files. This mechanism follows the same principle of resource IDs in Win32 applications. Static text is merely a resource that doesn't get changed programmatically for whole of its lifetime whereas dynamic resources can change during the lifetime of the program depending on the algorithm (for example, hide that piece of text and set another one, etc.). * [USETUP] Remove the "Press ENTER to continue" message prompt when the partition formatting begins.
2020-01-19 16:58:13 +00:00
const MUI_ENTRY *
MUIGetEntry(
IN ULONG Page,
IN INT TextID);
VOID
MUIClearText(
IN ULONG Page,
IN INT TextID);
VOID
MUIClearStyledText(
IN ULONG Page,
IN INT TextID,
IN INT Flags);
VOID
MUISetText(
IN ULONG Page,
IN INT TextID);
VOID
MUISetStyledText(
IN ULONG Page,
IN INT TextID,
IN INT Flags);
/* Special characters */
extern CHAR CharBullet;
extern CHAR CharBlock;
extern CHAR CharHalfBlock;
extern CHAR CharUpArrow;
extern CHAR CharDownArrow;
extern CHAR CharHorizontalLine;
extern CHAR CharVerticalLine;
extern CHAR CharUpperLeftCorner;
extern CHAR CharUpperRightCorner;
extern CHAR CharLowerLeftCorner;
extern CHAR CharLowerRightCorner;
extern CHAR CharVertLineAndRightHorizLine;
extern CHAR CharLeftHorizLineAndVertLine;
extern CHAR CharDoubleHorizontalLine;
extern CHAR CharDoubleVerticalLine;
extern CHAR CharDoubleUpperLeftCorner;
extern CHAR CharDoubleUpperRightCorner;
extern CHAR CharDoubleLowerLeftCorner;
extern CHAR CharDoubleLowerRightCorner;
[USETUP] Implement resource ID text based strings for MUI (#2193) CORE-12683 Supersedes PR #612. * [USETUP] Implement the internal MUI routines for text manipulation based on its ID and implement text resource based IDs USETUP (the 1st stage text mode setup module) bases upon MUI (Multilingual User Interface) sub-component of USETUP which is responsible for the ability into translating the MUI pages (each page having corresponding properties like X, Y coordinates, text flags and text string buffer) in various languages. The only problem, as of now, is that whenever you want to modify a certain property of a page, such as removing a text from the said page in the screen, you've got to rely on using CONSOLE_* specific functions and calling with hardcoded parameters, namely the coordinates. This can become a problem as not every localized (translated) MUI page has the same properties for each language and this could lead to various issues. Therefore, assigning each entry with an ID you can remove a text by only giving its ID (and the entry page number) without having the need to specify the coordinates as the internal MUI routine, MUIGetEntry(), automatically retrieves the entry with respective data fields. The following commit implements: - MUIGetEntry() - MUIClearText() - MUIClearStyledText() - MUISetText() - MUISetStyledText() - Now the X and Y coordinate members of MUI_ENTRY are of SHORT integer type, for the sake of the general code as most of the coordination values, even the COORD structure itself, has the coordination points as SHORTs and not BYTEs. The following MUI functions will be used to manipulate text based resources depending on their ID from the corresponding MUI entry. * [USETUP] Make CONSOLE_ClearTextXY function public so that we can use across other files. * [USETUP] Implement the IDs for each text MUI entry in locale files. This mechanism follows the same principle of resource IDs in Win32 applications. Static text is merely a resource that doesn't get changed programmatically for whole of its lifetime whereas dynamic resources can change during the lifetime of the program depending on the algorithm (for example, hide that piece of text and set another one, etc.). * [USETUP] Remove the "Press ENTER to continue" message prompt when the partition formatting begins.
2020-01-19 16:58:13 +00:00
/* MUI Text IDs */
/* Static MUI Text */
#define TEXT_ID_STATIC (-1)
/* Dynamic MUI Text IDs */
#define TEXT_ID_FORMAT_PROMPT 1
/* MUI Strings */
#define STRING_PLEASEWAIT 1
#define STRING_INSTALLCREATEPARTITION 2
#define STRING_INSTALLCREATELOGICAL 3
#define STRING_INSTALLDELETEPARTITION 4
#define STRING_DELETEPARTITION 5
#define STRING_PARTITIONSIZE 6
#define STRING_CHOOSE_NEW_PARTITION 7
#define STRING_CHOOSE_NEW_EXTENDED_PARTITION 8
#define STRING_CHOOSE_NEW_LOGICAL_PARTITION 9
#define STRING_HDPARTSIZE 10
#define STRING_CREATEPARTITION 11
#define STRING_NEWPARTITION 12
#define STRING_PARTFORMAT 13
#define STRING_NONFORMATTEDPART 14
#define STRING_NONFORMATTEDSYSTEMPART 15
#define STRING_NONFORMATTEDOTHERPART 16
#define STRING_INSTALLONPART 17
#define STRING_CONTINUE 18
#define STRING_QUITCONTINUE 19
#define STRING_REBOOTCOMPUTER 20
#define STRING_DELETING 21
#define STRING_MOVING 22
#define STRING_RENAMING 23
#define STRING_COPYING 24
#define STRING_SETUPCOPYINGFILES 25
#define STRING_REGHIVEUPDATE 26
#define STRING_IMPORTFILE 27
#define STRING_DISPLAYSETTINGSUPDATE 28
#define STRING_LOCALESETTINGSUPDATE 29
#define STRING_KEYBOARDSETTINGSUPDATE 30
#define STRING_CODEPAGEINFOUPDATE 31
#define STRING_DONE 32
#define STRING_REBOOTCOMPUTER2 33
#define STRING_CONSOLEFAIL1 34
#define STRING_CONSOLEFAIL2 35
#define STRING_CONSOLEFAIL3 36
#define STRING_FORMATTINGPART 37
#define STRING_CHECKINGDISK 38
#define STRING_FORMATDISK1 39
#define STRING_FORMATDISK2 40
#define STRING_KEEPFORMAT 41
#define STRING_HDDISK1 42
#define STRING_HDDISK2 43
#define STRING_PARTTYPE 44
#define STRING_HDDINFO1 45
#define STRING_HDDINFO2 46
#define STRING_UNPSPACE 47
#define STRING_MAXSIZE 48
#define STRING_UNFORMATTED 49
#define STRING_EXTENDED_PARTITION 50
#define STRING_FORMATUNUSED 51
#define STRING_FORMATUNKNOWN 52
#define STRING_KB 53
#define STRING_MB 54
#define STRING_GB 55
#define STRING_ADDKBLAYOUTS 56
#define STRING_REBOOTPROGRESSBAR 57