[DllImport(Libraries.InputMethod, EntryPoint = "ime_device_info_get_subclass")]
internal static extern ErrorCode ImeDeviceInfoGetSubclass(IntPtr dev_info, out DeviceSubclass devSubClass);
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_floating_mode")]
+ internal static extern ErrorCode ImeSetFloatingMode(bool floating_mode);
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_floating_drag_start")]
+ internal static extern ErrorCode ImeSetFloatingDragStart();
+
+ [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_floating_drag_end")]
+ internal static extern ErrorCode ImeSetFloatingDragEnd();
+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void ImeCreateCb(IntPtr userData);
throw InputMethodExceptionFactory.CreateException(error);
}
}
+
+ /// <summary>
+ /// Sets the floating mode or not.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <param name="floating_mode">The floating mode On/Off.</param>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function.
+ /// 2) The IME main loop isn't started yet.
+ /// </exception>
+ /// <since_tizen> 5 </since_tizen>
+ public static void SetFloatingMode(bool floating_mode)
+ {
+ ErrorCode error = ImeSetFloatingMode(floating_mode);
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "SetFloatingMode Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Allows the floating input panel window to move along with the mouse pointer when the mouse is pressed.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <remarks>
+ /// This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect.
+ /// </remarks>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function.
+ /// 2) The IME main loop isn't started yet.
+ /// </exception>
+ /// <since_tizen> 5 </since_tizen>
+ public static void SetFloatingDragStart()
+ {
+ ErrorCode error = ImeSetFloatingDragStart();
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "SetFloatingDragStart Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
+
+ /// <summary>
+ /// Disallows the movement of the floating input panel window with the mouse pointer when the mouse is pressed.
+ /// </summary>
+ /// <privilege>
+ /// http://tizen.org/privilege/ime
+ /// </privilege>
+ /// <remarks>
+ /// This function can be used in floating mode. If the floating mode is deactivated, calling this function has no effect.
+ /// </remarks>
+ /// <exception cref="InvalidOperationException">
+ /// This can occur due to the following reasons:
+ /// 1) The application does not have the privilege to call this function.
+ /// 2) The IME main loop isn't started yet.
+ /// </exception>
+ /// <since_tizen> 5 </since_tizen>
+ public static void SetFloatingDragEnd()
+ {
+ ErrorCode error = ImeSetFloatingDragEnd();
+ if (error != ErrorCode.None)
+ {
+ Log.Error(LogTag, "SetFloatingDragEnd Failed with error " + error);
+ throw InputMethodExceptionFactory.CreateException(error);
+ }
+ }
}
}