1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 using System.Runtime.InteropServices;
22 using Tizen.NUI.BaseComponents;
23 using System.ComponentModel;
26 /// The window class is used internally for drawing.<br>
27 /// The window has an orientation and indicator properties.<br>
29 public class Window : BaseHandle
31 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 private global::System.Runtime.InteropServices.HandleRef stageCPtr;
33 private Layer _rootLayer;
34 private string _windowTitle;
36 internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn)
38 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
39 if (NDalicPINVOKE.Stage_IsInstalled())
41 stageCPtr = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.Stage_GetCurrent());
45 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj)
47 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
51 /// To make the window instance be disposed.
53 protected override void Dispose(DisposeTypes type)
60 if(type == DisposeTypes.Explicit)
63 //Release your own managed resources here.
64 //You should release all of your own disposable objects here.
67 //Release your own unmanaged resources here.
68 //You should not access any managed member here except static instance.
69 //because the execution order of Finalizes is non-deterministic.
71 if (_windowFocusChangedEventCallback != null)
73 WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback);
76 if (_stageTouchCallbackDelegate != null)
78 TouchSignal().Disconnect(_stageTouchCallbackDelegate);
81 if (_stageWheelCallbackDelegate != null)
83 WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
86 if (_stageKeyCallbackDelegate != null)
88 KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
91 if (_stageEventProcessingFinishedEventCallbackDelegate != null)
93 EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
96 if (_stageContextLostEventCallbackDelegate != null)
98 ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
101 if (_stageContextRegainedEventCallbackDelegate != null)
103 this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
106 if (_stageSceneCreatedEventCallbackDelegate != null)
108 SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
111 if (_windowResizedEventCallback != null)
113 ResizedSignal().Disconnect(_windowResizedEventCallback);
116 if (_windowFocusChangedEventCallback2 != null)
118 WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2);
121 if (swigCPtr.Handle != global::System.IntPtr.Zero)
126 NDalicPINVOKE.delete_Window(swigCPtr);
127 NDalicPINVOKE.delete_Stage(stageCPtr);
129 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
135 internal static Window GetCurrent()
137 Window ret = new Window(NDalicPINVOKE.Stage_GetCurrent(), true);
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142 internal static bool IsInstalled()
144 bool ret = NDalicPINVOKE.Stage_IsInstalled();
145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 /// Sets whether the window accepts a focus or not.
152 /// <param name="accept">If a focus is accepted or not. The default is true.</param>
153 /// <since_tizen> 3 </since_tizen>
154 public void SetAcceptFocus(bool accept)
156 NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 /// Returns whether the window accepts a focus or not.
163 /// <returns>True if the window accepts a focus, false otherwise.</returns>
164 /// <since_tizen> 3 </since_tizen>
165 public bool IsFocusAcceptable()
167 bool ret = NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 /// Shows the window if it is hidden.
176 /// <since_tizen> 3 </since_tizen>
179 NDalicPINVOKE.Show(swigCPtr);
180 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184 /// Hides the window if it is showing.
186 /// <since_tizen> 3 </since_tizen>
189 NDalicPINVOKE.Hide(swigCPtr);
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 /// Retrieves whether the window is visible or not.
196 /// <returns>True if the window is visible.</returns>
197 /// <since_tizen> 3 </since_tizen>
198 public bool IsVisible()
200 bool temp = NDalicPINVOKE.IsVisible(swigCPtr);
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 /// Gets the count of supported auxiliary hints of the window.
208 /// <returns>The number of supported auxiliary hints.</returns>
209 /// <since_tizen> 3 </since_tizen>
210 public uint GetSupportedAuxiliaryHintCount() {
211 uint ret = NDalicPINVOKE.GetSupportedAuxiliaryHintCount(swigCPtr);
212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217 /// Gets the supported auxiliary hint string of the window.
219 /// <param name="index">The index of the supported auxiliary hint lists.</param>
220 /// <returns>The auxiliary hint string of the index.</returns>
221 /// <since_tizen> 3 </since_tizen>
222 public string GetSupportedAuxiliaryHint(uint index) {
223 string ret = NDalicPINVOKE.GetSupportedAuxiliaryHint(swigCPtr, index);
224 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229 /// Creates an auxiliary hint of the window.
231 /// <param name="hint">The auxiliary hint string.</param>
232 /// <param name="value">The value string.</param>
233 /// <returns>The ID of created auxiliary hint, or 0 on failure.</returns>
234 /// <since_tizen> 3 </since_tizen>
235 public uint AddAuxiliaryHint(string hint, string value) {
236 uint ret = NDalicPINVOKE.AddAuxiliaryHint(swigCPtr, hint, value);
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 /// Removes an auxiliary hint of the window.
244 /// <param name="id">The ID of the auxiliary hint.</param>
245 /// <returns>True if no error occurred, false otherwise.</returns>
246 /// <since_tizen> 3 </since_tizen>
247 public bool RemoveAuxiliaryHint(uint id) {
248 bool ret = NDalicPINVOKE.RemoveAuxiliaryHint(swigCPtr, id);
249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254 /// Changes a value of the auxiliary hint.
256 /// <param name="id">The auxiliary hint ID.</param>
257 /// <param name="value">The value string to be set.</param>
258 /// <returns>True if no error occurred, false otherwise.</returns>
259 /// <since_tizen> 3 </since_tizen>
260 public bool SetAuxiliaryHintValue(uint id, string value) {
261 bool ret = NDalicPINVOKE.SetAuxiliaryHintValue(swigCPtr, id, value);
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267 /// Gets a value of the auxiliary hint.
269 /// <param name="id">The auxiliary hint ID.</param>
270 /// <returns>The string value of the auxiliary hint ID, or an empty string if none exists.</returns>
271 /// <since_tizen> 3 </since_tizen>
272 public string GetAuxiliaryHintValue(uint id) {
273 string ret = NDalicPINVOKE.GetAuxiliaryHintValue(swigCPtr, id);
274 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 /// Gets an ID of the auxiliary hint string.
281 /// <param name="hint">The auxiliary hint string.</param>
282 /// <returns>The ID of auxiliary hint string, or 0 on failure.</returns>
283 /// <since_tizen> 3 </since_tizen>
284 public uint GetAuxiliaryHintId(string hint) {
285 uint ret = NDalicPINVOKE.GetAuxiliaryHintId(swigCPtr, hint);
286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
291 /// Sets a region to accept input events.
293 /// <param name="inputRegion">The region to accept input events.</param>
294 /// <since_tizen> 3 </since_tizen>
295 public void SetInputRegion(Rectangle inputRegion) {
296 NDalicPINVOKE.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion));
297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301 /// Gets or sets a window type.
303 /// <since_tizen> 3 </since_tizen>
304 public WindowType Type
308 WindowType ret = (WindowType)NDalicPINVOKE.GetType(swigCPtr);
309 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
314 NDalicPINVOKE.SetType(swigCPtr, (int)value);
315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
320 /// Sets a priority level for the specified notification window.
322 /// <param name="level">The notification window level.</param>
323 /// <returns>True if no error occurred, false otherwise.</returns>
324 /// <since_tizen> 3 </since_tizen>
325 public bool SetNotificationLevel(NotificationLevel level) {
326 bool ret = NDalicPINVOKE.SetNotificationLevel(swigCPtr, (int)level);
327 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332 /// Gets a priority level for the specified notification window.
334 /// <returns>The notification window level.</returns>
335 /// <since_tizen> 3 </since_tizen>
336 public NotificationLevel GetNotificationLevel() {
337 NotificationLevel ret = (NotificationLevel)NDalicPINVOKE.GetNotificationLevel(swigCPtr);
338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343 /// Sets a transparent window's visual state to opaque.
345 /// <param name="opaque">Whether the window's visual state is opaque.</param>
346 /// <since_tizen> 3 </since_tizen>
347 public void SetOpaqueState(bool opaque) {
348 NDalicPINVOKE.SetOpaqueState(swigCPtr, opaque);
349 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
353 /// Returns whether a transparent window's visual state is opaque or not.
355 /// <returns>True if the window's visual state is opaque, false otherwise.</returns>
356 /// <since_tizen> 3 </since_tizen>
357 public bool IsOpaqueState() {
358 bool ret = NDalicPINVOKE.IsOpaqueState(swigCPtr);
359 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364 /// Sets a window's screen mode.
366 /// <param name="screenMode">The screen mode.</param>
367 /// <returns>True if no error occurred, false otherwise.</returns>
368 /// <since_tizen> 3 </since_tizen>
369 public bool SetScreenMode(ScreenMode screenMode) {
370 bool ret = NDalicPINVOKE.SetScreenMode(swigCPtr, (int)screenMode);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376 /// Gets the screen mode of the window.
378 /// <returns>The screen mode.</returns>
379 /// <since_tizen> 3 </since_tizen>
380 public ScreenMode GetScreenMode() {
381 ScreenMode ret = (ScreenMode)NDalicPINVOKE.GetScreenMode(swigCPtr);
382 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
387 /// Sets preferred brightness of the window.
389 /// <param name="brightness">The preferred brightness (0 to 100).</param>
390 /// <returns>True if no error occurred, false otherwise.</returns>
391 /// <since_tizen> 3 </since_tizen>
392 public bool SetBrightness(int brightness) {
393 bool ret = NDalicPINVOKE.SetBrightness(swigCPtr, brightness);
394 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399 /// Gets the preferred brightness of the window.
401 /// <returns>The preferred brightness.</returns>
402 /// <since_tizen> 3 </since_tizen>
403 public int GetBrightness() {
404 int ret = NDalicPINVOKE.GetBrightness(swigCPtr);
405 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409 public class FocusChangedEventArgs : EventArgs
411 public bool FocusGained
418 private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback;
419 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
420 private delegate void WindowFocusChangedEventCallbackType(bool focusGained);
421 private event EventHandler<FocusChangedEventArgs> _windowFocusChangedEventHandler;
424 /// FocusChanged event.
426 /// <since_tizen> 4 </since_tizen>
427 public event EventHandler<FocusChangedEventArgs> FocusChanged
431 if (_windowFocusChangedEventHandler == null)
433 _windowFocusChangedEventCallback = OnWindowFocusedChanged;
434 WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback);
437 _windowFocusChangedEventHandler += value;
441 _windowFocusChangedEventHandler -= value;
443 if (_windowFocusChangedEventHandler == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback != null)
445 WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback);
450 private void OnWindowFocusedChanged(bool focusGained)
452 FocusChangedEventArgs e = new FocusChangedEventArgs();
454 e.FocusGained = focusGained;
456 if (_windowFocusChangedEventHandler != null)
458 _windowFocusChangedEventHandler(this, e);
463 /// Gets/Sets a window title.
465 /// <since_tizen> 4 </since_tizen>
474 _windowTitle = value;
475 SetClass( _windowTitle, "" );
479 internal WindowFocusSignalType WindowFocusChangedSignal()
481 WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
482 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
486 internal Window(Rectangle windowPosition, string name, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), name, isTransparent), true)
488 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
491 internal Window(Rectangle windowPosition, string name) : this(NDalicPINVOKE.Window_New__SWIG_1(Rectangle.getCPtr(windowPosition), name), true)
493 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
496 internal Window(Rectangle windowPosition, string name, string className, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_2(Rectangle.getCPtr(windowPosition), name, className, isTransparent), true)
498 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501 internal Window(Rectangle windowPosition, string name, string className) : this(NDalicPINVOKE.Window_New__SWIG_3(Rectangle.getCPtr(windowPosition), name, className), true)
503 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
506 internal void ShowIndicator(Window.IndicatorVisibleMode visibleMode)
508 NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
509 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
512 internal void SetIndicatorBackgroundOpacity(Window.IndicatorBackgroundOpacity opacity)
514 NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
518 internal void RotateIndicator(Window.WindowOrientation orientation)
520 NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
521 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
525 /// Sets the window name and the class string.
527 /// <param name="name">The name of the window.</param>
528 /// <param name="klass">The class of the window.</param>
529 /// <since_tizen> 4 </since_tizen>
530 public void SetClass(string name, string klass)
532 NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
533 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
537 /// Raises the window to the top of the window stack.
539 /// <since_tizen> 3 </since_tizen>
542 NDalicPINVOKE.Window_Raise(swigCPtr);
543 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547 /// Lowers the window to the bottom of the window stack.
549 /// <since_tizen> 3 </since_tizen>
552 NDalicPINVOKE.Window_Lower(swigCPtr);
553 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
557 /// Activates the window to the top of the window stack even it is iconified.
559 /// <since_tizen> 3 </since_tizen>
560 public void Activate()
562 NDalicPINVOKE.Window_Activate(swigCPtr);
563 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
566 internal void AddAvailableOrientation(Window.WindowOrientation orientation)
568 NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
569 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
572 internal void RemoveAvailableOrientation(Window.WindowOrientation orientation)
574 NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
575 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
578 internal void SetPreferredOrientation(Window.WindowOrientation orientation)
580 NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
581 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
584 internal Window.WindowOrientation GetPreferredOrientation()
586 Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
587 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
591 internal DragAndDropDetector GetDragAndDropDetector()
593 DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
594 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
598 internal Any GetNativeHandle()
600 Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
601 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
605 internal WindowFocusSignalType FocusChangedSignal()
607 WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
608 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
613 /// Gets the default ( root ) layer.
615 /// <returns>The root layer.</returns>
616 /// <since_tizen> 3 </since_tizen>
617 public Layer GetDefaultLayer()
619 return this.GetRootLayer();
622 internal void Add(Layer layer)
624 NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
625 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
628 internal void Remove(Layer layer)
630 NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
631 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
634 public void Add(View view)
636 NDalicPINVOKE.Stage_Add(stageCPtr, View.getCPtr(view));
637 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
640 public void Remove(View view)
642 NDalicPINVOKE.Stage_Remove(stageCPtr, View.getCPtr(view));
643 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
646 internal Vector2 GetSize()
648 Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetSize(stageCPtr), true);
649 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
653 internal RenderTaskList GetRenderTaskList()
655 RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.Stage_GetRenderTaskList(stageCPtr), true);
656 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
661 /// Queries the number of on-window layers.
663 /// <returns>The number of layers.</returns>
664 /// <remarks>Note that a default layer is always provided (count >= 1).</remarks>
665 internal uint GetLayerCount()
667 uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
668 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
672 /// <since_tizen> 3 </since_tizen>
673 public Layer GetLayer(uint depth)
675 IntPtr cPtr = NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth);
676 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
678 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
682 internal Layer GetRootLayer()
684 if (_rootLayer == null)
685 _rootLayer = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
688 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
692 internal void SetBackgroundColor(Vector4 color)
694 NDalicPINVOKE.Stage_SetBackgroundColor(stageCPtr, Vector4.getCPtr(color));
695 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
698 internal Vector4 GetBackgroundColor()
700 Vector4 ret = new Vector4(NDalicPINVOKE.Stage_GetBackgroundColor(stageCPtr), true);
701 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
705 internal Vector2 GetDpi()
707 Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetDpi(stageCPtr), true);
708 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
712 internal ObjectRegistry GetObjectRegistry()
714 ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.Stage_GetObjectRegistry(stageCPtr), true);
715 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
720 /// Keep rendering for at least the given amount of time.
722 /// <param name="durationSeconds">Time to keep rendering, 0 means render at least one more frame.</param>
723 /// <since_tizen> 3 </since_tizen>
724 public void KeepRendering(float durationSeconds)
726 NDalicPINVOKE.Stage_KeepRendering(stageCPtr, durationSeconds);
727 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
730 internal KeyEventSignal KeyEventSignal()
732 KeyEventSignal ret = new KeyEventSignal(NDalicPINVOKE.Stage_KeyEventSignal(stageCPtr), false);
733 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
737 internal VoidSignal EventProcessingFinishedSignal()
739 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_EventProcessingFinishedSignal(stageCPtr), false);
740 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744 internal TouchSignal TouchSignal()
746 TouchSignal ret = new TouchSignal(NDalicPINVOKE.Stage_TouchSignal(stageCPtr), false);
747 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
751 private StageWheelSignal WheelEventSignal()
753 StageWheelSignal ret = new StageWheelSignal(NDalicPINVOKE.Stage_WheelEventSignal(stageCPtr), false);
754 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
758 internal VoidSignal ContextLostSignal()
760 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextLostSignal(stageCPtr), false);
761 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
765 internal VoidSignal ContextRegainedSignal()
767 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextRegainedSignal(stageCPtr), false);
768 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
772 internal VoidSignal SceneCreatedSignal()
774 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_SceneCreatedSignal(stageCPtr), false);
775 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
779 internal ResizedSignal ResizedSignal()
781 ResizedSignal ret = new ResizedSignal(NDalicManualPINVOKE.Window_ResizedSignal(swigCPtr), false);
782 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
786 internal static Vector4 DEFAULT_BACKGROUND_COLOR
790 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEFAULT_BACKGROUND_COLOR_get();
791 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
792 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
797 internal static Vector4 DEBUG_BACKGROUND_COLOR
801 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEBUG_BACKGROUND_COLOR_get();
802 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
803 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
808 private static readonly Window instance = Application.Instance.GetWindow();
811 /// The stage instance property (read-only).<br>
812 /// Gets the current window.<br>
814 /// <since_tizen> 3 </since_tizen>
815 public static Window Instance
824 /// Grabs the key specified by a key for a window only when a window is the topmost window.<br>
825 /// This function can be used for following example scenarios: <br>
826 /// - Mobile - Using volume up or down as zoom up or down in camera apps.<br>
828 /// <param name="DaliKey">The key code to grab.</param>
829 /// <returns>True if the grab succeeds.</returns>
830 /// <since_tizen> 3 </since_tizen>
831 public bool GrabKeyTopmost(int DaliKey)
833 bool ret = NDalicManualPINVOKE.GrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
834 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
839 /// Ungrabs the key specified by a key for the window.<br>
840 /// 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>
842 /// <param name="DaliKey">The key code to ungrab.</param>
843 /// <returns>True if the ungrab succeeds.</returns>
844 /// <since_tizen> 3 </since_tizen>
845 public bool UngrabKeyTopmost(int DaliKey)
847 bool ret = NDalicManualPINVOKE.UngrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
848 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
853 /// Grabs the key specified by a key for a window in a GrabMode. <br>
854 /// Details: This function can be used for following example scenarios: <br>
855 /// - TV - A user might want to change the volume or channel of the background TV contents while focusing on the foregrund app. <br>
856 /// - Mobile - When a user presses the Home key, the homescreen appears regardless of the current foreground app. <br>
857 /// - Mobile - Using the volume up or down as zoom up or down in camera apps. <br>
859 /// <param name="DaliKey">The key code to grab.</param>
860 /// <param name="GrabMode">The grab mode for the key.</param>
861 /// <returns>True if the grab succeeds.</returns>
862 /// <since_tizen> 3 </since_tizen>
863 public bool GrabKey(int DaliKey, KeyGrabMode GrabMode)
865 bool ret = NDalicManualPINVOKE.GrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey, (int)GrabMode);
866 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
871 /// Ungrabs the key specified by a key for a window.<br>
872 /// 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>
874 /// <param name="DaliKey">The key code to ungrab.</param>
875 /// <returns>True if the ungrab succeeds.</returns>
876 /// <since_tizen> 3 </since_tizen>
877 public bool UngrabKey(int DaliKey)
879 bool ret = NDalicManualPINVOKE.UngrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
880 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
884 internal System.IntPtr GetNativeWindowHandler()
886 System.IntPtr ret = NDalicManualPINVOKE.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr));
887 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
892 /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
894 /// <since_tizen> 3 </since_tizen>
895 public enum WindowOrientation
899 PortraitInverse = 180,
900 LandscapeInverse = 270
904 /// Enumeration for the key grab mode for platform-level APIs.
906 /// <since_tizen> 3 </since_tizen>
907 public enum KeyGrabMode
910 /// Grabs a key only when on the top of the grabbing-window stack mode.
914 /// Grabs a key together with the other client window(s) mode.
918 /// Grabs 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.
922 /// Grabs a key exclusively regardless of the grabbing-window's position on the window stack mode.
928 /// Enumeration for opacity of the indicator.
930 internal enum IndicatorBackgroundOpacity
938 /// Enumeration for visible mode of the indicator.
940 internal enum IndicatorVisibleMode
948 /// The touch event argument.
950 public class TouchEventArgs : EventArgs
952 private Touch _touch;
957 /// <since_tizen> 3 </since_tizen>
971 private event EventHandler<TouchEventArgs> _stageTouchHandler;
972 private EventCallbackDelegateType1 _stageTouchCallbackDelegate;
975 /// This event is emitted when the screen is touched and when the touch ends.<br>
976 /// If there are multiple touch points, then this will be emitted when the first touch occurs and
977 /// then when the last finger is lifted.<br>
978 /// An interrupted event will also be emitted (if it occurs).<br>
980 /// <since_tizen> 4 </since_tizen>
981 public event EventHandler<TouchEventArgs> TouchEvent
987 _stageTouchHandler += value;
988 _stageTouchCallbackDelegate = OnStageTouch;
989 this.TouchSignal().Connect(_stageTouchCallbackDelegate);
996 if (_stageTouchHandler != null)
998 this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
1000 _stageTouchHandler -= value;
1005 private void OnStageTouch(IntPtr data)
1007 TouchEventArgs e = new TouchEventArgs();
1011 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(data);
1014 if (_stageTouchHandler != null)
1016 _stageTouchHandler(this, e);
1021 /// Wheel event arguments.
1023 public class WheelEventArgs : EventArgs
1025 private Wheel _wheel;
1030 /// <since_tizen> 3 </since_tizen>
1044 private event EventHandler<WheelEventArgs> _stageWheelHandler;
1045 private EventCallbackDelegateType1 _stageWheelCallbackDelegate;
1048 /// This event is emitted when the wheel event is received.
1050 /// <since_tizen> 4 </since_tizen>
1051 public event EventHandler<WheelEventArgs> WheelEvent
1055 if (_stageWheelHandler == null)
1057 _stageWheelCallbackDelegate = OnStageWheel;
1058 WheelEventSignal().Connect(_stageWheelCallbackDelegate);
1060 _stageWheelHandler += value;
1064 _stageWheelHandler -= value;
1065 if (_stageWheelHandler == null && WheelEventSignal().Empty() == false)
1067 WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
1072 private void OnStageWheel(IntPtr data)
1074 WheelEventArgs e = new WheelEventArgs();
1078 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(data);
1081 if (_stageWheelHandler != null)
1083 _stageWheelHandler(this, e);
1088 /// Key event arguments.
1090 public class KeyEventArgs : EventArgs
1097 /// <since_tizen> 3 </since_tizen>
1111 private event EventHandler<KeyEventArgs> _stageKeyHandler;
1112 private EventCallbackDelegateType1 _stageKeyCallbackDelegate;
1115 /// This event is emitted when the key event is received.
1117 /// <since_tizen> 4 </since_tizen>
1118 public event EventHandler<KeyEventArgs> KeyEvent
1122 if (_stageKeyHandler == null)
1124 _stageKeyCallbackDelegate = OnStageKey;
1125 KeyEventSignal().Connect(_stageKeyCallbackDelegate);
1127 _stageKeyHandler += value;
1131 _stageKeyHandler -= value;
1132 if (_stageKeyHandler == null && KeyEventSignal().Empty() == false)
1134 KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
1139 // Callback for Stage KeyEventsignal
1140 private void OnStageKey(IntPtr data)
1142 KeyEventArgs e = new KeyEventArgs();
1146 e.Key = Tizen.NUI.Key.GetKeyFromPtr(data);
1149 if (_stageKeyHandler != null)
1151 //here we send all data to user event handlers
1152 _stageKeyHandler(this, e);
1157 private event EventHandler _stageEventProcessingFinishedEventHandler;
1158 private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate;
1160 internal event EventHandler EventProcessingFinished
1164 if (_stageEventProcessingFinishedEventHandler == null)
1166 _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished;
1167 EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
1169 _stageEventProcessingFinishedEventHandler += value;
1174 _stageEventProcessingFinishedEventHandler -= value;
1175 if (_stageEventProcessingFinishedEventHandler == null && EventProcessingFinishedSignal().Empty() == false)
1177 EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
1182 // Callback for Stage EventProcessingFinishedSignal
1183 private void OnEventProcessingFinished()
1185 if (_stageEventProcessingFinishedEventHandler != null)
1187 _stageEventProcessingFinishedEventHandler(this, null);
1192 private EventHandler _stageContextLostEventHandler;
1193 private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate;
1195 internal event EventHandler ContextLost
1199 if (_stageContextLostEventHandler == null)
1201 _stageContextLostEventCallbackDelegate = OnContextLost;
1202 ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
1204 _stageContextLostEventHandler += value;
1208 _stageContextLostEventHandler -= value;
1209 if (_stageContextLostEventHandler == null && ContextLostSignal().Empty() == false)
1211 ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
1216 // Callback for Stage ContextLostSignal
1217 private void OnContextLost()
1219 if (_stageContextLostEventHandler != null)
1221 _stageContextLostEventHandler(this, null);
1226 private EventHandler _stageContextRegainedEventHandler;
1227 private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate;
1229 internal event EventHandler ContextRegained
1233 if (_stageContextRegainedEventHandler == null)
1235 _stageContextRegainedEventCallbackDelegate = OnContextRegained;
1236 ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
1238 _stageContextRegainedEventHandler += value;
1242 _stageContextRegainedEventHandler -= value;
1243 if (_stageContextRegainedEventHandler == null && ContextRegainedSignal().Empty() == false)
1245 this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
1250 // Callback for Stage ContextRegainedSignal
1251 private void OnContextRegained()
1253 if (_stageContextRegainedEventHandler != null)
1255 _stageContextRegainedEventHandler(this, null);
1260 private EventHandler _stageSceneCreatedEventHandler;
1261 private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate;
1263 internal event EventHandler SceneCreated
1267 if (_stageSceneCreatedEventHandler == null)
1269 _stageSceneCreatedEventCallbackDelegate = OnSceneCreated;
1270 SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
1272 _stageSceneCreatedEventHandler += value;
1276 _stageSceneCreatedEventHandler -= value;
1277 if (_stageSceneCreatedEventHandler == null && SceneCreatedSignal().Empty() == false)
1279 SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
1284 // Callback for Stage SceneCreatedSignal
1285 private void OnSceneCreated()
1287 if (_stageSceneCreatedEventHandler != null)
1289 _stageSceneCreatedEventHandler(this, null);
1293 public class ResizedEventArgs : EventArgs
1297 public Size2D WindowSize
1305 _windowSize = value;
1310 private WindowResizedEventCallbackType _windowResizedEventCallback;
1311 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1312 private delegate void WindowResizedEventCallbackType(IntPtr windowSize);
1313 private event EventHandler<ResizedEventArgs> _windowResizedEventHandler;
1316 /// This event is emitted when the window resized.
1318 /// <since_tizen> 4 </since_tizen>
1319 public event EventHandler<ResizedEventArgs> Resized
1323 if (_windowResizedEventHandler == null)
1325 _windowResizedEventCallback = OnResized;
1326 ResizedSignal().Connect(_windowResizedEventCallback);
1329 _windowResizedEventHandler += value;
1333 _windowResizedEventHandler -= value;
1335 if (_windowResizedEventHandler == null && ResizedSignal().Empty() == false && _windowResizedEventCallback != null)
1337 ResizedSignal().Disconnect(_windowResizedEventCallback);
1342 private void OnResized(IntPtr windowSize)
1344 ResizedEventArgs e = new ResizedEventArgs();
1345 var val = new Uint16Pair(windowSize, false);
1346 e.WindowSize = new Size2D(val.GetWidth(), val.GetHeight());
1349 if (_windowResizedEventHandler != null)
1351 _windowResizedEventHandler(this, e);
1355 internal void SetWindowSize(Size2D size)
1357 var val = new Uint16Pair((uint)size.Width, (uint)size.Height);
1358 NDalicManualPINVOKE.SetSize(swigCPtr, Uint16Pair.getCPtr(val));
1360 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1363 internal Size2D GetWindowSize()
1365 var val = new Uint16Pair(NDalicManualPINVOKE.GetSize(swigCPtr), false);
1366 Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
1368 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1372 internal void SetPosition(Position2D position)
1374 var val = new Uint16Pair( (uint)position.X, (uint)position.Y );
1375 NDalicManualPINVOKE.SetPosition(swigCPtr, Uint16Pair.getCPtr(val));
1377 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1380 internal Position2D GetPosition()
1382 var val = new Uint16Pair(NDalicManualPINVOKE.GetPosition(swigCPtr), true);
1383 Position2D ret = new Position2D(val.GetX(), val.GetY());
1385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1390 /// The window size property (read-only).
1392 /// <since_tizen> 3 </since_tizen>
1397 Size2D ret = GetSize();
1403 /// The background color property.
1405 /// <since_tizen> 3 </since_tizen>
1406 public Color BackgroundColor
1410 SetBackgroundColor(value);
1414 Color ret = GetBackgroundColor();
1420 /// The DPI property (read-only).<br>
1421 /// Retrieves the DPI of the display device to which the Window is connected.<br>
1423 /// <since_tizen> 3 </since_tizen>
1433 /// The layer count property (read-only).<br>
1434 /// Queries the number of on-Window layers.<br>
1436 /// <since_tizen> 3 </since_tizen>
1437 public uint LayerCount
1441 return GetLayerCount();
1447 /// Adds a layer to the stage.
1449 /// <param name="layer">Layer to add.</param>
1450 /// <since_tizen> 3 </since_tizen>
1451 public void AddLayer(Layer layer)
1453 NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
1454 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1458 /// Removes a layer from the stage.
1460 /// <param name="layer">Layer to remove.</param>
1461 /// <since_tizen> 4 </since_tizen>
1462 public void RemoveLayer(Layer layer)
1464 NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
1465 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1468 //Please do not use! this will be deprecated
1469 [EditorBrowsable(EditorBrowsableState.Never)]
1470 public class WindowFocusChangedEventArgs : EventArgs
1472 public bool FocusGained
1479 private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback2;
1480 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1481 private delegate void WindowFocusChangedEventCallbackType2(bool focusGained);
1482 private event EventHandler<WindowFocusChangedEventArgs> _windowFocusChangedEventHandler2;
1484 [Obsolete("Please do not use! this will be deprecated. Please use 'FocusChanged' event instead")]
1485 public event EventHandler<WindowFocusChangedEventArgs> WindowFocusChanged
1489 if (_windowFocusChangedEventHandler2 == null)
1491 _windowFocusChangedEventCallback2 = OnWindowFocusedChanged2;
1492 WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback2);
1495 _windowFocusChangedEventHandler2 += value;
1499 _windowFocusChangedEventHandler2 -= value;
1501 if (_windowFocusChangedEventHandler2 == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback2 != null)
1503 WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2);
1508 private void OnWindowFocusedChanged2(bool focusGained)
1510 WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs();
1512 e.FocusGained = focusGained;
1514 if (_windowFocusChangedEventHandler2 != null)
1516 _windowFocusChangedEventHandler2(this, e);
1521 /// Gets or sets a size of the window.
1523 /// <since_tizen> 4 </since_tizen>
1524 public Size2D WindowSize
1528 return GetWindowSize();
1532 SetWindowSize(value);
1537 /// Gets or sets a position of the window.
1539 /// <since_tizen> 4 </since_tizen>
1540 public Position2D WindowPosition
1544 return GetPosition();
1553 /// Feed a key-event into the window.
1555 /// <since_tizen> 4 </since_tizen>
1556 public static void FeedKeyEvent(Key keyEvent)
1558 NDalicManualPINVOKE.Window_FeedKeyEvent(Key.getCPtr(keyEvent));
1559 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1563 /// Allows at least one more render, even when paused.
1564 /// The window should be shown, not minimised.
1566 /// <since_tizen> 4 </since_tizen>
1567 public void RenderOnce()
1569 NDalicManualPINVOKE.Window_RenderOnce(swigCPtr);
1570 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();