+
+
/*
- * Copyright(c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
private global::System.Runtime.InteropServices.HandleRef stageCPtr;
- private readonly global::System.Runtime.InteropServices.HandleRef rootLayoutCPtr;
private Layer _rootLayer;
private string _windowTitle;
- private readonly LayoutItem rootLayoutItem;
-
private List<Layer> _childLayers = new List<Layer>();
private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback;
private RootLayerTouchDataCallbackType _rootLayerTouchDataCallback;
private static readonly Window instance = Application.Instance?.GetWindow();
- internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn)
+ private LayoutController localController;
+
+ internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Window.Window_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- if (NDalicPINVOKE.Stage_IsInstalled())
- {
- stageCPtr = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.Stage_GetCurrent());
- // Create a root layout (AbsoluteLayout) that is invisible to the user but enables layouts added to the Window
- // Enables layouts added to the Window to have a parent layout. As parent layout is needed to store measure spec properties.
- // Currently without these measure specs the new layout added will always be the size of the window.
- global::System.IntPtr rootLayoutIntPtr = NDalicManualPINVOKE.Window_NewRootLayout();
- // Store HandleRef used by Add()
- rootLayoutCPtr = new global::System.Runtime.InteropServices.HandleRef(this, rootLayoutIntPtr);
- Layer rootLayer = GetRootLayer();
- // Add the root layout created above to the root layer.
- NDalicPINVOKE.Actor_Add( Layer.getCPtr(rootLayer), rootLayoutCPtr );
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
- global::System.IntPtr rootControlLayoutIntPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(rootLayoutCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ if (Interop.Stage.Stage_IsInstalled())
+ {
+ stageCPtr = new global::System.Runtime.InteropServices.HandleRef(this, Interop.Stage.Stage_GetCurrent());
- rootLayoutItem = new LayoutItem(rootControlLayoutIntPtr, true);
+ localController = new LayoutController(this);
+ NUILog.Debug("layoutController id:" + localController.GetId() );
}
}
- internal Window(Rectangle windowPosition, string name, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), name, isTransparent), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- internal Window(Rectangle windowPosition, string name) : this(NDalicPINVOKE.Window_New__SWIG_1(Rectangle.getCPtr(windowPosition), name), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- internal Window(Rectangle windowPosition, string name, string className, bool isTransparent) : this(NDalicPINVOKE.Window_New__SWIG_2(Rectangle.getCPtr(windowPosition), name, className, isTransparent), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- internal Window(Rectangle windowPosition, string name, string className) : this(NDalicPINVOKE.Window_New__SWIG_3(Rectangle.getCPtr(windowPosition), name, className), true)
+ /// <summary>
+ /// Creates a new Window.<br />
+ /// This creates an extra window in addition to the default main window<br />
+ /// </summary>
+ /// <param name="windowPosition">The position and size of the Window.</param>
+ /// <param name="isTranslucent">Whether Window is translucent.</param>
+ /// <returns>A new Window.</returns>
+ /// <since_tizen> 6 </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Window(Rectangle windowPosition = null , bool isTranslucent = false) : this(Interop.Window.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), "", isTranslucent), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
}
+ /// <summary>
+ /// ViewAdded will be triggered when the view added on Window
+ /// </summary>
+ /// <since_tizen> 6 </since_tizen>
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler ViewAdded;
+
+ internal void SendViewAdded(View view)
+ {
+ ViewAdded?.Invoke(view, EventArgs.Empty);
+ }
+
internal event EventHandler EventProcessingFinished
{
add
{
get
{
- WindowType ret = (WindowType)NDalicPINVOKE.GetType(swigCPtr);
+ WindowType ret = (WindowType)Interop.Window.GetType(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
set
{
- NDalicPINVOKE.SetType(swigCPtr, (int)value);
+ Interop.Window.SetType(swigCPtr, (int)value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
{
get
{
- global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEFAULT_BACKGROUND_COLOR_get();
+ global::System.IntPtr cPtr = Interop.Stage.Stage_DEFAULT_BACKGROUND_COLOR_get();
Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
{
get
{
- global::System.IntPtr cPtr = NDalicPINVOKE.Stage_DEBUG_BACKGROUND_COLOR_get();
+ global::System.IntPtr cPtr = Interop.Stage.Stage_DEBUG_BACKGROUND_COLOR_get();
Vector4 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector4(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
+ internal LayoutController LayoutController
+ {
+ get
+ {
+ return localController;
+ }
+ }
+
/// <summary>
/// Feed a key-event into the window.
/// </summary>
[Obsolete("Please do not use! This will be deprecated! Please use FeedKey(Key keyEvent) instead!")]
public static void FeedKeyEvent(Key keyEvent)
{
- NDalicManualPINVOKE.Window_FeedKeyEvent(Key.getCPtr(keyEvent));
+ Interop.Window.Window_FeedKeyEvent(Key.getCPtr(keyEvent));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public void SetAcceptFocus(bool accept)
{
- NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
+ Interop.Window.SetAcceptFocus(swigCPtr, accept);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public bool IsFocusAcceptable()
{
- bool ret = NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
+ bool ret = Interop.Window.IsFocusAcceptable(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <since_tizen> 3 </since_tizen>
public void Show()
{
- NDalicPINVOKE.Show(swigCPtr);
+ Interop.Window.Show(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public void Hide()
{
- NDalicPINVOKE.Hide(swigCPtr);
+ Interop.Window.Hide(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public bool IsVisible()
{
- bool temp = NDalicPINVOKE.IsVisible(swigCPtr);
+ bool temp = Interop.Window.IsVisible(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return temp;
}
/// <since_tizen> 3 </since_tizen>
public uint GetSupportedAuxiliaryHintCount()
{
- uint ret = NDalicPINVOKE.GetSupportedAuxiliaryHintCount(swigCPtr);
+ uint ret = Interop.Window.GetSupportedAuxiliaryHintCount(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public string GetSupportedAuxiliaryHint(uint index)
{
- string ret = NDalicPINVOKE.GetSupportedAuxiliaryHint(swigCPtr, index);
+ string ret = Interop.Window.GetSupportedAuxiliaryHint(swigCPtr, index);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public uint AddAuxiliaryHint(string hint, string value)
{
- uint ret = NDalicPINVOKE.AddAuxiliaryHint(swigCPtr, hint, value);
+ uint ret = Interop.Window.AddAuxiliaryHint(swigCPtr, hint, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public bool RemoveAuxiliaryHint(uint id)
{
- bool ret = NDalicPINVOKE.RemoveAuxiliaryHint(swigCPtr, id);
+ bool ret = Interop.Window.RemoveAuxiliaryHint(swigCPtr, id);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public bool SetAuxiliaryHintValue(uint id, string value)
{
- bool ret = NDalicPINVOKE.SetAuxiliaryHintValue(swigCPtr, id, value);
+ bool ret = Interop.Window.SetAuxiliaryHintValue(swigCPtr, id, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public string GetAuxiliaryHintValue(uint id)
{
- string ret = NDalicPINVOKE.GetAuxiliaryHintValue(swigCPtr, id);
+ string ret = Interop.Window.GetAuxiliaryHintValue(swigCPtr, id);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public uint GetAuxiliaryHintId(string hint)
{
- uint ret = NDalicPINVOKE.GetAuxiliaryHintId(swigCPtr, hint);
+ uint ret = Interop.Window.GetAuxiliaryHintId(swigCPtr, hint);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public void SetInputRegion(Rectangle inputRegion)
{
- NDalicPINVOKE.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion));
+ Interop.Window.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public bool SetNotificationLevel(NotificationLevel level)
{
- bool ret = NDalicPINVOKE.SetNotificationLevel(swigCPtr, (int)level);
+ bool ret = Interop.Window.SetNotificationLevel(swigCPtr, (int)level);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public NotificationLevel GetNotificationLevel()
{
- NotificationLevel ret = (NotificationLevel)NDalicPINVOKE.GetNotificationLevel(swigCPtr);
+ NotificationLevel ret = (NotificationLevel)Interop.Window.GetNotificationLevel(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public void SetOpaqueState(bool opaque)
{
- NDalicPINVOKE.SetOpaqueState(swigCPtr, opaque);
+ Interop.Window.SetOpaqueState(swigCPtr, opaque);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public bool IsOpaqueState()
{
- bool ret = NDalicPINVOKE.IsOpaqueState(swigCPtr);
+ bool ret = Interop.Window.IsOpaqueState(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 4 </since_tizen>
public bool SetScreenOffMode(ScreenOffMode screenOffMode)
{
- bool ret = NDalicPINVOKE.SetScreenOffMode(swigCPtr, (int)screenOffMode);
+ bool ret = Interop.Window.SetScreenOffMode(swigCPtr, (int)screenOffMode);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 4 </since_tizen>
public ScreenOffMode GetScreenOffMode()
{
- ScreenOffMode ret = (ScreenOffMode)NDalicPINVOKE.GetScreenOffMode(swigCPtr);
+ ScreenOffMode ret = (ScreenOffMode)Interop.Window.GetScreenOffMode(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public bool SetBrightness(int brightness)
{
- bool ret = NDalicPINVOKE.SetBrightness(swigCPtr, brightness);
+ bool ret = Interop.Window.SetBrightness(swigCPtr, brightness);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public int GetBrightness()
{
- int ret = NDalicPINVOKE.GetBrightness(swigCPtr);
+ int ret = Interop.Window.GetBrightness(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 4 </since_tizen>
public void SetClass(string name, string klass)
{
- NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
+ Interop.Window.Window_SetClass(swigCPtr, name, klass);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public void Raise()
{
- NDalicPINVOKE.Window_Raise(swigCPtr);
+ Interop.Window.Window_Raise(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public void Lower()
{
- NDalicPINVOKE.Window_Lower(swigCPtr);
+ Interop.Window.Window_Lower(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public void Activate()
{
- NDalicPINVOKE.Window_Activate(swigCPtr);
+ Interop.Window.Window_Activate(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public void Add(View view)
{
- NDalicPINVOKE.Actor_Add(rootLayoutCPtr, View.getCPtr(view));
+ Interop.Actor.Actor_Add(Layer.getCPtr(GetRootLayer()), View.getCPtr(view));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
this.GetRootLayer().AddViewToLayerList(view); // Maintain the children list in the Layer
view.InternalParent = this.GetRootLayer();
/// <since_tizen> 3 </since_tizen>
public void Remove(View view)
{
- NDalicPINVOKE.Actor_Remove(rootLayoutCPtr, View.getCPtr(view));
+ Interop.Actor.Actor_Remove(Layer.getCPtr(GetRootLayer()), View.getCPtr(view));
this.GetRootLayer().RemoveViewFromLayerList(view); // Maintain the children list in the Layer
view.InternalParent = null;
}
{
if (depth < LayersChildren?.Count)
{
- Layer ret = LayersChildren[Convert.ToInt32(depth)];
+ Layer ret = LayersChildren?[Convert.ToInt32(depth)];
return ret;
}
else
}
/// <summary>
+ /// Destroy the window immediately.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void Destroy()
+ {
+ this.Dispose();
+ }
+
+ /// <summary>
/// Keep rendering for at least the given amount of time.
/// </summary>
/// <param name="durationSeconds">Time to keep rendering, 0 means render at least one more frame.</param>
/// <since_tizen> 3 </since_tizen>
public void KeepRendering(float durationSeconds)
{
- NDalicPINVOKE.Stage_KeepRendering(stageCPtr, durationSeconds);
+ Interop.Stage.Stage_KeepRendering(stageCPtr, durationSeconds);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public bool GrabKeyTopmost(int DaliKey)
{
- bool ret = NDalicManualPINVOKE.GrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
+ bool ret = Interop.Window.GrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public bool UngrabKeyTopmost(int DaliKey)
{
- bool ret = NDalicManualPINVOKE.UngrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
+ bool ret = Interop.Window.UngrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public bool GrabKey(int DaliKey, KeyGrabMode GrabMode)
{
- bool ret = NDalicManualPINVOKE.GrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey, (int)GrabMode);
+ bool ret = Interop.Window.GrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey, (int)GrabMode);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public bool UngrabKey(int DaliKey)
{
- bool ret = NDalicManualPINVOKE.UngrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
+ bool ret = Interop.Window.UngrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 5 </since_tizen>
public bool SetKeyboardRepeatInfo(float rate, float delay)
{
- bool ret = NDalicManualPINVOKE.SetKeyboardRepeatInfo(rate, delay);
+ bool ret = Interop.Window.SetKeyboardRepeatInfo(rate, delay);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 5 </since_tizen>
public bool GetKeyboardRepeatInfo(out float rate, out float delay)
{
- bool ret = NDalicManualPINVOKE.GetKeyboardRepeatInfo(out rate, out delay);
+ bool ret = Interop.Window.GetKeyboardRepeatInfo(out rate, out delay);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public void AddLayer(Layer layer)
{
- NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
+ Interop.Window.Add(swigCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
LayersChildren?.Add(layer);
+ layer.SetWindow(this);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public void RemoveLayer(Layer layer)
{
- NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
+ Interop.Window.Remove(swigCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
LayersChildren?.Remove(layer);
+ layer.SetWindow(null);
}
/// <summary>
/// <since_tizen> 5 </since_tizen>
public void FeedKey(Key keyEvent)
{
- NDalicManualPINVOKE.Window_FeedKeyEvent(Key.getCPtr(keyEvent));
+ Interop.Window.Window_FeedKeyEvent(Key.getCPtr(keyEvent));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 4 </since_tizen>
public void RenderOnce()
{
- NDalicManualPINVOKE.Window_RenderOnce(swigCPtr);
+ Interop.Window.Window_RenderOnce(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal static Window GetCurrent()
{
- Window ret = new Window(NDalicPINVOKE.Stage_GetCurrent(), true);
+ Window ret = new Window(Interop.Stage.Stage_GetCurrent(), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal static bool IsInstalled()
{
- bool ret = NDalicPINVOKE.Stage_IsInstalled();
+ bool ret = Interop.Stage.Stage_IsInstalled();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal WindowFocusSignalType WindowFocusChangedSignal()
{
- WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
+ WindowFocusSignalType ret = new WindowFocusSignalType(Interop.Window.FocusChangedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal void ShowIndicator(Window.IndicatorVisibleMode visibleMode)
{
- NDalicPINVOKE.Window_ShowIndicator(swigCPtr, (int)visibleMode);
+ Interop.WindowInternal.Window_ShowIndicator(swigCPtr, (int)visibleMode);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal void SetIndicatorBackgroundOpacity(Window.IndicatorBackgroundOpacity opacity)
{
- NDalicPINVOKE.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
+ Interop.WindowInternal.Window_SetIndicatorBgOpacity(swigCPtr, (int)opacity);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal void RotateIndicator(Window.WindowOrientation orientation)
{
- NDalicPINVOKE.Window_RotateIndicator(swigCPtr, (int)orientation);
+ Interop.WindowInternal.Window_RotateIndicator(swigCPtr, (int)orientation);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal void AddAvailableOrientation(Window.WindowOrientation orientation)
{
- NDalicPINVOKE.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
+ Interop.WindowInternal.Window_AddAvailableOrientation(swigCPtr, (int)orientation);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal void RemoveAvailableOrientation(Window.WindowOrientation orientation)
{
- NDalicPINVOKE.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
+ Interop.WindowInternal.Window_RemoveAvailableOrientation(swigCPtr, (int)orientation);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal void SetPreferredOrientation(Window.WindowOrientation orientation)
{
- NDalicPINVOKE.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
+ Interop.WindowInternal.Window_SetPreferredOrientation(swigCPtr, (int)orientation);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal Window.WindowOrientation GetPreferredOrientation()
{
- Window.WindowOrientation ret = (Window.WindowOrientation)NDalicPINVOKE.Window_GetPreferredOrientation(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- internal DragAndDropDetector GetDragAndDropDetector()
- {
- DragAndDropDetector ret = new DragAndDropDetector(NDalicPINVOKE.Window_GetDragAndDropDetector(swigCPtr), true);
+ Window.WindowOrientation ret = (Window.WindowOrientation)Interop.WindowInternal.Window_GetPreferredOrientation(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal Any GetNativeHandle()
{
- Any ret = new Any(NDalicPINVOKE.Window_GetNativeHandle(swigCPtr), true);
+ Any ret = new Any(Interop.WindowInternal.Window_GetNativeHandle(swigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal WindowFocusSignalType FocusChangedSignal()
{
- WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
+ WindowFocusSignalType ret = new WindowFocusSignalType(Interop.Window.FocusChangedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal void Add(Layer layer)
{
- NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
+ Interop.Window.Add(swigCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
LayersChildren?.Add(layer);
+ layer.SetWindow(this);
}
internal void Remove(Layer layer)
{
- NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
+ Interop.Window.Remove(swigCPtr, Layer.getCPtr(layer));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
LayersChildren?.Remove(layer);
+ layer.SetWindow(null);
}
internal Vector2 GetSize()
{
- Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetSize(stageCPtr), true);
+ var val = new Uint16Pair(Interop.Window.GetSize(swigCPtr), false);
+ Vector2 ret = new Vector2(val.GetWidth(), val.GetHeight());
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal RenderTaskList GetRenderTaskList()
{
- RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.Stage_GetRenderTaskList(stageCPtr), true);
+ RenderTaskList ret = new RenderTaskList(Interop.Stage.Stage_GetRenderTaskList(stageCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
// Core has been initialized, not when Stage is ready.
if (_rootLayer == null && Window.IsInstalled())
{
- _rootLayer = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
+ _rootLayer = new Layer(Interop.Window.GetRootLayer(swigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
LayersChildren?.Add(_rootLayer);
+ _rootLayer.SetWindow(this);
}
return _rootLayer;
}
internal void SetBackgroundColor(Vector4 color)
{
- NDalicPINVOKE.Stage_SetBackgroundColor(stageCPtr, Vector4.getCPtr(color));
+ Interop.Window.SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal Vector4 GetBackgroundColor()
{
- Vector4 ret = new Vector4(NDalicPINVOKE.Stage_GetBackgroundColor(stageCPtr), true);
+ Vector4 ret = new Vector4(Interop.Window.GetBackgroundColor(swigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal Vector2 GetDpi()
{
- Vector2 ret = new Vector2(NDalicPINVOKE.Stage_GetDpi(stageCPtr), true);
+ Vector2 ret = new Vector2(Interop.Stage.Stage_GetDpi(stageCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal ObjectRegistry GetObjectRegistry()
{
- ObjectRegistry ret = new ObjectRegistry(NDalicPINVOKE.Stage_GetObjectRegistry(stageCPtr), true);
+ ObjectRegistry ret = new ObjectRegistry(Interop.Stage.Stage_GetObjectRegistry(stageCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal void SetRenderingBehavior(RenderingBehaviorType renderingBehavior)
{
- NDalicPINVOKE.Stage_SetRenderingBehavior(stageCPtr, (int)renderingBehavior);
+ Interop.Stage.Stage_SetRenderingBehavior(stageCPtr, (int)renderingBehavior);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal RenderingBehaviorType GetRenderingBehavior()
{
- RenderingBehaviorType ret = (RenderingBehaviorType)NDalicPINVOKE.Stage_GetRenderingBehavior(stageCPtr);
+ RenderingBehaviorType ret = (RenderingBehaviorType)Interop.Stage.Stage_GetRenderingBehavior(stageCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal KeyEventSignal KeyEventSignal()
{
- KeyEventSignal ret = new KeyEventSignal(NDalicPINVOKE.Stage_KeyEventSignal(stageCPtr), false);
+ KeyEventSignal ret = new KeyEventSignal(Interop.Window.KeyEventSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal VoidSignal EventProcessingFinishedSignal()
{
- VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_EventProcessingFinishedSignal(stageCPtr), false);
+ VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_EventProcessingFinishedSignal(stageCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal TouchSignal TouchSignal()
{
- TouchSignal ret = new TouchSignal(NDalicPINVOKE.Stage_TouchSignal(stageCPtr), false);
+ TouchSignal ret = new TouchSignal(Interop.Window.TouchSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal TouchDataSignal TouchDataSignal()
{
- TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(Layer.getCPtr(GetRootLayer())), false);
+ TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(Layer.getCPtr(GetRootLayer())), false);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal VoidSignal ContextLostSignal()
{
- VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextLostSignal(stageCPtr), false);
+ VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_ContextLostSignal(stageCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal VoidSignal ContextRegainedSignal()
{
- VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_ContextRegainedSignal(stageCPtr), false);
+ VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_ContextRegainedSignal(stageCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal VoidSignal SceneCreatedSignal()
{
- VoidSignal ret = new VoidSignal(NDalicPINVOKE.Stage_SceneCreatedSignal(stageCPtr), false);
+ VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_SceneCreatedSignal(stageCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal ResizedSignal ResizedSignal()
{
- ResizedSignal ret = new ResizedSignal(NDalicManualPINVOKE.Window_ResizedSignal(swigCPtr), false);
+ ResizedSignal ret = new ResizedSignal(Interop.Window.Window_ResizedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal void SetWindowSize(Size2D size)
{
var val = new Uint16Pair((uint)size.Width, (uint)size.Height);
- NDalicManualPINVOKE.SetSize(swigCPtr, Uint16Pair.getCPtr(val));
+ Interop.Window.SetSize(swigCPtr, Uint16Pair.getCPtr(val));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- if(rootLayoutItem != null)
- {
- rootLayoutItem.RequestLayout();
- }
+ // Resetting Window size should request a relayout of the tree.
}
internal Size2D GetWindowSize()
{
- var val = new Uint16Pair(NDalicManualPINVOKE.GetSize(swigCPtr), false);
+ var val = new Uint16Pair(Interop.Window.GetSize(swigCPtr), false);
Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
internal void SetPosition(Position2D position)
{
var val = new Uint16Pair((uint)position.X, (uint)position.Y);
- NDalicManualPINVOKE.SetPosition(swigCPtr, Uint16Pair.getCPtr(val));
+ Interop.Window.SetPosition(swigCPtr, Uint16Pair.getCPtr(val));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- if(rootLayoutItem != null)
- {
- rootLayoutItem.RequestLayout();
- }
+ // Setting Position of the window should request a relayout of the tree.
+
}
internal Position2D GetPosition()
{
- var val = new Uint16Pair(NDalicManualPINVOKE.GetPosition(swigCPtr), true);
+ var val = new Uint16Pair(Interop.Window.GetPosition(swigCPtr), true);
Position2D ret = new Position2D(val.GetX(), val.GetY());
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
internal void SetPositionSize(Rectangle positionSize)
{
- NDalicPINVOKE.Window_SetPositionSize(swigCPtr, Rectangle.getCPtr(positionSize));
+ Interop.Window.Window_SetPositionSize(swigCPtr, Rectangle.getCPtr(positionSize));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- if(rootLayoutItem != null)
- {
- rootLayoutItem.RequestLayout();
- }
+ // Setting Position of the window should request a relayout of the tree.
+
}
/// <summary>
/// <param name="transparent">Whether the window is transparent or not.</param>
/// <since_tizen> 5 </since_tizen>
public void SetTransparency(bool transparent) {
- NDalicManualPINVOKE.SetTransparency(swigCPtr, transparent);
+ Interop.Window.SetTransparency(swigCPtr, transparent);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- if(rootLayoutItem != null)
+ // Setting transparency of the window should request a relayout of the tree in the case the window changes from fully transparent.
+
+ }
+
+ /// <summary>
+ /// Sets parent window of the window.
+ /// After setting that, these windows do together when raise-up, lower and iconified/deiconified.
+ /// Initially, the window is located on top of the parent. The window can go below parent by calling Lower().
+ /// If parent's window stack is changed by calling Raise() or Lower(), child windows are located on top of the parent again.
+ /// </summary>
+ /// <param name="parent">The parent window.</param>
+ /// <since_tizen> 6 </since_tizen>
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetParent(Window parent) {
+ Interop.Window.SetParent(swigCPtr, Window.getCPtr(parent));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Unsets parent window of the window.
+ /// After unsetting, the window is disconnected his parent window.
+ /// </summary>
+ /// <since_tizen> 6 </since_tizen>
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void Unparent() {
+ Interop.Window.Unparent(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets parent window of the window.
+ /// </summary>
+ /// <returns>The parent window of the window.</returns>
+ /// <since_tizen> 6 </since_tizen>
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Window GetParent() {
+ Window ret = new Window(Interop.Window.GetParent(swigCPtr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Dispose for Window
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ _rootLayer.Dispose();
+ localController.Dispose();
+
+ foreach(var layer in _childLayers)
+ {
+ layer.Dispose();
+ }
+ _childLayers.Clear();
+ }
+
+ this.DisconnectNativeSignals();
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
{
- rootLayoutItem.RequestLayout();
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ Interop.Window.delete_Window(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
+
+ base.Dispose(type);
}
internal System.IntPtr GetNativeWindowHandler()
{
- System.IntPtr ret = NDalicManualPINVOKE.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr));
+ System.IntPtr ret = Interop.Window.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private StageWheelSignal WheelEventSignal()
{
- StageWheelSignal ret = new StageWheelSignal(NDalicPINVOKE.Stage_WheelEventSignal(stageCPtr), false);
+ StageWheelSignal ret = new StageWheelSignal(Interop.StageSignal.Stage_WheelEventSignal(stageCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private WheelSignal StageWheelEventSignal()
{
- WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(Layer.getCPtr(this.GetRootLayer())), false);
+ WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(Layer.getCPtr(this.GetRootLayer())), false);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
private bool OnStageWheel(IntPtr rootLayer, IntPtr wheelEvent)
{
if (wheelEvent == global::System.IntPtr.Zero)
- {
+ {
NUILog.Error("wheelEvent should not be null!");
return true;
}
/// Disconnect all native signals
/// </summary>
/// <since_tizen> 5 </since_tizen>
- internal void DisconnectNativeSignals()
+ internal void DisconnectNativeSignals()
{
if( _windowFocusChangedEventCallback != null )
{