Merge "TextLabel devel properties manual binding for auto scroll animation" into...
[platform/core/csapi/tizenfx.git] / src / 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         internal uint GetLayerCount()
613         {
614             uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
615             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
616             return ret;
617         }
618
619         public Layer GetLayer(uint depth)
620         {
621             Layer ret = new Layer(NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth), true);
622             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
623             return ret;
624         }
625
626         internal Layer GetRootLayer()
627         {
628             Layer ret = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
629             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
630             return ret;
631         }
632
633         internal void SetBackgroundColor(Vector4 color)
634         {
635             NDalicPINVOKE.Stage_SetBackgroundColor(stageCPtr, Vector4.getCPtr(color));
636             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
637         }
638
639         internal Vector4 GetBackgroundColor()
640         {
641             Vector4 ret = new Vector4(NDalicPINVOKE.Stage_GetBackgroundColor(stageCPtr), true);
642             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
643             return ret;
644         }
645
646         internal Vector2 GetDpi()
647         {
648             Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetDpi(stageCPtr), true);
649             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
650             return ret;
651         }
652
653         internal ObjectRegistry GetObjectRegistry()
654         {
655             ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.Stage_GetObjectRegistry(stageCPtr), true);
656             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
657             return ret;
658         }
659
660         /// <summary>
661         /// Keep rendering for at least the given amount of time.
662         /// </summary>
663         /// <param name="durationSeconds">Time to keep rendering, 0 means render at least one more frame</param>
664         public void KeepRendering(float durationSeconds)
665         {
666             NDalicPINVOKE.Stage_KeepRendering(stageCPtr, durationSeconds);
667             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
668         }
669
670         internal KeyEventSignal KeyEventSignal()
671         {
672             KeyEventSignal ret = new KeyEventSignal(NDalicPINVOKE.Stage_KeyEventSignal(stageCPtr), false);
673             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
674             return ret;
675         }
676
677         internal VoidSignal EventProcessingFinishedSignal()
678         {
679             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_EventProcessingFinishedSignal(stageCPtr), false);
680             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
681             return ret;
682         }
683
684         internal TouchSignal TouchSignal()
685         {
686             TouchSignal ret = new TouchSignal(NDalicPINVOKE.Stage_TouchSignal(stageCPtr), false);
687             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
688             return ret;
689         }
690
691         private StageWheelSignal WheelEventSignal()
692         {
693             StageWheelSignal ret = new StageWheelSignal(NDalicPINVOKE.Stage_WheelEventSignal(stageCPtr), false);
694             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
695             return ret;
696         }
697
698         internal VoidSignal ContextLostSignal()
699         {
700             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextLostSignal(stageCPtr), false);
701             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
702             return ret;
703         }
704
705         internal VoidSignal ContextRegainedSignal()
706         {
707             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextRegainedSignal(stageCPtr), false);
708             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
709             return ret;
710         }
711
712         internal VoidSignal SceneCreatedSignal()
713         {
714             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_SceneCreatedSignal(stageCPtr), false);
715             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
716             return ret;
717         }
718
719         internal static Vector4 DEFAULT_BACKGROUND_COLOR
720         {
721             get
722             {
723                 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEFAULT_BACKGROUND_COLOR_get();
724                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
725                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
726                 return ret;
727             }
728         }
729
730         internal static Vector4 DEBUG_BACKGROUND_COLOR
731         {
732             get
733             {
734                 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEBUG_BACKGROUND_COLOR_get();
735                 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
736                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
737                 return ret;
738             }
739         }
740
741         private static readonly Window instance = Application.Instance.GetWindow();
742
743         /// <summary>
744         /// Stage instance property (read-only).<br>
745         /// Gets the current Window.<br>
746         /// </summary>
747         public static Window Instance
748         {
749             get
750             {
751                 return instance;
752             }
753         }
754
755         /// <summary>
756         /// Grabs the key specified by a key for a window only when a window is the topmost window. <br>
757         /// This function can be used for following example scenarios: <br>
758         /// - Mobile - Using volume up/down as zoom up/down in camera apps. <br>
759         /// </summary>
760         /// <param name="DaliKey">The key code to grab</param>
761         /// <returns>true if the grab succeeds</returns>
762         public bool GrabKeyTopmost(int DaliKey)
763         {
764             bool ret = NDalicManualPINVOKE.GrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
765             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
766             return ret;
767         }
768
769         /// <summary>
770         /// Ungrabs the key specified by a key for a window. <br>
771         /// 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>
772         /// </summary>
773         /// <param name="DaliKey">The key code to ungrab</param>
774         /// <returns>true if the ungrab succeeds</returns>
775         public bool UngrabKeyTopmost(int DaliKey)
776         {
777             bool ret = NDalicManualPINVOKE.UngrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
778             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
779             return ret;
780         }
781         /// <summary>
782         ///  Grabs the key specified by a key for a window in a GrabMode. <br>
783         ///  Details: This function can be used for following example scenarios: <br>
784         ///  - TV - A user might want to change the volume or channel of the background TV contents while focusing on the foregrund app. <br>
785         ///  - Mobile - When a user presses Home key, the homescreen appears regardless of current foreground app. <br>
786         ///  - Mobile - Using volume up/down as zoom up/down in camera apps. <br>
787         /// </summary>
788         /// <param name="DaliKey">The key code to grab</param>
789         /// <param name="GrabMode">The grab mode for the key</param>
790         /// <returns>true if the grab succeeds</returns>
791         public bool GrabKey(int DaliKey, KeyGrabMode GrabMode)
792         {
793             bool ret = NDalicManualPINVOKE.GrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey, (int)GrabMode);
794             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
795             return ret;
796         }
797         /// <summary>
798         /// Ungrabs the key specified by a key for a window.  <br>
799         /// 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>
800         /// </summary>
801         /// <param name="DaliKey">The key code to ungrab</param>
802         /// <returns>true if the ungrab succeeds</returns>
803         public bool UngrabKey(int DaliKey)
804         {
805             bool ret = NDalicManualPINVOKE.UngrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
806             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
807             return ret;
808         }
809         internal System.IntPtr GetNativeWindowHandler()
810         {
811             System.IntPtr ret = NDalicManualPINVOKE.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr));
812             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
813             return ret;
814         }
815
816
817
818         /// <summary>
819         /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
820         /// </summary>
821         public enum WindowOrientation
822         {
823             Portrait = 0,
824             Landscape = 90,
825             PortraitInverse = 180,
826             LandscapeInverse = 270
827         }
828
829         /// <summary>
830         /// Enumeration for key grab mode for platform-level APIs.
831         /// </summary>
832         public enum KeyGrabMode
833         {
834             /// <summary>
835             /// Grab a key only when on the top of the grabbing-window stack mode.
836             /// </summary>
837             Topmost = 0,
838             /// <summary>
839             /// Grab a key together with the other client window(s) mode.
840             /// </summary>
841             Shared,
842             /// <summary>
843             /// 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.
844             /// </summary>
845             OverrideExclusive,
846             /// <summary>
847             /// Grab a key exclusively regardless of the grabbing-window's position on the window stack mode.
848             /// </summary>
849             Exclusive
850         };
851
852         /// <summary>
853         /// Enumeration for opacity of the indicator.
854         /// </summary>
855         internal enum IndicatorBgOpacity
856         {
857             Opaque = 100,
858             Translucent = 50,
859             Transparent = 0
860         }
861
862         /// <summary>
863         /// Enumeration for visible mode of the indicator.
864         /// </summary>
865         internal enum IndicatorVisibleMode
866         {
867             Invisible = 0,
868             Visible = 1,
869             Auto = 2
870         }
871
872         /// <summary>
873         /// Touch event argument.
874         /// </summary>
875         public class TouchEventArgs : EventArgs
876         {
877             private Touch _touch;
878
879             /// <summary>
880             /// Touch.
881             /// </summary>
882             public Touch Touch
883             {
884                 get
885                 {
886                     return _touch;
887                 }
888                 set
889                 {
890                     _touch = value;
891                 }
892             }
893         }
894
895         private event EventHandler<TouchEventArgs> _stageTouchHandler;
896         private EventCallbackDelegateType1 _stageTouchCallbackDelegate;
897
898         /// <summary>
899         /// This is emitted when the screen is touched and when the touch ends.<br>
900         /// If there are multiple touch points, then this will be emitted when the first touch occurs and
901         /// then when the last finger is lifted.<br>
902         /// An interrupted event will also be emitted (if it occurs).<br>
903         /// </summary>
904         public event EventHandler<TouchEventArgs> TouchEvent
905         {
906             add
907             {
908                 lock (this)
909                 {
910                     _stageTouchHandler += value;
911                     _stageTouchCallbackDelegate = OnStageTouch;
912                     this.TouchSignal().Connect(_stageTouchCallbackDelegate);
913                 }
914             }
915             remove
916             {
917                 lock (this)
918                 {
919                     if (_stageTouchHandler != null)
920                     {
921                         this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
922                     }
923                     _stageTouchHandler -= value;
924                 }
925             }
926         }
927
928         private void OnStageTouch(IntPtr data)
929         {
930             TouchEventArgs e = new TouchEventArgs();
931
932             if (data != null)
933             {
934                 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(data);
935             }
936
937             if (_stageTouchHandler != null)
938             {
939                 _stageTouchHandler(this, e);
940             }
941         }
942
943         /// <summary>
944         /// Wheel event arguments.
945         /// </summary>
946         public class WheelEventArgs : EventArgs
947         {
948             private Wheel _wheel;
949
950             /// <summary>
951             /// Wheel.
952             /// </summary>
953             public Wheel Wheel
954             {
955                 get
956                 {
957                     return _wheel;
958                 }
959                 set
960                 {
961                     _wheel = value;
962                 }
963             }
964         }
965
966         private event EventHandler<WheelEventArgs> _stageWheelHandler;
967         private EventCallbackDelegateType1 _stageWheelCallbackDelegate;
968
969         /// <summary>
970         /// Event emitted when wheel event is received.
971         /// </summary>
972         public event EventHandler<WheelEventArgs> WheelEvent
973         {
974             add
975             {
976                 if (_stageWheelHandler == null)
977                 {
978                     _stageWheelCallbackDelegate = OnStageWheel;
979                     WheelEventSignal().Connect(_stageWheelCallbackDelegate);
980                 }
981                 _stageWheelHandler += value;
982             }
983             remove
984             {
985                 _stageWheelHandler -= value;
986                 if (_stageWheelHandler == null && WheelEventSignal().Empty() == false)
987                 {
988                     WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
989                 }
990             }
991         }
992
993         private void OnStageWheel(IntPtr data)
994         {
995             WheelEventArgs e = new WheelEventArgs();
996
997             if (data != null)
998             {
999                 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(data);
1000             }
1001
1002             if (_stageWheelHandler != null)
1003             {
1004                 _stageWheelHandler(this, e);
1005             }
1006         }
1007
1008         /// <summary>
1009         /// Key event arguments.
1010         /// </summary>
1011         public class KeyEventArgs : EventArgs
1012         {
1013             private Key _key;
1014
1015             /// <summary>
1016             /// Key
1017             /// </summary>
1018             public Key Key
1019             {
1020                 get
1021                 {
1022                     return _key;
1023                 }
1024                 set
1025                 {
1026                     _key = value;
1027                 }
1028             }
1029         }
1030
1031         private event EventHandler<KeyEventArgs> _stageKeyHandler;
1032         private EventCallbackDelegateType1 _stageKeyCallbackDelegate;
1033
1034         /// <summary>
1035         /// Event emitted when key event is received.
1036         /// </summary>
1037         public event EventHandler<KeyEventArgs> KeyEvent
1038         {
1039             add
1040             {
1041                 if (_stageKeyHandler == null)
1042                 {
1043                     _stageKeyCallbackDelegate = OnStageKey;
1044                     KeyEventSignal().Connect(_stageKeyCallbackDelegate);
1045                 }
1046                 _stageKeyHandler += value;
1047             }
1048             remove
1049             {
1050                 _stageKeyHandler -= value;
1051                 if (_stageKeyHandler == null && KeyEventSignal().Empty() == false)
1052                 {
1053                     KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
1054                 }
1055             }
1056         }
1057
1058         // Callback for Stage KeyEventsignal
1059         private void OnStageKey(IntPtr data)
1060         {
1061             KeyEventArgs e = new KeyEventArgs();
1062
1063             if (data != null)
1064             {
1065                 e.Key = Tizen.NUI.Key.GetKeyFromPtr(data);
1066             }
1067
1068             if (_stageKeyHandler != null)
1069             {
1070                 //here we send all data to user event handlers
1071                 _stageKeyHandler(this, e);
1072             }
1073         }
1074
1075
1076         private event EventHandler _stageEventProcessingFinishedEventHandler;
1077         private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate;
1078
1079         internal event EventHandler EventProcessingFinished
1080         {
1081             add
1082             {
1083                 if (_stageEventProcessingFinishedEventHandler == null)
1084                 {
1085                     _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished;
1086                     EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
1087                 }
1088                 _stageEventProcessingFinishedEventHandler += value;
1089
1090             }
1091             remove
1092             {
1093                 _stageEventProcessingFinishedEventHandler -= value;
1094                 if (_stageEventProcessingFinishedEventHandler == null && EventProcessingFinishedSignal().Empty() == false)
1095                 {
1096                     EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
1097                 }
1098             }
1099         }
1100
1101         // Callback for Stage EventProcessingFinishedSignal
1102         private void OnEventProcessingFinished()
1103         {
1104             if (_stageEventProcessingFinishedEventHandler != null)
1105             {
1106                 _stageEventProcessingFinishedEventHandler(this, null);
1107             }
1108         }
1109
1110
1111         private EventHandler _stageContextLostEventHandler;
1112         private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate;
1113
1114         internal event EventHandler ContextLost
1115         {
1116             add
1117             {
1118                 if (_stageContextLostEventHandler == null)
1119                 {
1120                     _stageContextLostEventCallbackDelegate = OnContextLost;
1121                     ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
1122                 }
1123                 _stageContextLostEventHandler += value;
1124             }
1125             remove
1126             {
1127                 _stageContextLostEventHandler -= value;
1128                 if (_stageContextLostEventHandler == null && ContextLostSignal().Empty() == false)
1129                 {
1130                     ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
1131                 }
1132             }
1133         }
1134
1135         // Callback for Stage ContextLostSignal
1136         private void OnContextLost()
1137         {
1138             if (_stageContextLostEventHandler != null)
1139             {
1140                 _stageContextLostEventHandler(this, null);
1141             }
1142         }
1143
1144
1145         private EventHandler _stageContextRegainedEventHandler;
1146         private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate;
1147
1148         internal event EventHandler ContextRegained
1149         {
1150             add
1151             {
1152                 if (_stageContextRegainedEventHandler == null)
1153                 {
1154                     _stageContextRegainedEventCallbackDelegate = OnContextRegained;
1155                     ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
1156                 }
1157                 _stageContextRegainedEventHandler += value;
1158             }
1159             remove
1160             {
1161                 _stageContextRegainedEventHandler -= value;
1162                 if (_stageContextRegainedEventHandler == null && ContextRegainedSignal().Empty() == false)
1163                 {
1164                     this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
1165                 }
1166             }
1167         }
1168
1169         // Callback for Stage ContextRegainedSignal
1170         private void OnContextRegained()
1171         {
1172             if (_stageContextRegainedEventHandler != null)
1173             {
1174                 _stageContextRegainedEventHandler(this, null);
1175             }
1176         }
1177
1178
1179         private EventHandler _stageSceneCreatedEventHandler;
1180         private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate;
1181
1182         internal event EventHandler SceneCreated
1183         {
1184             add
1185             {
1186                 if (_stageSceneCreatedEventHandler == null)
1187                 {
1188                     _stageSceneCreatedEventCallbackDelegate = OnSceneCreated;
1189                     SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
1190                 }
1191                 _stageSceneCreatedEventHandler += value;
1192             }
1193             remove
1194             {
1195                 _stageSceneCreatedEventHandler -= value;
1196                 if (_stageSceneCreatedEventHandler == null && SceneCreatedSignal().Empty() == false)
1197                 {
1198                     SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
1199                 }
1200             }
1201         }
1202
1203         // Callback for Stage SceneCreatedSignal
1204         private void OnSceneCreated()
1205         {
1206             if (_stageSceneCreatedEventHandler != null)
1207             {
1208                 _stageSceneCreatedEventHandler(this, null);
1209             }
1210         }
1211
1212         /// <summary>
1213         /// Window size property (read-only).
1214         /// </summary>
1215         public Vector2 Size
1216         {
1217             get
1218             {
1219                 Vector2 ret = GetSize();
1220                 return ret;
1221             }
1222         }
1223
1224         /// <summary>
1225         /// Background color property.
1226         /// </summary>
1227         public Vector4 BackgroundColor
1228         {
1229             set
1230             {
1231                 SetBackgroundColor(value);
1232             }
1233             get
1234             {
1235                 Vector4 ret = GetBackgroundColor();
1236                 return ret;
1237             }
1238         }
1239
1240         /// <summary>
1241         /// Dpi property (read-only).<br>
1242         /// Retrieves the DPI of the display device to which the Window is connected.<br>
1243         /// </summary>
1244         public Vector2 Dpi
1245         {
1246             get
1247             {
1248                 return GetDpi();
1249             }
1250         }
1251
1252         /// <summary>
1253         /// Layer count property (read-only).<br>
1254         /// Queries the number of on-Window layers.<br>
1255         /// </summary>
1256         public uint LayerCount
1257         {
1258             get
1259             {
1260                 return GetLayerCount();
1261             }
1262         }
1263     }
1264 }