3 * - By John Hodge (thePowersGang)
9 #include <CCompositor.hpp>
15 CWindow::CWindow(CCompositor& compositor, CClient& client, const ::std::string& name):
17 m_compositor(compositor),
21 _SysDebug("CWindow::CWindow()");
28 void CWindow::Repaint(const CRect& rect)
33 m_surface.m_rect.m_x + rect.m_x,
34 m_surface.m_rect.m_y + rect.m_y,
37 m_compositor.DamageArea(outrect);
41 void CWindow::Show(bool bShow)
43 if( m_is_shown == bShow )
47 m_compositor.ShowWindow( this );
49 m_compositor.HideWindow( this );
53 void CWindow::Move(int X, int Y)
55 m_surface.m_rect.Move(X, Y);
57 void CWindow::Resize(unsigned int W, unsigned int H)
59 m_surface.Resize(W, H);
60 IPC::SendMessage_NotifyDims(m_client, W, H);
62 void CWindow::SetFlags(uint32_t Flags)
64 // TODO: CWindow::SetFlags
65 _SysDebug("TOOD: CWindow::SetFlags");
67 uint64_t CWindow::ShareSurface()
69 assert(!"TODO: CWindow::ShareSurface");
73 void CWindow::MouseButton(int ButtonID, int X, int Y, bool Down)
77 void CWindow::MouseMove(int NewX, int NewY)
81 void CWindow::KeyEvent(::uint32_t Scancode, const ::std::string &Translated, bool Down)
86 void CWindow::DrawScanline(unsigned int row, unsigned int x, unsigned int w, const uint8_t *data)
88 m_surface.DrawScanline(row, x, w, data);
89 CRect damaged( m_surface.m_rect.m_x+x, m_surface.m_rect.m_y+row, w, 1 );
90 m_compositor.DamageArea(damaged);