[ecore_imf] svn merge 52773
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 29 Sep 2010 04:47:06 +0000 (13:47 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 29 Sep 2010 04:47:06 +0000 (13:47 +0900)
src/lib/ecore_imf/Ecore_IMF.h
src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_imf/ecore_imf_private.h

index 6580846..cc13569 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _ECORE_IMF_H
 #define _ECORE_IMF_H
 
-#include <Evas.h>
+#include <Eina.h>
 #include <Ecore_IMF_Input_Panel_Key.h>
 
 #ifdef EAPI
@@ -449,9 +449,9 @@ extern "C" {
         void (*focus_out)           (Ecore_IMF_Context *ctx);
         void (*reset)               (Ecore_IMF_Context *ctx);
         void (*cursor_position_set) (Ecore_IMF_Context *ctx, int cursor_pos);
-        void (*use_preedit_set)     (Ecore_IMF_Context *ctx, int use_preedit);
+        void (*use_preedit_set)     (Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
         void (*input_mode_set)      (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
-        int  (*filter_event)        (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
+        Eina_Bool (*filter_event)   (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
 
         /* Input Panel Control APIs */
         int (*control_panel_show)   (Ecore_IMF_Context *ctx);
@@ -525,17 +525,17 @@ extern "C" {
    EAPI void                          ecore_imf_context_focus_out(Ecore_IMF_Context *ctx);
    EAPI void                          ecore_imf_context_reset(Ecore_IMF_Context *ctx);
    EAPI void                          ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos);
-   EAPI void                          ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, int use_preedit);
-   EAPI void                          ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, int (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data);
+   EAPI void                          ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit);
+   EAPI void                          ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, Eina_Bool (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data);
    EINA_DEPRECATED EAPI void          ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode);
    EINA_DEPRECATED EAPI Ecore_IMF_Input_Mode          ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx);
-   EAPI int                           ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
+   EAPI Eina_Bool                     ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event);
 
    /* plugin specific functions */
    EAPI Ecore_IMF_Context            *ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc);
    EAPI void                          ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data);
    EAPI void                         *ecore_imf_context_data_get(Ecore_IMF_Context *ctx);
-   EAPI int                           ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
+   EAPI Eina_Bool                     ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
    EAPI void                          ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx);
    EAPI void                          ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx);
    EAPI void                          ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx);
index c83f04b..c6d3a47 100644 (file)
@@ -174,9 +174,9 @@ ecore_imf_context_add(const char *id)
    ctx = ecore_imf_module_context_create(id);
    if (!ctx || !ctx->klass) return NULL;
    if (ctx->klass->add) ctx->klass->add(ctx);
-   /* default use_preedit is 1, so let's make sure it's
+   /* default use_preedit is EINA_TRUE, so let's make sure it's
     * set on the immodule */
-   ecore_imf_context_use_preedit_set(ctx, 1);
+   ecore_imf_context_use_preedit_set(ctx, EINA_TRUE);
    /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's
     * set on the immodule */
    ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL);
@@ -455,8 +455,8 @@ ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos)
 
 /**
  * Set whether the IM context should use the preedit string
- * to display feedback. If @use_preedit is 0 (default
- * is 1), then the IM context may use some other method to display
+ * to display feedback. If @use_preedit is EINA_FALSE (default
+ * is EINA_TRUE), then the IM context may use some other method to display
  * feedback, such as displaying it in a child of the root window.
  *
  * @param ctx An #Ecore_IMF_Context.
@@ -464,7 +464,7 @@ ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos)
  * @ingroup Ecore_IMF_Context_Group
  */
 EAPI void
-ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, int use_preedit)
+ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
@@ -487,7 +487,7 @@ ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, int use_preedit)
  * @ingroup Ecore_IMF_Context_Group
  */
 EAPI void
-ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, int (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data)
+ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, Eina_Bool (*func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos), const void *data)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
@@ -547,30 +547,30 @@ ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx)
 
 /**
  * Allow an Ecore Input Context to internally handle an event.
- * If this function returns 1, then no further processing
+ * If this function returns EINA_TRUE, then no further processing
  * should be done for this event.
  *
  * Input methods must be able to accept all types of events (simply
- * returning 0 if the event was not handled), but there is no
+ * returning EINA_FALSE if the event was not handled), but there is no
  * obligation of any events to be submitted to this function.
  *
  * @param ctx An #Ecore_IMF_Context.
  * @param type The type of event defined by #Ecore_IMF_Event_Type.
  * @param event The event itself.
- * @return 1 if the event was handled; otherwise 0.
+ * @return EINA_TRUE if the event was handled; otherwise 0.
  * @ingroup Ecore_IMF_Context_Group
  */
-EAPI int
+EAPI Eina_Bool
 ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
                         "ecore_imf_context_filter_event");
-       return 0;
+       return EINA_FALSE;
      }
    if (ctx->klass->filter_event) return ctx->klass->filter_event(ctx, type, event);
-   return 0;
+   return EINA_FALSE;
 }
 
 /**
@@ -670,23 +670,23 @@ EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context *ctx)
  * @param ctx An #Ecore_IMF_Context.
  * @param text Location to store a UTF-8 encoded string of text
  *             holding context around the insertion point.
- *             If the function returns 1, then you must free
+ *             If the function returns EINA_TRUE, then you must free
  *             the result stored in this location with free().
  * @param cursor_pos Location to store the position in characters of
  *                   the insertion cursor within @text.
- * @return 1 if surrounding text was provided; otherwise 0.
+ * @return EINA_TRUE if surrounding text was provided; otherwise EINA_FALSE.
  * @ingroup Ecore_IMF_Context_Module_Group
  */
-EAPI int
+EAPI Eina_Bool
 ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *cursor_pos)
 {
-   int result = 0;
+   int result = EINA_FALSE;
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
                         "ecore_imf_context_surrounding_get");
-       return 0;
+       return EINA_FALSE;
      }
 
    if (ctx->retrieve_surrounding_func)
index 6d8931d..4b44cc4 100644 (file)
@@ -50,7 +50,7 @@ struct _Ecore_IMF_Context
    int                           input_panel_x;
    int                           input_panel_y;
    Ecore_IMF_Input_Panel_Orient input_panel_orient;
-   int                          (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
+   Eina_Bool                    (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
    void                          *retrieve_surrounding_data;
    Eina_List                     *callbacks;
    Eina_List                     *disabled_key_list;