elementary - deprecated elm_engine_current_get API
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 15 Feb 2012 02:29:57 +0000 (02:29 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 15 Feb 2012 02:29:57 +0000 (02:29 +0000)
Please use elm_engine_get instead

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67947 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/config.c
src/examples/inwin_example.c
src/lib/elm_deprecated.h
src/lib/elm_engine.h
src/lib/elm_main.c

index bc64750..dec84e2 100644 (file)
@@ -985,7 +985,7 @@ _config_display_update(Evas_Object *win)
    elm_theme_free(th);
    eina_stringshare_del(curr_theme);
 
-   curr_engine = elm_engine_current_get();
+   curr_engine = elm_engine_get();
    l_items = elm_list_items_get(evas_object_data_get(win, "engines_list"));
    EINA_LIST_FOREACH(l_items, l, list_it)
      {
@@ -1026,7 +1026,7 @@ _engine_use(void            *data,
    li = data;
    selection = elm_object_item_data_get(elm_list_selected_item_get(li));
 
-   if (!strcmp(elm_engine_current_get(), selection))
+   if (!strcmp(elm_engine_get(), selection))
      return;
 
    elm_engine_set(selection);
@@ -2732,7 +2732,7 @@ _engines_list_fill(Evas_Object *l_widget,
    if (!e_names)
      return;
 
-   cur_engine = elm_engine_current_get();
+   cur_engine = elm_engine_get();
 
    EINA_LIST_FOREACH(e_names, l, engine)
      {
index bb9b151..f87ae49 100644 (file)
@@ -146,7 +146,7 @@ elm_main(int argc __UNUSED__, char *argv[] __UNUSED__)
 
    evas_object_smart_callback_add(o, "clicked", _btn_click_cb, NULL);
 
-   if (!strncmp(elm_engine_current_get(), "shot", 4))
+   if (!strncmp(elm_engine_get(), "shot", 4))
      ecore_timer_add(0.1, _screenshot_hack_cb, o);
 
    elm_run();
index 0186ed9..00e0d64 100644 (file)
@@ -1,3 +1,18 @@
+/**
+ * @brief Get Elementary's rendering engine in use.
+ *
+ * @return The rendering engine's name
+ * @note there's no need to free the returned string, here.
+ *
+ * This gets the global rendering engine that is applied to all Elementary
+ * applications.
+ *
+ * @see elm_engine_set()
+ * @deprecated Use elm_engine_get() instead.
+ */
+EINA_DEPRECATED EAPI const char *elm_engine_current_get(void);
+
+
 EINA_DEPRECATED EAPI void          elm_gen_clear(Evas_Object *obj);
 EINA_DEPRECATED EAPI void          elm_gen_item_selected_set(Elm_Gen_Item *it, Eina_Bool selected);
 EINA_DEPRECATED EAPI Eina_Bool     elm_gen_item_selected_get(const Elm_Gen_Item *it);
index 1be77ab..49cb05d 100644 (file)
@@ -36,8 +36,7 @@
  *
  * @see elm_engine_set()
  */
-// XXX: rename to elm_engine_get()
-EAPI const char *elm_engine_current_get(void);
+EAPI const char *elm_engine_get(void);
 
 /**
  * @brief Set Elementary's rendering engine for use.
index 471c83b..0b97637 100644 (file)
@@ -1158,6 +1158,12 @@ elm_profile_all_set(const char *profile)
 EAPI const char *
 elm_engine_current_get(void)
 {
+   return elm_engine_get();
+}
+
+EAPI const char *
+elm_engine_get(void)
+{
    return _elm_config->engine;
 }