From: Bowon Ryu Date: Mon, 13 May 2024 06:05:19 +0000 (+0900) Subject: [NUI] Add align API to InputMethodContext X-Git-Tag: submit/tizen/20240611.104041~1^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b356077dd7d7615f067f1d1840e40ca860e0b47;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add align API to InputMethodContext Signed-off-by: Bowon Ryu --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.InputMethodContext.cs b/src/Tizen.NUI/src/internal/Interop/Interop.InputMethodContext.cs index 7b603b3..2dfba5a 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.InputMethodContext.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.InputMethodContext.cs @@ -197,6 +197,10 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_InputMethodContext_SetInputPanelPosition")] public static extern void SetInputPanelPosition(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, uint jarg3); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_InputMethodContext_SetInputPanelPositionAlign")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool SetInputPanelPositionAlign(global::System.Runtime.InteropServices.HandleRef inputMethodContext, int x, int y, int align); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_InputMethodContext_ActivatedSignal")] public static extern global::System.IntPtr ActivatedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/public/Input/InputMethodContext.cs b/src/Tizen.NUI/src/public/Input/InputMethodContext.cs index 05f825f..c188e30 100755 --- a/src/Tizen.NUI/src/public/Input/InputMethodContext.cs +++ b/src/Tizen.NUI/src/public/Input/InputMethodContext.cs @@ -377,6 +377,50 @@ namespace Tizen.NUI } /// + /// Enumeration for align of the input panel. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public enum InputPanelAlign + { + /// + /// The top-left corner. + /// + TopLeft, + /// + /// The top-center position. + /// + TopCenter, + /// + /// The top-right corner. + /// + TopRight, + /// + /// The middle-left position. + /// + MiddleLeft, + /// + /// The middle-center position. + /// + MiddleCenter, + /// + /// The middle-right position. + /// + MiddleRight, + /// + /// The bottom-left corner. + /// + BottomLeft, + /// + /// The bottom-center position. + /// + BottomCenter, + /// + /// The bottom-right corner. + /// + BottomRight + } + + /// /// Gets or sets whether the IM context allows to use the text prediction. /// /// 8 @@ -682,6 +726,26 @@ namespace Tizen.NUI } /// + /// Sets the alignment and its x,y coordinates of the input panel.
+ /// Regardless of the rotation degree, the x, y values of the top-left corner on the screen are based on 0, 0.
+ /// When the IME size is changed, its size will change according to the set alignment. + ///
+ /// + /// This API can be used to set the alignment of a floating IME. + /// + /// The x coordinate of the InputPanelAlign value. + /// The y coordinate of the InputPanelAlign value. + /// one of the InputPanelAlign values specifying the desired alignment. + /// True on success, false otherwise. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool SetInputPanelPositionAlign(int x, int y, InputMethodContext.InputPanelAlign align) + { + bool ret = Interop.InputMethodContext.SetInputPanelPositionAlign(SwigCPtr, x, y, (int)align); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// /// Sets the language of the input panel. /// /// The language to be set to the input panel