OverlayMgr.h
. It discusses the following topics:
OmLocaleType
struct specifies a locale.
typedef struct {
    UInt16 language;
    UInt16 country;
} OmLocaleType;
OmOverlayRscType
struct specifies an overlay of one resource. You create a resource overlay using the tools provided in the Palm OS® SDK.
typedef struct {
    OmOverlayKind overlayType;
    UInt32 rscType;
    UInt16 rscID;
    UInt32 rscLength;
    UInt32 rscChecksum;
} OmOverlayRscType;
OmOverlayRscType
structure as opaque. Do not attempt to change structure member values directly.
OmOverlaySpecType
struct defines a resource of type 'ovly'
. This resource is required in the overlay database and may optionally exist in the corresponding base database as well.
typedef struct {
    UInt16 version;
    UInt32 flags;
    UInt32 baseChecksum;
    OmLocaleType targetLocale;
    UInt32 baseDBType;
    UInt32 baseDBCreator;
    UInt32 baseDBCreateDate;
    UInt32 baseDBModDate;
    UInt16 numOverlays;
    OmOverlayRscType overlays[0];
} OmOverlaySpecType;
OmOverlaySpecType
structure as opaque. Do not attempt to change structure member values directly.
version
|
Version number for the overlay manager. The current version is omOverlayVersion .
| ||||||
flags
|
0, or one or more of the following flags:
| ||||||
baseChecksum
| Checksum of all of the checksum values for the overlaid resources. | ||||||
targetLocale
|
Locale of this database. See OmLocaleType .
| ||||||
baseDBType
| Type of the base database. | ||||||
baseDBCreator
| Creator of the base database. | ||||||
baseDBCreateDate
| Creation date of the base database. | ||||||
baseDBModDate
| Modification date of the base database. | ||||||
numOverlays
|
Number of elements in the overlays array.
| ||||||
overlays
|
An array of OmOverlayRscType structs identifying each change or action the overlay is making to a resource.
|
Constant | Value | Description |
---|---|---|
omOverlayVersion
| 0x0004 | Current version for the overlay manager. This version number controls which types of overlay actions are supported. |
omOverlayDBType
|
'ovly'
| Database type for overlay databases. |
omOverlayRscType
|
'ovly'
|
Symbolic name of an overlay resource that is contained in both the base database and the overlay database. This resource is defined by the OmOverlaySpecType struct.
|
omOverlayRscID
| 1000 | Resource ID of the overlay resource in both the base database and the overlay database. |
omFtrCreator
|
'ovly'
|
Creator value used for the omFtrShowErrorsFlag feature.
|
omFtrShowErrorsFlag
| 0 |
Feature that controls the number of error messages displayed by the overlay manager. If this feature is set to true , the overlay manager may display several more error messages when validating an overlay against its base database. This feature only takes effect when the error checking level is set to full (common on debug ROMs, not on release ROMs). Use FtrGet and FtrSet to retrieve and set this value.
|
void OmGetCurrentLocale (OmLocaleType *currentLocale)
  |
<- |
Points to an OmLocaleType struct that identifies the current locale. |
cUnitedKingdom
, the British English overlay is used for the application. If the country returned is cUnitedStates
, the US English overlay is used.
OmGetSystemLocale
Err OmGetIndexedLocale (UInt16 localeIndex, OmLocaleType *theLocale)
  |
-> |
Zero-based index of the locale to return. |
  |
<- |
Points to an OmLocaleType struct that identifies the locale at that index. |
errNone
upon success, or omErrInvalidLocaleIndex
if the index is out of bounds.
OmSetSystemLocale
to change the system locale.
OmGetSystemLocale
void *OmGetRoutineAddress (OmSelector inSelector)
NULL
if an invalid routine selector is passed.
OmGetRoutineAddress
returns NULL
, the function is unavailable.
void OmGetSystemLocale (OmLocaleType *systemLocale)
  |
<- |
Points to an OmLocaleType struct that identifies the system locale. |
OmGetCurrentLocale
, which returns the locale that determines which overlays are used.
OmGetCurrentLocale
Err OmLocaleToOverlayDBName (const Char *baseDBName, const OmLocaleType *targetLocale, Char *overlayDBName)
  |
-> |
The name of the base resource database associated with the overlay. |
  |
-> |
The locale to which this overlay applies. See OmLocaleType . Pass NULL to use the current locale. |
  |
<- |
The overlay database name given the base database name and the target locale. This buffer must be at least dmDBNameLength bytes. |
errNone
upon success, or omErrUnknownLocale
if the targetLocale
parameter is invalid.
_
llCC
  |
baseDBName |
The name of the base database as you passed it in. |
  |
ll |
A two-character code identifying the language. |
  |
CC |
A two-character code identifying the country. |
OmOverlayDBNameToLocale
Err OmOverlayDBNameToLocale (const Char *overlayDBName, OmLocaleType *overlayLocale)
  |
-> |
The name of the overlay database. |
  |
<- |
Points to an OmLocaleType structure identifying the overlay's locale. |
errNone
upon success, omErrBadOverlayDBName
if the string overlayDBName
is not long enough to have a locale suffix, or omErrUnknownLocale
if the locale cannot be determined.
OmLocaleToOverlayDBName
Err OmSetSystemLocale
(const OmLocaleType *systemLocale)
  |
-> |
An OmLocaleType structure specifying the locale to switch the system to. |
errNone
upon success, or one of the following if an error occurs:
  |
|
There is no system overlay for systemLocale . |
  |
|
The system overlay for systemLocale has been found but is invalid. |
  |
|
An error occurred while opening the overlay. |
  |
|
A memory error occurred while opening the overlay. |
  |
|
The system overlay was already open. |
OmGetSystemLocale
  |   |