Usermode/axwin4 - Continuing
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / CCompositor.hpp
1 /*
2  * Acess2 GUI v4
3  * - By John Hodge (thePowersGang) 
4  *
5  * CCompositor.hpp
6  * - Window Compositor
7  */
8 #ifndef _CCOMPOSITOR_H_
9 #define _CCOMPOSITOR_H_
10
11 #include <list>
12 #include <vector>
13 #include "CRect.hpp"
14 #include "CWindow.hpp"
15
16 namespace AxWin {
17
18 class CClient;
19 class CVideo;
20
21 struct TWindowID
22 {
23         uint16_t        Client;
24         uint16_t        Window;
25 };
26
27 enum eMouseButton
28 {
29         MOUSEBTN_MAIN,  // Left
30         MOUSEBTN_SECONDARY,     // Right
31         MOUSEBTN_MIDDLE,        // Scroll wheel
32         MOUSEBTN_BTN4,
33         MOUSEBTN_BTN5,
34 };
35
36 class CCompositor
37 {
38         CVideo& m_video;
39         ::std::list<CRect>      m_damageRects;
40         ::std::list<CWindow*>   m_windows;
41
42         ::std::vector<TWindowID>        m_windowIDBuffer;       // One 32-bit value per pixel
43         //::std::vector<CPixel>         m_frameBuffer;  // Local copy of the framebuffer (needed?)
44         
45 public:
46         CCompositor(CVideo& video);
47
48         CWindow* CreateWindow(CClient& client);
49
50         void    Redraw();
51         void    DamageArea(const CRect& rect);
52         void    BlitFromSurface(const CSurface& dest, const CRect& src_rect);
53         
54         void    MouseMove(unsigned int CursorID,  unsigned int X, unsigned int Y,  int dX, int dY);
55         void    MouseButton(unsigned int CursorID,  unsigned int X, unsigned int Y,  eMouseButton Button, bool Press);
56         
57         void    KeyState(unsigned int KeyboardID, uint32_t KeySym, bool Press, uint32_t Codepoint);
58 };
59
60
61 };
62
63 #endif
64

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