<--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../../aros.css' --->

Configdata.mui

MUIA_Configdata_Application

Function

Associate Configdata with the Application used for notifications and
window positions.

Inputs

Initialize only, borrowed live Application object pointer. Default NULL
in storage, but notification setup is not NULL-safe.

Notes

Borrowed Application pointer. Used to register/remove the filesystem
notification handler and access window positions; keep it alive until
Configdata is disposed. No local setter/getter.

MUIA_Configdata_ApplicationBase

Function

Choose the application preference-file base name.

Inputs

Initialize only, borrowed CONST_STRPTR, not an object pointer despite
the header annotation. Default NULL.

Notes

The explicit name takes precedence over MUIA_Application_Base. Paths use a
255-byte buffer and may be truncated. The name is borrowed, not copied; no
local setter/getter.

MUIC_Configdata

Superclass

Dataspace.mui

Description

Store Zune preferences by configuration ID, using compiled defaults
for missing records. Numeric records hold four-byte big-endian ULONGs;
strings include the terminating zero. Typed getters do not check the
stored record size or type.

Construction tries ENV:zune/<base>.prefs, then ENVARC:zune/<base>.prefs
when an application base is available. Only if neither succeeds does
it try the corresponding global.prefs files. Local and global files
are alternatives, not layers.

Dataspace owns copied records. GetString returns borrowed pointers;
the private ZunePrefsNew view is not generally refreshed by setters
or subsequent Load operations. Supply a live Application for
notification handling and retain it through disposal.

Notes

Save and Load are synchronous. Save replaces the file without atomic
rollback and always returns zero. Load may return TRUE for partial
or malformed records, after discarding existing records.
Window-position methods trust record lengths and temporarily swap
bytes in place; concurrent access is not safe without serialization.
Public-screen descriptors are borrowed and may expire after reload.

MUIM_Configdata_GetPubScrnDesc

Synopsis

IPTR descriptor = DoMethod(obj, MUIM_Configdata_GetPubScrnDesc, name);

Function

Find a loaded public-screen descriptor by exact name.

Inputs

name - Non-NULL terminated CONST_STRPTR, readable for the call.

Result

Borrowed MUI_PubScreenDesc pointer for a case-sensitive match, otherwise
NULL. Missing muiscreen.library yields NULL.

Notes

Looks up the name case-sensitively under a shared lock, released before
return. The pointer is borrowed and may become invalid on reload/disposal;
callers must synchronize concurrent access.

MUIM_Configdata_GetString

Synopsis

CONST_STRPTR value = (CONST_STRPTR)DoMethod(obj,
MUIM_Configdata_GetString, id);

Function

Find a stored string or its builtin fallback.

Inputs

id - ULONG configuration ID whose record is a terminated string.

Result

Borrowed CONST_STRPTR, or NULL if no stored record or builtin
string/image/frame default exists.

Notes

Search stored records before string, image and frame defaults. The pointer
is borrowed and unvalidated; copy it before replacing records, loading
preferences or disposing Configdata. Unknown IDs return NULL.

MUIM_Configdata_GetULong

Synopsis

ULONG value = (ULONG)DoMethod(obj, MUIM_Configdata_GetULong, id);

Function

Read a numeric preference in host byte order.

Inputs

id - ULONG ID whose stored record contains at least four bytes of
big-endian numeric data.

Result

Stored value converted to host order; otherwise builtin numeric default,
otherwise zero. Zero does not distinguish missing from stored zero.

Notes

Stored values are interpreted as four-byte big-endian ULONGs without
size/type checks. The numeric default (or zero) is returned when no record
exists.

MUIM_Configdata_GetWindowPos

Synopsis

IPTR record = DoMethod(obj, MUIM_Configdata_GetWindowPos);

Function

Copy the stored window-position record into the associated Application.

Inputs

obj - Live Configdata. No payload argument is read by this
implementation. The stored record must be valid for the Application
window-position layout and capacity.

Result

Borrowed pointer to the stored record, or zero when absent. With no
Application, returns the record without copying.

Notes

Reads MUICFG_WindowPos and copies it to the Application if present.
Temporarily swaps the stored record on little-endian targets. Record size
is not validated; use only valid native data with serialized access.
Returned storage is borrowed.

MUIM_Configdata_Load

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_Load, filename);

Function

Replace Dataspace contents with preference records from an IFF file.

Inputs

obj - Live Configdata with no retained record pointers in use.
filename - Non-NULL terminated path, readable for the call.

Result

FALSE if IFF allocation, file opening or OpenIFF fails. Otherwise TRUE,
regardless of later parsing, record-reading or completeness.

Notes

After successful OpenIFF, clears existing records and reads MUIC chunks
without checking all read/parse results. TRUE can mean partial or
malformed data; old records cannot be restored. Reloads screen descriptors
but does not rebuild private preferences, invalidating borrowed pointers.

MUIM_Configdata_LoadPubScreens

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_LoadPubScreens);

Function

Reload public-screen descriptors from env:Zune/PublicScreens.iff.

Inputs

obj - Live Configdata; no payload argument is used. Requires
muiscreen.library for actual loading.

Result

Always TRUE, including missing library, missing file and an empty
descriptor list.

Notes

Replaces the descriptor list from env:Zune/PublicScreens.iff when
muiscreen.library is available; old pointers become invalid. Missing files
leave an empty list. Allocation errors are not reported; notification-port
messages are not drained or replied to.

MUIM_Configdata_Save

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_Save, filename);

Function

Write the current preference Dataspace to a file.

Inputs

obj - Live Configdata; associated Application must remain valid.
filename - Non-NULL terminated path, readable for the call.

Result

Always zero. It is not a success/failure indicator.

Notes

Captures Application window positions, then writes PREF/PRHD/MUIC directly
to MODE_NEWFILE, creating the parent directory once if needed. Writes are
not fully checked and no atomic replacement or rollback is provided;
verify the file when persistence matters.

MUIM_Configdata_SetFont

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_SetFont, id, font);

Function

Store a font string in the preference Dataspace.

Inputs

id - Valid nonzero configuration ID for this representation.
font - Borrowed terminated CONST_STRPTR for the call, with NULL handled
as described below.

Result

Always zero; storage/removal success is not reported.

Notes

NULL or empty strings remove the record; nonempty strings are copied
without checking font availability. The private font view is not
refreshed. Source storage must not alias the replaced record.

MUIM_Configdata_SetFramespec

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_SetFramespec, id,
framespec);

Function

Store a framespec string in the preference Dataspace.

Inputs

id - Valid nonzero configuration ID for this representation.
framespec - Borrowed terminated CONST_STRPTR for the call, with NULL
handled as described below.

Result

Always zero; storage/removal success is not reported.

Notes

NULL and empty strings are ignored. Matching frame defaults remove the
record; other strings are copied without parsing or private-frame refresh.
Source storage must not alias the replaced record.

MUIM_Configdata_SetImspec

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_SetImspec, id, imspec);

Function

Store a imspec string in the preference Dataspace.

Inputs

id - Valid nonzero configuration ID for this representation.
imspec - Borrowed terminated CONST_STRPTR for the call, with NULL
handled as described below.

Result

Always zero; storage/removal success is not reported.

Notes

NULL, empty and strings starting with '6' are ignored. Matching image or
string defaults remove the record; other strings are copied without format
validation. Source storage must not alias the record being replaced.

MUIM_Configdata_SetPenspec

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_SetPenspec, id, penspec);

Function

Store a penspec string in the preference Dataspace.

Inputs

id - Valid nonzero configuration ID for this representation.
penspec - Borrowed terminated CONST_STRPTR for the call, with NULL
handled as described below.

Result

Always zero; storage/removal success is not reported.

Notes

NULL and empty strings are ignored. Matching string defaults remove the
record; other strings are copied. The private pen view is not refreshed;
source storage must not alias the replaced record.

MUIM_Configdata_SetString

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_SetString, id, string);

Function

Store a string and synchronize recognized private string fields.

Inputs

id - Valid nonzero string configuration ID.
string - Non-NULL terminated CONST_STRPTR, readable for the call.

Result

Always zero; allocation, removal or parse success is not reported.

Notes

Matching string defaults remove the record. Other strings are copied, then
recognized private fields are synchronized; keyboard specifications use
ParseIX, but errors are not returned. NULL and self-aliasing replacement
pointers are unsafe.

MUIM_Configdata_SetULong

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_SetULong, id, val);

Function

Store a four-byte numeric preference or remove a redundant default.

Inputs

id - Valid nonzero numeric configuration ID.
val - ULONG in host byte order.

Result

Always zero, including successful storage, removal and allocation
failure.

Notes

Remove a record matching the compiled numeric default; otherwise store
four big-endian bytes. The private preference view is not refreshed. Check
stored values separately if failure matters.

MUIM_Configdata_SetWindowPos

Synopsis

IPTR result = DoMethod(obj, MUIM_Configdata_SetWindowPos);

Function

Capture the Application window-position record in Dataspace.

Inputs

obj - Live Configdata with a valid associated Application, or no
Application for a no-op. No payload argument is read.

Result

Always zero; Dataspace copy success is ignored.

Notes

Copies the associated Application position record into Dataspace and
temporarily swaps source bytes on little-endian targets. Pointer/size
validity and storage success are unchecked. Save calls this method.