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:
@@ -351,6 +351,8 @@ enum color_which {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_IMPEXP_BE rgb_color ui_color(color_which 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);
|
_IMPEXP_BE rgb_color tint_color(rgb_color color, float tint);
|
||||||
|
|
||||||
extern "C" status_t _init_interface_kit_();
|
extern "C" status_t _init_interface_kit_();
|
||||||
|
|||||||
@@ -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
|
_IMPEXP_BE rgb_color
|
||||||
tint_color(rgb_color color, float tint)
|
tint_color(rgb_color color, float tint)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user