From f1fb9c6f5f1c80443d5c4ab80b64d7668a9e4a68 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Tue, 14 Jun 2005 20:49:47 +0000 Subject: [PATCH] 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 --- src/kits/interface/InterfaceDefs.cpp | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/kits/interface/InterfaceDefs.cpp b/src/kits/interface/InterfaceDefs.cpp index 1c6e1f128f..a1d43b5a64 100644 --- a/src/kits/interface/InterfaceDefs.cpp +++ b/src/kits/interface/InterfaceDefs.cpp @@ -46,6 +46,7 @@ extern "C" status_t _fini_interface_kit_(); #include #include #include +#include // for private system colors stuff #include #include @@ -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(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(colors); + link.Flush(); +} + // These methods were marked with "Danger, will Robinson!" in // the OpenTracker source, so we might not want to be compatible