Added two private functions which are for getting & setting system colors as a set.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13126 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm 2005-06-14 20:49:47 +00:00
parent 48d350d76e
commit f1fb9c6f5f

View File

@ -46,6 +46,7 @@ extern "C" status_t _fini_interface_kit_();
#include <input_globals.h>
#include <ServerProtocol.h>
#include <WidthBuffer.h>
#include <ColorSet.h> // for private system colors stuff
#include <string.h>
#include <Font.h>
@ -799,6 +800,37 @@ __set_window_decor(int32 theme)
link.Flush();
}
/*!
\brief Private function to get the system's GUI colors as a set
\param colors The recipient color set
*/
void get_system_colors(ColorSet *colors)
{
if(!colors)
return;
BAppServerLink link;
int32 code;
link.StartMessage(AS_GET_UI_COLORS);
link.Flush();
link.GetNextMessage(code);
link.Read<ColorSet>(colors);
}
/*!
\brief Private function to set the system's GUI colors all at once
\param colors The color set to use
*/
void set_system_colors(const ColorSet &colors)
{
BAppServerLink link;
link.StartMessage(AS_SET_UI_COLORS);
link.Attach<ColorSet>(colors);
link.Flush();
}
// These methods were marked with "Danger, will Robinson!" in
// the OpenTracker source, so we might not want to be compatible