1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2007-2008 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
14 #ifndef __MOON_WINDOW__
15 #define __MOON_WINDOW__
19 #define Visual _XxVisual
20 #define Region _XxRegion
30 #include "deployment.h"
34 /* @Namespace=System.Windows */
37 MoonWindow (int w
, int h
) : width(w
), height(h
), surface(NULL
), transparent(false) { }
39 virtual ~MoonWindow () { }
41 virtual void Resize (int width
, int height
) = 0;
43 virtual void SetCursor (MouseCursor cursor
) = 0;
44 virtual void Invalidate (Rect r
) = 0;
45 virtual void Invalidate () { Invalidate (Rect (0, 0, width
, height
)); }
46 virtual void ProcessUpdates () = 0;
48 virtual gboolean
HandleEvent (XEvent
*event
) = 0;
50 virtual void Show () = 0;
51 virtual void Hide () = 0;
53 virtual void EnableEvents (bool first
) = 0;
54 virtual void DisableEvents () = 0;
56 virtual void GrabFocus () = 0;
57 virtual bool HasFocus () = 0;
59 int GetWidth () { return width
; }
60 int GetHeight () { return height
; }
62 virtual void SetSurface (Surface
* s
) { surface
= s
; }
63 Surface
*GetSurface () { return surface
; }
65 /* @GenerateCBinding,GeneratePInvoke */
66 void SetTransparent (bool flag
) { if (transparent
!= flag
) Invalidate (); transparent
= flag
; }
68 virtual void SetBackgroundColor (Color
*color
) { Invalidate (); };
70 /* @GenerateCBinding,GeneratePInvoke */
71 bool GetTransparent () { return transparent
; }
73 virtual bool IsFullScreen () = 0;
75 virtual GdkWindow
* GetGdkWindow () = 0;
77 Deployment
*GetDeployment () { return deployment
; }
84 Deployment
*deployment
;
87 #endif /* __MOON_WINDOW__ */