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;
54 CWindowIDBuffer m_windowIDBuffer; // One 32-bit value per pixel
57 CCompositor(CVideo& video);
59 CWindow* CreateWindow(CClient& client, const ::std::string& name);
61 void ShowWindow(CWindow* window);
62 void HideWindow(CWindow* window);
64 bool GetScreenDims(unsigned int ScrenID, unsigned int *Width, unsigned int *Height);
67 void DamageArea(const CRect& rect);
68 void BlitFromSurface(const CSurface& dest, const CRect& src_rect);
70 void MouseMove(unsigned int Cursor, unsigned int X, unsigned int Y, int dX, int dY);
71 void MouseButton(unsigned int Cursor, unsigned int X, unsigned int Y, eMouseButton Button, bool Press);
73 void KeyState(unsigned int KeyboardID, uint32_t KeySym, bool Press, uint32_t Codepoint);
75 CWindow* getWindowForCoord(unsigned int X, unsigned int Y);