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
33 /* @Namespace=System.Windows */
36 MoonWindow (int w
, int h
) : width(w
), height(h
), surface(NULL
), transparent(false) { }
38 virtual ~MoonWindow () { }
40 virtual void Resize (int width
, int height
) = 0;
42 virtual void SetCursor (MouseCursor cursor
) = 0;
43 virtual void Invalidate (Rect r
) = 0;
44 virtual void Invalidate () { Invalidate (Rect (0, 0, width
, height
)); }
45 virtual void ProcessUpdates () = 0;
47 virtual gboolean
HandleEvent (XEvent
*event
) = 0;
49 virtual void Show () = 0;
50 virtual void Hide () = 0;
52 virtual void EnableEvents (bool first
) = 0;
53 virtual void DisableEvents () = 0;
55 virtual void GrabFocus () = 0;
56 virtual bool HasFocus () = 0;
58 int GetWidth () { return width
; }
59 int GetHeight () { return height
; }
61 virtual void SetSurface (Surface
* s
) { surface
= s
; }
62 Surface
*GetSurface () { return surface
; }
64 /* @GenerateCBinding,GeneratePInvoke */
65 void SetTransparent (bool flag
) { if (transparent
!= flag
) Invalidate (); transparent
= flag
; }
67 virtual void SetBackgroundColor (Color
*color
) { Invalidate (); };
69 /* @GenerateCBinding,GeneratePInvoke */
70 bool GetTransparent () { return transparent
; }
72 virtual bool IsFullScreen () = 0;
74 virtual GdkWindow
* GetGdkWindow () = 0;
76 void SetCurrentDeployment ();
85 #endif /* __MOON_WINDOW__ */