Usermode/libc #6 Fix string.h functions, add some more unit tests
[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, unsigned int id);
27         ~CWindow();
28         
29         const CClient& client() const { return m_client; }
30         const unsigned int id() const { return m_id; }
31         
32         void Repaint(const CRect& rect);
33
34         void Show(bool bShow);  
35         void Move(int X, int Y);
36         void Resize(unsigned int W, unsigned int H);
37         void SetFlags(uint32_t Flags);
38         
39         uint64_t ShareSurface();
40         
41         void MouseButton(int ButtonID, int X, int Y, bool Down);
42         void MouseMove(int NewX, int NewY);
43         void KeyEvent(::uint32_t Scancode, const ::std::string &Translated, bool Down);
44
45         void DrawScanline(unsigned int row, unsigned int x, unsigned int w, const uint8_t *data);
46         
47         bool    m_is_shown;
48         CSurface        m_surface;
49 private:
50         CCompositor&    m_compositor;
51         CClient&        m_client;
52         unsigned int    m_id;
53         const ::std::string     m_name;
54         ::std::vector<CRegion*> m_regions;
55 };
56
57 };      // namespace AxWin
58
59 #endif
60
61

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