Dali C#: initial code commit for tizen branch
[platform/core/uifw/dali-csharp-binder.git] / 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 NUI {
28
29 public class Window : BaseHandle {
30   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
32   internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn) {
33     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34   }
35
36   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj) {
37     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38   }
39
40   ~Window() {
41     DisposeQueue.Instance.Add(this);
42   }
43
44   public override void Dispose() {
45     if (!Stage.IsInstalled()) {
46       DisposeQueue.Instance.Add(this);
47       return;
48     }
49
50     lock(this) {
51       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52         if (swigCMemOwn) {
53           swigCMemOwn = false;
54           NDalicPINVOKE.delete_Window(swigCPtr);
55         }
56         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57       }
58       global::System.GC.SuppressFinalize(this);
59       base.Dispose();
60     }
61   }
62
63
64   public Window (RectInteger windowPosition, string name, bool isTransparent) : this (NDalicPINVOKE.Window_New__SWIG_0(RectInteger.getCPtr(windowPosition), name, isTransparent), true) {
65       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66
67   }
68   public Window (RectInteger windowPosition, string name) : this (NDalicPINVOKE.Window_New__SWIG_1(RectInteger.getCPtr(windowPosition), name), true) {
69       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70
71   }
72   public Window (RectInteger windowPosition, string name, string className, bool isTransparent) : this (NDalicPINVOKE.Window_New__SWIG_2(RectInteger.getCPtr(windowPosition), name, className, isTransparent), true) {
73       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74
75   }
76   public Window (RectInteger windowPosition, string name, string className) : this (NDalicPINVOKE.Window_New__SWIG_3(RectInteger.getCPtr(windowPosition), name, className), true) {
77       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78
79   }
80   public Window(Window handle) : this(NDalicPINVOKE.new_Window__SWIG_1(Window.getCPtr(handle)), true) {
81     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82   }
83
84   public Window Assign(Window rhs) {
85     Window ret = new Window(NDalicPINVOKE.Window_Assign(swigCPtr, Window.getCPtr(rhs)), false);
86     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87     return ret;
88   }
89
90   public void ShowIndicator(Window.IndicatorVisibleMode visibleMode) {
91     NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
92     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93   }
94
95   public void SetIndicatorBgOpacity(Window.IndicatorBgOpacity opacity) {
96     NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
97     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98   }
99
100   public void RotateIndicator(Window.WindowOrientation orientation) {
101     NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
102     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103   }
104
105   public void SetClass(string name, string klass) {
106     NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
107     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108   }
109
110   public void Raise() {
111     NDalicPINVOKE.Window_Raise(swigCPtr);
112     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113   }
114
115   public void Lower() {
116     NDalicPINVOKE.Window_Lower(swigCPtr);
117     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118   }
119
120   public void Activate() {
121     NDalicPINVOKE.Window_Activate(swigCPtr);
122     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123   }
124
125   public void AddAvailableOrientation(Window.WindowOrientation orientation) {
126     NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
127     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128   }
129
130   public void RemoveAvailableOrientation(Window.WindowOrientation orientation) {
131     NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
132     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133   }
134
135   public void SetPreferredOrientation(Window.WindowOrientation orientation) {
136     NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
137     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138   }
139
140   public Window.WindowOrientation GetPreferredOrientation() {
141     Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
142     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143     return ret;
144   }
145
146   public DragAndDropDetector GetDragAndDropDetector() {
147     DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
148     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149     return ret;
150   }
151
152   public Any GetNativeHandle() {
153     Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
154     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155     return ret;
156   }
157
158   public SWIGTYPE_p_Dali__SignalT_void_fboolF_t IndicatorVisibilityChangedSignal() {
159     SWIGTYPE_p_Dali__SignalT_void_fboolF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fboolF_t(NDalicPINVOKE.Window_IndicatorVisibilityChangedSignal(swigCPtr), false);
160     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161     return ret;
162   }
163
164   public enum WindowOrientation {
165     PORTRAIT = 0,
166     LANDSCAPE = 90,
167     PORTRAIT_INVERSE = 180,
168     LANDSCAPE_INVERSE = 270
169   }
170
171   public enum IndicatorBgOpacity {
172     OPAQUE = 100,
173     TRANSLUCENT = 50,
174     TRANSPARENT = 0
175   }
176
177   public enum IndicatorVisibleMode {
178     INVISIBLE = 0,
179     VISIBLE = 1,
180     AUTO = 2
181   }
182
183 }
184
185 }