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 using System.Runtime.InteropServices;
32 public class Window : BaseHandle {
33 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34 private global::System.Runtime.InteropServices.HandleRef stageCPtr;
36 internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn) {
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38 stageCPtr = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.Stage_GetCurrent());
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj) {
42 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 DisposeQueue.Instance.Add(this);
49 public override void Dispose() {
50 if (!Window.IsInstalled()) {
51 DisposeQueue.Instance.Add(this);
56 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
59 NDalicPINVOKE.delete_Window(swigCPtr);
60 NDalicPINVOKE.delete_Stage(stageCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
64 global::System.GC.SuppressFinalize(this);
70 public static bool IsInstalled() {
71 bool ret = NDalicPINVOKE.Stage_IsInstalled();
72 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75 public void SetAcceptFocus( bool accept )
77 NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81 public bool IsFocusAcceptable()
83 return NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 NDalicPINVOKE.Show(swigCPtr);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 NDalicPINVOKE.Hide(swigCPtr);
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99 public void IsVisible()
101 NDalicPINVOKE.IsVisible(swigCPtr);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 public class WindowFocusChangedEventArgs : EventArgs
107 public bool FocusGained
114 private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback;
115 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
116 private delegate void WindowFocusChangedEventCallbackType(bool focusGained);
117 private event EventHandler<WindowFocusChangedEventArgs> _windowFocusChangedEventHandler;
119 public event EventHandler<WindowFocusChangedEventArgs> WindowFocusChanged
123 if (_windowFocusChangedEventHandler == null)
125 _windowFocusChangedEventCallback = OnWindowFocusedChanged;
126 WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback);
129 _windowFocusChangedEventHandler += value;
133 _windowFocusChangedEventHandler -= value;
135 if (_windowFocusChangedEventHandler == null && _windowFocusChangedEventCallback != null)
137 WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback);
142 private void OnWindowFocusedChanged(bool focusGained)
144 WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs();
146 e.FocusGained = focusGained;
148 if (_windowFocusChangedEventHandler != null)
150 _windowFocusChangedEventHandler(this, e);
154 public WindowFocusSignalType WindowFocusChangedSignal() {
155 WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public Window (Rectangle windowPosition, string name, bool isTransparent) : this (NDalicPINVOKE.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), name, isTransparent), true) {
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public Window (Rectangle windowPosition, string name) : this (NDalicPINVOKE.Window_New__SWIG_1(Rectangle.getCPtr(windowPosition), name), true) {
166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 public Window (Rectangle windowPosition, string name, string className, bool isTransparent) : this (NDalicPINVOKE.Window_New__SWIG_2(Rectangle.getCPtr(windowPosition), name, className, isTransparent), true) {
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173 public Window (Rectangle windowPosition, string name, string className) : this (NDalicPINVOKE.Window_New__SWIG_3(Rectangle.getCPtr(windowPosition), name, className), true) {
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 public Window(Window handle) : this(NDalicPINVOKE.new_Window__SWIG_1(Window.getCPtr(handle)), true) {
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 public Window Assign(Window rhs) {
182 Window ret = new Window(NDalicPINVOKE.Window_Assign(swigCPtr, Window.getCPtr(rhs)), false);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public void ShowIndicator(Window.IndicatorVisibleMode visibleMode) {
188 NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192 public void SetIndicatorBgOpacity(Window.IndicatorBgOpacity opacity) {
193 NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
194 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 public void RotateIndicator(Window.WindowOrientation orientation) {
198 NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202 public void SetClass(string name, string klass) {
203 NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 public void Raise() {
208 NDalicPINVOKE.Window_Raise(swigCPtr);
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 public void Lower() {
213 NDalicPINVOKE.Window_Lower(swigCPtr);
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217 public void Activate() {
218 NDalicPINVOKE.Window_Activate(swigCPtr);
219 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222 public void AddAvailableOrientation(Window.WindowOrientation orientation) {
223 NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
224 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 public void RemoveAvailableOrientation(Window.WindowOrientation orientation) {
228 NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
232 public void SetPreferredOrientation(Window.WindowOrientation orientation) {
233 NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 public Window.WindowOrientation GetPreferredOrientation() {
238 Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
239 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243 public DragAndDropDetector GetDragAndDropDetector() {
244 DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
245 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
249 public Any GetNativeHandle() {
250 Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
251 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
255 public WindowFocusSignalType FocusChangedSignal() {
256 WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
257 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261 public Layer GetDefaultLayer()
263 return this.GetRootLayer();
266 public void Add(Layer layer)
268 NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 public void Remove(Layer layer)
274 NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
278 public void Add(View view) {
279 NDalicPINVOKE.Stage_Add(stageCPtr, View.getCPtr(view));
280 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283 public void Remove(View view) {
284 NDalicPINVOKE.Stage_Remove(stageCPtr, View.getCPtr(view));
285 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
288 public Vector2 GetSize() {
289 Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetSize(stageCPtr), true);
290 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
294 public RenderTaskList GetRenderTaskList() {
295 RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.Stage_GetRenderTaskList(stageCPtr), true);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
300 public uint GetLayerCount() {
301 uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306 public Layer GetLayer(uint depth) {
307 Layer ret = new Layer(NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth), true);
308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 public Layer GetRootLayer() {
313 Layer ret = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318 public void SetBackgroundColor(Vector4 color) {
319 NDalicPINVOKE.Stage_SetBackgroundColor(stageCPtr, Vector4.getCPtr(color));
320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 public Vector4 GetBackgroundColor() {
324 Vector4 ret = new Vector4(NDalicPINVOKE.Stage_GetBackgroundColor(stageCPtr), true);
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 public Vector2 GetDpi() {
330 Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetDpi(stageCPtr), true);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 public ObjectRegistry GetObjectRegistry() {
336 ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.Stage_GetObjectRegistry(stageCPtr), true);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341 public void KeepRendering(float durationSeconds) {
342 NDalicPINVOKE.Stage_KeepRendering(stageCPtr, durationSeconds);
343 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
346 public KeyEventSignal KeyEventSignal() {
347 KeyEventSignal ret = new KeyEventSignal(NDalicPINVOKE.Stage_KeyEventSignal(stageCPtr), false);
348 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
352 public VoidSignal EventProcessingFinishedSignal() {
353 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_EventProcessingFinishedSignal(stageCPtr), false);
354 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
358 public TouchSignal TouchSignal() {
359 TouchSignal ret = new TouchSignal(NDalicPINVOKE.Stage_TouchSignal(stageCPtr), false);
360 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364 private StageWheelSignal WheelEventSignal() {
365 StageWheelSignal ret = new StageWheelSignal(NDalicPINVOKE.Stage_WheelEventSignal(stageCPtr), false);
366 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
370 public VoidSignal ContextLostSignal() {
371 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextLostSignal(stageCPtr), false);
372 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376 public VoidSignal ContextRegainedSignal() {
377 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextRegainedSignal(stageCPtr), false);
378 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382 public VoidSignal SceneCreatedSignal() {
383 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_SceneCreatedSignal(stageCPtr), false);
384 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388 public static Vector4 DEFAULT_BACKGROUND_COLOR {
390 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEFAULT_BACKGROUND_COLOR_get();
391 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
392 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
397 public static Vector4 DEBUG_BACKGROUND_COLOR {
399 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEBUG_BACKGROUND_COLOR_get();
400 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
401 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406 private static readonly Window instance = Application.Instance.GetWindow();
407 public static Window Instance
415 public enum WindowOrientation {
418 PORTRAIT_INVERSE = 180,
419 LANDSCAPE_INVERSE = 270
422 public enum IndicatorBgOpacity {
428 public enum IndicatorVisibleMode {
437 * @brief Event arguments that passed via Touch signal
440 public class TouchEventArgs : EventArgs
442 private Touch _touch;
445 * @brief Touch - contains the information of touch points
461 private event EventHandler<TouchEventArgs> _stageTouchHandler;
462 private EventCallbackDelegateType1<IntPtr> _stageTouchCallbackDelegate;
465 * @brief Event for TouchEvent signal which can be used to subscribe/unsubscribe the event handler
466 * TouchEvent signal is emitted when the screen is touched and when the touch ends
467 * (i.e. the down & up touch events only).
470 public event EventHandler<TouchEventArgs> Touch
476 _stageTouchHandler += value;
477 _stageTouchCallbackDelegate = OnStageTouch;
478 this.TouchSignal().Connect(_stageTouchCallbackDelegate);
485 if (_stageTouchHandler != null)
487 this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
489 _stageTouchHandler -= value;
494 private void OnStageTouch(IntPtr data)
496 TouchEventArgs e = new TouchEventArgs();
500 e.Touch = Dali.Touch.GetTouchFromPtr( data );
503 if (_stageTouchHandler != null)
505 _stageTouchHandler(this, e);
510 * @brief Wheel arguments that passed via Wheel signal
513 public class WheelEventArgs : EventArgs
515 private Wheel _wheel;
518 * @brief Wheel - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
534 private event EventHandler<WheelEventArgs> _stageWheelHandler;
535 private EventCallbackDelegateType1<IntPtr> _stageWheelCallbackDelegate;
538 * @brief Event for Wheel signal which can be used to subscribe/unsubscribe the event handler
539 * Wheel signal is emitted is emitted when wheel event is received.
542 public event EventHandler<WheelEventArgs> Wheel
548 _stageWheelHandler += value;
549 _stageWheelCallbackDelegate = OnStageWheel;
550 this.WheelEventSignal().Connect(_stageWheelCallbackDelegate);
557 if (_stageWheelHandler != null)
559 this.WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
561 _stageWheelHandler -= value;
566 private void OnStageWheel(IntPtr data)
568 WheelEventArgs e = new WheelEventArgs();
572 e.Wheel = Dali.Wheel.GetWheelFromPtr( data );
575 if (_stageWheelHandler != null)
577 _stageWheelHandler(this, e);
582 * @brief Event arguments that passed via Key signal
585 public class KeyEventArgs : EventArgs
590 * @brief Key - is the keyevent sent to Stage.
606 private event EventHandler<KeyEventArgs> _stageKeyHandler;
607 private EventCallbackDelegateType1<IntPtr> _stageKeyCallbackDelegate;
610 * @brief Event for Key signal which can be used to subscribe/unsubscribe the event handler
611 * Key signal is emitted is emitted when key event is received.
614 public event EventHandler<KeyEventArgs> Key
620 _stageKeyHandler += value;
621 _stageKeyCallbackDelegate = OnStageKey;
622 this.KeyEventSignal().Connect(_stageKeyCallbackDelegate);
629 if (_stageKeyHandler != null)
631 this.KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
633 _stageKeyHandler -= value;
638 // Callback for Stage KeyEventsignal
639 private void OnStageKey(IntPtr data)
641 KeyEventArgs e = new KeyEventArgs();
645 e.Key = Dali.Key.GetKeyFromPtr( data );
648 if (_stageKeyHandler != null)
650 //here we send all data to user event handlers
651 _stageKeyHandler(this, e);
656 private event EventHandler _stageEventProcessingFinishedEventHandler;
657 private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate;
660 * @brief Event for EventProcessingFinished signal which can be used to subscribe/unsubscribe the event handler
661 * provided by the user. EventProcessingFinished signal is emitted just after the event processing is finished.
664 public event EventHandler EventProcessingFinished
670 _stageEventProcessingFinishedEventHandler += value;
671 _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished;
672 this.EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
679 if (_stageEventProcessingFinishedEventHandler != null)
681 this.EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
683 _stageEventProcessingFinishedEventHandler -= value;
688 // Callback for Stage EventProcessingFinishedSignal
689 private void OnEventProcessingFinished()
691 if (_stageEventProcessingFinishedEventHandler != null)
693 _stageEventProcessingFinishedEventHandler(this, null);
698 private EventHandler _stageContextLostEventHandler;
699 private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate;
702 * @brief Event for ContextLost signal which can be used to subscribe/unsubscribe the event handler
703 * ContextLost signal is emitted when the GL context is lost (Platform specific behaviour).
706 public event EventHandler ContextLost
712 _stageContextLostEventHandler += value;
713 _stageContextLostEventCallbackDelegate = OnContextLost;
714 this.ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
721 if (_stageContextLostEventHandler != null)
723 this.ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
726 _stageContextLostEventHandler -= value;
731 // Callback for Stage ContextLostSignal
732 private void OnContextLost()
734 if (_stageContextLostEventHandler != null)
736 _stageContextLostEventHandler(this, null);
741 private EventHandler _stageContextRegainedEventHandler;
742 private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate;
745 * @brief Event for ContextRegained signal which can be used to subscribe/unsubscribe the event handler
746 * provided by the user. ContextRegained signal is emitted when the GL context is regained (Platform specific
750 public event EventHandler ContextRegained
756 _stageContextRegainedEventHandler += value;
757 _stageContextRegainedEventCallbackDelegate = OnContextRegained;
758 this.ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
765 if (_stageContextRegainedEventHandler != null)
767 this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
770 _stageContextRegainedEventHandler -= value;
775 // Callback for Stage ContextRegainedSignal
776 private void OnContextRegained()
778 if (_stageContextRegainedEventHandler != null)
780 _stageContextRegainedEventHandler(this, null);
785 private EventHandler _stageSceneCreatedEventHandler;
786 private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate;
789 * @brief Event for SceneCreated signal which can be used to subscribe/unsubscribe the event handler
790 * SceneCreated signal is emitted after the initial scene is created.
793 public event EventHandler SceneCreated
799 _stageSceneCreatedEventHandler += value;
800 _stageSceneCreatedEventCallbackDelegate = OnSceneCreated;
801 this.SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
808 if (_stageSceneCreatedEventHandler != null)
810 this.SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
813 _stageSceneCreatedEventHandler -= value;
818 // Callback for Stage SceneCreatedSignal
819 private void OnSceneCreated()
821 if (_stageSceneCreatedEventHandler != null)
823 _stageSceneCreatedEventHandler(this, null);
832 Vector2 ret = GetSize();
837 public Vector4 BackgroundColor
841 SetBackgroundColor(value);
845 Vector4 ret = GetBackgroundColor();