Skip to content

Commit

Permalink
[NUI] Supports new window functions.
Browse files Browse the repository at this point in the history
Supports new window functions.
1. Supports the modal window.
2. Supports the pin to top function.
  • Loading branch information
sparrow74 authored and jaehyun0cho committed Jul 2, 2024
1 parent 25923a5 commit ad4bf32
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Tizen.NUI/src/internal/Interop/Interop.Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,20 @@ internal static partial class Window
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetFullScreen")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool GetFullScreen(global::System.Runtime.InteropServices.HandleRef window);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetModal")]
public static extern void SetModal(global::System.Runtime.InteropServices.HandleRef window, bool modal);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IsModal")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool IsModal(global::System.Runtime.InteropServices.HandleRef window);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetAlwaysOnTop")]
public static extern void SetAlwaysOnTop(global::System.Runtime.InteropServices.HandleRef window, bool alwaysTop);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IsAlwaysOnTop")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool IsAlwaysOnTop(global::System.Runtime.InteropServices.HandleRef window);
}
}
}
40 changes: 40 additions & 0 deletions src/Tizen.NUI/src/public/Window/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2514,5 +2514,45 @@ public SafeHandle NativeHandle
return new NUI.SafeNativeWindowHandle(this);
}
}

/// <summary>
/// Gets or sets a value indicating whether the window is modal or not.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool IsModal
{
get
{
bool ret = Interop.Window.IsModal(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
set
{
Interop.Window.SetModal(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}


/// <summary>
/// Gets or sets a value indicating whether the window is alwats on top of other windows or not.
/// Its behavior is effective among windows with the same notification level.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool IsAlwaysOnTop
{
get
{
bool ret = Interop.Window.IsAlwaysOnTop(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
set
{
Interop.Window.SetAlwaysOnTop(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
}
}

0 comments on commit ad4bf32

Please sign in to comment.