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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
30 /// The window class is used internally for drawing.
31 /// A Window has an orientation and indicator properties.
33 public class Window : BaseHandle
35 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
37 internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn)
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
42 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj)
44 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
49 DisposeQueue.Instance.Add(this);
52 public override void Dispose()
54 if (!Stage.IsInstalled())
56 DisposeQueue.Instance.Add(this);
62 if (swigCPtr.Handle != global::System.IntPtr.Zero)
67 NDalicPINVOKE.delete_Window(swigCPtr);
69 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
71 global::System.GC.SuppressFinalize(this);
77 /// Creates an initialized handle to a new Window.
79 /// <param name="windowPosition">The position and size of the Window</param>
80 /// <param name="name">The Window title</param>
81 /// <param name="isTransparent">Whether Window is transparent</param>
82 public Window(Rectangle windowPosition, string name, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), name, isTransparent), true)
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 /// Creates an initialized handle to a new Window.
91 /// <param name="windowPosition">The position and size of the Window</param>
92 /// <param name="name">The Window title</param>
93 public Window(Rectangle windowPosition, string name) : this(NDalicPINVOKE.Window_New__SWIG_1(Rectangle.getCPtr(windowPosition), name), true)
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 /// Creates an initialized handle to a new Window.
102 /// <param name="windowPosition">The position and size of the Window</param>
103 /// <param name="name">The Window title</param>
104 /// <param name="className">The Window class name</param>
105 /// <param name="isTransparent">Whether Window is transparent</param>
106 public Window(Rectangle windowPosition, string name, string className, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_2(Rectangle.getCPtr(windowPosition), name, className, isTransparent), true)
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 /// Creates an initialized handle to a new Window.
115 /// <param name="windowPosition">The position and size of the Window</param>
116 /// <param name="name">The Window title</param>
117 /// <param name="className">The Window class name</param>
118 public Window(Rectangle windowPosition, string name, string className) : this(NDalicPINVOKE.Window_New__SWIG_3(Rectangle.getCPtr(windowPosition), name, className), true)
120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 internal Window(Window handle) : this(NDalicPINVOKE.new_Window__SWIG_1(Window.getCPtr(handle)), true)
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 internal Window Assign(Window rhs)
130 Window ret = new Window(NDalicPINVOKE.Window_Assign(swigCPtr, Window.getCPtr(rhs)), false);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 /// This sets whether the indicator bar should be shown or not.
138 /// <param name="visibleMode">Visible mode for indicator bar, Visible in default</param>
139 public void ShowIndicator(Window.IndicatorVisibleMode visibleMode)
141 NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 /// This sets the opacity mode of indicator bar.
148 /// <param name="opacity">The opacity mode</param>
149 public void SetIndicatorBgOpacity(Window.IndicatorBgOpacity opacity)
151 NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 /// This sets the orientation of indicator bar.
157 /// It does not implicitly show the indicator if it is currently hidden.
159 /// <param name="orientation">The orientation</param>
160 public void RotateIndicator(Window.WindowOrientation orientation)
162 NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 internal void SetClass(string name, string klass)
168 NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173 /// Raises window to the top of Window stack.
177 NDalicPINVOKE.Window_Raise(swigCPtr);
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 /// Lowers window to the bottom of Window stack.
186 NDalicPINVOKE.Window_Lower(swigCPtr);
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 /// Activates window to the top of Window stack even it is iconified.
193 public void Activate()
195 NDalicPINVOKE.Window_Activate(swigCPtr);
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 internal void AddAvailableOrientation(Window.WindowOrientation orientation)
201 NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 internal void RemoveAvailableOrientation(Window.WindowOrientation orientation)
207 NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
208 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211 internal void SetPreferredOrientation(Window.WindowOrientation orientation)
213 NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217 internal Window.WindowOrientation GetPreferredOrientation()
219 Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224 internal DragAndDropDetector GetDragAndDropDetector()
226 DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231 internal Any GetNativeHandle()
233 Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238 internal SWIGTYPE_p_Dali__SignalT_void_fboolF_t IndicatorVisibilityChangedSignal()
240 SWIGTYPE_p_Dali__SignalT_void_fboolF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fboolF_t(NDalicPINVOKE.Window_IndicatorVisibilityChangedSignal(swigCPtr), false);
241 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
248 public enum WindowOrientation
252 PortraitInverse = 180,
253 LandscapeInverse = 270
257 /// Enumeration for opacity of the indicator.
259 public enum IndicatorBgOpacity
267 /// Enumeration for visible mode of the indicator.
269 public enum IndicatorVisibleMode