Added set_ui_color to act as counterpart to ui_color.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19148 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2006-10-30 01:50:37 +00:00
parent 158893b903
commit 59463a9aa1
2 changed files with 18 additions and 0 deletions
+2
View File
@@ -351,6 +351,8 @@ enum color_which {
};
_IMPEXP_BE rgb_color ui_color(color_which which);
_IMPEXP_BE void set_ui_color(const color_which &which,
const rgb_color &color);
_IMPEXP_BE rgb_color tint_color(rgb_color color, float tint);
extern "C" status_t _init_interface_kit_();
+16
View File
@@ -737,6 +737,22 @@ ui_color(color_which which)
}
_IMPEXP_BE void
set_ui_color(const color_which &which, const rgb_color &color)
{
int32 index = color_which_to_index(which);
if (index < 0 || index >= kNumColors) {
fprintf(stderr, "set_ui_color(): unknown color_which %d\n", which);
return;
}
if (be_app) {
server_read_only_memory* shared = BApplication::Private::ServerReadOnlyMemory();
shared->colors[index] = color;
}
}
_IMPEXP_BE rgb_color
tint_color(rgb_color color, float tint)
{