示例#1
0
        /// <summary>
        /// Requests to open the IME selector menu.
        /// This API provides the IME selector menu for the IME or other application developers who might want to change the default IME.
        /// </summary>
        /// <privilege>
        /// http://tizen.org/privilege/imemanager
        /// </privilege>
        /// <exception cref="T:System.InvalidOperationException">
        /// This exception can occur if:
        /// 1) The application does not have the privilege to call this function.
        /// 2) Operation failed.
        /// </exception>
        /// <since_tizen> 3 </since_tizen>
        public static void ShowIMESelector()
        {
            ErrorCode error = ImeManagerShowImeSelector();

            if (error != ErrorCode.None)
            {
                Log.Error(LogTag, "ShowIMESelector Failed with error " + error);
                throw InputMethodManagerExceptionFactory.CreateException(error);
            }
        }
示例#2
0
        /// <summary>
        /// Requests to pre-launch the IME.
        /// The developers can use this function to launch IME in On-demand mode.
        /// </summary>
        /// <privilege>
        /// http://tizen.org/privilege/imemanager
        /// </privilege>
        /// <exception cref="InvalidOperationException">
        /// This exception can occur if:
        /// 1) The application does not have the privilege to call this function.
        /// 2) Operation failed.
        /// </exception>
        /// <since_tizen> 5 </since_tizen>
        public static void PrelaunchIME()
        {
            ErrorCode error = ImeManagerPrelaunchIme();

            if (error != ErrorCode.None)
            {
                Log.Error(LogTag, "PrelaunchIME Failed with error " + error);
                throw InputMethodManagerExceptionFactory.CreateException(error);
            }
        }
示例#3
0
        /// <summary>
        /// Checks if the specific IME is enabled or disabled in the system keyboard setting.
        /// The IME developers can use this property to check if their IME is enabled or not.
        /// </summary>
        /// <privilege>
        /// http://tizen.org/privilege/imemanager
        /// </privilege>
        /// <param name="appId">The application ID of the IME.</param>
        /// <returns>The On (enabled) and Off (disabled) state of the IME.</returns>
        /// <exception cref="T:System.ArgumentException">
        /// This exception can occur if an invalid parameter is provided.
        /// </exception>
        /// <exception cref="T:System.InvalidOperationException">
        /// This exception can occur if:
        /// 1) The application does not have the privilege to call this function.
        /// 2) Operation failed.
        /// </exception>
        /// <since_tizen> 3 </since_tizen>
        public static bool IsIMEEnabled(string appId)
        {
            bool      isIMEEnabled;
            ErrorCode error = ImeManagerIsImeEnabled(appId, out isIMEEnabled);

            if (error != ErrorCode.None)
            {
                Log.Error(LogTag, "IsIMEEnabled Failed with error " + error);
                throw InputMethodManagerExceptionFactory.CreateException(error);
            }

            return(isIMEEnabled);
        }
示例#4
0
        /// <summary>
        /// Gets the number of IMEs that are enabled (usable).
        /// </summary>
        /// <privilege>
        /// http://tizen.org/privilege/imemanager
        /// </privilege>
        /// <returns>
        /// The number of enabled IMEs.
        /// </returns>
        /// <exception cref="T:System.InvalidOperationException">
        /// This exception can occur if:
        /// 1) The application does not have the privilege to call this function.
        /// 2) Operation failed.
        /// </exception>
        /// <since_tizen> 3 </since_tizen>
        public static int GetEnabledIMECount()
        {
            int       activeIME = ImeManagerGetEnabledImeCount();
            ErrorCode error     = (ErrorCode)Tizen.Internals.Errors.ErrorFacts.GetLastResult();

            if (error != ErrorCode.None)
            {
                Log.Error(LogTag, "GetEnabledIMECount Failed with error " + error);
                throw InputMethodManagerExceptionFactory.CreateException(error);
            }

            return(activeIME);
        }
示例#5
0
        /// <summary>
        /// Checks which IME is the current activated (selected) IME.
        /// </summary>
        /// <privilege>
        /// http://tizen.org/privilege/imemanager
        /// </privilege>
        /// <returns>
        /// The current activated (selected) IME.
        /// </returns>
        /// <exception cref="T:System.InvalidOperationException">
        /// This exception can occur if:
        /// 1) The application does not have the privilege to call this function.
        /// 2) Operation failed.
        /// </exception>
        /// <since_tizen> 3 </since_tizen>
        public static string GetActiveIME()
        {
            string    activeIME;
            ErrorCode error = ImeManagerGetActiveIme(out activeIME);

            if (error != ErrorCode.None)
            {
                Log.Error(LogTag, "GetActiveIME Failed with error " + error);
                throw InputMethodManagerExceptionFactory.CreateException(error);
            }

            return(activeIME);
        }