nui 0.2.32 manual merge, mapping to dali 1.2.32
[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     /// <summary>
30     /// The window class is used internally for drawing.
31     /// A Window has an orientation and indicator properties.
32     /// </summary>
33     public class Window : BaseHandle
34     {
35         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36
37         internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn)
38         {
39             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
40         }
41
42         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj)
43         {
44             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
45         }
46
47         ~Window()
48         {
49             DisposeQueue.Instance.Add(this);
50         }
51
52         public override void Dispose()
53         {
54             if (!Stage.IsInstalled())
55             {
56                 DisposeQueue.Instance.Add(this);
57                 return;
58             }
59
60             lock (this)
61             {
62                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
63                 {
64                     if (swigCMemOwn)
65                     {
66                         swigCMemOwn = false;
67                         NDalicPINVOKE.delete_Window(swigCPtr);
68                     }
69                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
70                 }
71                 global::System.GC.SuppressFinalize(this);
72                 base.Dispose();
73             }
74         }
75
76         public void Show()
77         {
78             NDalicPINVOKE.Show(swigCPtr);
79             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80         }
81
82         public void Hide()
83         {
84             NDalicPINVOKE.Hide(swigCPtr);
85             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86         }
87
88         public void IsVisible()
89         {
90             NDalicPINVOKE.IsVisible(swigCPtr);
91             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92         }
93
94         /// <summary>
95         /// Creates an initialized handle to a new Window.
96         /// </summary>
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)
101         {
102             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103
104         }
105
106         /// <summary>
107         /// Creates an initialized handle to a new Window.
108         /// </summary>
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)
112         {
113             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114
115         }
116
117         /// <summary>
118         /// Creates an initialized handle to a new Window.
119         /// </summary>
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)
125         {
126             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127
128         }
129
130         /// <summary>
131         /// Creates an initialized handle to a new Window.
132         /// </summary>
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)
137         {
138             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139
140         }
141         internal Window(Window handle) : this(NDalicPINVOKE.new_Window__SWIG_1(Window.getCPtr(handle)), true)
142         {
143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144         }
145
146         internal Window Assign(Window rhs)
147         {
148             Window ret = new Window(NDalicPINVOKE.Window_Assign(swigCPtr, Window.getCPtr(rhs)), false);
149             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150             return ret;
151         }
152
153         /// <summary>
154         /// This sets whether the indicator bar should be shown or not.
155         /// </summary>
156         /// <param name="visibleMode">Visible mode for indicator bar, Visible in default</param>
157         internal void ShowIndicator(Window.IndicatorVisibleMode visibleMode)
158         {
159             NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
160             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161         }
162
163         /// <summary>
164         /// This sets the opacity mode of indicator bar.
165         /// </summary>
166         /// <param name="opacity">The opacity mode</param>
167         internal void SetIndicatorBgOpacity(Window.IndicatorBgOpacity opacity)
168         {
169             NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
170             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171         }
172
173         /// <summary>
174         /// This sets the orientation of indicator bar.
175         /// It does not implicitly show the indicator if it is currently hidden.
176         /// </summary>
177         /// <param name="orientation">The orientation</param>
178         internal void RotateIndicator(Window.WindowOrientation orientation)
179         {
180             NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
181             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182         }
183
184         internal void SetClass(string name, string klass)
185         {
186             NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
187             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188         }
189
190         /// <summary>
191         /// Raises window to the top of Window stack.
192         /// </summary>
193         public void Raise()
194         {
195             NDalicPINVOKE.Window_Raise(swigCPtr);
196             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197         }
198
199         /// <summary>
200         /// Lowers window to the bottom of Window stack.
201         /// </summary>
202         public void Lower()
203         {
204             NDalicPINVOKE.Window_Lower(swigCPtr);
205             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206         }
207
208         /// <summary>
209         /// Activates window to the top of Window stack even it is iconified.
210         /// </summary>
211         public void Activate()
212         {
213             NDalicPINVOKE.Window_Activate(swigCPtr);
214             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215         }
216
217         internal void AddAvailableOrientation(Window.WindowOrientation orientation)
218         {
219             NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
220             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221         }
222
223         internal void RemoveAvailableOrientation(Window.WindowOrientation orientation)
224         {
225             NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
226             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227         }
228
229         internal void SetPreferredOrientation(Window.WindowOrientation orientation)
230         {
231             NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
232             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233         }
234
235         internal Window.WindowOrientation GetPreferredOrientation()
236         {
237             Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
238             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239             return ret;
240         }
241
242         internal DragAndDropDetector GetDragAndDropDetector()
243         {
244             DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
245             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246             return ret;
247         }
248
249         internal Any GetNativeHandle()
250         {
251             Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
252             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253             return ret;
254         }
255
256         internal SWIGTYPE_p_Dali__SignalT_void_fboolF_t IndicatorVisibilityChangedSignal()
257         {
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();
260             return ret;
261         }
262
263         /// <summary>
264         /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
265         /// </summary>
266         public enum WindowOrientation
267         {
268             Portrait = 0,
269             Landscape = 90,
270             PortraitInverse = 180,
271             LandscapeInverse = 270
272         }
273
274         /// <summary>
275         /// Enumeration for opacity of the indicator.
276         /// </summary>
277         internal enum IndicatorBgOpacity
278         {
279             Opaque = 100,
280             Translucent = 50,
281             Transparent = 0
282         }
283
284         /// <summary>
285         /// Enumeration for visible mode of the indicator.
286         /// </summary>
287         internal enum IndicatorVisibleMode
288         {
289             Invisible = 0,
290             Visible = 1,
291             Auto = 2
292         }
293
294     }
295
296 }