2 * Copyright 2005-2015, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus <superstippi@gmx.de>
7 * Axel Dörfler, axeld@pinc-software.de
8 * Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk>
9 * Joseph Groover <looncraz@looncraz.net>
13 #include "DesktopSettings.h"
14 #include "DesktopSettingsPrivate.h"
16 #include <Directory.h>
18 #include <FindDirectory.h>
21 #include <DefaultColors.h>
22 #include <InterfaceDefs.h>
23 #include <ServerReadOnlyMemory.h>
26 #include "FontCache.h"
27 #include "FontCacheEntry.h"
28 #include "FontManager.h"
29 #include "GlobalSubpixelSettings.h"
30 #include "ServerConfig.h"
33 DesktopSettingsPrivate::DesktopSettingsPrivate(server_read_only_memory
* shared
)
37 // if the on-disk settings are not complete, the defaults will be kept
43 DesktopSettingsPrivate::~DesktopSettingsPrivate()
49 DesktopSettingsPrivate::_SetDefaults()
51 fPlainFont
= *gFontManager
->DefaultPlainFont();
52 fBoldFont
= *gFontManager
->DefaultBoldFont();
53 fFixedFont
= *gFontManager
->DefaultFixedFont();
55 fMouseMode
= B_NORMAL_MOUSE
;
56 fFocusFollowsMouseMode
= B_NORMAL_FOCUS_FOLLOWS_MOUSE
;
57 fAcceptFirstClick
= false;
58 fShowAllDraggers
= true;
60 // init scrollbar info
61 fScrollBarInfo
.proportional
= true;
62 fScrollBarInfo
.double_arrows
= false;
63 fScrollBarInfo
.knob
= 1;
64 // look of the knob (R5: (0, 1, 2), 1 = default)
65 fScrollBarInfo
.min_knob_size
= 15;
68 strlcpy(fMenuInfo
.f_family
, fPlainFont
.Family(), B_FONT_FAMILY_LENGTH
);
69 strlcpy(fMenuInfo
.f_style
, fPlainFont
.Style(), B_FONT_STYLE_LENGTH
);
70 fMenuInfo
.font_size
= fPlainFont
.Size();
71 fMenuInfo
.background_color
.set_to(216, 216, 216);
73 fMenuInfo
.separator
= 0;
74 // look of the separator (R5: (0, 1, 2), default 0)
75 fMenuInfo
.click_to_open
= true; // always true
76 fMenuInfo
.triggers_always_shown
= false;
78 fWorkspacesColumns
= 2;
81 memcpy(fShared
.colors
, BPrivate::kDefaultColors
,
82 sizeof(rgb_color
) * kColorWhichCount
);
84 gSubpixelAntialiasing
= false;
85 gDefaultHintingMode
= HINTING_MODE_ON
;
86 gSubpixelAverageWeight
= 120;
87 gSubpixelOrderingRGB
= true;
92 DesktopSettingsPrivate::_GetPath(BPath
& path
)
94 status_t status
= find_directory(B_USER_SETTINGS_DIRECTORY
, &path
);
98 status
= path
.Append("system/app_server");
102 return create_directory(path
.Path(), 0755);
107 DesktopSettingsPrivate::_Load()
109 // TODO: add support for old app_server_settings file as well
112 status_t status
= _GetPath(basePath
);
116 // read workspaces settings
118 BPath
path(basePath
);
119 path
.Append("workspaces");
122 status
= file
.SetTo(path
.Path(), B_READ_ONLY
);
123 if (status
== B_OK
) {
125 status
= settings
.Unflatten(&file
);
126 if (status
== B_OK
) {
129 if (settings
.FindInt32("columns", &columns
) == B_OK
130 && settings
.FindInt32("rows", &rows
) == B_OK
) {
131 _ValidateWorkspacesLayout(columns
, rows
);
132 fWorkspacesColumns
= columns
;
133 fWorkspacesRows
= rows
;
137 while (i
< kMaxWorkspaces
&& settings
.FindMessage("workspace",
138 i
, &fWorkspaceMessages
[i
]) == B_OK
) {
144 // read font settings
147 path
.Append("fonts");
149 status
= file
.SetTo(path
.Path(), B_READ_ONLY
);
150 if (status
== B_OK
) {
152 status
= settings
.Unflatten(&file
);
153 if (status
== B_OK
&& gFontManager
->Lock()) {
158 if (settings
.FindString("plain family", &family
) == B_OK
159 && settings
.FindString("plain style", &style
) == B_OK
160 && settings
.FindFloat("plain size", &size
) == B_OK
) {
161 FontStyle
* fontStyle
= gFontManager
->GetStyle(family
, style
);
162 fPlainFont
.SetStyle(fontStyle
);
163 fPlainFont
.SetSize(size
);
166 if (settings
.FindString("bold family", &family
) == B_OK
167 && settings
.FindString("bold style", &style
) == B_OK
168 && settings
.FindFloat("bold size", &size
) == B_OK
) {
169 FontStyle
* fontStyle
= gFontManager
->GetStyle(family
, style
);
170 fBoldFont
.SetStyle(fontStyle
);
171 fBoldFont
.SetSize(size
);
174 if (settings
.FindString("fixed family", &family
) == B_OK
175 && settings
.FindString("fixed style", &style
) == B_OK
176 && settings
.FindFloat("fixed size", &size
) == B_OK
) {
177 FontStyle
* fontStyle
= gFontManager
->GetStyle(family
, style
);
178 if (fontStyle
!= NULL
&& fontStyle
->IsFixedWidth())
179 fFixedFont
.SetStyle(fontStyle
);
180 fFixedFont
.SetSize(size
);
184 if (settings
.FindInt32("hinting", &hinting
) == B_OK
)
185 gDefaultHintingMode
= hinting
;
187 gFontManager
->Unlock();
191 // read mouse settings
194 path
.Append("mouse");
196 status
= file
.SetTo(path
.Path(), B_READ_ONLY
);
197 if (status
== B_OK
) {
199 status
= settings
.Unflatten(&file
);
200 if (status
== B_OK
) {
202 if (settings
.FindInt32("mode", &mode
) == B_OK
)
203 fMouseMode
= (mode_mouse
)mode
;
205 int32 focusFollowsMouseMode
;
206 if (settings
.FindInt32("focus follows mouse mode",
207 &focusFollowsMouseMode
) == B_OK
) {
208 fFocusFollowsMouseMode
209 = (mode_focus_follows_mouse
)focusFollowsMouseMode
;
212 bool acceptFirstClick
;
213 if (settings
.FindBool("accept first click", &acceptFirstClick
)
215 fAcceptFirstClick
= acceptFirstClick
;
220 // read appearance settings
223 path
.Append("appearance");
225 status
= file
.SetTo(path
.Path(), B_READ_ONLY
);
226 if (status
== B_OK
) {
228 status
= settings
.Unflatten(&file
);
229 if (status
== B_OK
) {
232 if (settings
.FindFloat("font size", &fontSize
) == B_OK
)
233 fMenuInfo
.font_size
= fontSize
;
235 const char* fontFamily
;
236 if (settings
.FindString("font family", &fontFamily
) == B_OK
)
237 strlcpy(fMenuInfo
.f_family
, fontFamily
, B_FONT_FAMILY_LENGTH
);
239 const char* fontStyle
;
240 if (settings
.FindString("font style", &fontStyle
) == B_OK
)
241 strlcpy(fMenuInfo
.f_style
, fontStyle
, B_FONT_STYLE_LENGTH
);
244 if (settings
.FindInt32("bg color", (int32
*)&bgColor
) == B_OK
)
245 fMenuInfo
.background_color
= bgColor
;
248 if (settings
.FindInt32("separator", &separator
) == B_OK
)
249 fMenuInfo
.separator
= separator
;
252 if (settings
.FindBool("click to open", &clickToOpen
) == B_OK
)
253 fMenuInfo
.click_to_open
= clickToOpen
;
255 bool triggersAlwaysShown
;
256 if (settings
.FindBool("triggers always shown", &triggersAlwaysShown
)
258 fMenuInfo
.triggers_always_shown
= triggersAlwaysShown
;
263 if (settings
.FindBool("proportional", &proportional
) == B_OK
)
264 fScrollBarInfo
.proportional
= proportional
;
267 if (settings
.FindBool("double arrows", &doubleArrows
) == B_OK
)
268 fScrollBarInfo
.double_arrows
= doubleArrows
;
271 if (settings
.FindInt32("knob", &knob
) == B_OK
)
272 fScrollBarInfo
.knob
= knob
;
275 if (settings
.FindInt32("min knob size", &minKnobSize
) == B_OK
)
276 fScrollBarInfo
.min_knob_size
= minKnobSize
;
278 // subpixel font rendering
280 if (settings
.FindBool("subpixel antialiasing", &subpix
) == B_OK
)
281 gSubpixelAntialiasing
= subpix
;
284 if (settings
.FindInt8("subpixel average weight", &averageWeight
)
286 gSubpixelAverageWeight
= averageWeight
;
289 bool subpixelOrdering
;
290 if (settings
.FindBool("subpixel ordering", &subpixelOrdering
)
292 gSubpixelOrderingRGB
= subpixelOrdering
;
296 for (int32 i
= 0; i
< kColorWhichCount
; i
++) {
298 snprintf(colorName
, sizeof(colorName
), "color%" B_PRId32
,
299 (int32
)index_to_color_which(i
));
301 if (settings
.FindInt32(colorName
, (int32
*)&fShared
.colors
[i
]) != B_OK
) {
302 // Set obviously bad value so the Appearance app can detect it
303 fShared
.colors
[i
] = B_TRANSPARENT_COLOR
;
309 // read dragger settings
312 path
.Append("dragger");
314 status
= file
.SetTo(path
.Path(), B_READ_ONLY
);
315 if (status
== B_OK
) {
317 status
= settings
.Unflatten(&file
);
318 if (status
== B_OK
) {
319 if (settings
.FindBool("show", &fShowAllDraggers
) != B_OK
)
320 fShowAllDraggers
= true;
329 DesktopSettingsPrivate::Save(uint32 mask
)
336 status_t status
= _GetPath(basePath
);
340 if (mask
& kWorkspacesSettings
) {
341 BPath
path(basePath
);
342 if (path
.Append("workspaces") == B_OK
) {
343 BMessage
settings('asws');
344 settings
.AddInt32("columns", fWorkspacesColumns
);
345 settings
.AddInt32("rows", fWorkspacesRows
);
347 for (int32 i
= 0; i
< kMaxWorkspaces
; i
++) {
348 settings
.AddMessage("workspace", &fWorkspaceMessages
[i
]);
352 status
= file
.SetTo(path
.Path(), B_CREATE_FILE
| B_ERASE_FILE
354 if (status
== B_OK
) {
355 status
= settings
.Flatten(&file
, NULL
);
360 if (mask
& kFontSettings
) {
361 BPath
path(basePath
);
362 if (path
.Append("fonts") == B_OK
) {
363 BMessage
settings('asfn');
365 settings
.AddString("plain family", fPlainFont
.Family());
366 settings
.AddString("plain style", fPlainFont
.Style());
367 settings
.AddFloat("plain size", fPlainFont
.Size());
369 settings
.AddString("bold family", fBoldFont
.Family());
370 settings
.AddString("bold style", fBoldFont
.Style());
371 settings
.AddFloat("bold size", fBoldFont
.Size());
373 settings
.AddString("fixed family", fFixedFont
.Family());
374 settings
.AddString("fixed style", fFixedFont
.Style());
375 settings
.AddFloat("fixed size", fFixedFont
.Size());
377 settings
.AddInt32("hinting", gDefaultHintingMode
);
380 status
= file
.SetTo(path
.Path(), B_CREATE_FILE
| B_ERASE_FILE
382 if (status
== B_OK
) {
383 status
= settings
.Flatten(&file
, NULL
);
388 if (mask
& kMouseSettings
) {
389 BPath
path(basePath
);
390 if (path
.Append("mouse") == B_OK
) {
391 BMessage
settings('asms');
392 settings
.AddInt32("mode", (int32
)fMouseMode
);
393 settings
.AddInt32("focus follows mouse mode",
394 (int32
)fFocusFollowsMouseMode
);
395 settings
.AddBool("accept first click", fAcceptFirstClick
);
398 status
= file
.SetTo(path
.Path(), B_CREATE_FILE
| B_ERASE_FILE
400 if (status
== B_OK
) {
401 status
= settings
.Flatten(&file
, NULL
);
406 if (mask
& kDraggerSettings
) {
407 BPath
path(basePath
);
408 if (path
.Append("dragger") == B_OK
) {
409 BMessage
settings('asdg');
410 settings
.AddBool("show", fShowAllDraggers
);
413 status
= file
.SetTo(path
.Path(), B_CREATE_FILE
| B_ERASE_FILE
415 if (status
== B_OK
) {
416 status
= settings
.Flatten(&file
, NULL
);
421 if (mask
& kAppearanceSettings
) {
422 BPath
path(basePath
);
423 if (path
.Append("appearance") == B_OK
) {
424 BMessage
settings('aslk');
425 settings
.AddFloat("font size", fMenuInfo
.font_size
);
426 settings
.AddString("font family", fMenuInfo
.f_family
);
427 settings
.AddString("font style", fMenuInfo
.f_style
);
428 settings
.AddInt32("bg color",
429 (const int32
&)fMenuInfo
.background_color
);
430 settings
.AddInt32("separator", fMenuInfo
.separator
);
431 settings
.AddBool("click to open", fMenuInfo
.click_to_open
);
432 settings
.AddBool("triggers always shown",
433 fMenuInfo
.triggers_always_shown
);
435 settings
.AddBool("proportional", fScrollBarInfo
.proportional
);
436 settings
.AddBool("double arrows", fScrollBarInfo
.double_arrows
);
437 settings
.AddInt32("knob", fScrollBarInfo
.knob
);
438 settings
.AddInt32("min knob size", fScrollBarInfo
.min_knob_size
);
440 settings
.AddBool("subpixel antialiasing", gSubpixelAntialiasing
);
441 settings
.AddInt8("subpixel average weight", gSubpixelAverageWeight
);
442 settings
.AddBool("subpixel ordering", gSubpixelOrderingRGB
);
444 for (int32 i
= 0; i
< kColorWhichCount
; i
++) {
446 snprintf(colorName
, sizeof(colorName
), "color%" B_PRId32
,
447 (int32
)index_to_color_which(i
));
448 settings
.AddInt32(colorName
, (const int32
&)fShared
.colors
[i
]);
452 status
= file
.SetTo(path
.Path(), B_CREATE_FILE
| B_ERASE_FILE
454 if (status
== B_OK
) {
455 status
= settings
.Flatten(&file
, NULL
);
465 DesktopSettingsPrivate::SetDefaultPlainFont(const ServerFont
&font
)
473 DesktopSettingsPrivate::DefaultPlainFont() const
480 DesktopSettingsPrivate::SetDefaultBoldFont(const ServerFont
&font
)
488 DesktopSettingsPrivate::DefaultBoldFont() const
495 DesktopSettingsPrivate::SetDefaultFixedFont(const ServerFont
&font
)
503 DesktopSettingsPrivate::DefaultFixedFont() const
510 DesktopSettingsPrivate::SetScrollBarInfo(const scroll_bar_info
& info
)
512 fScrollBarInfo
= info
;
513 Save(kAppearanceSettings
);
517 const scroll_bar_info
&
518 DesktopSettingsPrivate::ScrollBarInfo() const
520 return fScrollBarInfo
;
525 DesktopSettingsPrivate::SetMenuInfo(const menu_info
& info
)
528 // Also update the ui_color
529 SetUIColor(B_MENU_BACKGROUND_COLOR
, info
.background_color
);
530 // SetUIColor already saves the settings
535 DesktopSettingsPrivate::MenuInfo() const
542 DesktopSettingsPrivate::SetMouseMode(const mode_mouse mode
)
545 Save(kMouseSettings
);
550 DesktopSettingsPrivate::SetFocusFollowsMouseMode(mode_focus_follows_mouse mode
)
552 fFocusFollowsMouseMode
= mode
;
553 Save(kMouseSettings
);
558 DesktopSettingsPrivate::MouseMode() const
564 mode_focus_follows_mouse
565 DesktopSettingsPrivate::FocusFollowsMouseMode() const
567 return fFocusFollowsMouseMode
;
572 DesktopSettingsPrivate::SetAcceptFirstClick(const bool acceptFirstClick
)
574 fAcceptFirstClick
= acceptFirstClick
;
575 Save(kMouseSettings
);
580 DesktopSettingsPrivate::AcceptFirstClick() const
582 return fAcceptFirstClick
;
587 DesktopSettingsPrivate::SetShowAllDraggers(bool show
)
589 fShowAllDraggers
= show
;
590 Save(kDraggerSettings
);
595 DesktopSettingsPrivate::ShowAllDraggers() const
597 return fShowAllDraggers
;
602 DesktopSettingsPrivate::SetWorkspacesLayout(int32 columns
, int32 rows
)
604 _ValidateWorkspacesLayout(columns
, rows
);
605 fWorkspacesColumns
= columns
;
606 fWorkspacesRows
= rows
;
608 Save(kWorkspacesSettings
);
613 DesktopSettingsPrivate::WorkspacesCount() const
615 return fWorkspacesColumns
* fWorkspacesRows
;
620 DesktopSettingsPrivate::WorkspacesColumns() const
622 return fWorkspacesColumns
;
627 DesktopSettingsPrivate::WorkspacesRows() const
629 return fWorkspacesRows
;
634 DesktopSettingsPrivate::SetWorkspacesMessage(int32 index
, BMessage
& message
)
636 if (index
< 0 || index
>= kMaxWorkspaces
)
639 fWorkspaceMessages
[index
] = message
;
644 DesktopSettingsPrivate::WorkspacesMessage(int32 index
) const
646 if (index
< 0 || index
>= kMaxWorkspaces
)
649 return &fWorkspaceMessages
[index
];
654 DesktopSettingsPrivate::SetUIColor(color_which which
, const rgb_color color
,
657 int32 index
= color_which_to_index(which
);
658 if (index
< 0 || index
>= kColorWhichCount
)
662 *changed
= fShared
.colors
[index
] != color
;
664 fShared
.colors
[index
] = color
;
665 // TODO: deprecate the background_color member of the menu_info struct,
666 // otherwise we have to keep this duplication...
667 if (which
== B_MENU_BACKGROUND_COLOR
)
668 fMenuInfo
.background_color
= color
;
670 Save(kAppearanceSettings
);
675 DesktopSettingsPrivate::SetUIColors(const BMessage
& colors
, bool* changed
)
677 int32 count
= colors
.CountNames(B_RGB_32_BIT_TYPE
);
682 int32 colorIndex
= 0;
686 color_which which
= B_NO_COLOR
;
688 while (colors
.GetInfo(B_RGB_32_BIT_TYPE
, index
, &name
, &type
) == B_OK
) {
689 which
= which_ui_color(name
);
690 colorIndex
= color_which_to_index(which
);
691 if (colorIndex
< 0 || colorIndex
>= kColorWhichCount
692 || colors
.FindColor(name
, &color
) != B_OK
) {
694 changed
[index
] = false;
701 changed
[index
] = fShared
.colors
[colorIndex
] != color
;
703 fShared
.colors
[colorIndex
] = color
;
705 if (which
== (int32
)B_MENU_BACKGROUND_COLOR
)
706 fMenuInfo
.background_color
= color
;
711 Save(kAppearanceSettings
);
716 DesktopSettingsPrivate::UIColor(color_which which
) const
718 static const rgb_color invalidColor
= {0, 0, 0, 0};
719 int32 index
= color_which_to_index(which
);
720 if (index
< 0 || index
>= kColorWhichCount
)
723 return fShared
.colors
[index
];
728 DesktopSettingsPrivate::SetSubpixelAntialiasing(bool subpix
)
730 gSubpixelAntialiasing
= subpix
;
731 Save(kAppearanceSettings
);
736 DesktopSettingsPrivate::SubpixelAntialiasing() const
738 return gSubpixelAntialiasing
;
743 DesktopSettingsPrivate::SetHinting(uint8 hinting
)
745 gDefaultHintingMode
= hinting
;
751 DesktopSettingsPrivate::Hinting() const
753 return gDefaultHintingMode
;
758 DesktopSettingsPrivate::SetSubpixelAverageWeight(uint8 averageWeight
)
760 gSubpixelAverageWeight
= averageWeight
;
761 Save(kAppearanceSettings
);
766 DesktopSettingsPrivate::SubpixelAverageWeight() const
768 return gSubpixelAverageWeight
;
773 DesktopSettingsPrivate::SetSubpixelOrderingRegular(bool subpixelOrdering
)
775 gSubpixelOrderingRGB
= subpixelOrdering
;
776 Save(kAppearanceSettings
);
781 DesktopSettingsPrivate::IsSubpixelOrderingRegular() const
783 return gSubpixelOrderingRGB
;
788 DesktopSettingsPrivate::_ValidateWorkspacesLayout(int32
& columns
,
796 if (columns
* rows
> kMaxWorkspaces
) {
797 // Revert to defaults in case of invalid settings
804 // #pragma mark - read access
807 DesktopSettings::DesktopSettings(Desktop
* desktop
)
809 fSettings(desktop
->fSettings
)
816 DesktopSettings::GetDefaultPlainFont(ServerFont
&font
) const
818 font
= fSettings
->DefaultPlainFont();
823 DesktopSettings::GetDefaultBoldFont(ServerFont
&font
) const
825 font
= fSettings
->DefaultBoldFont();
830 DesktopSettings::GetDefaultFixedFont(ServerFont
&font
) const
832 font
= fSettings
->DefaultFixedFont();
837 DesktopSettings::GetScrollBarInfo(scroll_bar_info
& info
) const
839 info
= fSettings
->ScrollBarInfo();
844 DesktopSettings::GetMenuInfo(menu_info
& info
) const
846 info
= fSettings
->MenuInfo();
851 DesktopSettings::MouseMode() const
853 return fSettings
->MouseMode();
857 mode_focus_follows_mouse
858 DesktopSettings::FocusFollowsMouseMode() const
860 return fSettings
->FocusFollowsMouseMode();
865 DesktopSettings::AcceptFirstClick() const
867 return fSettings
->AcceptFirstClick();
872 DesktopSettings::ShowAllDraggers() const
874 return fSettings
->ShowAllDraggers();
879 DesktopSettings::WorkspacesCount() const
881 return fSettings
->WorkspacesCount();
886 DesktopSettings::WorkspacesColumns() const
888 return fSettings
->WorkspacesColumns();
893 DesktopSettings::WorkspacesRows() const
895 return fSettings
->WorkspacesRows();
900 DesktopSettings::WorkspacesMessage(int32 index
) const
902 return fSettings
->WorkspacesMessage(index
);
907 DesktopSettings::UIColor(color_which which
) const
909 return fSettings
->UIColor(which
);
914 DesktopSettings::SubpixelAntialiasing() const
916 return fSettings
->SubpixelAntialiasing();
921 DesktopSettings::Hinting() const
923 return fSettings
->Hinting();
928 DesktopSettings::SubpixelAverageWeight() const
930 return fSettings
->SubpixelAverageWeight();
935 DesktopSettings::IsSubpixelOrderingRegular() const
937 // True corresponds to RGB, false means BGR
938 return fSettings
->IsSubpixelOrderingRegular();
941 // #pragma mark - write access
944 LockedDesktopSettings::LockedDesktopSettings(Desktop
* desktop
)
946 DesktopSettings(desktop
),
950 if (desktop
->fWindowLock
.IsReadLocked())
951 debugger("desktop read locked when trying to change settings");
954 fDesktop
->LockAllWindows();
958 LockedDesktopSettings::~LockedDesktopSettings()
960 fDesktop
->UnlockAllWindows();
965 LockedDesktopSettings::SetDefaultPlainFont(const ServerFont
&font
)
967 fSettings
->SetDefaultPlainFont(font
);
972 LockedDesktopSettings::SetDefaultBoldFont(const ServerFont
&font
)
974 fSettings
->SetDefaultBoldFont(font
);
975 fDesktop
->BroadcastToAllWindows(AS_SYSTEM_FONT_CHANGED
);
980 LockedDesktopSettings::SetDefaultFixedFont(const ServerFont
&font
)
982 fSettings
->SetDefaultFixedFont(font
);
987 LockedDesktopSettings::SetScrollBarInfo(const scroll_bar_info
& info
)
989 fSettings
->SetScrollBarInfo(info
);
994 LockedDesktopSettings::SetMenuInfo(const menu_info
& info
)
996 fSettings
->SetMenuInfo(info
);
1001 LockedDesktopSettings::SetMouseMode(const mode_mouse mode
)
1003 fSettings
->SetMouseMode(mode
);
1008 LockedDesktopSettings::SetFocusFollowsMouseMode(mode_focus_follows_mouse mode
)
1010 fSettings
->SetFocusFollowsMouseMode(mode
);
1015 LockedDesktopSettings::SetAcceptFirstClick(const bool acceptFirstClick
)
1017 fSettings
->SetAcceptFirstClick(acceptFirstClick
);
1022 LockedDesktopSettings::SetShowAllDraggers(bool show
)
1024 fSettings
->SetShowAllDraggers(show
);
1029 LockedDesktopSettings::SetUIColors(const BMessage
& colors
, bool* changed
)
1031 fSettings
->SetUIColors(colors
, &changed
[0]);
1036 LockedDesktopSettings::SetSubpixelAntialiasing(bool subpix
)
1038 fSettings
->SetSubpixelAntialiasing(subpix
);
1043 LockedDesktopSettings::SetHinting(uint8 hinting
)
1045 fSettings
->SetHinting(hinting
);
1050 LockedDesktopSettings::SetSubpixelAverageWeight(uint8 averageWeight
)
1052 fSettings
->SetSubpixelAverageWeight(averageWeight
);
1056 LockedDesktopSettings::SetSubpixelOrderingRegular(bool subpixelOrdering
)
1058 fSettings
->SetSubpixelOrderingRegular(subpixelOrdering
);