tab--
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 30 Sep 2010 07:31:11 +0000 (07:31 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 30 Sep 2010 07:31:11 +0000 (07:31 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52921 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_imf/ecore_imf_module.c
src/lib/ecore_imf_evas/ecore_imf_evas.c
src/lib/ecore_input/Ecore_Input.h
src/lib/ecore_input/ecore_input.c
src/lib/ecore_input_evas/ecore_input_evas.c

index 6e994d0..386d549 100644 (file)
@@ -91,8 +91,8 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
    id = getenv("ECORE_IMF_MODULE");
    if (id)
      {
-       if (strcmp(id, "none") == 0) return NULL;
-       if (ecore_imf_module_get(id)) return id;
+        if (strcmp(id, "none") == 0) return NULL;
+        if (ecore_imf_module_get(id)) return id;
      }
 
    modules = ecore_imf_module_available_get();
@@ -112,24 +112,24 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
 
    EINA_LIST_FREE(modules, module)
      {
-       if (canvas_type &&
-           strcmp(module->info->canvas_type, canvas_type) == 0)
-         continue;
-
-       const char *p = module->info->default_locales;
-       while (p)
-         {
-            const char *q = strchr(p, ':');
-            int goodness = _ecore_imf_context_match_locale(locale, p, q ? (size_t)(q - p) : strlen (p));
-
-             if (goodness > best_goodness)
-               {
-                  id = module->info->id;
-                  best_goodness = goodness;
-               }
-
-             p = q ? q + 1 : NULL;
-         }
+        if (canvas_type &&
+            strcmp(module->info->canvas_type, canvas_type) == 0)
+          continue;
+
+        const char *p = module->info->default_locales;
+        while (p)
+          {
+             const char *q = strchr(p, ':');
+             int goodness = _ecore_imf_context_match_locale(locale, p, q ? (size_t)(q - p) : strlen (p));
+
+              if (goodness > best_goodness)
+                {
+                   id = module->info->id;
+                   best_goodness = goodness;
+                }
+
+              p = q ? q + 1 : NULL;
+          }
      }
 
    free(locale);
@@ -194,9 +194,9 @@ ecore_imf_context_info_get(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_info_get");
-       return NULL;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_info_get");
+        return NULL;
      }
    return ctx->module->info;
 }
@@ -212,9 +212,9 @@ ecore_imf_context_del(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_del");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_del");
+        return;
      }
    if (ctx->klass->del) ctx->klass->del(ctx);
    ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE);
@@ -237,9 +237,9 @@ ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_client_window_set");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_client_window_set");
+        return;
      }
    if (ctx->klass->client_window_set) ctx->klass->client_window_set(ctx, window);
 }
@@ -262,9 +262,9 @@ ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_client_canvas_set");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_client_canvas_set");
+        return;
      }
    if (ctx->klass->client_canvas_set) ctx->klass->client_canvas_set(ctx, canvas);
 }
@@ -280,9 +280,9 @@ ecore_imf_context_show(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_show");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_show");
+        return;
      }
    if (ctx->klass->show) ctx->klass->show(ctx);
 }
@@ -298,9 +298,9 @@ ecore_imf_context_hide(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_hide");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_hide");
+        return;
      }
    if (ctx->klass->hide) ctx->klass->hide(ctx);
 }
@@ -321,16 +321,16 @@ ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cu
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_preedit_string_get");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_preedit_string_get");
+        return;
      }
    if (ctx->klass->preedit_string_get)
      ctx->klass->preedit_string_get(ctx, str, cursor_pos);
    else
      {
-       if (str) *str = strdup("");
-       if (cursor_pos) *cursor_pos = 0;
+        if (str) *str = strdup("");
+        if (cursor_pos) *cursor_pos = 0;
      }
 }
 
@@ -346,9 +346,9 @@ ecore_imf_context_focus_in(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_focus_in");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_focus_in");
+        return;
      }
    if (ctx->klass->focus_in) ctx->klass->focus_in(ctx);
 }
@@ -365,9 +365,9 @@ ecore_imf_context_focus_out(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_focus_out");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_focus_out");
+        return;
      }
    if (ctx->klass->focus_out) ctx->klass->focus_out(ctx);
 }
@@ -385,9 +385,9 @@ ecore_imf_context_reset(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_reset");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_reset");
+        return;
      }
    if (ctx->klass->reset) ctx->klass->reset(ctx);
 }
@@ -405,9 +405,9 @@ ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_cursor_position_set");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_cursor_position_set");
+        return;
      }
    if (ctx->klass->cursor_position_set) ctx->klass->cursor_position_set(ctx, cursor_pos);
 }
@@ -427,9 +427,9 @@ ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_use_preedit_set");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_use_preedit_set");
+        return;
      }
    if (ctx->klass->use_preedit_set) ctx->klass->use_preedit_set(ctx, use_preedit);
 }
@@ -450,9 +450,9 @@ ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, Eina
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_retrieve_surrounding_callback_set");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_retrieve_surrounding_callback_set");
+        return;
      }
 
    ctx->retrieve_surrounding_func = func;
@@ -475,9 +475,9 @@ ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode in
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_input_mode_set");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_input_mode_set");
+        return;
      }
    if (ctx->klass->input_mode_set) ctx->klass->input_mode_set(ctx, input_mode);
    ctx->input_mode = input_mode;
@@ -497,9 +497,9 @@ ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_input_mode_set");
-       return 0;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_input_mode_set");
+        return 0;
      }
    return ctx->input_mode;
 }
@@ -524,9 +524,9 @@ ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_filter_event");
-       return EINA_FALSE;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_filter_event");
+        return EINA_FALSE;
      }
    if (ctx->klass->filter_event) return ctx->klass->filter_event(ctx, type, event);
    return EINA_FALSE;
@@ -581,9 +581,9 @@ ecore_imf_context_data_set(Ecore_IMF_Context *ctx, void *data)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_data_set");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_data_set");
+        return;
      }
    ctx->data = data;
 }
@@ -601,9 +601,9 @@ EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context *ctx)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_data_get");
-       return NULL;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_data_get");
+        return NULL;
      }
    return ctx->data;
 }
@@ -636,19 +636,19 @@ ecore_imf_context_surrounding_get(Ecore_IMF_Context *ctx, char **text, int *curs
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_surrounding_get");
-       return EINA_FALSE;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_surrounding_get");
+        return EINA_FALSE;
      }
 
    if (ctx->retrieve_surrounding_func)
      {
-       result = ctx->retrieve_surrounding_func(ctx->retrieve_surrounding_data, ctx, text, cursor_pos);
-       if (!result)
-         {
-            if (text) *text = NULL;
-            if (cursor_pos) *cursor_pos = 0;
-         }
+        result = ctx->retrieve_surrounding_func(ctx->retrieve_surrounding_data, ctx, text, cursor_pos);
+        if (!result)
+          {
+             if (text) *text = NULL;
+             if (cursor_pos) *cursor_pos = 0;
+          }
      }
    return result;
 }
@@ -672,15 +672,15 @@ ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx)
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_preedit_start_event_add");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_preedit_start_event_add");
+        return;
      }
 
    ev = malloc(sizeof(Ecore_IMF_Event_Preedit_Start));
    ev->ctx = ctx;
    ecore_event_add(ECORE_IMF_EVENT_PREEDIT_START,
-                  ev, _ecore_imf_event_free_preedit, NULL);
+                   ev, _ecore_imf_event_free_preedit, NULL);
 }
 
 /**
@@ -696,15 +696,15 @@ ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx)
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_preedit_end_event_add");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_preedit_end_event_add");
+        return;
      }
 
    ev = malloc(sizeof(Ecore_IMF_Event_Preedit_End));
    ev->ctx = ctx;
    ecore_event_add(ECORE_IMF_EVENT_PREEDIT_END,
-                  ev, _ecore_imf_event_free_preedit, NULL);
+                   ev, _ecore_imf_event_free_preedit, NULL);
 }
 
 /**
@@ -720,15 +720,15 @@ ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx)
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_preedit_changed_event_add");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_preedit_changed_event_add");
+        return;
      }
 
    ev = malloc(sizeof(Ecore_IMF_Event_Preedit_Changed));
    ev->ctx = ctx;
    ecore_event_add(ECORE_IMF_EVENT_PREEDIT_CHANGED,
-                  ev, _ecore_imf_event_free_preedit, NULL);
+                   ev, _ecore_imf_event_free_preedit, NULL);
 }
 
 static void
@@ -755,16 +755,16 @@ ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str)
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_commit_event_add");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_commit_event_add");
+        return;
      }
 
    ev = malloc(sizeof(Ecore_IMF_Event_Commit));
    ev->ctx = ctx;
    ev->str = str ? strdup(str) : NULL;
    ecore_event_add(ECORE_IMF_EVENT_COMMIT,
-                  ev, _ecore_imf_event_free_commit, NULL);
+                   ev, _ecore_imf_event_free_commit, NULL);
 
 }
 
@@ -789,9 +789,9 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
      {
-       ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                        "ecore_imf_context_delete_surrounding_event_add");
-       return;
+        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                         "ecore_imf_context_delete_surrounding_event_add");
+        return;
      }
 
    ev = malloc(sizeof(Ecore_IMF_Event_Delete_Surrounding));
@@ -799,5 +799,5 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse
    ev->offset = offset;
    ev->n_chars = n_chars;
    ecore_event_add(ECORE_IMF_EVENT_DELETE_SURROUNDING,
-                  ev, _ecore_imf_event_free_delete_surrounding, NULL);
+                   ev, _ecore_imf_event_free_delete_surrounding, NULL);
 }
index 456e559..cdde808 100644 (file)
@@ -18,8 +18,8 @@ static int _ecore_imf_modules_exists(const char *ctx_id);
 
 typedef struct _Ecore_IMF_Selector
 {
-  const char   *toselect;
-  void         *selected;
+  const char *toselect;
+  void       *selected;
 } Ecore_IMF_Selector;
 
 static Eina_Hash *modules = NULL;
@@ -34,8 +34,8 @@ ecore_imf_module_init(void)
    homedir = eina_module_environment_path_get("HOME", "/.ecore/immodules");
    if (homedir)
      {
-       module_list = eina_module_list_get(module_list, homedir, 0, NULL, NULL);
-       free(homedir);
+        module_list = eina_module_list_get(module_list, homedir, 0, NULL, NULL);
+        free(homedir);
      }
    eina_module_list_load(module_list);
 }
@@ -45,13 +45,13 @@ ecore_imf_module_shutdown(void)
 {
    if (modules)
      {
-       eina_hash_free(modules);
-       modules = NULL;
+        eina_hash_free(modules);
+        modules = NULL;
      }
    if (module_list)
      {
-       eina_module_list_free(module_list);
-       module_list = NULL;
+        eina_module_list_free(module_list);
+        module_list = NULL;
      }
 }
 
@@ -97,14 +97,14 @@ ecore_imf_module_context_create(const char *ctx_id)
    module = eina_hash_find(modules, ctx_id);
    if (module)
      {
-       ctx = module->create();
-       if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
-         {
-            ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
-                             "ecore_imf_module_context_create");
-            return NULL;
-         }
-       ctx->module = module;
+        ctx = module->create();
+        if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+          {
+             ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+                              "ecore_imf_module_context_create");
+             return NULL;
+          }
+        ctx->module = module;
      }
    return ctx;
 }
@@ -172,8 +172,8 @@ ecore_imf_module_context_ids_by_canvas_type_get(const char *canvas_type)
 
 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))
+                          Ecore_IMF_Context *(*imf_module_create)(void),
+                          Ecore_IMF_Context *(*imf_module_exit)(void))
 {
    Ecore_IMF_Module *module;
 
index de0f1ef..86badf5 100644 (file)
@@ -15,7 +15,7 @@ static const char *_ecore_imf_evas_event_empty = "";
 /* Converts the Evas modifiers to Ecore_IMF keyboard modifiers */
 static void
 _ecore_imf_evas_event_modifiers_wrap(Evas_Modifier *evas_modifiers,
-                                    Ecore_IMF_Keyboard_Modifiers *imf_keyboard_modifiers)
+                                     Ecore_IMF_Keyboard_Modifiers *imf_keyboard_modifiers)
 {
    if (!evas_modifiers || !imf_keyboard_modifiers)
      return;
@@ -34,7 +34,7 @@ _ecore_imf_evas_event_modifiers_wrap(Evas_Modifier *evas_modifiers,
 /* Converts the Evas locks to Ecore_IMF keyboard locks */
 static void
 _ecore_imf_evas_event_locks_wrap(Evas_Lock *evas_locks,
-                                Ecore_IMF_Keyboard_Locks *imf_keyboard_locks)
+                                 Ecore_IMF_Keyboard_Locks *imf_keyboard_locks)
 {
    if (!evas_locks || !imf_keyboard_locks)
      return;
@@ -51,7 +51,7 @@ _ecore_imf_evas_event_locks_wrap(Evas_Lock *evas_locks,
 /* Converts the Evas mouse flags to Ecore_IMF mouse flags */
 static void
 _ecore_imf_evas_event_mouse_flags_wrap(Evas_Button_Flags evas_flags,
-                                      Ecore_IMF_Mouse_Flags *imf_flags)
+                                       Ecore_IMF_Mouse_Flags *imf_flags)
 {
    if (!imf_flags)
      return;
@@ -72,7 +72,7 @@ _ecore_imf_evas_event_mouse_flags_wrap(Evas_Button_Flags evas_flags,
  */
 EAPI void
 ecore_imf_evas_event_mouse_in_wrap(Evas_Event_Mouse_In *evas_event,
-                                  Ecore_IMF_Event_Mouse_In *imf_event)
+                                   Ecore_IMF_Event_Mouse_In *imf_event)
 {
    if (!evas_event || !imf_event)
      return;
@@ -96,7 +96,7 @@ ecore_imf_evas_event_mouse_in_wrap(Evas_Event_Mouse_In *evas_event,
  */
 EAPI void
 ecore_imf_evas_event_mouse_out_wrap(Evas_Event_Mouse_Out *evas_event,
-                                   Ecore_IMF_Event_Mouse_Out *imf_event)
+                                    Ecore_IMF_Event_Mouse_Out *imf_event)
 {
    if (!evas_event || !imf_event)
      return;
@@ -120,7 +120,7 @@ ecore_imf_evas_event_mouse_out_wrap(Evas_Event_Mouse_Out *evas_event,
  */
 EAPI void
 ecore_imf_evas_event_mouse_move_wrap(Evas_Event_Mouse_Move *evas_event,
-                                    Ecore_IMF_Event_Mouse_Move *imf_event)
+                                     Ecore_IMF_Event_Mouse_Move *imf_event)
 {
    if (!evas_event || !imf_event)
      return;
@@ -148,7 +148,7 @@ ecore_imf_evas_event_mouse_move_wrap(Evas_Event_Mouse_Move *evas_event,
  */
 EAPI void
 ecore_imf_evas_event_mouse_down_wrap(Evas_Event_Mouse_Down *evas_event,
-                                    Ecore_IMF_Event_Mouse_Down *imf_event)
+                                     Ecore_IMF_Event_Mouse_Down *imf_event)
 {
    if (!evas_event || !imf_event)
       return;
@@ -173,7 +173,7 @@ ecore_imf_evas_event_mouse_down_wrap(Evas_Event_Mouse_Down *evas_event,
  */
 EAPI void
 ecore_imf_evas_event_mouse_up_wrap(Evas_Event_Mouse_Up *evas_event,
-                                  Ecore_IMF_Event_Mouse_Up *imf_event)
+                                   Ecore_IMF_Event_Mouse_Up *imf_event)
 {
    if (!evas_event || !imf_event)
      return;
@@ -198,7 +198,7 @@ ecore_imf_evas_event_mouse_up_wrap(Evas_Event_Mouse_Up *evas_event,
  */
 EAPI void
 ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event,
-                                     Ecore_IMF_Event_Mouse_Wheel *imf_event)
+                                      Ecore_IMF_Event_Mouse_Wheel *imf_event)
 {
    if (!evas_event || !imf_event)
      return;
@@ -224,7 +224,7 @@ ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event,
  */
 EAPI void
 ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event,
-                                  Ecore_IMF_Event_Key_Down *imf_event)
+                                   Ecore_IMF_Event_Key_Down *imf_event)
 {
    if (!evas_event || !imf_event)
      return;
@@ -247,7 +247,7 @@ ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event,
  */
 EAPI void
 ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event,
-                                Ecore_IMF_Event_Key_Up *imf_event)
+                                 Ecore_IMF_Event_Key_Up *imf_event)
 {
    imf_event->keyname = evas_event->keyname ? evas_event->keyname : _ecore_imf_evas_event_empty;
    imf_event->key = evas_event->key ? evas_event->key : _ecore_imf_evas_event_empty;
index d3492d8..52af19d 100644 (file)
@@ -41,16 +41,16 @@ extern "C" {
    EAPI extern int ECORE_EVENT_MOUSE_IN;
    EAPI extern int ECORE_EVENT_MOUSE_OUT;
 
-#define ECORE_EVENT_MODIFIER_SHIFT     0x0001
-#define ECORE_EVENT_MODIFIER_CTRL      0x0002
-#define ECORE_EVENT_MODIFIER_ALT       0x0004
-#define ECORE_EVENT_MODIFIER_WIN       0x0008
-#define ECORE_EVENT_MODIFIER_SCROLL    0x0010
-#define ECORE_EVENT_MODIFIER_NUM       0x0020
-#define ECORE_EVENT_MODIFIER_CAPS      0x0040
-#define ECORE_EVENT_LOCK_SCROLL                0x0080
-#define ECORE_EVENT_LOCK_NUM           0x0100
-#define ECORE_EVENT_LOCK_CAPS          0x0200
+#define ECORE_EVENT_MODIFIER_SHIFT      0x0001
+#define ECORE_EVENT_MODIFIER_CTRL       0x0002
+#define ECORE_EVENT_MODIFIER_ALT        0x0004
+#define ECORE_EVENT_MODIFIER_WIN        0x0008
+#define ECORE_EVENT_MODIFIER_SCROLL     0x0010
+#define ECORE_EVENT_MODIFIER_NUM        0x0020
+#define ECORE_EVENT_MODIFIER_CAPS       0x0040
+#define ECORE_EVENT_LOCK_SCROLL         0x0080
+#define ECORE_EVENT_LOCK_NUM            0x0100
+#define ECORE_EVENT_LOCK_CAPS           0x0200
 
    typedef uintptr_t                        Ecore_Window;
    typedef struct _Ecore_Event_Key          Ecore_Event_Key;
@@ -113,8 +113,8 @@ extern "C" {
         unsigned int     triple_click;
         int              same_screen;
         
-        int             x;
-        int             y;
+        int              x;
+        int              y;
         struct {
            int           x;
            int           y;
index ab11d90..16d0c2f 100644 (file)
@@ -110,9 +110,9 @@ ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, i
    for (i = 0; i < sizeof (matchs) / sizeof (Ecore_Event_Modifier_Match); i++)
      if (strcmp(matchs[i].key, key) == 0)
        {
-         if (modifiers && matchs[i].modifier < modifiers->size)
-           modifiers->array[matchs[i].modifier] += inc;
-         return matchs[i].modifier;
+          if (modifiers && matchs[i].modifier < modifiers->size)
+            modifiers->array[matchs[i].modifier] += inc;
+          return matchs[i].modifier;
        }
 
    return ECORE_NONE;
index 6bf5d7a..7d61780 100644 (file)
@@ -42,13 +42,13 @@ ecore_event_evas_modifier_lock_update(Evas *e, unsigned int modifiers)
 
    if (modifiers & ECORE_EVENT_MODIFIER_WIN)
      {
-       evas_key_modifier_on(e, "Super");
-       evas_key_modifier_on(e, "Hyper");
+        evas_key_modifier_on(e, "Super");
+        evas_key_modifier_on(e, "Hyper");
      }
    else
      {
-       evas_key_modifier_off(e, "Super");
-       evas_key_modifier_off(e, "Hyper");
+        evas_key_modifier_off(e, "Super");
+        evas_key_modifier_off(e, "Hyper");
      }
 
    if (modifiers & ECORE_EVENT_LOCK_SCROLL)
@@ -214,13 +214,13 @@ _ecore_event_evas_mouse_io(Ecore_Event_Mouse_IO *e, Ecore_Event_IO io)
    switch (io)
      {
       case ECORE_IN:
-        evas_event_feed_mouse_in(lookup->evas, e->timestamp, NULL);
-        break;
+         evas_event_feed_mouse_in(lookup->evas, e->timestamp, NULL);
+         break;
       case ECORE_OUT:
-        evas_event_feed_mouse_out(lookup->evas, e->timestamp, NULL);
-        break;
+         evas_event_feed_mouse_out(lookup->evas, e->timestamp, NULL);
+         break;
       default:
-        break;
+         break;
      }
 
    lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp);
@@ -280,38 +280,38 @@ ecore_event_evas_init(void)
 
    if (!ecore_init())
      {
-       return --_ecore_event_evas_init_count;
+        return --_ecore_event_evas_init_count;
      }
 
    if (!ecore_event_init())
      {
-       goto shutdown_ecore;
+        goto shutdown_ecore;
      }
 
    ecore_event_evas_handlers[0] = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
-                                                         ecore_event_evas_key_down,
-                                                         NULL);
+                                                          ecore_event_evas_key_down,
+                                                          NULL);
    ecore_event_evas_handlers[1] = ecore_event_handler_add(ECORE_EVENT_KEY_UP,
-                                                         ecore_event_evas_key_up,
-                                                         NULL);
+                                                          ecore_event_evas_key_up,
+                                                          NULL);
    ecore_event_evas_handlers[2] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN,
-                                                         ecore_event_evas_mouse_button_down,
-                                                         NULL);
+                                                          ecore_event_evas_mouse_button_down,
+                                                          NULL);
    ecore_event_evas_handlers[3] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
-                                                         ecore_event_evas_mouse_button_up,
-                                                         NULL);
+                                                          ecore_event_evas_mouse_button_up,
+                                                          NULL);
    ecore_event_evas_handlers[4] = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE,
-                                                         ecore_event_evas_mouse_move,
-                                                         NULL);
+                                                          ecore_event_evas_mouse_move,
+                                                          NULL);
    ecore_event_evas_handlers[5] = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL,
-                                                         ecore_event_evas_mouse_wheel,
-                                                         NULL);
+                                                          ecore_event_evas_mouse_wheel,
+                                                          NULL);
    ecore_event_evas_handlers[6] = ecore_event_handler_add(ECORE_EVENT_MOUSE_IN,
-                                                         ecore_event_evas_mouse_in,
-                                                         NULL);
+                                                          ecore_event_evas_mouse_in,
+                                                          NULL);
    ecore_event_evas_handlers[7] = ecore_event_handler_add(ECORE_EVENT_MOUSE_OUT,
-                                                         ecore_event_evas_mouse_out,
-                                                         NULL);
+                                                          ecore_event_evas_mouse_out,
+                                                          NULL);
    
    _window_hash = eina_hash_pointer_new(free);
    
@@ -335,8 +335,8 @@ ecore_event_evas_shutdown(void)
    _window_hash = NULL;
    for (i = 0; i < sizeof(ecore_event_evas_handlers) / sizeof(Ecore_Event_Handler *); i++)
      {
-       ecore_event_handler_del(ecore_event_evas_handlers[i]);
-       ecore_event_evas_handlers[i] = NULL;
+        ecore_event_handler_del(ecore_event_evas_handlers[i]);
+        ecore_event_evas_handlers[i] = NULL;
      }
    
    ecore_event_shutdown();