Documentation  |   Table of Contents   |  < Previous   |  Next >  

89    Preferences.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

Applications should no longer access the system preferences database directly, but should instead get and set individual preference values using the declared functions.

Deleted APIs ^TOP^

Table 89.1  Deleted functions

Deleted API

Use instead

PrefGetAppPreferencesV10()

PrefGetAppPreferences()

PrefGetPreferences()

PrefGetPreference()

PrefOpenPreferenceDB()

Locate the preferences database with DmFindDatabaseByTypeCreator (type, sysFileCSystem, dmFindExtendedDB, NULL) where type is either sysFileTSavedPreferences or sysFileTPreferences, depending on whether or not you are opening the saved preferences database; and then open the database by calling DmOpenDBNoOverlay().

PrefOpenPreferenceDBV10()

See the explanation for PrefOpenPreferenceDB(), above.

PrefSetAppPreferencesV10()

PrefSetAppPreferences()

PrefSetPreferences()

PrefSetPreference()

Table 89.2  Deleted structures

Deleted API

Use instead

ButtonDefaultAppType

ButtonDefaultListType

SystemPreferencesType

Nothing. This structure was always considered to be private.

SystemPreferencesTypeV10

Nothing. This structure was always considered to be private.

Table 89.3  Deleted types

Deleted API

Use instead

SystemPreferencesPtr

Nothing. This was a pointer to a structure that was always considered to be private.

Table 89.4  Deleted #defines

Deleted API

Use instead

default...

peggedAutoOffDuration

peggedAutoOffDurationSecs

preferenceDataVer...

Nothing. Access individual preference values by calling PrefGetPreference() or PrefGetAppPreferences().

prefLeftHanded

prefRightHanded

Table 89.5  Deleted enumerated types

Deleted API

Use instead

AnimationLevelType

SecurityAutoLockType

Modified APIs ^TOP^

Table 89.6  Modified functions

Modified API

Description of change

int16_t PrefGetAppPreferences (uint32_t, uint16_t, void *, uint32_t *, Boolean)

The prefsSize parameter was 16-bit, but is now 32-bit.

void PrefSetAppPreferences (uint32_t, uint16_t, int16_t, const void *, uint32_t, Boolean)

The prefsSize parameter was 16-bit, but is now 32-bit.

Table 89.7  Modified enumerated types 

Modified API

Description of change

MeasurementSystemType

Now a typedef and an associated enum (MeasurementSystemTag).

SoundLevelTypeV20

Now a typedef and an associated enum (SoundLevelTypeV20Tag).

SystemPreferencesChoice

Now a typedef and an associated enum (SystemPreferencesChoiceTag). As well, several values within the associated enum have changed:

  • prefCountry is now prefCountry68K, and is intended for use only from applications running under PACE—although such applications should really use the prefLocale value instead. ARM-native applications should call LmGetFormatsLocale() to find out what locale the user has selected in the Formats panel, and LmSetFormatsLocale() to change it.

  • prefLanguage is now prefLanguage68K, and is intended for use only from applications running under PACE—although such applications should really use the prefLocale value instead. ARM-native applications should call LmGetFormatsLocale() to find out what locale the user has selected in the Formats panel, and LmSetFormatsLocale() to change it.

  • prefLocale is now prefFormatsLocale68K, and is intended for use only from applications running under PACE—although such applications should really use the prefLocale value instead. ARM-native applications should call LmGetFormatsLocale() to find out what locale the user has selected in the Formats panel, and LmSetFormatsLocale() to change it.

Unchanged APIs ^TOP^

Table 89.8  Unchanged functions

PrefGetPreference()

PrefSetPreference()

Table 89.9  Unchanged #defines

noPreferenceFound