extern "C" {
#endif
+typedef struct _ime_context *ime_context_h;
+
/**
* @brief Called when an caps mode is changed.
*
EXPORT_API int ime_event_set_lookup_table_changed_cb(ime_lookup_table_changed_cb callback_func, void *user_data);
/**
+ * @brief Gets the caps mode information from the given input context.
+ *
+ * @details Each edit field has various attributes for input panel. This function can be
+ * called to get the caps mode information in ime_show_cb() callback function.
+ *
+ * @since_tizen 3.0
+ *
+ * @privilege %http://tizen.org/privilege/ime
+ *
+ * @param[in] context The input context information of an associated text input UI control
+ * @param[out] caps_mode Caps mode information \n @c true to turn on shift mode
+ * text feature if available, @c false to disable the predictive text feature
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #IME_ERROR_NONE No error
+ * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
+ * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @post Input panel UI should be drawn or operated by this information accordingly.
+ *
+ * @see ime_show_cb()
+ */
+EXPORT_API int ime_context_get_caps_mode(ime_context_h context, bool *caps_mode);
+
+/**
* @brief Set keyboard engine.
*
* @since_tizen 3.0
*
* @return 0 on success, otherwise a negative error value
* @retval #IME_ERROR_NONE No error
+ * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
* @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
*/
Ecore_IMF_BiDi_Direction bidi_direction;/**< Bidirectional mode */
Ecore_IMF_Input_Panel_Lang language; /**< Preferred input language */
unsigned int client_window; /**< Client application window object */
+ Eina_Bool caps_mode; /**< Caps mode */
};
struct _ime_device_info {
input_context.bidi_direction = context.bidi_direction;
input_context.language = context.language;
input_context.client_window = context.client_window;
+ input_context.caps_mode = context.caps_mode;
g_basic_callback.show(ic, static_cast<ime_context_h>(&input_context), g_user_data);
}
return IME_ERROR_NONE;
}
+int ime_context_get_caps_mode(ime_context_h context, bool *caps_mode)
+{
+ ime_error_e retVal = IME_ERROR_NONE;
+
+ if (!context || !caps_mode) {
+ LOGW("IME_ERROR_INVALID_PARAMETER");
+ return IME_ERROR_INVALID_PARAMETER;
+ }
+
+ if (!g_running) {
+ LOGW("IME_ERROR_NOT_RUNNING");
+ return IME_ERROR_NOT_RUNNING;
+ }
+
+ retVal = _check_privilege();
+ if (retVal != IME_ERROR_NONE) {
+ LOGE("_check_privilege returned %d.", retVal);
+ return retVal;
+ }
+
+ *caps_mode = static_cast<bool>(context->caps_mode);
+
+ return IME_ERROR_NONE;
+}
+
int ime_device_info_get_name(ime_device_info_h dev_info, char **dev_name)
{
ime_error_e retVal = IME_ERROR_NONE;