X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin4_src%2FServer%2Finclude%2FCCompositor.hpp;h=fe24303929c9502981e59b704053d9d25dbec15f;hb=6fbf6b93bec9b8b5bd6d7c683eefb0ebed8dff77;hp=0b773cefb522c417c0f5ad03a1df99ff073b8b06;hpb=aa5e13445f3d9ab6e0c0049780f38daed443104f;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin4_src/Server/include/CCompositor.hpp b/Usermode/Applications/axwin4_src/Server/include/CCompositor.hpp index 0b773cef..fe243039 100644 --- a/Usermode/Applications/axwin4_src/Server/include/CCompositor.hpp +++ b/Usermode/Applications/axwin4_src/Server/include/CCompositor.hpp @@ -19,11 +19,6 @@ namespace AxWin { class CClient; class CVideo; -struct TWindowID -{ - uint16_t Client; - uint16_t Window; -}; enum eMouseButton { @@ -34,20 +29,39 @@ enum eMouseButton MOUSEBTN_BTN5, }; +class CWindowIDBuffer +{ + struct TWindowID + { + uint16_t Client; + uint16_t Window; + }; + unsigned int m_w; + ::std::vector m_buf; +public: + CWindowIDBuffer(unsigned int W, unsigned int H); + + void set(unsigned int X, unsigned int Y, unsigned int W, unsigned int H, CWindow* win); + CWindow* get(unsigned int X, unsigned int Y); +}; + class CCompositor { CVideo& m_video; ::std::list m_damageRects; ::std::list m_windows; + CWindow* m_focussed_window; - ::std::vector m_windowIDBuffer; // One 32-bit value per pixel - //::std::vector m_frameBuffer; // Local copy of the framebuffer (needed?) + CWindowIDBuffer m_windowIDBuffer; // One 32-bit value per pixel public: CCompositor(CVideo& video); CWindow* CreateWindow(CClient& client, const ::std::string& name); + void ShowWindow(CWindow* window); + void HideWindow(CWindow* window); + bool GetScreenDims(unsigned int ScrenID, unsigned int *Width, unsigned int *Height); void Redraw(); @@ -58,6 +72,8 @@ public: void MouseButton(unsigned int Cursor, unsigned int X, unsigned int Y, eMouseButton Button, bool Press); void KeyState(unsigned int KeyboardID, uint32_t KeySym, bool Press, uint32_t Codepoint); +public: + CWindow* getWindowForCoord(unsigned int X, unsigned int Y); };