From fb52610b8272f62f11fe2ecf96c30ce59c7e718c Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sat, 7 May 2005 17:11:30 +0000 Subject: [PATCH] Added a handler for GET_ESCAPEMENTS_AS_FLOATS so that there are no deadlocks in the BFont call until the server-side code can be implemented git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12590 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ServerApp.cpp | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/servers/app/ServerApp.cpp b/src/servers/app/ServerApp.cpp index ab6944cb76..f3fad2d69a 100644 --- a/src/servers/app/ServerApp.cpp +++ b/src/servers/app/ServerApp.cpp @@ -1820,6 +1820,52 @@ void ServerApp::DispatchMessage(int32 code, LinkMsgReader &msg) break; } + case AS_GET_ESCAPEMENTS_AS_FLOATS: + { + // Attached Data: + // 1) uint16 - family ID + // 2) uint16 - style ID + // 3) float - point size + // 4) float - rotation + // 5) uint32 - flags + // 6) int32 - numChars + // 7) char - char + // 8) port_id - reply port + + // Returns: + // 1) float - escapement + // numChars times + + uint16 famid, styid; + uint32 flags; + float ptsize, rotation; + + msg.Read(&famid); + msg.Read(&styid); + msg.Read(&ptsize); + msg.Read(&rotation); + msg.Read(&flags); + + int32 numChars; + msg.Read(&numChars); + + char charArray[numChars]; + BPoint offsetArray[numChars]; + for (int32 i = 0; i < numChars; i++) { + msg.Read(&charArray[i]); + msg.Read(&offsetArray[i]); + } + + port_id replyport; + msg.Read(&replyport); + replylink.SetSendPort(replyport); + + // TODO: Implement AS_GET_ESCAPEMENTS_AS_FLOATS and the float version of ServerFont::GetEscapements() + replylink.StartMessage(SERVER_FALSE); + replylink.Flush(); + + break; + } case AS_SCREEN_GET_MODE: { // Attached data