mirror of
https://review.haiku-os.org/haiku
synced 2025-01-21 05:53:46 +01:00
6d5488e18a
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
35 lines
687 B
C
35 lines
687 B
C
/*
|
|
* Copyright 2006, Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Axel Dörfler, axeld@pinc-software.de
|
|
*/
|
|
#ifndef SERVER_READ_ONLY_MEMORY_H
|
|
#define SERVER_READ_ONLY_MEMORY_H
|
|
|
|
|
|
#include <GraphicsDefs.h>
|
|
#include <InterfaceDefs.h>
|
|
|
|
|
|
static const int32 kNumColors = 32;
|
|
|
|
struct server_read_only_memory {
|
|
rgb_color colors[kNumColors];
|
|
};
|
|
|
|
|
|
static inline int32
|
|
color_which_to_index(color_which which)
|
|
{
|
|
if (which <= B_TOOLTIP_TEXT_COLOR)
|
|
return which - 1;
|
|
if (which >= B_SUCCESS_COLOR && which <= B_FAILURE_COLOR)
|
|
return which - B_SUCCESS_COLOR + B_TOOLTIP_TEXT_COLOR;
|
|
|
|
return -1;
|
|
}
|
|
|
|
#endif /* SERVER_READ_ONLY_MEMORY_H */
|