3c763de22a70cec7bec94659ee3e63e10e93f5da
[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         void SetFlags(uint32_t Flags);
35         
36         uint64_t ShareSurface();
37         
38         void MouseButton(int ButtonID, int X, int Y, bool Down);
39         void MouseMove(int NewX, int NewY);
40         void KeyEvent(::uint32_t Scancode, const ::std::string &Translated, bool Down);
41
42         void DrawScanline(unsigned int row, unsigned int x, unsigned int w, const uint8_t *data);
43         
44         bool    m_is_shown;
45         CSurface        m_surface;
46 private:
47         CCompositor&    m_compositor;
48         CClient&        m_client;
49         const ::std::string     m_name;
50         ::std::vector<CRegion*> m_regions;
51 };
52
53 };      // namespace AxWin
54
55 #endif
56
57

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