On Monday, January 7, 2013, Enlightenment SVN wrote:

> Log:
> ecore_imf: move the docs to header


Thanks! Do you plan to do it for others? Ecore X is the biggest sucker



>
> Author:       jihoon
> Date:         2013-01-07 17:57:22 -0800 (Mon, 07 Jan 2013)
> New Revision: 82373
> Trac:         http://trac.enlightenment.org/e/changeset/82373
>
> Modified:
>   trunk/efl/src/lib/ecore_imf/Ecore_IMF.h
> trunk/efl/src/lib/ecore_imf/ecore_imf_context.c
>
> Modified: trunk/efl/src/lib/ecore_imf/Ecore_IMF.h
> ===================================================================
> --- trunk/efl/src/lib/ecore_imf/Ecore_IMF.h     2013-01-07 23:30:06 UTC
> (rev 82372)
> +++ trunk/efl/src/lib/ecore_imf/Ecore_IMF.h     2013-01-08 01:57:22 UTC
> (rev 82373)
> @@ -34,6 +34,30 @@
>  #endif
>
>  /**
> + * @defgroup Ecore_IMF_Context_Group Ecore Input Method Context Functions
> + * @ingroup Ecore_IMF_Lib_Group
> + *
> + * Functions that operate on Ecore Input Method Context objects.
> +
> + * Ecore Input Method Context Function defines the interface for EFL
> input methods.
> + * An input method is used by EFL text input widgets like elm_entry
> + * (based on edje_entry) to map from key events to Unicode character
> strings.
> + *
> + * The default input method can be set through setting the
> ECORE_IMF_MODULE environment variable.
> + *
> + * An input method may consume multiple key events in sequence and
> finally output the composed result.
> + * This is called preediting, and an input method may provide feedback
> about
> + * this process by displaying the intermediate composition states as
> preedit text.
> + *
> + * Immodule is plugin to connect your application and input method
> framework such as SCIM, ibus, and so on.@n
> + * ecore_imf_init() should be called to initialize and load immodule.@n
> + * ecore_imf_shutdown() is used for shutdowning and unloading immodule.
> + *
> + * An example of usage of these functions can be found at:
> + * @li @ref ecore_imf_example_c
> + */
> +
> +/**
>   * @addtogroup Ecore_IMF_Context_Group
>   *
>   * @{
> @@ -53,7 +77,8 @@
>  {
>     ECORE_IMF_INPUT_PANEL_STATE_SHOW,        /**< Notification after the
> display of the input panel @since 1.7 */
>     ECORE_IMF_INPUT_PANEL_STATE_HIDE,        /**< Notification prior to
> the dismissal of the input panel @since 1.7 */
> -   ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW    /**< Notification prior to
> the display of the input panel @since 1.7 */
> +   ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW,   /**< Notification prior to
> the display of the input panel @since 1.7 */
> +   ECORE_IMF_INPUT_PANEL_STATE_WILL_HIDE    /**< Notification prior to
> the dismissal of the input panel @since 1.8 */
>  } Ecore_IMF_Input_Panel_State;
>
>  typedef enum
> @@ -237,8 +262,10 @@
>     ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY,      /**< Number Only layout
> */
>     ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID,         /**< Never use this */
>     ECORE_IMF_INPUT_PANEL_LAYOUT_HEX,             /**< Hexadecimal layout
> @since 1.2 */
> -   ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL,        /**< Command-line
> terminal layout including esc, alt, ctrl key, so on (no auto-correct, no
> auto-capitalization) @since 1.2 */
> -   ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD         /**< Like normal, but no
> auto-correct, no auto-capitalization etc. @since 1.2 */
> +   ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL,        /**< Command-line
> terminal layout including ESC, Alt, Ctrl key, so on (no auto-correct, no
> auto-capitalization) @since 1.2 */
> +   ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD,        /**< Like normal, but no
> auto-correct, no auto-capitalization etc. @since 1.2 */
> +   ECORE_IMF_INPUT_PANEL_LAYOUT_NAME,            /**< Name layout */
> +   ECORE_IMF_INPUT_PANEL_LAYOUT_ADDRESS,         /**< Address layout */
>  } Ecore_IMF_Input_Panel_Layout;
>
>  /**
> @@ -489,76 +516,926 @@
>
>  EAPI void                          ecore_imf_module_register(const
> Ecore_IMF_Context_Info *info, Ecore_IMF_Context
> *(*imf_module_create)(void), Ecore_IMF_Context *(*imf_module_exit)(void));
>
> +/**
> + * Get the list of the available Input Method Context ids.
> + *
> + * Note that the caller is responsible for freeing the Eina_List
> + * when finished with it. There is no need to finish the list strings.
> + *
> + * @return Return an Eina_List of strings;
> + *         on failure it returns NULL.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI Eina_List
>  *ecore_imf_context_available_ids_get(void);
>  EAPI Eina_List
>  *ecore_imf_context_available_ids_by_canvas_type_get(const char
> *canvas_type);
> +
> +/**
> + * Get the id of the default Input Method Context.
> + * The id may to used to create a new instance of an Input Method
> + * Context object.
> + *
> + * @return Return a string containing the id of the default Input
> + *         Method Context; on failure it returns NULL.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI const char                   *ecore_imf_context_default_id_get(void);
>  EAPI const char
> *ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type);
> +
> +/**
> + * Retrieve the info for the Input Method Context with @p id.
> + *
> + * @param id The Input Method Context id to query for.
> + * @return Return a #Ecore_IMF_Context_Info for the Input Method Context
> with @p id;
> + *         on failure it returns NULL.
> + * @ingroup Ecore_IMF_Context_Group
> + *
> + * Example
> + * @code
> + *
> + * const char *ctx_id;
> + * const Ecore_IMF_Context_Info *ctx_info;
> + * Ecore_IMF_Context *imf_context;
> + * ctx_id = ecore_imf_context_default_id_get();
> + * if (ctx_id)
> + *   {
> + *      ctx_info = ecore_imf_context_info_by_id_get(ctx_id);
> + *      if (!ctx_info->canvas_type ||
> + *          strcmp(ctx_info->canvas_type, "evas") == 0)
> + *        {
> + *           imf_context = ecore_imf_context_add(ctx_id);
> + *        }
> + *      else
> + *        {
> + *           ctx_id =
> ecore_imf_context_default_id_by_canvas_type_get("evas");
> + *           if (ctx_id)
> + *             {
> + *                imf_context = ecore_imf_context_add(ctx_id);
> + *             }
> + *        }
> + *   }
> + * @endcode
> + */
>  EAPI const Ecore_IMF_Context_Info *ecore_imf_context_info_by_id_get(const
> char *id);
>
> +/**
> + * Create a new Input Method Context defined by the given id.
> + *
> + * @param id The Input Method Context id.
> + * @return A newly allocated Input Method Context;
> + *         on failure it returns NULL.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI Ecore_IMF_Context            *ecore_imf_context_add(const char *id);
> +
> +/**
> + * Retrieve the info for the given Input Method Context.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @return Return a #Ecore_IMF_Context_Info for the given Input Method
> Context;
> + *         on failure it returns NULL.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI const Ecore_IMF_Context_Info
> *ecore_imf_context_info_get(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Delete the given Input Method Context and free its memory.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI void
>  ecore_imf_context_del(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Set the client window for the Input Method Context; this is the
> + * Ecore_X_Window when using X11, Ecore_Win32_Window when using Win32,
> etc.
> + * This window is used in order to correctly position status windows, and
> may
> + * also be used for purposes internal to the Input Method Context.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @param window The client window. This may be @c NULL to indicate
> + *               that the previous client window no longer exists.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI void
>  ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window);
> +
> +/**
> + * Get the client window of the Input Method Context
> + *
> + * See @ref ecore_imf_context_client_window_set for more details.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @return Return the client window.
> + * @ingroup Ecore_IMF_Context_Group
> + * @since 1.1.0
> + */
>  EAPI void
> *ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Set the client canvas for the Input Method Context; this is the
> + * canvas in which the input appears.
> + * The canvas type can be determined by using the context canvas type.
> + * Actually only canvas with type "evas" (Evas *) is supported.
> + * This canvas may be used in order to correctly position status windows,
> and may
> + * also be used for purposes internal to the Input Method Context.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @param canvas The client canvas. This may be @c NULL to indicate
> + *               that the previous client canvas no longer exists.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI void
>  ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas);
> +
> +/**
> + * Get the client canvas of the Input Method Context.
> + *
> + * See @ref ecore_imf_context_client_canvas_set for more details.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @return Return the client canvas.
> + * @ingroup Ecore_IMF_Context_Group
> + * @since 1.1.0
> + */
>  EAPI void
> *ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Ask the Input Method Context to show itself.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI void
>  ecore_imf_context_show(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Ask the Input Method Context to hide itself.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI void
>  ecore_imf_context_hide(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Retrieve the current preedit string and cursor position
> + * for the Input Method Context.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @param str Location to store the retrieved string. The
> + *            string retrieved must be freed with free().
> + * @param cursor_pos Location to store position of cursor (in characters)
> + *                   within the preedit string.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI void
>  ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str,
> int *cursor_pos);
> +
> +/**
> + * Retrieve the current preedit string, attributes and
> + * cursor position for the Input Method Context.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @param str Location to store the retrieved string. The
> + *            string retrieved must be freed with free().
> + * @param attrs an Eina_List of attributes
> + * @param cursor_pos Location to store position of cursor (in characters)
> + *                   within the preedit string.
> + * @ingroup Ecore_IMF_Context_Group
> + *
> + * Example
> + * @code
> + * char *preedit_string;
> + * int cursor_pos;
> + * Eina_List *attrs = NULL, *l = NULL;
> + * Ecore_IMF_Preedit_Attr *attr;
> + *
> + * ecore_imf_context_preedit_string_with_attributes_get(imf_context,
> + *                                                      &preedit_string,
> + *                                                      &attrs,
> &cursor_pos);
> + * if (!preedit_string) return;
> + *
> + *  if (strlen(preedit_string) > 0)
> + *    {
> + *       if (attrs)
> + *         {
> + *            EINA_LIST_FOREACH(attrs, l, attr)
> + *              {
> + *                 if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1)
> + *                   {
> + *                      // Something to do
> + *                   }
> + *                 else if (attr->preedit_type ==
> ECORE_IMF_PREEDIT_TYPE_SUB2)
> + *                   {
> + *                      // Something to do
> + *                   }
> + *                 else if (attr->preedit_type ==
> ECORE_IMF_PREEDIT_TYPE_SUB3)
> + *                   {
> + *                      // Something to do
> + *                   }
> + *              }
> + *         }
> + *    }
> + *
> + * // delete attribute list
> + * EINA_LIST_FREE(attrs, attr) free(attr);
> + *
> + * free(preedit_string);
> + * @endcode
> + * @since 1.1.0
> + */
>  EAPI void
>  ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context
> *ctx, char **str, Eina_List **attrs, int *cursor_pos);
> +
> +/**
> + * Notify the Input Method Context that the widget to which its
> + * correspond has gained focus.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @ingroup Ecore_IMF_Context_Group
> + *
> + * Example
> + * @code
> + * static void
> + * _focus_in_cb(void *data, Evas_Object *o, const char *emission, const
> char *source)
> + * {
> + *    ecore_imf_context_reset(imf_context);
> + *    ecore_imf_context_focus_in(imf_context);
> + * }
> + *
> + * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_IN,
> _focus_in_cb, ed);
> + * @endcode
> + */
>  EAPI void
>  ecore_imf_context_focus_in(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Notify the Input Method Context that the widget to which its
> + * correspond has lost focus.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @ingroup Ecore_IMF_Context_Group
> + *
> + * Example
> + * @code
> + * static void
> + * _focus_out_cb(void *data, Evas_Object *o, const char *emission, const
> char *source)
> + * {
> + *    ecore_imf_context_reset(imf_context);
> + *    ecore_imf_context_focus_out(imf_context);
> + * }
> + *
> + * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_OUT,
> _focus_out_cb, ed);
> + * @endcode
> + */
>  EAPI void
>  ecore_imf_context_focus_out(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Notify the Input Method Context that a change such as a
> + * change in cursor position has been made. This will typically
> + * cause the Input Method Context to clear the preedit state.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @ingroup Ecore_IMF_Context_Group
> + *
> + * Example
> + * @code
> + * static void
> + * _focus_out_cb(void *data, Evas_Object *o, const char *emission, const
> char *source)
> + * {
> + *    ecore_imf_context_reset(imf_context);
> + *    ecore_imf_context_focus_out(imf_context);
> + * }
> + *
> + * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_OUT,
> _focus_out_cb, ed);
> + * @endcode
> + */
>  EAPI void
>  ecore_imf_context_reset(Ecore_IMF_Context *ctx);
> +
> +/**
> + * Notify the Input Method Context that a change in the cursor
> + * position has been made.
> + *
> + * @param ctx An #Ecore_IMF_Context.
> + * @param cursor_pos New cursor position in characters.
> + * @ingroup Ecore_IMF_Context_Group
> + */
>  EAPI void
>  ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int
> cursor_pos);
> +
> +/**
> + * Notify the Input Method Context that a change in the cursor
> + * location has been made. The location is relative to



-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to