//to fix memory leak issue, match the handle count with native side.
Window ret = view.GetInstanceSafely<Window>(Interop.Window.Get(View.getCPtr(view)));
- if (NDalicPINVOKE.SWIGPendingException.Pending)throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <summary>
/// Enumeration for transition effect's state.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectState instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectState instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
// This is already deprecated, so suppress warning here.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "<Pending>")]
/// <summary>
/// None state.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectState.None instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectState.None instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
None = 0,
/// <summary>
/// Transition effect is started.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectState.Start instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectState.Start instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
Start,
/// <summary>
/// Transition effect is ended.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectState.End instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectState.End instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
End,
}
/// <summary>
/// Enumeration for transition effect's type.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectType instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectType instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
// This is already deprecated, so suppress warning here.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "<Pending>")]
/// <summary>
/// None type.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectType.None instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectType.None instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
None = 0,
/// <summary>
/// Window show effect.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectType.Show instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectType.Show instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
Show,
/// <summary>
/// Window hide effect.
/// </summary>
- [Obsolete("Please do not use! This will be removed. Please use Window.EffectType.Hide instead!")]
+ [Obsolete("Do not use this, that will be removed. Use Window.EffectType.Hide instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
Hide,
}
{
Position2D position = GetPosition();
Size2D size = GetSize();
- Rectangle ret = new Rectangle(position.X, position.Y, size.Width, size.Height);
+ Rectangle ret = new Rectangle(position?.X ?? 0, position?.Y ?? 0, size?.Width ?? 0, size?.Height ?? 0);
position.Dispose();
return ret;
}
/// </summary>
/// <param name="keyEvent">The key event to feed.</param>
/// <since_tizen> 4 </since_tizen>
- [Obsolete("Please do not use! This will be deprecated! Please use FeedKey(Key keyEvent) instead!")]
+ [Obsolete("Do not use this, that will be deprecated. Use FeedKey(Key keyEvent) instead.")]
public static void FeedKeyEvent(Key keyEvent)
{
Interop.Window.FeedKeyEvent(Key.getCPtr(keyEvent));
/// <since_tizen> 3 </since_tizen>
public void Add(View view)
{
- Interop.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
- if (null != view)
- {
- view.InternalParent = this.GetRootLayer();
-
- this.GetRootLayer().LayoutCount += view.LayoutCount;
- }
+ this.GetRootLayer().Add(view);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public void Remove(View view)
{
- Interop.Actor.Remove(Layer.getCPtr(GetRootLayer()), View.getCPtr(view));
- this.GetRootLayer().RemoveViewFromLayerList(view); // Maintain the children list in the Layer
- if (null != view)
- {
- view.InternalParent = null;
-
- this.GetRootLayer().LayoutCount -= view.LayoutCount;
- }
+ this.GetRootLayer().Remove(view);
}
/// <summary>
{
if (isBorderWindow)
{
- if(borderLayer == null)
+ if (borderLayer == null)
{
borderLayer = GetBorderWindowRootLayer();
LayersChildren?.Add(borderLayer);
{
throw new ArgumentNullException(nameof(position));
}
- var val = new Uint16Pair((uint)position.X, (uint)position.Y);
- Interop.Window.SetPosition(SwigCPtr, Uint16Pair.getCPtr(val));
+ var val = new Int32Pair(position.X, position.Y);
+ Interop.Window.SetPosition(SwigCPtr, Int32Pair.getCPtr(val));
val.Dispose();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
// Setting Position of the window should request a relayout of the tree.
internal Position2D GetPosition()
{
- var val = new Uint16Pair(Interop.Window.GetPosition(SwigCPtr), true);
- Position2D ret = new Position2D(val.GetX(), val.GetY());
+ var val = new Int32Pair(Interop.Window.GetPosition(SwigCPtr), true);
+ Position2D ret = new Position2D((int)val.GetX(), (int)val.GetY());
val.Dispose();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
positionSize.Height = val.GetY();
Interop.Window.SetPositionSize(SwigCPtr, Rectangle.getCPtr(positionSize));
+ val.Dispose();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
+ /// Sets window's maximum size.
+ ///
+ /// It is to set the maximized size when window is maximized or the window's size is increased by RequestResizeToServer().
+ /// Although the size is set by this function, window's size can be increased over the limitation by SetPositionSize() or SetSize().
+ ///
+ /// After setting, if Maximize() is called, window is resized with the setting size and move the center.
+ ///
+ /// </summary>
+ /// <param name="size">the maximum size.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetMaximumSize(Size2D size)
+ {
+ if (null == size)
+ {
+ throw new ArgumentNullException(nameof(size));
+ }
+ var val = new Uint16Pair((uint)size.Width, (uint)size.Height);
+
+ Interop.Window.SetMaximumSize(SwigCPtr, Uint16Pair.getCPtr(val));
+ val.Dispose();
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Minimizes window's size.
/// If this function is called with true, window will be iconified.
/// Otherwise window will be activated.
}
/// <summary>
+ /// Sets window's minimum size.
+ /// It is to set the minimum size when window's size is decreased by RequestResizeToServer().
+ /// Although the size is set by this function, window's size can be decreased over the limitation by SetPositionSize() or SetSize().
+ /// </summary>
+ /// <param name="size">the minimum size.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetMimimumSize(Size2D size)
+ {
+ if (null == size)
+ {
+ throw new ArgumentNullException(nameof(size));
+ }
+ var val = new Uint16Pair((uint)size.Width, (uint)size.Height);
+
+ Interop.Window.SetMimimumSize(SwigCPtr, Uint16Pair.getCPtr(val));
+ val.Dispose();
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Query whether window is rotating or not.
+ /// </summary>
+ /// <returns>True if window is rotating, false otherwise.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsWindowRotating()
+ {
+ bool ret = Interop.Window.IsWindowRotating(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Gets the last key event the window gets.
+ /// </summary>
+ /// <returns>The last key event the window gets.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Key GetLastKeyEvent()
+ {
+ Key ret = new Key(Interop.Window.GetLastKeyEvent(SwigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Gets the last touch event the window gets.
+ /// </summary>
+ /// <returns>The last touch event the window gets.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Touch GetLastTouchEvent()
+ {
+ Touch ret = new Touch(Interop.Window.GetLastTouchEvent(SwigCPtr), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
/// Add FrameUpdateCallback
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
{
return;
}
+
+ this.DisconnectNativeSignals();
if (type == DisposeTypes.Explicit)
{
localController?.Dispose();
}
- this.DisconnectNativeSignals();
base.Dispose(type);
}