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 internal void SetAcceptFocus( bool accept )
77 NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81 internal 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 internal 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();
170 public Window(Window handle) : this(NDalicPINVOKE.new_Window__SWIG_1(Window.getCPtr(handle)), true) {
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 public Window Assign(Window rhs) {
175 Window ret = new Window(NDalicPINVOKE.Window_Assign(swigCPtr, Window.getCPtr(rhs)), false);
176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 public void ShowIndicator(Window.IndicatorVisibleMode visibleMode) {
181 NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 public void SetIndicatorBackgroundOpacity(Window.IndicatorBackgroundOpacity opacity) {
186 NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 public void RotateIndicator(Window.WindowOrientation orientation) {
191 NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195 public void SetClass(string name, string klass) {
196 NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 public void Raise() {
201 NDalicPINVOKE.Window_Raise(swigCPtr);
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 public void Lower() {
206 NDalicPINVOKE.Window_Lower(swigCPtr);
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210 public void Activate() {
211 NDalicPINVOKE.Window_Activate(swigCPtr);
212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215 internal void AddAvailableOrientation(Window.WindowOrientation orientation) {
216 NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 internal void RemoveAvailableOrientation(Window.WindowOrientation orientation) {
221 NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225 internal void SetPreferredOrientation(Window.WindowOrientation orientation) {
226 NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230 internal Window.WindowOrientation GetPreferredOrientation() {
231 Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
236 internal DragAndDropDetector GetDragAndDropDetector() {
237 DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242 internal Any GetNativeHandle() {
243 Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 internal WindowFocusSignalType FocusChangedSignal() {
249 WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254 public Layer GetDefaultLayer()
256 return this.GetRootLayer();
259 public void Add(Layer layer)
261 NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265 public void Remove(Layer layer)
267 NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271 public void Add(View view) {
272 NDalicPINVOKE.Stage_Add(stageCPtr, View.getCPtr(view));
273 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276 public void Remove(View view) {
277 NDalicPINVOKE.Stage_Remove(stageCPtr, View.getCPtr(view));
278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281 public Vector2 GetSize() {
282 Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetSize(stageCPtr), true);
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287 internal RenderTaskList GetRenderTaskList() {
288 RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.Stage_GetRenderTaskList(stageCPtr), true);
289 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
293 public uint GetLayerCount() {
294 uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
295 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
299 public Layer GetLayer(uint depth) {
300 Layer ret = new Layer(NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth), true);
301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 public Layer GetRootLayer() {
306 Layer ret = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 public void SetBackgroundColor(Vector4 color) {
312 NDalicPINVOKE.Stage_SetBackgroundColor(stageCPtr, Vector4.getCPtr(color));
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316 public Vector4 GetBackgroundColor() {
317 Vector4 ret = new Vector4(NDalicPINVOKE.Stage_GetBackgroundColor(stageCPtr), true);
318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
322 public Vector2 GetDpi() {
323 Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetDpi(stageCPtr), true);
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328 internal ObjectRegistry GetObjectRegistry() {
329 ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.Stage_GetObjectRegistry(stageCPtr), true);
330 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
334 public void KeepRendering(float durationSeconds) {
335 NDalicPINVOKE.Stage_KeepRendering(stageCPtr, durationSeconds);
336 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 internal KeyEventSignal KeyEventSignal() {
340 KeyEventSignal ret = new KeyEventSignal(NDalicPINVOKE.Stage_KeyEventSignal(stageCPtr), false);
341 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 internal VoidSignal EventProcessingFinishedSignal() {
346 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_EventProcessingFinishedSignal(stageCPtr), false);
347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351 internal TouchSignal TouchSignal() {
352 TouchSignal ret = new TouchSignal(NDalicPINVOKE.Stage_TouchSignal(stageCPtr), false);
353 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 internal StageWheelSignal WheelEventSignal() {
358 StageWheelSignal ret = new StageWheelSignal(NDalicPINVOKE.Stage_WheelEventSignal(stageCPtr), false);
359 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
363 internal VoidSignal ContextLostSignal() {
364 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextLostSignal(stageCPtr), false);
365 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
369 internal VoidSignal ContextRegainedSignal() {
370 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextRegainedSignal(stageCPtr), false);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
375 internal VoidSignal SceneCreatedSignal() {
376 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_SceneCreatedSignal(stageCPtr), false);
377 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
381 internal static Vector4 DEFAULT_BACKGROUND_COLOR {
383 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEFAULT_BACKGROUND_COLOR_get();
384 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
390 internal static Vector4 DEBUG_BACKGROUND_COLOR {
392 global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEBUG_BACKGROUND_COLOR_get();
393 Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
394 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399 private static readonly Window instance = Application.Instance.GetWindow();
400 public static Window Instance
408 public enum WindowOrientation {
411 PORTRAIT_INVERSE = 180,
412 LANDSCAPE_INVERSE = 270
415 public enum IndicatorBackgroundOpacity {
421 public enum IndicatorVisibleMode {
430 * @brief Event arguments that passed via Touch signal
433 public class TouchEventArgs : EventArgs
435 private Touch _touch;
438 * @brief Touch - contains the information of touch points
454 private event EventHandler<TouchEventArgs> _stageTouchHandler;
455 private EventCallbackDelegateType1<IntPtr> _stageTouchCallbackDelegate;
458 * @brief Event for TouchEvent signal which can be used to subscribe/unsubscribe the event handler
459 * TouchEvent signal is emitted when the screen is touched and when the touch ends
460 * (i.e. the down & up touch events only).
463 public event EventHandler<TouchEventArgs> Touched
469 _stageTouchHandler += value;
470 _stageTouchCallbackDelegate = OnStageTouch;
471 this.TouchSignal().Connect(_stageTouchCallbackDelegate);
478 if (_stageTouchHandler != null)
480 this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
482 _stageTouchHandler -= value;
487 private void OnStageTouch(IntPtr data)
489 TouchEventArgs e = new TouchEventArgs();
493 e.Touch = Dali.Touch.GetTouchFromPtr( data );
496 if (_stageTouchHandler != null)
498 _stageTouchHandler(this, e);
503 * @brief Wheel arguments that passed via Wheel signal
506 public class WheelEventArgs : EventArgs
508 private Wheel _wheel;
511 * @brief Wheel - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
527 private event EventHandler<WheelEventArgs> _stageWheelHandler;
528 private EventCallbackDelegateType1<IntPtr> _stageWheelCallbackDelegate;
531 * @brief Event for Wheel signal which can be used to subscribe/unsubscribe the event handler
532 * Wheel signal is emitted is emitted when wheel event is received.
535 public event EventHandler<WheelEventArgs> WheelRolled
541 _stageWheelHandler += value;
542 _stageWheelCallbackDelegate = OnStageWheel;
543 this.WheelEventSignal().Connect(_stageWheelCallbackDelegate);
550 if (_stageWheelHandler != null)
552 this.WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
554 _stageWheelHandler -= value;
559 private void OnStageWheel(IntPtr data)
561 WheelEventArgs e = new WheelEventArgs();
565 e.Wheel = Dali.Wheel.GetWheelFromPtr( data );
568 if (_stageWheelHandler != null)
570 _stageWheelHandler(this, e);
575 * @brief Event arguments that passed via Key signal
578 public class KeyEventArgs : EventArgs
583 * @brief Key - is the keyevent sent to Stage.
599 private event EventHandler<KeyEventArgs> _stageKeyHandler;
600 private EventCallbackDelegateType1<IntPtr> _stageKeyCallbackDelegate;
603 * @brief Event for Key signal which can be used to subscribe/unsubscribe the event handler
604 * Key signal is emitted is emitted when key event is received.
607 public event EventHandler<KeyEventArgs> Key
613 _stageKeyHandler += value;
614 _stageKeyCallbackDelegate = OnStageKey;
615 this.KeyEventSignal().Connect(_stageKeyCallbackDelegate);
622 if (_stageKeyHandler != null)
624 this.KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
626 _stageKeyHandler -= value;
631 // Callback for Stage KeyEventsignal
632 private void OnStageKey(IntPtr data)
634 KeyEventArgs e = new KeyEventArgs();
638 e.Key = Dali.Key.GetKeyFromPtr( data );
641 if (_stageKeyHandler != null)
643 //here we send all data to user event handlers
644 _stageKeyHandler(this, e);
649 private event EventHandler _stageEventProcessingFinishedEventHandler;
650 private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate;
653 * @brief Event for EventProcessingFinished signal which can be used to subscribe/unsubscribe the event handler
654 * provided by the user. EventProcessingFinished signal is emitted just after the event processing is finished.
657 internal event EventHandler EventProcessingFinished
663 _stageEventProcessingFinishedEventHandler += value;
664 _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished;
665 this.EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
672 if (_stageEventProcessingFinishedEventHandler != null)
674 this.EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
676 _stageEventProcessingFinishedEventHandler -= value;
681 // Callback for Stage EventProcessingFinishedSignal
682 private void OnEventProcessingFinished()
684 if (_stageEventProcessingFinishedEventHandler != null)
686 _stageEventProcessingFinishedEventHandler(this, null);
691 private EventHandler _stageContextLostEventHandler;
692 private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate;
695 * @brief Event for ContextLost signal which can be used to subscribe/unsubscribe the event handler
696 * ContextLost signal is emitted when the GL context is lost (Platform specific behaviour).
699 internal event EventHandler ContextLost
705 _stageContextLostEventHandler += value;
706 _stageContextLostEventCallbackDelegate = OnContextLost;
707 this.ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
714 if (_stageContextLostEventHandler != null)
716 this.ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
719 _stageContextLostEventHandler -= value;
724 // Callback for Stage ContextLostSignal
725 private void OnContextLost()
727 if (_stageContextLostEventHandler != null)
729 _stageContextLostEventHandler(this, null);
734 private EventHandler _stageContextRegainedEventHandler;
735 private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate;
738 * @brief Event for ContextRegained signal which can be used to subscribe/unsubscribe the event handler
739 * provided by the user. ContextRegained signal is emitted when the GL context is regained (Platform specific
743 internal event EventHandler ContextRegained
749 _stageContextRegainedEventHandler += value;
750 _stageContextRegainedEventCallbackDelegate = OnContextRegained;
751 this.ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
758 if (_stageContextRegainedEventHandler != null)
760 this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
763 _stageContextRegainedEventHandler -= value;
768 // Callback for Stage ContextRegainedSignal
769 private void OnContextRegained()
771 if (_stageContextRegainedEventHandler != null)
773 _stageContextRegainedEventHandler(this, null);
778 private EventHandler _stageSceneCreatedEventHandler;
779 private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate;
782 * @brief Event for SceneCreated signal which can be used to subscribe/unsubscribe the event handler
783 * SceneCreated signal is emitted after the initial scene is created.
786 internal event EventHandler SceneCreated
792 _stageSceneCreatedEventHandler += value;
793 _stageSceneCreatedEventCallbackDelegate = OnSceneCreated;
794 this.SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
801 if (_stageSceneCreatedEventHandler != null)
803 this.SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
806 _stageSceneCreatedEventHandler -= value;
811 // Callback for Stage SceneCreatedSignal
812 private void OnSceneCreated()
814 if (_stageSceneCreatedEventHandler != null)
816 _stageSceneCreatedEventHandler(this, null);
825 Vector2 ret = GetSize();
830 public Vector4 BackgroundColor
834 SetBackgroundColor(value);
838 Vector4 ret = GetBackgroundColor();