2 * Copyright 2005-2015, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de
7 * Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk>
8 * Joseph Groover <looncraz@looncraz.net>
10 #ifndef DESKTOP_SETTINGS_PRIVATE_H
11 #define DESKTOP_SETTINGS_PRIVATE_H
14 #include "DesktopSettings.h"
18 #include "ServerFont.h"
21 struct server_read_only_memory
;
24 class DesktopSettingsPrivate
{
26 DesktopSettingsPrivate(
27 server_read_only_memory
* shared
);
28 ~DesktopSettingsPrivate();
30 status_t
Save(uint32 mask
= kAllSettings
);
32 void SetDefaultPlainFont(const ServerFont
& font
);
33 const ServerFont
& DefaultPlainFont() const;
35 void SetDefaultBoldFont(const ServerFont
& font
);
36 const ServerFont
& DefaultBoldFont() const;
38 void SetDefaultFixedFont(const ServerFont
& font
);
39 const ServerFont
& DefaultFixedFont() const;
41 void SetScrollBarInfo(const scroll_bar_info
&info
);
42 const scroll_bar_info
& ScrollBarInfo() const;
44 void SetMenuInfo(const menu_info
&info
);
45 const menu_info
& MenuInfo() const;
47 void SetMouseMode(mode_mouse mode
);
48 mode_mouse
MouseMode() const;
49 void SetFocusFollowsMouseMode(
50 mode_focus_follows_mouse mode
);
51 mode_focus_follows_mouse
FocusFollowsMouseMode() const;
52 bool NormalMouse() const
53 { return MouseMode() == B_NORMAL_MOUSE
; }
54 bool FocusFollowsMouse() const
56 == B_FOCUS_FOLLOWS_MOUSE
; }
57 bool ClickToFocusMouse() const
59 == B_CLICK_TO_FOCUS_MOUSE
; }
60 void SetAcceptFirstClick(bool acceptFirstClick
);
61 bool AcceptFirstClick() const;
63 void SetShowAllDraggers(bool show
);
64 bool ShowAllDraggers() const;
66 void SetWorkspacesLayout(int32 columns
, int32 rows
);
67 int32
WorkspacesCount() const;
68 int32
WorkspacesColumns() const;
69 int32
WorkspacesRows() const;
71 void SetWorkspacesMessage(int32 index
,
73 const BMessage
* WorkspacesMessage(int32 index
) const;
75 void SetUIColor(color_which which
,
76 const rgb_color color
,
77 bool* changed
= NULL
);
78 void SetUIColors(const BMessage
& colors
,
79 bool* changed
= NULL
);
80 // changed must be boolean array equal in
81 // size to colors' size
83 rgb_color
UIColor(color_which which
) const;
85 void SetSubpixelAntialiasing(bool subpix
);
86 bool SubpixelAntialiasing() const;
87 void SetHinting(uint8 hinting
);
88 uint8
Hinting() const;
89 void SetSubpixelAverageWeight(uint8 averageWeight
);
90 uint8
SubpixelAverageWeight() const;
91 void SetSubpixelOrderingRegular(
92 bool subpixelOrdering
);
93 bool IsSubpixelOrderingRegular() const;
98 status_t
_GetPath(BPath
& path
);
99 void _ValidateWorkspacesLayout(int32
& columns
,
102 ServerFont fPlainFont
;
103 ServerFont fBoldFont
;
104 ServerFont fFixedFont
;
106 scroll_bar_info fScrollBarInfo
;
108 mode_mouse fMouseMode
;
109 mode_focus_follows_mouse fFocusFollowsMouseMode
;
110 bool fAcceptFirstClick
;
111 bool fShowAllDraggers
;
112 int32 fWorkspacesColumns
;
113 int32 fWorkspacesRows
;
114 BMessage fWorkspaceMessages
[kMaxWorkspaces
];
116 server_read_only_memory
& fShared
;
119 #endif /* DESKTOP_SETTINGS_PRIVATE_H */