Moved some system colors code to be monitored by a client's ServerApp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13123 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d70f24a679
commit
57bbc53987
@ -652,20 +652,6 @@ AppServer::DispatchMessage(int32 code, BPortLink &msg)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AS_SET_UI_COLORS:
|
|
||||||
{
|
|
||||||
// Client application is asking to set all the system colors at once
|
|
||||||
// using a ColorSet object
|
|
||||||
|
|
||||||
// Attached data:
|
|
||||||
// 1) ColorSet new colors to use
|
|
||||||
|
|
||||||
gui_colorset.Lock();
|
|
||||||
msg.Read<ColorSet>(&gui_colorset);
|
|
||||||
gui_colorset.Unlock();
|
|
||||||
Broadcast(AS_UPDATE_COLORS);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AS_SET_DECORATOR:
|
case AS_SET_DECORATOR:
|
||||||
{
|
{
|
||||||
// Received from an application when the user wants to set the window
|
// Received from an application when the user wants to set the window
|
||||||
|
@ -878,6 +878,38 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &link)
|
|||||||
fLink.Flush();
|
fLink.Flush();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case AS_GET_UI_COLORS:
|
||||||
|
{
|
||||||
|
// Client application is asking for all the system colors at once
|
||||||
|
// using a ColorSet object
|
||||||
|
|
||||||
|
|
||||||
|
gui_colorset.Lock();
|
||||||
|
|
||||||
|
fLink.StartMessage(SERVER_TRUE);
|
||||||
|
fLink.Attach<ColorSet>(gui_colorset);
|
||||||
|
fLink.Flush();
|
||||||
|
|
||||||
|
gui_colorset.Unlock();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case AS_SET_UI_COLORS:
|
||||||
|
{
|
||||||
|
// Client application is asking to set all the system colors at once
|
||||||
|
// using a ColorSet object
|
||||||
|
|
||||||
|
// Attached data:
|
||||||
|
// 1) ColorSet new colors to use
|
||||||
|
|
||||||
|
gui_colorset.Lock();
|
||||||
|
link.Read<ColorSet>(&gui_colorset);
|
||||||
|
gui_colorset.Unlock();
|
||||||
|
|
||||||
|
// TODO: Broadcast an AS_UPDATE_COLORS to all apps
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case AS_GET_UI_COLOR:
|
case AS_GET_UI_COLOR:
|
||||||
{
|
{
|
||||||
STRACE(("ServerApp %s: Get UI color\n", fSignature.String()));
|
STRACE(("ServerApp %s: Get UI color\n", fSignature.String()));
|
||||||
@ -931,7 +963,7 @@ ServerApp::DispatchMessage(int32 code, LinkMsgReader &link)
|
|||||||
// 1) font_family - name of family
|
// 1) font_family - name of family
|
||||||
// 2) uint32 - flags of font family (B_IS_FIXED || B_HAS_TUNED_FONT)
|
// 2) uint32 - flags of font family (B_IS_FIXED || B_HAS_TUNED_FONT)
|
||||||
int32 id;
|
int32 id;
|
||||||
|
debugger("");
|
||||||
link.Read<int32>(&id);
|
link.Read<int32>(&id);
|
||||||
|
|
||||||
fontserver->Lock();
|
fontserver->Lock();
|
||||||
|
Loading…
Reference in New Issue
Block a user