[ElmSharp] Add internal Window auxiliary hint APIs (#1534)
authorarosis78 <jh0506.yun@samsung.com>
Mon, 13 Apr 2020 01:03:11 +0000 (10:03 +0900)
committerGitHub <noreply@github.com>
Mon, 13 Apr 2020 01:03:11 +0000 (10:03 +0900)
src/ElmSharp/ElmSharp/Window.cs
src/ElmSharp/Interop/Interop.Elementary.Win.cs

index e57f43f..ee3ab84 100644 (file)
@@ -1254,6 +1254,83 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Creates an auxiliary hint of the window.
+        /// </summary>
+        /// <remarks>
+        /// Support for this depends on the underlying windowing system. 
+        /// </remarks>
+        /// <param name="hint">The auxiliary hint string</param>
+        /// <param name="value">The value string</param>
+        /// <returns>The ID of the created auxiliary hint, otherwise -1 on failure</returns>
+        /// <since_tizen> preview </since_tizen>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public int AddAuxiliaryHint(string hint, string value)
+        {
+            return Interop.Elementary.elm_win_aux_hint_add(RealHandle, hint, value);
+        }
+
+        /// <summary>
+        /// Deletes an auxiliary hint of the window.
+        /// </summary>
+        /// <remarks>
+        /// Support for this depends on the underlying windowing system. 
+        /// </remarks>
+        /// <param name="id">The ID of the auxiliary hint</param>
+        /// <returns>If true deletes successful, otherwise false.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool DeleteAuxiliaryHint(int id)
+        {
+            return Interop.Elementary.elm_win_aux_hint_del(RealHandle, id);
+        }
+
+        /// <summary>
+        /// Changes a value of the auxiliary hint.
+        /// </summary>
+        /// <remarks>
+        /// Support for this depends on the underlying windowing system. 
+        /// </remarks>
+        /// <param name="id">The auxiliary hint ID</param>
+        /// <param name="value">The value string to be set</param>
+        /// <returns>If true changes successful, otherwise false.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool SetAuxiliaryHintValue(int id, string value)
+        {
+            return Interop.Elementary.elm_win_aux_hint_val_set(RealHandle, id, value);
+        }
+
+        /// <summary>
+        /// Gets a value of the auxiliary hint.
+        /// </summary>
+        /// <remarks>
+        /// Support for this depends on the underlying windowing system. 
+        /// </remarks>
+        /// <param name="id">The auxiliary hint ID</param>
+        /// <returns>The string value of the auxiliary hint ID</returns>
+        /// <since_tizen> preview </since_tizen>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string GetAuxiliaryHintValue(int id)
+        {
+            return Interop.Elementary.elm_win_aux_hint_val_get(RealHandle, id);
+        }
+
+        /// <summary>
+        /// Gets an ID of the auxiliary hint string.
+        /// </summary>
+        /// <remarks>
+        /// Support for this depends on the underlying windowing system. 
+        /// </remarks>
+        /// <param name="hint">The auxiliary hint string</param>
+        /// <returns>The ID of the auxiliary hint, otherwise -1 on failure</returns>
+        /// <since_tizen> preview </since_tizen>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public int GetAuxiliaryHintId(string hint)
+        {
+            return Interop.Elementary.elm_win_aux_hint_id_get(RealHandle, hint);
+        }
+
+        /// <summary>
         /// Creates a widget handle.
         /// </summary>
         /// <param name="parent">Parent EvasObject.</param>
index c209c95..9c3c999 100644 (file)
@@ -434,5 +434,25 @@ internal static partial class Interop
 
         [DllImport(Libraries.Elementary)]
         internal static extern void elm_win_illume_command_send(IntPtr obj, IntPtr param);
+
+        [DllImport(Libraries.Elementary)]
+        internal static extern int elm_win_aux_hint_add(IntPtr obj, string hint, string val);
+
+        [DllImport(Libraries.Elementary)]
+        internal static extern bool elm_win_aux_hint_del(IntPtr obj, int id);
+
+        [DllImport(Libraries.Elementary)]
+        internal static extern bool elm_win_aux_hint_val_set(IntPtr obj, int id, string val);
+
+        [DllImport(Libraries.Elementary, EntryPoint = "elm_win_aux_hint_val_get")]
+        internal static extern IntPtr _elm_win_aux_hint_val_get(IntPtr obj, int id);
+
+        internal static string elm_win_aux_hint_val_get(IntPtr obj, int id)
+        {
+            return Marshal.PtrToStringAnsi(_elm_win_aux_hint_val_get(obj, id));
+        }
+
+        [DllImport(Libraries.Elementary)]
+        internal static extern int elm_win_aux_hint_id_get(IntPtr obj, string hint);
     }
 }
\ No newline at end of file