Difference between revisions of "Unit Locale"

From Ultibo.org
Jump to: navigation, search
Line 316: Line 316:
 
<br />
 
<br />
  
 +
'''Locale helper functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function MapPage(CodePage:UINT):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Map a default code page to the actual current page</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetPage(PageID:Word):PCodePage;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find the requested page in the linked list</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function CheckPage(Page:PCodePage):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check that the Page supplied is part of the Linked list</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function LinkPage(Page:PCodePage):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Link Page to Prev,Next Siblings and Adjust First/Last</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function UnlinkPage(Page:PCodePage):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Unlink Page from Prev,Next Siblings and Adjust First/Last</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function LoadPage(PageID:Word; Table:PCodeTable; Lower:PLowerTable; Upper:PUpperTable):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Load a code table and allocate memory to create a code page</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function UnloadPage(PageID:Word; Page:PCodePage):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Unload a code page and release allocated memory</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function DefaultTrans(PageID,TransID:Word):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function InstallTrans(PageID:Word; Table:PTransTable):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Revision as of 03:55, 19 August 2016

Return to Unit Reference


Description



This unit implements the locale support for Ultibo and provides the code page support for the WideStringManager/UnicodeStringManager interface for the RTL.


This unit provides compatible implementations of the following functions:

  • ConvertDefaultLocale
  • EnumCodePagesProc
  • EnumLocalesProc
  • EnumTimeFormats
  • GetCPInfo
  • GetNumberFormat
  • GetSystemDefaultLangID
  • GetUserDefaultLangID
  • IsValidLocale
  • GetConsoleOutputCP
  • EnumCalendarInfo
  • EnumDateFormats
  • EnumSystemCodePages
  • EnumTimeFormatsProc
  • GetCurrencyFormat
  • GetLocaleInfo
  • GetSystemDefaultLCID
  • GetUserDefaultLCID
  • SetLocaleInfo
  • SetConsoleCP
  • EnumCalendarInfoProc
  • EnumDateFormatsProc
  • EnumSystemLocales
  • GetACP
  • GetDateFormat
  • GetOEMCP
  • GetTimeFormat
  • IsValidCodePage
  • GetConsoleCP
  • SetConsoleOutputCP


The following function are implemented by the Threads unit:

  • GetThreadLocale (ThreadGetLocale) (GetThreadLocale is exposed in the Ultibo unit)
  • SetThreadLocale (ThreadSetLocale) (SetThreadLocale is exposed in the Ultibo unit)

Most of the above are currently not implemented.


OEM Code Page defaults to 437 (OEM United States) ANSI Code Page defaults to 1252 (ANSI Latin 1; Western European (Windows))


See also: https://msdn.microsoft.com/en-us/library/windows/desktop/dd319081%28v=vs.85%29.aspx

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

procedure LocaleInit;
Description: To be documented
Note To be documented


Locale functions

function IsValidCodePage(CodePage:UINT):BOOL;
Description: To be documented
Note To be documented


function GetACP:UINT;
Description: To be documented
Note To be documented


function GetOEMCP:UINT;
Description: To be documented
Note To be documented


function SetACP(CodePage:UINT):BOOL;
Description: To be documented
Note To be documented


function SetOEMCP(CodePage:UINT):BOOL;
Description: To be documented
Note To be documented


function GetConsoleCP:UINT;
Description: To be documented
Note To be documented


function SetConsoleCP(wCodePageID:UINT):BOOL;
Description: To be documented
Note To be documented


function GetConsoleOutputCP:UINT;
Description: To be documented
Note To be documented


function SetConsoleOutputCP(wCodePageID:UINT):BOOL;
Description: To be documented
Note To be documented


function GetCPInfo(CodePage:UINT; var lpCPInfo:TCPInfo):BOOL;
Description: To be documented
Note To be documented


function GetCPInfoEx(CodePage:UINT; dwFlags:DWORD; var lpCPInfoEx:CPINFOEXA):BOOL;
Description: To be documented
Note To be documented


function GetCPInfoExA(CodePage:UINT; dwFlags:DWORD; var lpCPInfoEx:CPINFOEXA):BOOL;
Description: To be documented
Note To be documented


function GetCPInfoExW(CodePage:UINT; dwFlags:DWORD; var lpCPInfoEx:CPINFOEXW):BOOL;
Description: To be documented
Note To be documented


function IsValidLocale(Locale:LCID; dwFlags:DWORD):BOOL;
Description: To be documented
Note To be documented


function GetSystemDefaultLCID:LCID;
Description: To be documented
Note To be documented


function GetUserDefaultLCID:LCID;
Description: To be documented
Note To be documented


function SetSystemDefaultLCID(Locale:LCID):BOOL;
Description: To be documented
Note To be documented


RTL unicode string manager functions

function SysGetStandardCodePage(const stdcp:TStandardCodePageEnum):TSystemCodePage;
Description: To be documented
Note To be documented


Locale helper functions

function MapPage(CodePage:UINT):Word;
Description: Map a default code page to the actual current page
Note To be documented


function GetPage(PageID:Word):PCodePage;
Description: Find the requested page in the linked list
Note To be documented


function CheckPage(Page:PCodePage):Boolean;
Description: Check that the Page supplied is part of the Linked list
Note To be documented


function LinkPage(Page:PCodePage):Boolean;
Description: Link Page to Prev,Next Siblings and Adjust First/Last
Note To be documented


function UnlinkPage(Page:PCodePage):Boolean;
Description: Unlink Page from Prev,Next Siblings and Adjust First/Last
Note To be documented


function LoadPage(PageID:Word; Table:PCodeTable; Lower:PLowerTable; Upper:PUpperTable):Boolean;
Description: Load a code table and allocate memory to create a code page
Note To be documented


function UnloadPage(PageID:Word; Page:PCodePage):Boolean;
Description: Unload a code page and release allocated memory
Note To be documented


function DefaultTrans(PageID,TransID:Word):Boolean;
Description: To be documented
Note To be documented


function InstallTrans(PageID:Word; Table:PTransTable):Boolean;
Description: To be documented
Note To be documented


Return to Unit Reference