Make UEFI boot-platform build again
[haiku.git] / headers / os / media / MediaTheme.h
blobf7f51cdf350a442f4a160ad641057b75ca134f0a
1 /*
2 * Copyright 2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _CONTROL_THEME_H
6 #define _CONTROL_THEME_H
9 #include <Entry.h>
10 #include <MediaDefs.h>
12 class BBitmap;
13 class BControl;
14 class BParameter;
15 class BParameterWeb;
16 class BRect;
17 class BView;
20 class BMediaTheme {
21 public:
22 virtual ~BMediaTheme();
24 const char* Name();
25 const char* Info();
26 int32 ID();
27 bool GetRef(entry_ref* ref);
29 static BView* ViewFor(BParameterWeb* web, const BRect* hintRect = NULL,
30 BMediaTheme* usingTheme = NULL);
32 static status_t SetPreferredTheme(BMediaTheme* defaultTheme = NULL);
33 static BMediaTheme* PreferredTheme();
35 virtual BControl* MakeControlFor(BParameter* control) = 0;
37 enum bg_kind {
38 B_GENERAL_BG = 0,
39 B_SETTINGS_BG,
40 B_PRESENTATION_BG,
41 B_EDIT_BG,
42 B_CONTROL_BG,
43 B_HILITE_BG
45 enum fg_kind {
46 B_GENERAL_FG = 0,
47 B_SETTINGS_FG,
48 B_PRESENTATION_FG,
49 B_EDIT_FG,
50 B_CONTROL_FG,
51 B_HILITE_FG
54 virtual BBitmap* BackgroundBitmapFor(bg_kind bg = B_GENERAL_BG);
55 virtual rgb_color BackgroundColorFor(bg_kind bg = B_GENERAL_BG);
56 virtual rgb_color ForegroundColorFor(fg_kind fg = B_GENERAL_FG);
58 protected:
59 BMediaTheme(const char* name, const char* info,
60 const entry_ref* addOn = NULL, int32 themeID = 0);
62 virtual BView* MakeViewFor(BParameterWeb* web,
63 const BRect* hintRect = NULL) = 0;
65 static BControl* MakeFallbackViewFor(BParameter* control);
67 private:
68 BMediaTheme(); /* private unimplemented */
69 BMediaTheme(const BMediaTheme& other);
70 BMediaTheme& operator=(const BMediaTheme& other);
72 virtual status_t _Reserved_ControlTheme_0(void *);
73 virtual status_t _Reserved_ControlTheme_1(void *);
74 virtual status_t _Reserved_ControlTheme_2(void *);
75 virtual status_t _Reserved_ControlTheme_3(void *);
76 virtual status_t _Reserved_ControlTheme_4(void *);
77 virtual status_t _Reserved_ControlTheme_5(void *);
78 virtual status_t _Reserved_ControlTheme_6(void *);
79 virtual status_t _Reserved_ControlTheme_7(void *);
81 char* fName;
82 char* fInfo;
83 int32 fID;
84 bool fIsAddOn;
85 entry_ref fAddOnRef;
87 uint32 _reserved[8];
89 static BMediaTheme* sDefaultTheme;
93 // Theme add-ons should export these functions:
94 #if defined(_BUILDING_THEME_ADDON)
95 extern "C" BMediaTheme* make_theme(int32 id, image_id you);
96 extern "C" status_t get_theme_at(int32 index, const char** _name,
97 const char** _info, int32* _id);
98 #endif // _BUILDING_THEME_ADDON
100 #endif // _CONTROL_THEME_H