3 * - By John Hodge (thePowersGang)
8 #ifndef _CCOMPOSITOR_H_
9 #define _CCOMPOSITOR_H_
15 #include "CWindow.hpp"
25 MOUSEBTN_MAIN, // Left
26 MOUSEBTN_SECONDARY, // Right
27 MOUSEBTN_MIDDLE, // Scroll wheel
40 ::std::vector<TWindowID> m_buf;
42 CWindowIDBuffer(unsigned int W, unsigned int H);
44 void set(unsigned int X, unsigned int Y, unsigned int W, unsigned int H, CWindow* win);
45 CWindow* get(unsigned int X, unsigned int Y);
51 ::std::list<CRect> m_damageRects;
52 ::std::list<CWindow*> m_windows;
53 CWindow* m_focussed_window;
55 CWindowIDBuffer m_windowIDBuffer; // One 32-bit value per pixel
58 CCompositor(CVideo& video);
60 CWindow* CreateWindow(CClient& client, const ::std::string& name);
62 void ShowWindow(CWindow* window);
63 void HideWindow(CWindow* window);
65 bool GetScreenDims(unsigned int ScrenID, unsigned int *Width, unsigned int *Height);
68 void DamageArea(const CRect& rect);
69 void BlitFromSurface(const CSurface& dest, const CRect& src_rect);
71 void MouseMove(unsigned int Cursor, unsigned int X, unsigned int Y, int dX, int dY);
72 void MouseButton(unsigned int Cursor, unsigned int X, unsigned int Y, eMouseButton Button, bool Press);
74 void KeyState(unsigned int KeyboardID, uint32_t KeySym, bool Press, uint32_t Codepoint);
76 CWindow* getWindowForCoord(unsigned int X, unsigned int Y);