haiku/src/servers/app/DesktopSettingsPrivate.h
Axel Dörfler 6d5488e18a * There is now a server_read_only_memory structure that is placed in a (surprise!)
read-only area shared between the Desktop and all applications.
* Right now, this area only contains the desktop colors, ie. B_PANEL_BACKGROUND_COLOR
  etc.; ui_color() no longer needs to ask the server for these colors.
* The ui_colors are now maintained by DesktopSettings, though ColorSet is still there.
* The default colors are now hardcoded once and for everyone in InterfaceDefs.h, ie.
  the app_server uses them as well.
* Desktop::Init() can now also return an error (but that is not yet accounted for).
* Cleaned up InterfaceDefs.h.
* Fixed wrong include in moreUTF8.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-25 20:12:06 +00:00

71 lines
1.7 KiB
C++

/*
* Copyright 2005-2006, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Axel Dörfler, axeld@pinc-software.de
*/
#ifndef DESKTOP_SETTINGS_PRIVATE_H
#define DESKTOP_SETTINGS_PRIVATE_H
#include "DesktopSettings.h"
#include "ServerFont.h"
#include <Locker.h>
struct server_read_only_memory;
class DesktopSettings::Private : public BLocker {
public:
Private(server_read_only_memory* shared);
~Private();
status_t Save(uint32 mask = kAllSettings);
void SetDefaultPlainFont(const ServerFont& font);
const ServerFont& DefaultPlainFont() const;
void SetDefaultBoldFont(const ServerFont& font);
const ServerFont& DefaultBoldFont() const;
void SetDefaultFixedFont(const ServerFont& font);
const ServerFont& DefaultFixedFont() const;
void SetScrollBarInfo(const scroll_bar_info &info);
const scroll_bar_info& ScrollBarInfo() const;
void SetMenuInfo(const menu_info &info);
const menu_info& MenuInfo() const;
void SetMouseMode(mode_mouse mode);
mode_mouse MouseMode() const;
bool FocusFollowsMouse() const;
void SetWorkspacesCount(int32 number);
int32 WorkspacesCount() const;
void SetWorkspacesMessage(int32 index, BMessage& message);
const BMessage* WorkspacesMessage(int32 index) const;
private:
void _SetDefaults();
status_t _Load();
status_t _GetPath(BPath& path);
ServerFont fPlainFont;
ServerFont fBoldFont;
ServerFont fFixedFont;
scroll_bar_info fScrollBarInfo;
menu_info fMenuInfo;
mode_mouse fMouseMode;
int32 fWorkspacesCount;
BMessage fWorkspaceMessages[kMaxWorkspaces];
server_read_only_memory& fShared;
};
#endif /* DESKTOP_SETTINGS_PRIVATE_H */