Usermode/AxWin4 - Screen dimensions acquisition, speedup, window render
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / CWindow.hpp
1 /*
2  * Acess2 GUI v4
3  * - By John Hodge (thePowersGang)
4  *
5  * CWindow.hpp
6  * - Window class
7  */
8 #ifndef _CWINDOW_HPP_
9 #define _CWINDOW_HPP_
10
11 #include <string>
12 #include <vector>
13 #include <cstdint>
14 #include "CRect.hpp"
15 #include "CSurface.hpp"
16
17 namespace AxWin {
18
19 class CClient;
20 class CCompositor;
21 class CRegion;
22
23 class CWindow
24 {
25 public:
26         CWindow(CCompositor& compositor, CClient& client, const ::std::string &name);
27         ~CWindow();
28         
29         void Repaint(const CRect& rect);
30
31         void Show(bool bShow);  
32         void Move(int X, int Y);
33         void Resize(unsigned int W, unsigned int H);
34         
35         uint64_t ShareSurface();
36         
37         void MouseButton(int ButtonID, int X, int Y, bool Down);
38         void MouseMove(int NewX, int NewY);
39         void KeyEvent(::uint32_t Scancode, const ::std::string &Translated, bool Down);
40
41         void DrawScanline(unsigned int row, unsigned int x, unsigned int w, const uint8_t *data);
42         
43         bool    m_is_shown;
44         CSurface        m_surface;
45 private:
46         CCompositor&    m_compositor;
47         CClient&        m_client;
48         const ::std::string     m_name;
49         ::std::vector<CRegion*> m_regions;
50 };
51
52 };      // namespace AxWin
53
54 #endif
55
56

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