From: joogab.yun Date: Sat, 3 Jun 2023 00:53:38 +0000 (+0900) Subject: [NUI] Add moveCompleted and resizeCompleted api on BorderWindow X-Git-Tag: submit/tizen/20230608.083840~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be98cd8a94f2dba5021afb6142cf6cf3aa5075f3;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add moveCompleted and resizeCompleted api on BorderWindow --- diff --git a/src/Tizen.NUI/src/public/Window/BorderWindow.cs b/src/Tizen.NUI/src/public/Window/BorderWindow.cs index 3b0cc1b23..64477db96 100755 --- a/src/Tizen.NUI/src/public/Window/BorderWindow.cs +++ b/src/Tizen.NUI/src/public/Window/BorderWindow.cs @@ -186,14 +186,14 @@ namespace Tizen.NUI SetMimimumSize(mimimumSize); minSize = borderInterface.MinSize; } - + if (maxSize != borderInterface.MaxSize || (borderInterface.MaxSize != null && isNeedResizeByLine == true)) { using Size2D maximumSize = new Size2D((borderInterface.MaxSize?.Width + (int)borderLineThickness * 2 ?? 0), (borderInterface.MaxSize?.Height ?? 0) + (int)(borderHeight + borderLineThickness * 2)); SetMaximumSize(maximumSize); maxSize = borderInterface.MaxSize; } - + if (borderResizePolicy != borderInterface.ResizePolicy) { AddAuxiliaryHint("wm.policy.win.resize_aspect_ratio", "0"); @@ -203,7 +203,7 @@ namespace Tizen.NUI AddAuxiliaryHint("wm.policy.win.resize_aspect_ratio", "1"); } } - + } } /// @@ -269,6 +269,10 @@ namespace Tizen.NUI Moved += OnBorderWindowMoved; + MoveCompleted += OnBorderWindowMoveCompleted; + + ResizeCompleted += OnBorderWindowResizeCompleted; + borderInterface.OnCreated(borderView); // Increase the window size as much as the border area. @@ -533,7 +537,19 @@ namespace Tizen.NUI private void OnBorderWindowMoved(object sender, WindowMovedEventArgs e) { Tizen.Log.Info("NUI", $"OnBorderWindowMoved {e.WindowPosition.X}, {e.WindowPosition.Y}\n"); - borderInterface.OnMoved(e.WindowPosition.X, e.WindowPosition.X); + borderInterface.OnMoved(e.WindowPosition.X, e.WindowPosition.Y); + } + + private void OnBorderWindowMoveCompleted(object sender, WindowMoveCompletedEventArgs e) + { + Tizen.Log.Info("NUI", $"OnBorderWindowMoveCompleted {e.WindowCompletedPosition.X}, {e.WindowCompletedPosition.Y}\n"); + borderInterface.OnMoveCompleted(e.WindowCompletedPosition.X, e.WindowCompletedPosition.Y); + } + + private void OnBorderWindowResizeCompleted(object sender, WindowResizeCompletedEventArgs e) + { + Tizen.Log.Info("NUI", $"OnBorderWindowResizeCompleted {e.WindowCompletedSize.Width}, {e.WindowCompletedSize.Height}\n"); + borderInterface.OnResizeCompleted(e.WindowCompletedSize.Width, e.WindowCompletedSize.Height); } diff --git a/src/Tizen.NUI/src/public/Window/DefaultBorder.cs b/src/Tizen.NUI/src/public/Window/DefaultBorder.cs index f185a225e..af8841bf3 100755 --- a/src/Tizen.NUI/src/public/Window/DefaultBorder.cs +++ b/src/Tizen.NUI/src/public/Window/DefaultBorder.cs @@ -159,13 +159,13 @@ namespace Tizen.NUI var instance = (DefaultBorder)bindable; return instance.resizePolicy; }); - + /// /// The thickness of the border. /// [EditorBrowsable(EditorBrowsableState.Never)] - public uint BorderLineThickness + public uint BorderLineThickness { get { @@ -799,6 +799,22 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public virtual void OnMoved(int x, int y) {} + /// + /// Called when window has been moved the display server. + /// + /// The x of the has been moved window + /// The y of the has been moved window + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual void OnMoveCompleted(int x, int y) {} + + /// + /// Called when window has been resized the display server. + /// + /// The width of the resized window + /// The height of the resized window + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual void OnResizeCompleted(int width, int height) {} + /// /// Called when the window is maximized. /// diff --git a/src/Tizen.NUI/src/public/Window/IBorderInterface.cs b/src/Tizen.NUI/src/public/Window/IBorderInterface.cs index 95fa46b32..bee48fa04 100755 --- a/src/Tizen.NUI/src/public/Window/IBorderInterface.cs +++ b/src/Tizen.NUI/src/public/Window/IBorderInterface.cs @@ -124,6 +124,22 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public void OnMoved(int x, int y); + /// + /// Called when window has been moved the display server. + /// + /// The x of the has been moved window + /// The y of the has been moved window + [EditorBrowsable(EditorBrowsableState.Never)] + public void OnMoveCompleted(int x, int y); + + /// + /// Called when window has been resized the display server. + /// + /// The width of the resized window + /// The height of the resized window + [EditorBrowsable(EditorBrowsableState.Never)] + public void OnResizeCompleted(int width, int height); + /// /// Called when the window is maximized. ///