3 * - By John Hodge (thePowersGang)
9 #include <CCompositor.hpp>
15 CWindow::CWindow(CCompositor& compositor, CClient& client, const ::std::string& name):
17 m_compositor(compositor),
22 _SysDebug("CWindow::CWindow()");
29 void CWindow::Repaint(const CRect& rect)
34 m_surface.m_rect.m_x + rect.m_x,
35 m_surface.m_rect.m_y + rect.m_y,
38 m_compositor.DamageArea(outrect);
42 void CWindow::Show(bool bShow)
44 if( m_is_shown == bShow )
48 m_compositor.ShowWindow( this );
50 m_compositor.HideWindow( this );
54 void CWindow::Move(int X, int Y)
56 m_surface.m_rect.Move(X, Y);
58 void CWindow::Resize(unsigned int W, unsigned int H)
60 m_surface.Resize(W, H);
61 IPC::SendMessage_NotifyDims(m_client, W, H);
63 void CWindow::SetFlags(uint32_t Flags)
65 // TODO: CWindow::SetFlags
66 _SysDebug("TOOD: CWindow::SetFlags");
68 uint64_t CWindow::ShareSurface()
70 assert(!"TODO: CWindow::ShareSurface");
74 void CWindow::MouseButton(int ButtonID, int X, int Y, bool Down)
78 void CWindow::MouseMove(int NewX, int NewY)
82 void CWindow::KeyEvent(::uint32_t Scancode, const ::std::string &Translated, bool Down)
87 void CWindow::DrawScanline(unsigned int row, unsigned int x, unsigned int w, const uint8_t *data)
89 m_surface.DrawScanline(row, x, w, data);
90 CRect damaged( m_surface.m_rect.m_x+x, m_surface.m_rect.m_y+row, w, 1 );
91 m_compositor.DamageArea(damaged);