8815c059b6d710529505eaabfe023ee20e6b3c20
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / Window.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.9
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Tizen.NUI
28 {
29
30     using System;
31     using System.Runtime.InteropServices;
32     using Tizen.NUI.BaseComponents;
33
34     /// <summary>
35     /// The window class is used internally for drawing.<br>
36     /// A Window has an orientation and indicator properties.<br>
37     /// </summary>
38     public class Window : BaseHandle
39     {
40         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
41         private global::System.Runtime.InteropServices.HandleRef stageCPtr;
42
43         internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn)
44         {
45             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
46             stageCPtr = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.Stage_GetCurrent());
47         }
48
49         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj)
50         {
51             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
52         }
53
54         /// <summary>
55         /// To make Window instance be disposed.
56         /// </summary>
57         public override void Dispose()
58         {
59             if (!Window.IsInstalled())
60             {
61                 DisposeQueue.Instance.Add(this);
62                 return;
63             }
64
65             lock (this)
66             {
67                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
68                 {
69                     if (swigCMemOwn)
70                     {
71                         swigCMemOwn = false;
72                         NDalicPINVOKE.delete_Window(swigCPtr);
73                         NDalicPINVOKE.delete_Stage(stageCPtr);
74                     }
75                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
76                 }
77                 global::System.GC.SuppressFinalize(this);
78                 base.Dispose();
79             }
80         }
81
82         internal static Window GetCurrent()
83         {
84             Window ret = new Window(NDalicPINVOKE.Stage_GetCurrent(), true);
85             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86             return ret;
87         }
88
89        internal static bool IsInstalled()
90        {
91             bool ret = NDalicPINVOKE.Stage_IsInstalled();
92             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93             return ret;
94        }
95
96         /// <summary>
97         /// Sets the focus acceptable flag of an window as true.
98         /// </summary>
99         public void SetAcceptFocus(bool accept)
100         {
101             NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
102             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103         }
104
105         /// <summary>
106         /// Retrieves whether the window is focus acceptable or not.
107         /// </summary>
108         public bool IsFocusAcceptable()
109         {
110             return NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
111             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112         }
113
114         /// <summary>
115         /// Shows the window if it is hidden.
116         /// </summary>
117         public void Show()
118         {
119             NDalicPINVOKE.Show(swigCPtr);
120             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121         }
122
123         /// <summary>
124         /// Hides the window if it is showing.
125         /// </summary>
126         public void Hide()
127         {
128             NDalicPINVOKE.Hide(swigCPtr);
129             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130         }
131
132         /// <summary>
133         /// Retrieves whether the window is visible or not.
134         /// </summary>
135         /// <returns>true, if the windoe is visible</returns>
136         public bool IsVisible()
137         {
138             bool temp = NDalicPINVOKE.IsVisible(swigCPtr);
139             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140             return temp;
141         }
142
143         /// <summary>
144         /// Gets the count of supported auxiliary hints of the window.
145         /// </summary>
146         /// <returns>The number of supported auxiliary hints.</returns>
147         public uint GetSupportedAuxiliaryHintCount() {
148             uint ret = NDalicPINVOKE.GetSupportedAuxiliaryHintCount(swigCPtr);
149             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150             return ret;
151         }
152
153         /// <summary>
154         /// Gets the supported auxiliary hint string of the window.
155         /// </summary>
156         /// <param name="index">The index of the supported auxiliary hint lists.</param>
157         /// <returns>The auxiliary hint string of the index.</returns>
158         public string GetSupportedAuxiliaryHint(uint index) {
159             string ret = NDalicPINVOKE.GetSupportedAuxiliaryHint(swigCPtr, index);
160             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161             return ret;
162         }
163
164         /// <summary>
165         /// Creates an auxiliary hint of the window.
166         /// </summary>
167         /// <param name="hint">The auxiliary hint string.</param>
168         /// <param name="value">The value string.</param>
169         /// <returns>The ID of created auxiliary hint, or 0 on failure.</returns>
170         public uint AddAuxiliaryHint(string hint, string value) {
171             uint ret = NDalicPINVOKE.AddAuxiliaryHint(swigCPtr, hint, value);
172             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173             return ret;
174         }
175
176         /// <summary>
177         /// Removes an auxiliary hint of the window.
178         /// </summary>
179         /// <param name="id">The ID of the auxiliary hint.</param>
180         /// <returns>True if no error occurred, false otherwise.</returns>
181         public bool RemoveAuxiliaryHint(uint id) {
182             bool ret = NDalicPINVOKE.RemoveAuxiliaryHint(swigCPtr, id);
183             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184             return ret;
185         }
186
187         /// <summary>
188         /// Changes a value of the auxiliary hint.
189         /// </summary>
190         /// <param name="id">The auxiliary hint ID.</param>
191         /// <param name="value">The value string to be set.</param>
192         /// <returns>True if no error occurred, false otherwise.</returns>
193         public bool SetAuxiliaryHintValue(uint id, string value) {
194             bool ret = NDalicPINVOKE.SetAuxiliaryHintValue(swigCPtr, id, value);
195             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196             return ret;
197         }
198
199         /// <summary>
200         /// Gets a value of the auxiliary hint.
201         /// </summary>
202         /// <param name="id">The auxiliary hint ID.</param>
203         /// <returns>The string value of the auxiliary hint ID, or an empty string if none exists.</returns>
204         public string GetAuxiliaryHintValue(uint id) {
205             string ret = NDalicPINVOKE.GetAuxiliaryHintValue(swigCPtr, id);
206             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207             return ret;
208         }
209
210         /// <summary>
211         /// Gets an ID of the auxiliary hint string.
212         /// </summary>
213         /// <param name="hint">The auxiliary hint string.</param>
214         /// <returns>The ID of auxiliary hint string, or 0 on failure.</returns>
215         public uint GetAuxiliaryHintId(string hint) {
216             uint ret = NDalicPINVOKE.GetAuxiliaryHintId(swigCPtr, hint);
217             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218             return ret;
219         }
220
221         /// <summary>
222         /// Sets a region to accept input events.
223         /// </summary>
224         /// <param name="inputRegion">The region to accept input events.</param>
225         public void SetInputRegion(Rectangle inputRegion) {
226             NDalicPINVOKE.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion));
227             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
228         }
229
230         /// <summary>
231         /// Gets/Sets a window type.
232         /// </summary>
233         public WindowType Type
234         {
235             get
236             {
237                 WindowType ret = (WindowType)NDalicPINVOKE.GetType(swigCPtr);
238                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239                 return ret;
240             }
241             set
242             {
243                 NDalicPINVOKE.SetType(swigCPtr, (int)value);
244                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245             }
246         }
247
248         /// <summary>
249         /// Sets a priority level for the specified notification window.
250         /// </summary>
251         /// <param name="level">The notification window level.</param>
252         /// <returns>True if no error occurred, false otherwise.</returns>
253         public bool SetNotificationLevel(NotificationLevelType level) {
254             bool ret = NDalicPINVOKE.SetNotificationLevel(swigCPtr, (int)level);
255             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256             return ret;
257         }
258
259         /// <summary>
260         /// Gets a priority level for the specified notification window.
261         /// </summary>
262         /// <returns>The notification window level.</returns>
263         public NotificationLevelType GetNotificationLevel() {
264             NotificationLevelType ret = (NotificationLevelType)NDalicPINVOKE.GetNotificationLevel(swigCPtr);
265             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266             return ret;
267         }
268
269         /// <summary>
270         /// Sets a transparent window's visual state to opaque.
271         /// </summary>
272         /// <param name="opaque">Whether the window's visual state is opaque.</param>
273         public void SetOpaqueState(bool opaque) {
274             NDalicPINVOKE.SetOpaqueState(swigCPtr, opaque);
275             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276         }
277
278         /// <summary>
279         /// Returns whether a transparent window's visual state is opaque or not.
280         /// </summary>
281         /// <returns>True if the window's visual state is opaque, false otherwise.</returns>
282         public bool IsOpaqueState() {
283             bool ret = NDalicPINVOKE.IsOpaqueState(swigCPtr);
284             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285             return ret;
286         }
287
288         /// <summary>
289         /// Sets a window's screen mode.
290         /// </summary>
291         /// <param name="screenMode">The screen mode.</param>
292         /// <returns>True if no error occurred, false otherwise.</returns>
293         public bool SetScreenMode(ScreenModeType screenMode) {
294             bool ret = NDalicPINVOKE.SetScreenMode(swigCPtr, (int)screenMode);
295             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296             return ret;
297         }
298
299         /// <summary>
300         /// Gets a screen mode of the window.
301         /// </summary>
302         /// <returns>The screen mode.</returns>
303         public ScreenModeType GetScreenMode() {
304             ScreenModeType ret = (ScreenModeType)NDalicPINVOKE.GetScreenMode(swigCPtr);
305             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306             return ret;
307         }
308
309         /// <summary>
310         /// Sets preferred brightness of the window.
311         /// </summary>
312         /// <param name="brightness">The preferred brightness (0 to 100).</param>
313         /// <returns>True if no error occurred, false otherwise.</returns>
314         public bool SetBrightness(int brightness) {
315             bool ret = NDalicPINVOKE.SetBrightness(swigCPtr, brightness);
316             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317             return ret;
318         }
319
320         /// <summary>
321         /// Gets preffered brightness of the window.
322         /// </summary>
323         /// <returns>The preffered brightness.</returns>
324         public int GetBrightness() {
325             int ret = NDalicPINVOKE.GetBrightness(swigCPtr);
326             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327             return ret;
328         }
329
330         public class WindowFocusChangedEventArgs : EventArgs
331         {
332             public bool FocusGained
333             {
334                 get;
335                 set;
336             }
337         }
338
339         private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback;
340         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
341         private delegate void WindowFocusChangedEventCallbackType(bool focusGained);
342         private event EventHandler<WindowFocusChangedEventArgs> _windowFocusChangedEventHandler;
343
344         public event EventHandler<WindowFocusChangedEventArgs> WindowFocusChanged
345         {
346             add
347             {
348                 if (_windowFocusChangedEventHandler == null)
349                 {
350                     _windowFocusChangedEventCallback = OnWindowFocusedChanged;
351                     WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback);
352                 }
353
354                 _windowFocusChangedEventHandler += value;
355             }
356             remove
357             {
358                 _windowFocusChangedEventHandler -= value;
359
360                 if (_windowFocusChangedEventHandler == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback != null)
361                 {
362                     WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback);
363                 }
364             }
365         }
366
367         private void OnWindowFocusedChanged(bool focusGained)
368         {
369             WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs();
370
371             e.FocusGained = focusGained;
372
373             if (_windowFocusChangedEventHandler != null)
374             {
375                 _windowFocusChangedEventHandler(this, e);
376             }
377         }
378
379         internal WindowFocusSignalType WindowFocusChangedSignal()
380         {
381             WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
382             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
383             return ret;
384         }
385
386
387
388         /// <summary>
389         /// Creates an initialized handle to a new Window.
390         /// </summary>
391         /// <param name="windowPosition">The position and size of the Window</param>
392         /// <param name="name">The Window title</param>
393         /// <param name="isTransparent">Whether Window is transparent</param>
394         public Window(Rectangle windowPosition, string name, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), name, isTransparent), true)
395         {
396             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
397
398         }
399
400         /// <summary>
401         /// Creates an initialized handle to a new Window.
402         /// </summary>
403         /// <param name="windowPosition">The position and size of the Window</param>
404         /// <param name="name">The Window title</param>
405         public Window(Rectangle windowPosition, string name) : this(NDalicPINVOKE.Window_New__SWIG_1(Rectangle.getCPtr(windowPosition), name), true)
406         {
407             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
408
409         }
410
411         /// <summary>
412         /// Creates an initialized handle to a new Window.
413         /// </summary>
414         /// <param name="windowPosition">The position and size of the Window</param>
415         /// <param name="name">The Window title</param>
416         /// <param name="className">The Window class name</param>
417         /// <param name="isTransparent">Whether Window is transparent</param>
418         public Window(Rectangle windowPosition, string name, string className, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_2(Rectangle.getCPtr(windowPosition), name, className, isTransparent), true)
419         {
420             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
421
422         }
423
424         /// <summary>
425         /// Creates an initialized handle to a new Window.
426         /// </summary>
427         /// <param name="windowPosition">The position and size of the Window</param>
428         /// <param name="name">The Window title</param>
429         /// <param name="className">The Window class name</param>
430         public Window(Rectangle windowPosition, string name, string className) : this(NDalicPINVOKE.Window_New__SWIG_3(Rectangle.getCPtr(windowPosition), name, className), true)
431         {
432             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
433
434         }
435         internal Window(Window handle) : this(NDalicPINVOKE.new_Window__SWIG_1(Window.getCPtr(handle)), true)
436         {
437             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438         }
439
440         internal Window Assign(Window rhs)
441         {
442             Window ret = new Window(NDalicPINVOKE.Window_Assign(swigCPtr, Window.getCPtr(rhs)), false);
443             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
444             return ret;
445         }
446
447         /// <summary>
448         /// This sets whether the indicator bar should be shown or not.
449         /// </summary>
450         /// <param name="visibleMode">Visible mode for indicator bar, Visible in default</param>
451         internal void ShowIndicator(Window.IndicatorVisibleMode visibleMode)
452         {
453             NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
454             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
455         }
456
457         /// <summary>
458         /// This sets the opacity mode of indicator bar.
459         /// </summary>
460         /// <param name="opacity">The opacity mode</param>
461         internal void SetIndicatorBgOpacity(Window.IndicatorBgOpacity opacity)
462         {
463             NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
464             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
465         }
466
467         /// <summary>
468         /// This sets the orientation of indicator bar.<br>
469         /// It does not implicitly show the indicator if it is currently hidden.<br>
470         /// </summary>
471         /// <param name="orientation">The orientation</param>
472         internal void RotateIndicator(Window.WindowOrientation orientation)
473         {
474             NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
475             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
476         }
477
478         internal void SetClass(string name, string klass)
479         {
480             NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
481             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
482         }
483
484         /// <summary>
485         /// Raises window to the top of Window stack.
486         /// </summary>
487         public void Raise()
488         {
489             NDalicPINVOKE.Window_Raise(swigCPtr);
490             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
491         }
492
493         /// <summary>
494         /// Lowers window to the bottom of Window stack.
495         /// </summary>
496         public void Lower()
497         {
498             NDalicPINVOKE.Window_Lower(swigCPtr);
499             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
500         }
501
502         /// <summary>
503         /// Activates window to the top of Window stack even it is iconified.
504         /// </summary>
505         public void Activate()
506         {
507             NDalicPINVOKE.Window_Activate(swigCPtr);
508             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
509         }
510
511         internal void AddAvailableOrientation(Window.WindowOrientation orientation)
512         {
513             NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
514             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
515         }
516
517         internal void RemoveAvailableOrientation(Window.WindowOrientation orientation)
518         {
519             NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
520             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
521         }
522
523         internal void SetPreferredOrientation(Window.WindowOrientation orientation)
524         {
525             NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
526             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
527         }
528
529         internal Window.WindowOrientation GetPreferredOrientation()
530         {
531             Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
532             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533             return ret;
534         }
535
536         internal DragAndDropDetector GetDragAndDropDetector()
537         {
538             DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
539             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
540             return ret;
541         }
542
543         internal Any GetNativeHandle()
544         {
545             Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
546             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547             return ret;
548         }
549
550         internal WindowFocusSignalType FocusChangedSignal()
551         {
552             WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
553             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
554             return ret;
555         }
556
557         /// <summary>
558         /// Get default ( root ) layer.
559         /// </summary>
560         /// <returns>The root layer</returns>
561         public Layer GetDefaultLayer()
562         {
563             return this.GetRootLayer();
564         }
565
566         /// <summary>
567         /// Add layer to the Stage.
568         /// </summary>
569         /// <param name="layer">Layer to add</param>
570         public void AddLayer(Layer layer)
571         {
572             NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
573             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
574         }
575
576         /// <summary>
577         /// Remove layer from the Stage.
578         /// </summary>
579         /// <param name="layer">Layer to remove</param>
580         public void RemoveLayer(Layer layer)
581         {
582             NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
583             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
584         }
585
586         internal void Add(View view)
587         {
588             NDalicPINVOKE.Stage_Add(stageCPtr, View.getCPtr(view));
589             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
590         }
591
592         internal void Remove(View view)
593         {
594             NDalicPINVOKE.Stage_Remove(stageCPtr, View.getCPtr(view));
595             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
596         }
597
598         internal Vector2 GetSize()
599         {
600             Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetSize(stageCPtr), true);
601             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
602             return ret;
603         }
604
605         internal RenderTaskList GetRenderTaskList()
606         {
607             RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.Stage_GetRenderTaskList(stageCPtr), true);
608             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
609             return ret;
610         }
611
612         /// <summary>
613         /// Queries the number of on-window layers.
614         /// </summary>
615         /// <returns>The number of layers.</returns>
616         /// <remarks>Note that a default layer is always provided (count >= 1).</remarks>
617         public uint GetLayerCount()
618         {
619             uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
620             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
621             return ret;
622         }
623
624         public Layer GetLayer(uint depth)
625         {
626             Layer ret = new Layer(NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth), true);
627             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
628             return ret;
629         }
630
631         internal Layer GetRootLayer()
632         {
633             Layer ret = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
634             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
635             return ret;
636         }
637
638         internal void SetBackgroundColor(Vector4 color)
639         {
640             NDalicPINVOKE.Stage_SetBackgroundColor(stageCPtr, Vector4.getCPtr(color));
641             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
642         }
643
644         internal Vector4 GetBackgroundColor()
645         {
646             Vector4 ret = new Vector4(NDalicPINVOKE.Stage_GetBackgroundColor(stageCPtr), true);
647             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648             return ret;
649         }
650
651         internal Vector2 GetDpi()
652         {
653             Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetDpi(stageCPtr), true);
654             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
655             return ret;
656         }
657
658         internal ObjectRegistry GetObjectRegistry()
659         {
660             ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.Stage_GetObjectRegistry(stageCPtr), true);
661             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
662             return ret;
663         }
664
665         /// <summary>
666         /// Keep rendering for at least the given amount of time.
667         /// </summary>
668         /// <param name="durationSeconds">Time to keep rendering, 0 means render at least one more frame</param>
669         public void KeepRendering(float durationSeconds)
670         {
671             NDalicPINVOKE.Stage_KeepRendering(stageCPtr, durationSeconds);
672             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
673         }
674
675         internal KeyEventSignal KeyEventSignal()
676         {
677             KeyEventSignal ret = new KeyEventSignal(NDalicPINVOKE.Stage_KeyEventSignal(stageCPtr), false);
678             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679             return ret;
680         }
681
682         internal VoidSignal EventProcessingFinishedSignal()
683         {
684             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_EventProcessingFinishedSignal(stageCPtr), false);
685             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
686             return ret;
687         }
688
689         internal TouchSignal TouchSignal()
690         {
691             TouchSignal ret = new TouchSignal(NDalicPINVOKE.Stage_TouchSignal(stageCPtr), false);
692             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
693             return ret;
694         }
695
696         private StageWheelSignal WheelEventSignal()
697         {
698             StageWheelSignal ret = new StageWheelSignal(NDalicPINVOKE.Stage_WheelEventSignal(stageCPtr), false);
699             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
700             return ret;
701         }
702
703         internal VoidSignal ContextLostSignal()
704         {
705             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextLostSignal(stageCPtr), false);
706             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
707             return ret;
708         }
709
710         internal VoidSignal ContextRegainedSignal()
711         {
712             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextRegainedSignal(stageCPtr), false);
713             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
714             return ret;
715         }
716
717         internal VoidSignal SceneCreatedSignal()
718         {
719             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_SceneCreatedSignal(stageCPtr), false);
720             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
721             return ret;
722         }
723
724         internal static Vector4 DEFAULT_BACKGROUND_COLOR
725         {
726             get
727             {
728                 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEFAULT_BACKGROUND_COLOR_get();
729                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
730                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
731                 return ret;
732             }
733         }
734
735         internal static Vector4 DEBUG_BACKGROUND_COLOR
736         {
737             get
738             {
739                 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEBUG_BACKGROUND_COLOR_get();
740                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
741                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
742                 return ret;
743             }
744         }
745
746         private static readonly Window instance = Application.Instance.GetWindow();
747
748         /// <summary>
749         /// Stage instance property (read-only).<br>
750         /// Gets the current Window.<br>
751         /// </summary>
752         public static Window Instance
753         {
754             get
755             {
756                 return instance;
757             }
758         }
759
760         /// <summary>
761         /// Grabs the key specified by a key for a window only when a window is the topmost window. <br>
762         /// This function can be used for following example scenarios: <br>
763         /// - Mobile - Using volume up/down as zoom up/down in camera apps. <br>
764         /// </summary>
765         /// <param name="DaliKey">The key code to grab</param>
766         /// <returns>true if the grab succeeds</returns>
767         public bool GrabKeyTopmost(int DaliKey)
768         {
769             bool ret = NDalicManualPINVOKE.GrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
770             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
771             return ret;
772         }
773
774         /// <summary>
775         /// Ungrabs the key specified by a key for a window. <br>
776         /// Note: If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event.<br>
777         /// </summary>
778         /// <param name="DaliKey">The key code to ungrab</param>
779         /// <returns>true if the ungrab succeeds</returns>
780         public bool UngrabKeyTopmost(int DaliKey)
781         {
782             bool ret = NDalicManualPINVOKE.UngrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
783             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
784             return ret;
785         }
786         /// <summary>
787         ///  Grabs the key specified by a key for a window in a GrabMode. <br>
788         ///  Details: This function can be used for following example scenarios: <br>
789         ///  - TV - A user might want to change the volume or channel of the background TV contents while focusing on the foregrund app. <br>
790         ///  - Mobile - When a user presses Home key, the homescreen appears regardless of current foreground app. <br>
791         ///  - Mobile - Using volume up/down as zoom up/down in camera apps. <br>
792         /// </summary>
793         /// <param name="DaliKey">The key code to grab</param>
794         /// <param name="GrabMode">The grab mode for the key</param>
795         /// <returns>true if the grab succeeds</returns>
796         public bool GrabKey(int DaliKey, KeyGrabMode GrabMode)
797         {
798             bool ret = NDalicManualPINVOKE.GrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey, (int)GrabMode);
799             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
800             return ret;
801         }
802         /// <summary>
803         /// Ungrabs the key specified by a key for a window.  <br>
804         /// Note: If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event. <br>
805         /// </summary>
806         /// <param name="DaliKey">The key code to ungrab</param>
807         /// <returns>true if the ungrab succeeds</returns>
808         public bool UngrabKey(int DaliKey)
809         {
810             bool ret = NDalicManualPINVOKE.UngrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
811             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
812             return ret;
813         }
814         internal System.IntPtr GetNativeWindowHandler()
815         {
816             System.IntPtr ret = NDalicManualPINVOKE.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr));
817             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
818             return ret;
819         }
820
821
822
823         /// <summary>
824         /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
825         /// </summary>
826         public enum WindowOrientation
827         {
828             Portrait = 0,
829             Landscape = 90,
830             PortraitInverse = 180,
831             LandscapeInverse = 270
832         }
833
834         /// <summary>
835         /// Enumeration for key grab mode for platform-level APIs.
836         /// </summary>
837         public enum KeyGrabMode
838         {
839             /// <summary>
840             /// Grab a key only when on the top of the grabbing-window stack mode.
841             /// </summary>
842             Topmost = 0,
843             /// <summary>
844             /// Grab a key together with the other client window(s) mode.
845             /// </summary>
846             Shared,
847             /// <summary>
848             /// Grab a key exclusively regardless of the grabbing-window's position on the window stack with the possibility of overriding the grab by the other client window mode.
849             /// </summary>
850             OverrideExclusive,
851             /// <summary>
852             /// Grab a key exclusively regardless of the grabbing-window's position on the window stack mode.
853             /// </summary>
854             Exclusive
855         };
856
857         /// <summary>
858         /// Enumeration for opacity of the indicator.
859         /// </summary>
860         internal enum IndicatorBgOpacity
861         {
862             Opaque = 100,
863             Translucent = 50,
864             Transparent = 0
865         }
866
867         /// <summary>
868         /// Enumeration for visible mode of the indicator.
869         /// </summary>
870         internal enum IndicatorVisibleMode
871         {
872             Invisible = 0,
873             Visible = 1,
874             Auto = 2
875         }
876
877         /// <summary>
878         /// Touch event argument.
879         /// </summary>
880         public class TouchEventArgs : EventArgs
881         {
882             private Touch _touch;
883
884             /// <summary>
885             /// Touch.
886             /// </summary>
887             public Touch Touch
888             {
889                 get
890                 {
891                     return _touch;
892                 }
893                 set
894                 {
895                     _touch = value;
896                 }
897             }
898         }
899
900         private event EventHandler<TouchEventArgs> _stageTouchHandler;
901         private EventCallbackDelegateType1 _stageTouchCallbackDelegate;
902
903         /// <summary>
904         /// This is emitted when the screen is touched and when the touch ends.<br>
905         /// If there are multiple touch points, then this will be emitted when the first touch occurs and
906         /// then when the last finger is lifted.<br>
907         /// An interrupted event will also be emitted (if it occurs).<br>
908         /// </summary>
909         public event EventHandler<TouchEventArgs> TouchEvent
910         {
911             add
912             {
913                 lock (this)
914                 {
915                     _stageTouchHandler += value;
916                     _stageTouchCallbackDelegate = OnStageTouch;
917                     this.TouchSignal().Connect(_stageTouchCallbackDelegate);
918                 }
919             }
920             remove
921             {
922                 lock (this)
923                 {
924                     if (_stageTouchHandler != null)
925                     {
926                         this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
927                     }
928                     _stageTouchHandler -= value;
929                 }
930             }
931         }
932
933         private void OnStageTouch(IntPtr data)
934         {
935             TouchEventArgs e = new TouchEventArgs();
936
937             if (data != null)
938             {
939                 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(data);
940             }
941
942             if (_stageTouchHandler != null)
943             {
944                 _stageTouchHandler(this, e);
945             }
946         }
947
948         /// <summary>
949         /// Wheel event arguments.
950         /// </summary>
951         public class WheelEventArgs : EventArgs
952         {
953             private Wheel _wheel;
954
955             /// <summary>
956             /// Wheel.
957             /// </summary>
958             public Wheel Wheel
959             {
960                 get
961                 {
962                     return _wheel;
963                 }
964                 set
965                 {
966                     _wheel = value;
967                 }
968             }
969         }
970
971         private event EventHandler<WheelEventArgs> _stageWheelHandler;
972         private EventCallbackDelegateType1 _stageWheelCallbackDelegate;
973
974         /// <summary>
975         /// Event emitted when wheel event is received.
976         /// </summary>
977         public event EventHandler<WheelEventArgs> WheelEvent
978         {
979             add
980             {
981                 if (_stageWheelHandler == null)
982                 {
983                     _stageWheelCallbackDelegate = OnStageWheel;
984                     WheelEventSignal().Connect(_stageWheelCallbackDelegate);
985                 }
986                 _stageWheelHandler += value;
987             }
988             remove
989             {
990                 _stageWheelHandler -= value;
991                 if (_stageWheelHandler == null && WheelEventSignal().Empty() == false)
992                 {
993                     WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
994                 }
995             }
996         }
997
998         private void OnStageWheel(IntPtr data)
999         {
1000             WheelEventArgs e = new WheelEventArgs();
1001
1002             if (data != null)
1003             {
1004                 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(data);
1005             }
1006
1007             if (_stageWheelHandler != null)
1008             {
1009                 _stageWheelHandler(this, e);
1010             }
1011         }
1012
1013         /// <summary>
1014         /// Key event arguments.
1015         /// </summary>
1016         public class KeyEventArgs : EventArgs
1017         {
1018             private Key _key;
1019
1020             /// <summary>
1021             /// Key
1022             /// </summary>
1023             public Key Key
1024             {
1025                 get
1026                 {
1027                     return _key;
1028                 }
1029                 set
1030                 {
1031                     _key = value;
1032                 }
1033             }
1034         }
1035
1036         private event EventHandler<KeyEventArgs> _stageKeyHandler;
1037         private EventCallbackDelegateType1 _stageKeyCallbackDelegate;
1038
1039         /// <summary>
1040         /// Event emitted when key event is received.
1041         /// </summary>
1042         public event EventHandler<KeyEventArgs> KeyEvent
1043         {
1044             add
1045             {
1046                 if (_stageKeyHandler == null)
1047                 {
1048                     _stageKeyCallbackDelegate = OnStageKey;
1049                     KeyEventSignal().Connect(_stageKeyCallbackDelegate);
1050                 }
1051                 _stageKeyHandler += value;
1052             }
1053             remove
1054             {
1055                 _stageKeyHandler -= value;
1056                 if (_stageKeyHandler == null && KeyEventSignal().Empty() == false)
1057                 {
1058                     KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
1059                 }
1060             }
1061         }
1062
1063         // Callback for Stage KeyEventsignal
1064         private void OnStageKey(IntPtr data)
1065         {
1066             KeyEventArgs e = new KeyEventArgs();
1067
1068             if (data != null)
1069             {
1070                 e.Key = Tizen.NUI.Key.GetKeyFromPtr(data);
1071             }
1072
1073             if (_stageKeyHandler != null)
1074             {
1075                 //here we send all data to user event handlers
1076                 _stageKeyHandler(this, e);
1077             }
1078         }
1079
1080
1081         private event EventHandler _stageEventProcessingFinishedEventHandler;
1082         private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate;
1083
1084         internal event EventHandler EventProcessingFinished
1085         {
1086             add
1087             {
1088                 if (_stageEventProcessingFinishedEventHandler == null)
1089                 {
1090                     _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished;
1091                     EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
1092                 }
1093                 _stageEventProcessingFinishedEventHandler += value;
1094
1095             }
1096             remove
1097             {
1098                 _stageEventProcessingFinishedEventHandler -= value;
1099                 if (_stageEventProcessingFinishedEventHandler == null && EventProcessingFinishedSignal().Empty() == false)
1100                 {
1101                     EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
1102                 }
1103             }
1104         }
1105
1106         // Callback for Stage EventProcessingFinishedSignal
1107         private void OnEventProcessingFinished()
1108         {
1109             if (_stageEventProcessingFinishedEventHandler != null)
1110             {
1111                 _stageEventProcessingFinishedEventHandler(this, null);
1112             }
1113         }
1114
1115
1116         private EventHandler _stageContextLostEventHandler;
1117         private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate;
1118
1119         internal event EventHandler ContextLost
1120         {
1121             add
1122             {
1123                 if (_stageContextLostEventHandler == null)
1124                 {
1125                     _stageContextLostEventCallbackDelegate = OnContextLost;
1126                     ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
1127                 }
1128                 _stageContextLostEventHandler += value;
1129             }
1130             remove
1131             {
1132                 _stageContextLostEventHandler -= value;
1133                 if (_stageContextLostEventHandler == null && ContextLostSignal().Empty() == false)
1134                 {
1135                     ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
1136                 }
1137             }
1138         }
1139
1140         // Callback for Stage ContextLostSignal
1141         private void OnContextLost()
1142         {
1143             if (_stageContextLostEventHandler != null)
1144             {
1145                 _stageContextLostEventHandler(this, null);
1146             }
1147         }
1148
1149
1150         private EventHandler _stageContextRegainedEventHandler;
1151         private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate;
1152
1153         internal event EventHandler ContextRegained
1154         {
1155             add
1156             {
1157                 if (_stageContextRegainedEventHandler == null)
1158                 {
1159                     _stageContextRegainedEventCallbackDelegate = OnContextRegained;
1160                     ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
1161                 }
1162                 _stageContextRegainedEventHandler += value;
1163             }
1164             remove
1165             {
1166                 _stageContextRegainedEventHandler -= value;
1167                 if (_stageContextRegainedEventHandler == null && ContextRegainedSignal().Empty() == false)
1168                 {
1169                     this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
1170                 }
1171             }
1172         }
1173
1174         // Callback for Stage ContextRegainedSignal
1175         private void OnContextRegained()
1176         {
1177             if (_stageContextRegainedEventHandler != null)
1178             {
1179                 _stageContextRegainedEventHandler(this, null);
1180             }
1181         }
1182
1183
1184         private EventHandler _stageSceneCreatedEventHandler;
1185         private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate;
1186
1187         internal event EventHandler SceneCreated
1188         {
1189             add
1190             {
1191                 if (_stageSceneCreatedEventHandler == null)
1192                 {
1193                     _stageSceneCreatedEventCallbackDelegate = OnSceneCreated;
1194                     SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
1195                 }
1196                 _stageSceneCreatedEventHandler += value;
1197             }
1198             remove
1199             {
1200                 _stageSceneCreatedEventHandler -= value;
1201                 if (_stageSceneCreatedEventHandler == null && SceneCreatedSignal().Empty() == false)
1202                 {
1203                     SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
1204                 }
1205             }
1206         }
1207
1208         // Callback for Stage SceneCreatedSignal
1209         private void OnSceneCreated()
1210         {
1211             if (_stageSceneCreatedEventHandler != null)
1212             {
1213                 _stageSceneCreatedEventHandler(this, null);
1214             }
1215         }
1216
1217         /// <summary>
1218         /// Window size property (read-only).
1219         /// </summary>
1220         public Vector2 Size
1221         {
1222             get
1223             {
1224                 Vector2 ret = GetSize();
1225                 return ret;
1226             }
1227         }
1228
1229         /// <summary>
1230         /// Background color property.
1231         /// </summary>
1232         public Vector4 BackgroundColor
1233         {
1234             set
1235             {
1236                 SetBackgroundColor(value);
1237             }
1238             get
1239             {
1240                 Vector4 ret = GetBackgroundColor();
1241                 return ret;
1242             }
1243         }
1244
1245         /// <summary>
1246         /// Dpi property (read-only).<br>
1247         /// Retrieves the DPI of the display device to which the Window is connected.<br>
1248         /// </summary>
1249         public Vector2 Dpi
1250         {
1251             get
1252             {
1253                 return GetDpi();
1254             }
1255         }
1256
1257         /// <summary>
1258         /// Layer count property (read-only).<br>
1259         /// Queries the number of on-Window layers.<br>
1260         /// </summary>
1261         public uint LayerCount
1262         {
1263             get
1264             {
1265                 return GetLayerCount();
1266             }
1267         }
1268     }
1269 }