User settings

⭐ New in 0.2.9.

User settings system loads and saves registered consumer settings transparently to application. Consumers are menu items, widgets and windows, and settings system handles loading and saving window position, widget state, radio group selection, and so on. Settings are located in user home directory, either .config or .local subdirectory. If none of those two directories exists, application user home directory is used.

See FOSS Mixer and Desktop menu demo for live example.

Functions

Each settings function explained.

settings_register

Register settings consumer to update its state to user setting system. User settings are loaded and saved automatically by the engine.

Returns settings handle on success, zero on failure.

handle
settings_register([string] consumer_name, [string] consumer_class)

settings_unregister

Unregister settings consumer. Unregistering detaches consumer from user settings system, so consumer state is not updated or saved to settings after this call returns succesfully.

Returns zero on success, non-zero on failure.

int
settings_unregister([handle] settings_handle)

Copyright © 2025, Jani Salonen <salojan at goto10 piste co>. Piste is finnish word and means dot. All rights reserved.