Usermode/AxWin4 - Minor cleanups (change background colour, remove commented lines)
authorJohn Hodge (sonata) <[email protected]>
Sun, 28 Dec 2014 02:39:14 +0000 (10:39 +0800)
committerJohn Hodge (sonata) <[email protected]>
Sun, 28 Dec 2014 02:39:14 +0000 (10:39 +0800)
Usermode/Applications/axwin4_src/Server/compositor.cpp
Usermode/Applications/axwin4_src/Server/ipc.cpp
Usermode/Applications/axwin4_src/UI/main.c
Usermode/Applications/axwin4_src/UI/taskbar.c
Usermode/Libraries/libaxwin4.so_src/include_exp/axwin4/axwin.h

index cf8192e..e488380 100644 (file)
@@ -134,6 +134,7 @@ void CCompositor::MouseButton(unsigned int Cursor, unsigned int X, unsigned int
 void CCompositor::KeyState(unsigned int KeyboardID, uint32_t KeySym, bool Press, uint32_t Codepoint)
 {
        _SysDebug("KeyState(%i, 0x%x, %b, 0x%x)", KeyboardID, KeySym, Press, Codepoint);
+       // TODO: Global hotkeys
        if( m_focussed_window )
        {
                m_focussed_window->KeyEvent(KeySym, "", Press);
index 059e90e..f522ac2 100644 (file)
@@ -120,7 +120,7 @@ void SendMessage_MouseButton(CClient& client, unsigned int WinID, unsigned int X
 }
 void SendMessage_MouseMove(CClient& client, unsigned int WinID, unsigned int X, unsigned int Y)
 {
-       _SysDebug("TODO: IPC::SendMessage_MouseButton");
+       _SysDebug("TODO: IPC::SendMessage_MouseMove");
 }
 void SendMessage_KeyEvent(CClient& client, unsigned int WinID, uint32_t KeySym, bool Pressed, const char *Translated)
 {
index 8577a26..624e381 100644 (file)
@@ -59,7 +59,7 @@ tAxWin4_Window *CreateBGWin(int w, int h)
        }
        else
        {
-               AxWin4_FillRect(bgwin, 0, 0, w, h, 0x0000CC);
+               AxWin4_FillRect(bgwin, 0, 0, w, h, 0x8888CC);
        }
        //AxWin4_DamageRect(bgwin, 0, 0, w, h);
        AxWin4_ShowWindow(bgwin, true);
index f6261d4..b62a042 100644 (file)
@@ -84,12 +84,7 @@ void Taskbar_Redraw(void)
                strftime(timestr, 5, "%H%M", localtime(&rawtime));
                //AxWin4_DrawControl(gpTaskbar_Window, clock_start_x, TASKBAR_BORDER, TASKBAR_CLOCKSIZE, active_height, AXWIN4_CTL_BOX);
                
-               //unsigned int clock_height = 16;       // Hard-code the standard font height
-               //unsigned int clock_yofs = (active_height - clock_height)/2;
-               //AxWin4_DrawText(gpTaskbar_Window, clock_start_x, TASKBAR_BORDER + clock_yofs, TASKBAR_CLOCKSIZE, clock_height, 0, timestr);
                AxWin4_DrawText(gpTaskbar_Window, clock_start_x, TASKBAR_BORDER, TASKBAR_CLOCKSIZE, active_height, 0, timestr);
-               
-               //AxWin4_DrawText(gpTaskbar_Window, clock_start_x, TASKBAR_BORDER, TASKBAR_CLOCKSIZE, 16, 0, timestr);
        }
        
        AxWin4_DamageRect(gpTaskbar_Window, 0, 0, w, h);
index 14b25f0..255b0e1 100644 (file)
@@ -28,6 +28,14 @@ extern void  AxWin4_GetScreenDimensions(unsigned int ScreenIndex, unsigned int *W
 
 extern tAxWin4_Window  *AxWin4_CreateWindow(const char *Name);
 extern void    AxWin4_DestroyWindow(tAxWin4_Window *Window);
+
+// Callbacks
+typedef int tAxWin4_KeyCallback(tAxWin4_Window* Winow, unsigned int Key, const char *Translated);
+extern void    AxWin4_SetCallback_Key(tAxWin4_Window* Window, tAxWin4_KeyCallback* cb);
+typedef int tAxWin4_MouseBtnCallback(tAxWin4_Window* Winow, unsigned int Mouse, unsigned int X, unsigned int Y, unsigned int Button, bool IsPress);
+extern void    AxWin4_SetCallback_MouseBtn(tAxWin4_Window* Window, tAxWin4_MouseBtnCallback* cb);
+typedef int tAxWin4_MouseMoveCallback(tAxWin4_Window* Winow, unsigned int Mouse, unsigned int X, unsigned int Y);
+
 extern void    AxWin4_ShowWindow(tAxWin4_Window *Window, bool Shown);
 extern void    AxWin4_SetWindowFlags(tAxWin4_Window *Window, unsigned int NewFlags);
 extern void    AxWin4_SetTitle(tAxWin4_Window *Window, const char *Title);

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