Usermode/axwin3 - Added WNDMSG_FIRE handler to richtext lib
authorJohn Hodge (sonata) <[email protected]>
Sun, 20 Jan 2013 10:44:44 +0000 (18:44 +0800)
committerJohn Hodge (sonata) <[email protected]>
Sun, 20 Jan 2013 10:44:44 +0000 (18:44 +0800)
Usermode/Applications/axwin3_src/libaxwin3.so_src/r_richtext.c

index fd1cf39..9fed544 100644 (file)
@@ -10,6 +10,7 @@
 #include "include/internal.h"
 #include <richtext_messages.h>
 #include <string.h>
+#include <wm_messages.h>
 //#include <alloca.h>
 
 // === TYPES ===
@@ -23,6 +24,16 @@ typedef struct sRichText_Window
 // === CODE ===
 int AxWin3_RichText_MessageHandler(tHWND Window, int MessageID, int Size, void *Data)
 {
+       tRichText_Window        *info = AxWin3_int_GetDataPtr(Window);
+       struct sWndMsg_KeyAction        *keyaction = Data;
+       _SysDebug("MessageID = %i", MessageID);
+       switch(MessageID)
+       {
+       case WNDMSG_KEYFIRE:
+               if(Size < sizeof(*keyaction))   return -1;
+               info->KeyCallback(Window, 2, keyaction->KeySym, keyaction->UCS32);
+               return 1;
+       }
        return 0;
 }
 

UCC git Repository :: git.ucc.asn.au