Preferences.h
.
Int16 PrefGetAppPreferences (UInt32 creator, UInt16 id, void* prefs, UInt16* prefsSize, Boolean saved)
  |
|
Application creator. |
  |
|
ID number (lets an application have multiple preferences). |
  |
|
Pointer to a buffer to hold preferences. |
  |
|
Pointer to size the buffer passed. |
  |
|
If true , retrieve the saved preferences. If false , retrieve the current preferences. |
noPreferenceFound
if the preference resource wasn't found.
prefsSize
is equal or less than the return value. If it's greater than the size passed, then some bytes were not retrieved.
PrefSetPreferences
,
PrefGetAppPreferencesV10
Boolean PrefGetAppPreferencesV10 (UInt32 type, Int16 version, void* prefs, UInt16 prefsSize)
  |
|
Application creator type. |
  |
|
Version number of the application. |
  |
|
Pointer to a buffer to hold preferences. |
  |
|
Size of the buffer passed. |
false
if the preference resource was not found or the preference resource contains the wrong version number.
PrefGetAppPreferences
.
PrefSetPreferences
,
PrefGetAppPreferences
UInt32 PrefGetPreference (SystemPreferencesChoice choice)
PrefGetPreferences
only let you retrieve the whole system preferences structure, this function lets you specify which preferences to retrieve. You can also choose among different preferences using an ID, or choose to access the saved or unsaved preferences.
PrefSetPreferences
,
PrefGetAppPreferences
,
PrefGetAppPreferencesV10
void PrefGetPreferences (SystemPreferencesPtr p)
p
.
p
parameter points to a memory block allocated by the caller that is filled in by this function.
PrefSetPreferences
DmOpenRef PrefOpenPreferenceDBV10 (void)
PrefOpenPreferenceDB
.
PrefGetPreferences
,
PrefSetPreferences
void PrefSetAppPreferences (UInt32 creator, UInt16 id, Int16 version, void* prefs, UInt16 prefsSize, Boolean saved)
  |
|
Application creator type. |
  |
|
Resource ID (usually 0). |
  |
|
Version number of the application. |
  |
|
Pointer to a buffer that holds preferences. |
  |
|
Size of the buffer passed. |
  |
|
If true , set the saved preferences. If not, set the current preferences. |
PrefSetAppPreferencesV10
void PrefSetAppPreferencesV10 (UInt32 creator, Int16 version, void* prefs, UInt16 prefsSize)
  |
|
Application creator type. |
  |
|
Version number of the application. |
  |
|
Pointer to a buffer holding preferences. |
  |
|
Size of the buffer passed. |
PrefSetAppPreferences
.
PrefSetAppPreferences
,
PrefGetPreferences
PrefSetPreferences
allows you to set selected preferences without having to access the whole structure.
void PrefSetPreference (SystemPreferencesChoice choice, UInt32 value)
  |
|
A SystemPreferencesChoice (see Preferences.h ) |
  |
|
Value to assign to the item in SystemPreferencesChoice . |
void PrefSetPreferences (SystemPreferencesPtr p)
p
Pointer to system preferences.
PrefGetPreferences
  |   |