Add window move/resize completed signal
authorWonsik Jung <sidein@samsung.com>
Mon, 22 May 2023 00:56:55 +0000 (09:56 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Thu, 8 Jun 2023 08:33:00 +0000 (17:33 +0900)
When RequestMoveToServer() or RequestResizeToServer() is called, window start to be moved or resized by display server.
After the action is finished, server send the completed event.
This patch is to received the events.

src/Tizen.NUI/src/internal/Interop/Interop.WindowMoveCompletedSignal.cs [new file with mode: 0644]
src/Tizen.NUI/src/internal/Interop/Interop.WindowResizeCompletedSignal.cs [new file with mode: 0644]
src/Tizen.NUI/src/internal/Window/WindowMoveCompletedSignal.cs [new file with mode: 0644]
src/Tizen.NUI/src/internal/Window/WindowResizeCompletedSignal.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/Window/WindowEvent.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/BorderWindowTest.cs

diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WindowMoveCompletedSignal.cs b/src/Tizen.NUI/src/internal/Interop/Interop.WindowMoveCompletedSignal.cs
new file mode 100644 (file)
index 0000000..24a97d4
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright(c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+    internal static partial class Interop
+    {
+        internal static partial class WindowMoveCompletedSignal
+        {
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Move_Completed_Signal")]
+            public static extern global::System.IntPtr GetSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Move_Completed_Signal_Empty")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+            public static extern bool Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Move_Completed_Signal_GetConnectionCount")]
+            public static extern uint GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Move_Completed_Signal_Connect")]
+            public static extern void Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Move_Completed_Signal_Disconnect")]
+            public static extern void Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Move_Completed_Signal_Emit")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+            public static extern bool Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Move_Completed_Signal")]
+            public static extern global::System.IntPtr NewSignal();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Move_Completed_Signal")]
+            public static extern void DeleteSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WindowResizeCompletedSignal.cs b/src/Tizen.NUI/src/internal/Interop/Interop.WindowResizeCompletedSignal.cs
new file mode 100644 (file)
index 0000000..674ec24
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright(c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+    internal static partial class Interop
+    {
+        internal static partial class WindowResizeCompletedSignal
+        {
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Resize_Completed_Signal")]
+            public static extern global::System.IntPtr GetSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Resize_Completed_Signal_Empty")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+            public static extern bool Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Resize_Completed_Signal_GetConnectionCount")]
+            public static extern uint GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Resize_Completed_Signal_Connect")]
+            public static extern void Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Resize_Completed_Signal_Disconnect")]
+            public static extern void Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Resize_Completed_Signal_Emit")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+            public static extern bool Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Resize_Completed_Signal")]
+            public static extern global::System.IntPtr NewSignal();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Resize_Completed_Signal")]
+            public static extern void DeleteSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/Window/WindowMoveCompletedSignal.cs b/src/Tizen.NUI/src/internal/Window/WindowMoveCompletedSignal.cs
new file mode 100644 (file)
index 0000000..80ce791
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright(c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+    internal class WindowMoveCompletedSignal : Disposable
+    {
+        internal WindowMoveCompletedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+        {
+        }
+
+        protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+        {
+            Interop.WindowMoveCompletedSignal.DeleteSignal(swigCPtr);
+        }
+
+        public bool Empty()
+        {
+            bool ret = Interop.WindowMoveCompletedSignal.Empty(SwigCPtr);
+
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public uint GetConnectionCount()
+        {
+            uint ret = Interop.WindowMoveCompletedSignal.GetConnectionCount(SwigCPtr);
+
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public void Connect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+            {
+                Interop.WindowMoveCompletedSignal.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public void Disconnect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+            {
+                Interop.WindowMoveCompletedSignal.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public bool Emit(Window window, Position2D position)
+        {
+            bool ret = Interop.WindowMoveCompletedSignal.Emit(SwigCPtr, Window.getCPtr(window), Position2D.getCPtr(position));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public WindowMoveCompletedSignal(Window window) : this(Interop.WindowMoveCompletedSignal.GetSignal(Window.getCPtr(window)), false)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/Window/WindowResizeCompletedSignal.cs b/src/Tizen.NUI/src/internal/Window/WindowResizeCompletedSignal.cs
new file mode 100644 (file)
index 0000000..6441f93
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright(c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+    internal class WindowResizeCompletedSignal : Disposable
+    {
+        internal WindowResizeCompletedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+        {
+        }
+
+        protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+        {
+            Interop.WindowResizeCompletedSignal.DeleteSignal(swigCPtr);
+        }
+
+        public bool Empty()
+        {
+            bool ret = Interop.WindowResizeCompletedSignal.Empty(SwigCPtr);
+
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public uint GetConnectionCount()
+        {
+            uint ret = Interop.WindowResizeCompletedSignal.GetConnectionCount(SwigCPtr);
+
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public void Connect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+            {
+                Interop.WindowResizeCompletedSignal.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public void Disconnect(System.Delegate func)
+        {
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+            {
+                Interop.WindowResizeCompletedSignal.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public bool Emit(Window window, Size2D size)
+        {
+            bool ret = Interop.WindowResizeCompletedSignal.Emit(SwigCPtr, Window.getCPtr(window), Size2D.getCPtr(size));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public WindowResizeCompletedSignal(Window window) : this(Interop.WindowResizeCompletedSignal.GetSignal(Window.getCPtr(window)), false)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+    }
+}
index 1578cf8..dceaf19 100755 (executable)
@@ -51,6 +51,8 @@ namespace Tizen.NUI
         private KeyboardRepeatSettingsChangedEventCallbackType keyboardRepeatSettingsChangedEventCallback;
         private AuxiliaryMessageEventCallbackType auxiliaryMessageEventCallback;
         private WindowMouseInOutEventCallbackType windowMouseInOutEventCallback;
+        private MoveCompletedEventCallbackType moveCompletedEventCallback;
+        private ResizeCompletedEventCallbackType resizeCompletedEventCallback;
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         private delegate void WindowFocusChangedEventCallbackType(IntPtr window, bool focusGained);
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
@@ -75,6 +77,11 @@ namespace Tizen.NUI
         private delegate bool InterceptKeyEventDelegateType(IntPtr arg1);
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         private delegate void WindowMouseInOutEventCallbackType(IntPtr window, IntPtr mouseEvent);
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void MoveCompletedEventCallbackType(IntPtr window, IntPtr position);
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void ResizeCompletedEventCallbackType(IntPtr window, IntPtr size);
+
 
         /// <summary>
         /// FocusChanged event.
@@ -268,7 +275,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Emits the event when the window resized.
+        /// Emits the event when window is resized by user or the display server.<br />
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public event EventHandler<ResizedEventArgs> Resized
@@ -360,7 +367,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// MovedEvent
+        /// Emits the event when window is moved by user or the display server.<br />
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public event EventHandler<WindowMovedEventArgs> Moved
@@ -472,6 +479,66 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Emits the event when window has been moved by the display server.<br />
+        /// To make the window move by display server, RequestMoveToServer() should be called.<br />
+        /// After the moving job is completed, this signal will be emitted.<br />
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler<WindowMoveCompletedEventArgs> MoveCompleted
+        {
+            add
+            {
+                if (moveCompletedHandler == null)
+                {
+                    moveCompletedEventCallback = OnMoveCompleted;
+                    using WindowMoveCompletedSignal signal = new WindowMoveCompletedSignal(Interop.WindowMoveCompletedSignal.GetSignal(SwigCPtr), false);
+                    signal.Ensure()?.Connect(moveCompletedEventCallback);
+                }
+                moveCompletedHandler += value;
+            }
+            remove
+            {
+                moveCompletedHandler -= value;
+                if (moveCompletedHandler == null && moveCompletedEventCallback != null)
+                {
+                    using WindowMoveCompletedSignal signal = new WindowMoveCompletedSignal(Interop.WindowMoveCompletedSignal.GetSignal(SwigCPtr), false);
+                    signal.Ensure()?.Disconnect(moveCompletedEventCallback);
+                    moveCompletedEventCallback = null;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Emits the event when window has been resized by the display server.<br />
+        /// To make the window resize by display server, RequestResizeToServer() should be called.<br />
+        /// After the resizing job is completed, this signal will be emitted.<br />
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler<WindowResizeCompletedEventArgs> ResizeCompleted
+        {
+            add
+            {
+                if (resizeCompletedHandler == null)
+                {
+                    resizeCompletedEventCallback = OnResizeCompleted;
+                    using WindowResizeCompletedSignal signal = new WindowResizeCompletedSignal(Interop.WindowResizeCompletedSignal.GetSignal(SwigCPtr), false);
+                    signal.Ensure()?.Connect(resizeCompletedEventCallback);
+                }
+                resizeCompletedHandler += value;
+            }
+            remove
+            {
+                resizeCompletedHandler -= value;
+                if (resizeCompletedHandler == null && resizeCompletedEventCallback != null)
+                {
+                    using WindowResizeCompletedSignal signal = new WindowResizeCompletedSignal(Interop.WindowResizeCompletedSignal.GetSignal(SwigCPtr), false);
+                    signal.Ensure()?.Disconnect(resizeCompletedEventCallback);
+                    resizeCompletedEventCallback = null;
+                }
+            }
+        }
+
         private event EventHandler<FocusChangedEventArgs> windowFocusChangedEventHandler;
         private event EventHandler<TouchEventArgs> rootLayerTouchDataEventHandler;
         private ReturnTypeEventHandler<object, TouchEventArgs, bool> rootLayerInterceptTouchDataEventHandler;
@@ -487,6 +554,8 @@ namespace Tizen.NUI
         private event EventHandler keyboardRepeatSettingsChangedHandler;
         private event EventHandler<AuxiliaryMessageEventArgs> auxiliaryMessageEventHandler;
         private event EventHandler<MouseInOutEventArgs> windowMouseInOutEventHandler;
+        private event EventHandler<WindowMoveCompletedEventArgs> moveCompletedHandler;
+        private event EventHandler<WindowResizeCompletedEventArgs> resizeCompletedHandler;
 
 
         internal event EventHandler EventProcessingFinished
@@ -744,6 +813,19 @@ namespace Tizen.NUI
                 windowMouseInOutEventCallback = null;
             }
 
+            if (moveCompletedEventCallback != null)
+            {
+                using WindowMoveCompletedSignal signal = new WindowMoveCompletedSignal(Interop.WindowMoveCompletedSignal.GetSignal(GetBaseHandleCPtrHandleRef), false);
+                signal?.Disconnect(moveCompletedEventCallback);
+                moveCompletedEventCallback = null;
+            }
+
+            if (resizeCompletedEventCallback != null)
+            {
+                using WindowResizeCompletedSignal signal = new WindowResizeCompletedSignal(Interop.WindowResizeCompletedSignal.GetSignal(GetBaseHandleCPtrHandleRef), false);
+                signal?.Disconnect(resizeCompletedEventCallback);
+                resizeCompletedEventCallback = null;
+            }
         }
 
         private void OnWindowFocusedChanged(IntPtr window, bool focusGained)
@@ -974,6 +1056,36 @@ namespace Tizen.NUI
             }
         }
 
+        private void OnMoveCompleted(IntPtr window, IntPtr position)
+        {
+            if (window == global::System.IntPtr.Zero)
+            {
+                return;
+            }
+
+            if (moveCompletedHandler != null)
+            {
+                WindowMoveCompletedEventArgs e = new WindowMoveCompletedEventArgs(this.WindowPosition);
+                moveCompletedHandler(this, e);
+            }
+            return;
+        }
+
+        private void OnResizeCompleted(IntPtr window, IntPtr size)
+        {
+            if (window == global::System.IntPtr.Zero)
+            {
+                return;
+            }
+
+            if (resizeCompletedHandler != null)
+            {
+                WindowResizeCompletedEventArgs e = new WindowResizeCompletedEventArgs(this.WindowSize);
+                resizeCompletedHandler(this, e);
+            }
+            return;
+        }
+
         /// <summary>
         /// The focus changed event argument.
         /// </summary>
@@ -1453,7 +1565,7 @@ namespace Tizen.NUI
     }
 
     /// <summary>
-    /// MovedArgs
+    /// Move event is sent when window is resized by user or the display server.
     /// </summary>
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class WindowMovedEventArgs : EventArgs
@@ -1495,4 +1607,43 @@ namespace Tizen.NUI
             }
         }
     }
+
+    /// <summary>
+    /// Move Completed event is sent when window has been moved the display server.
+    /// It is triggered by calling RequestMoveToServer().
+    /// </summary>
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class WindowMoveCompletedEventArgs : EventArgs
+    {
+        public WindowMoveCompletedEventArgs(Position2D completedPosition)
+        {
+            WindowCompletedPosition = completedPosition;
+        }
+
+        public Position2D WindowCompletedPosition
+        {
+            get;
+            private set;
+        }
+    }
+
+    /// <summary>
+    /// Resize Completed event is sent when window has been resized the display server.
+    /// It is triggered by calling RequestResizeToServer().
+    /// </summary>
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class WindowResizeCompletedEventArgs : EventArgs
+    {
+        public WindowResizeCompletedEventArgs(Size2D completedSize)
+        {
+            WindowCompletedSize = completedSize;
+        }
+
+        public Size2D WindowCompletedSize
+        {
+            get;
+            private set;
+        }
+    }
+
 }
index d18da84..f3f586d 100755 (executable)
@@ -328,6 +328,18 @@ namespace Tizen.NUI.Samples
         log.Fatal(tag, $"OnWindowMoved() called!, x:{position.X}, y:{position.Y}");
     }
 
+    private void OnWindowMoveCompleted(object sender, WindowMoveCompletedEventArgs e)
+    {
+        Position2D position = e.WindowCompletedPosition;
+        log.Fatal(tag, $"OnWindowMoveCompleted() called!, x:{position.X}, y:{position.Y}");
+    }
+
+    private void OnWindowResizeCompleted(object sender, WindowResizeCompletedEventArgs e)
+    {
+        Size2D size = e.WindowCompletedSize;
+        log.Fatal(tag, $"OnWindowResizeCompleted() called!, width:{size.Width}, height:{size.Height}");
+    }
+
     void CreateSubWindowOne()
     {
       if (subWindowOne == null)
@@ -360,6 +372,8 @@ namespace Tizen.NUI.Samples
 
         subWindowOne.KeyEvent += OnKeyEvent;
         subWindowOne.Moved += OnWindowMoved;
+        subWindowOne.MoveCompleted += OnWindowMoveCompleted;
+        subWindowOne.ResizeCompleted += OnWindowResizeCompleted;
       }
       else
       {
@@ -373,6 +387,18 @@ namespace Tizen.NUI.Samples
         log.Fatal(tag, $"OnWindowMoved2() called!, x:{position.X}, y:{position.Y}");
     }
 
+    private void OnWindowMoveCompleted2(object sender, WindowMoveCompletedEventArgs e)
+    {
+        Position2D position = e.WindowCompletedPosition;
+        log.Fatal(tag, $"OnWindowMoveCompleted2() called!, x:{position.X}, y:{position.Y}");
+    }
+
+    private void OnWindowResizeCompleted2(object sender, WindowResizeCompletedEventArgs e)
+    {
+        Size2D size = e.WindowCompletedSize;
+        log.Fatal(tag, $"OnWindowResizeCompleted2() called!, width:{size.Width}, height:{size.Height}");
+    }
+
     void CreateSubWindowTwo()
     {
       if (subWindowTwo == null)
@@ -411,6 +437,8 @@ namespace Tizen.NUI.Samples
         subWindowTwo.Add(root);
 
         subWindowTwo.Moved += OnWindowMoved2;
+        subWindowTwo.MoveCompleted += OnWindowMoveCompleted2;
+        subWindowTwo.ResizeCompleted += OnWindowResizeCompleted2;
       }
       else
       {