From d973d0f8ef728f9ae1827c63fd539c9f2cd80bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 25 Jan 2008 01:45:46 +0000 Subject: [PATCH] Introduce global flags for theme manager. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23726 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- 3rdparty/mmu_man/themes/ThemeManager.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/3rdparty/mmu_man/themes/ThemeManager.h b/3rdparty/mmu_man/themes/ThemeManager.h index cfa9ddc215..c6612dc43a 100644 --- a/3rdparty/mmu_man/themes/ThemeManager.h +++ b/3rdparty/mmu_man/themes/ThemeManager.h @@ -9,6 +9,18 @@ /* backup of current settings when applying a theme */ #define THEME_ID_BACKUP -1 +/* flags */ + + // try to apply settings to running applications +#define UI_THEME_SETTINGS_APPLY 0x00000001 + // save settings to native storage +#define UI_THEME_SETTINGS_SAVE 0x00000002 + // attempt to do both +#define UI_THEME_SETTINGS_SET_ALL (UI_THEME_SETTINGS_APPLY|UI_THEME_SETTINGS_SAVE) + // do read settings from native storage +#define UI_THEME_SETTINGS_RETRIEVE 0x00000004 + + namespace Z { namespace ThemeManager { class ThemeManager; @@ -64,13 +76,13 @@ status_t CurrentTheme(BMessage ©to); /* Theme manipulation */ -status_t ApplyTheme(int32 id, uint32 flags=0L); -int32 MakeTheme(uint32 flags=0L); -status_t UpdateTheme(int32 id, uint32 flags=0L); +status_t ApplyTheme(int32 id, uint32 flags=UI_THEME_SETTINGS_SET_ALL); +int32 MakeTheme(uint32 flags=UI_THEME_SETTINGS_RETRIEVE); +status_t UpdateTheme(int32 id, uint32 flags=UI_THEME_SETTINGS_RETRIEVE); status_t DeleteTheme(int32 id); int32 SelectedTheme(); -status_t ApplyDefaultTheme(uint32 flags=0L); +status_t ApplyDefaultTheme(uint32 flags=UI_THEME_SETTINGS_SET_ALL); status_t BackupCurrent(); status_t RestoreCurrent();