[NUI] Add moveCompleted and resizeCompleted api on BorderWindow
authorjoogab.yun <joogab.yun@samsung.com>
Sat, 3 Jun 2023 00:53:38 +0000 (09:53 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Thu, 8 Jun 2023 08:33:00 +0000 (17:33 +0900)
src/Tizen.NUI/src/public/Window/BorderWindow.cs
src/Tizen.NUI/src/public/Window/DefaultBorder.cs
src/Tizen.NUI/src/public/Window/IBorderInterface.cs

index 3b0cc1b..64477db 100755 (executable)
@@ -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");
                     }
                 }
-                
+
             }
         }
         /// <summary>
@@ -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);
         }
 
 
index f185a22..af8841b 100755 (executable)
@@ -159,13 +159,13 @@ namespace Tizen.NUI
             var instance = (DefaultBorder)bindable;
             return instance.resizePolicy;
         });
-        
+
 
         /// <summary>
         /// The thickness of the border.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public uint BorderLineThickness 
+        public uint BorderLineThickness
         {
             get
             {
@@ -800,6 +800,22 @@ namespace Tizen.NUI
         public virtual void OnMoved(int x, int y) {}
 
         /// <summary>
+        /// Called when window has been moved the display server.
+        /// </summary>
+        /// <param name="x">The x of the has been moved window</param>
+        /// <param name="y">The y of the has been moved window</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public virtual void OnMoveCompleted(int x, int y) {}
+
+        /// <summary>
+        /// Called when window has been resized the display server.
+        /// </summary>
+        /// <param name="width">The width of the resized window</param>
+        /// <param name="height">The height of the resized window</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public virtual void OnResizeCompleted(int width, int height) {}
+
+        /// <summary>
         /// Called when the window is maximized.
         /// </summary>
         /// <param name="isMaximized">If window is maximized or unmaximized.</param>
index 95fa46b..bee48fa 100755 (executable)
@@ -125,6 +125,22 @@ namespace Tizen.NUI
         public void OnMoved(int x, int y);
 
         /// <summary>
+        /// Called when window has been moved the display server.
+        /// </summary>
+        /// <param name="x">The x of the has been moved window</param>
+        /// <param name="y">The y of the has been moved window</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void OnMoveCompleted(int x, int y);
+
+        /// <summary>
+        /// Called when window has been resized the display server.
+        /// </summary>
+        /// <param name="width">The width of the resized window</param>
+        /// <param name="height">The height of the resized window</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void OnResizeCompleted(int width, int height);
+
+        /// <summary>
         /// Called when the window is maximized.
         /// </summary>
         /// <param name="isMaximized">If window is maximized or unmaximized.</param>