git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Usermode/AxWin4 - Fix _DrawText deserialise, replace assert with log
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin4_src
/
Server
/
ipc.cpp
diff --git
a/Usermode/Applications/axwin4_src/Server/ipc.cpp
b/Usermode/Applications/axwin4_src/Server/ipc.cpp
index
4ed0352
..
58cda2b
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/ipc.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/ipc.cpp
@@
-185,7
+185,7
@@
void HandleMessage_SetWindowAttr(CClient& client, CDeserialiser& message)
{
uint16_t win_id = message.ReadU16();
uint16_t attr_id = message.ReadU16();
- _SysDebug("_SetWindowAttr: (
%i,
%i)", win_id, attr_id);
+ _SysDebug("_SetWindowAttr: (
Win=%i, ID=
%i)", win_id, attr_id);
CWindow* win = client.GetWindow(win_id);
if(!win) {
@@
-276,7
+276,7
@@
void HandleMessage_PushData(CClient& client, CDeserialiser& message)
uint16_t y = message.ReadU16();
uint16_t w = message.ReadU16();
uint16_t h = message.ReadU16();
-
//
_SysDebug("_PushData: (%i, (%i,%i) %ix%i)", win_id, x, y, w, h);
+ _SysDebug("_PushData: (%i, (%i,%i) %ix%i)", win_id, x, y, w, h);
CWindow* win = client.GetWindow(win_id);
if(!win) {
@@
-307,6
+307,7
@@
void HandleMessage_DrawCtl(CClient& client, CDeserialiser& message)
uint16_t h = message.ReadU16();
uint16_t ctrl_id = message.ReadU16();
uint16_t frame = message.ReadU16();
+ _SysDebug("_DrawCtl: (%i, (%i,%i) %ix%i Ctl%i frame?=0x%04x)", win_id, x, y, w, h, ctrl_id, frame);
CWindow* win = client.GetWindow(win_id);
if(!win) {
@@
-328,9
+329,23
@@
void HandleMessage_DrawText(CClient& client, CDeserialiser& message)
uint16_t y = message.ReadU16();
uint16_t w = message.ReadU16();
uint16_t h = message.ReadU16();
+ uint16_t font = message.ReadU16();
::std::string str = message.ReadString();
+ _SysDebug("_DrawText: (%i (%i,%i) %ix%i Font%i \"%s\")", win_id, x, y, w, h, font, str.c_str());
- assert(!"TODO HandleMessage_DrawText");
+ CWindow* win = client.GetWindow(win_id);
+ if(!win) {
+ throw IPC::CClientFailure("_DrawText: Bad window");
+ }
+
+ // 1. Get font from client structure
+ //CFont& font = client.GetFont(font_id);
+
+ // 2. Render
+ //CRect area(x, y, w, h);
+ //font->Render(win->m_surface, area, str, h);
+
+ _SysDebug("TODO: HandleMessage_DrawText");
}
typedef void MessageHandler_op_t(CClient& client, CDeserialiser& message);
UCC
git Repository :: git.ucc.asn.au