Usermode/AxWin4 - Slowly implementing
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / CWindow.cpp
1 /*
2  * Acess2 GUI v4
3  * - By John Hodge (thePowersGang)
4  *
5  * CWindow.cpp
6  * - Window
7  */
8 #include <CWindow.hpp>
9 #include <CCompositor.hpp>
10 #include <assert.h>
11 #include <ipc.hpp>
12
13 namespace AxWin {
14
15 CWindow::CWindow(CCompositor& compositor, CClient& client, const ::std::string& name):
16         m_surface(0,0,0,0),
17         m_compositor(compositor),
18         m_client(client),
19         m_name(name)
20 {
21         _SysDebug("CWindow::CWindow()");
22 }
23
24 CWindow::~CWindow()
25 {
26 }
27
28 void CWindow::Repaint(const CRect& rect)
29 {
30         #if 0
31         for( auto rgn : m_regions )
32         {
33                 if( rect.Contains(rgn->m_rect) )
34                 {
35                         CRect   rel_rect(rect, rgn->m_rect);
36                         rgn->Repaint(m_surface, rel_rect);
37                 } 
38         }
39         #endif
40 }
41
42 void CWindow::Show(bool bShow)
43 {
44         assert(!"TODO: CWindow::Show");
45 }
46
47 void CWindow::Move(int X, int Y)
48 {
49         m_surface.m_rect.Move(X, Y);
50 }
51 void CWindow::Resize(unsigned int W, unsigned int H)
52 {
53         m_surface.Resize(W, H);
54         IPC::SendNotify_Dims(m_client, W, H);
55 }
56 uint64_t CWindow::ShareSurface()
57 {
58         assert(!"TODO: CWindow::ShareSurface");
59         return 0;
60 }
61
62 void CWindow::MouseButton(int ButtonID, int X, int Y, bool Down)
63 {
64 }
65
66 void CWindow::MouseMove(int NewX, int NewY)
67 {
68 }
69
70 void CWindow::KeyEvent(::uint32_t Scancode, const ::std::string &Translated, bool Down)
71 {
72 }
73
74 };
75

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