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);
78 NDalicPINVOKE.Show(swigCPtr);
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 NDalicPINVOKE.Hide(swigCPtr);
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 public void IsVisible()
90 NDalicPINVOKE.IsVisible(swigCPtr);
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 /// Creates an initialized handle to a new Window.
97 /// <param name="windowPosition">The position and size of the Window</param>
98 /// <param name="name">The Window title</param>
99 /// <param name="isTransparent">Whether Window is transparent</param>
100 public Window(Rectangle windowPosition, string name, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), name, isTransparent), true)
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 /// Creates an initialized handle to a new Window.
109 /// <param name="windowPosition">The position and size of the Window</param>
110 /// <param name="name">The Window title</param>
111 public Window(Rectangle windowPosition, string name) : this(NDalicPINVOKE.Window_New__SWIG_1(Rectangle.getCPtr(windowPosition), name), true)
113 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118 /// Creates an initialized handle to a new Window.
120 /// <param name="windowPosition">The position and size of the Window</param>
121 /// <param name="name">The Window title</param>
122 /// <param name="className">The Window class name</param>
123 /// <param name="isTransparent">Whether Window is transparent</param>
124 public Window(Rectangle windowPosition, string name, string className, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_2(Rectangle.getCPtr(windowPosition), name, className, isTransparent), true)
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 /// Creates an initialized handle to a new Window.
133 /// <param name="windowPosition">The position and size of the Window</param>
134 /// <param name="name">The Window title</param>
135 /// <param name="className">The Window class name</param>
136 public Window(Rectangle windowPosition, string name, string className) : this(NDalicPINVOKE.Window_New__SWIG_3(Rectangle.getCPtr(windowPosition), name, className), true)
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141 internal Window(Window handle) : this(NDalicPINVOKE.new_Window__SWIG_1(Window.getCPtr(handle)), true)
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 internal Window Assign(Window rhs)
148 Window ret = new Window(NDalicPINVOKE.Window_Assign(swigCPtr, Window.getCPtr(rhs)), false);
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 /// This sets whether the indicator bar should be shown or not.
156 /// <param name="visibleMode">Visible mode for indicator bar, Visible in default</param>
157 internal void ShowIndicator(Window.IndicatorVisibleMode visibleMode)
159 NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164 /// This sets the opacity mode of indicator bar.
166 /// <param name="opacity">The opacity mode</param>
167 internal void SetIndicatorBgOpacity(Window.IndicatorBgOpacity opacity)
169 NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 /// This sets the orientation of indicator bar.
175 /// It does not implicitly show the indicator if it is currently hidden.
177 /// <param name="orientation">The orientation</param>
178 internal void RotateIndicator(Window.WindowOrientation orientation)
180 NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184 internal void SetClass(string name, string klass)
186 NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 /// Raises window to the top of Window stack.
195 NDalicPINVOKE.Window_Raise(swigCPtr);
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 /// Lowers window to the bottom of Window stack.
204 NDalicPINVOKE.Window_Lower(swigCPtr);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209 /// Activates window to the top of Window stack even it is iconified.
211 public void Activate()
213 NDalicPINVOKE.Window_Activate(swigCPtr);
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217 internal void AddAvailableOrientation(Window.WindowOrientation orientation)
219 NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223 internal void RemoveAvailableOrientation(Window.WindowOrientation orientation)
225 NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229 internal void SetPreferredOrientation(Window.WindowOrientation orientation)
231 NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235 internal Window.WindowOrientation GetPreferredOrientation()
237 Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 internal DragAndDropDetector GetDragAndDropDetector()
244 DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
245 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
249 internal Any GetNativeHandle()
251 Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
252 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256 internal SWIGTYPE_p_Dali__SignalT_void_fboolF_t IndicatorVisibilityChangedSignal()
258 SWIGTYPE_p_Dali__SignalT_void_fboolF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fboolF_t(NDalicPINVOKE.Window_IndicatorVisibilityChangedSignal(swigCPtr), false);
259 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264 /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
266 public enum WindowOrientation
270 PortraitInverse = 180,
271 LandscapeInverse = 270
275 /// Enumeration for opacity of the indicator.
277 internal enum IndicatorBgOpacity
285 /// Enumeration for visible mode of the indicator.
287 internal enum IndicatorVisibleMode