{ NULL, NULL }
};
-static void
-_theme_hook(Evas_Object *obj)
-{
#ifdef HAVE_ELEMENTARY_WEB
- Elm_Theme *theme = elm_object_theme_get(obj);
- Widget_Data *wd = elm_widget_data_get(obj);
- const Eina_List *themes, *l;
+static char *
+_webkit_theme_find(const Eina_List *list)
+{
+ const Eina_List *l;
const char *th;
- char *view_theme = NULL;
- themes = elm_theme_list_get(theme);
- EINA_LIST_FOREACH(themes, l, th)
+ EINA_LIST_FOREACH(list, l, th)
{
char *path = elm_theme_list_item_path_get(th, NULL);
if (!path) continue;
if (edje_file_group_exists(path, "webkit/base"))
- {
- view_theme = path;
- break;
- }
+ return path;
free(path);
}
+ return NULL;
+}
+#endif
+
+static void
+_theme_hook(Evas_Object *obj)
+{
+#ifdef HAVE_ELEMENTARY_WEB
+ Elm_Theme *theme = elm_object_theme_get(obj);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ const Eina_List *themes;
+ char *view_theme = NULL;
+
+ themes = elm_theme_overlay_list_get(theme);
+ view_theme = _webkit_theme_find(themes);
+ if (view_theme) goto set;
+
+ themes = elm_theme_list_get(theme);
+ view_theme = _webkit_theme_find(themes);
+ if (view_theme) goto set;
+
+ themes = elm_theme_extension_list_get(theme);
+ view_theme = _webkit_theme_find(themes);
+
+set:
if (view_theme)
{
ewk_view_theme_set(wd->ewk_view, view_theme);
_popup_item_selected(void *data, Evas_Object *obj, void *event_info __UNUSED__)
{
Evas_Object *view = data;
- Elm_List_Item *it = elm_list_selected_item_get(obj);
+ Elm_Object_Item *list_it = elm_list_selected_item_get(obj);
const Eina_List *itr, *list = elm_list_items_get(obj);
void *d;
int i = 0;
EINA_LIST_FOREACH(list, itr, d)
{
- if (d == it)
+ if (d == list_it)
break;
i++;
return;
notify = elm_notify_add(obj);
- elm_notify_repeat_events_set(notify, EINA_FALSE);
+ elm_notify_allow_events_set(notify, EINA_FALSE);
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
list = elm_list_add(obj);
- elm_list_always_select_mode_set(list, EINA_TRUE);
+ elm_list_select_mode_set(data, ELM_OBJECT_SELECT_MODE_ALWAYS);
elm_list_bounce_set(list, EINA_FALSE, EINA_FALSE);
elm_list_mode_set(list, ELM_LIST_EXPAND);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_notify_content_set(notify, list);
+ elm_object_content_set(notify, list);
evas_object_show(list);
EINA_LIST_FOREACH(m->items, itr, it)
#endif
}
+EAPI void
+elm_web_useragent_set(Evas_Object *obj, const char *user_agent)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+#ifdef HAVE_ELEMENTARY_WEB
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ ewk_view_setting_user_agent_set(wd->ewk_view, user_agent);
+#else
+ (void)user_agent;
+#endif
+}
+
+EAPI const char*
+elm_web_useragent_get(const Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+#ifdef HAVE_ELEMENTARY_WEB
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return NULL;
+ return ewk_view_setting_user_agent_get(wd->ewk_view);
+#else
+ return NULL;
+#endif
+}
+
EAPI Eina_Bool
elm_web_tab_propagate_get(const Evas_Object *obj)
{
#endif
}
-EAPI Eina_Bool
+EINA_DEPRECATED EAPI Eina_Bool
elm_web_back_possible(Evas_Object *obj)
{
+ return elm_web_back_possible_get(obj);
+}
+
+EAPI Eina_Bool
+elm_web_back_possible_get(Evas_Object *obj)
+{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
#ifdef HAVE_ELEMENTARY_WEB
Widget_Data *wd = elm_widget_data_get(obj);
#endif
}
-EAPI Eina_Bool
+EINA_DEPRECATED EAPI Eina_Bool
elm_web_forward_possible(Evas_Object *obj)
{
+ return elm_web_forward_possible_get(obj);
+}
+
+EAPI Eina_Bool
+elm_web_forward_possible_get(Evas_Object *obj)
+{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
#ifdef HAVE_ELEMENTARY_WEB
Widget_Data *wd = elm_widget_data_get(obj);
}
EAPI Eina_Bool
-elm_web_navigate_possible(Evas_Object *obj, int steps)
+elm_web_navigate_possible_get(Evas_Object *obj, int steps)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
#ifdef HAVE_ELEMENTARY_WEB
#endif
}
-EAPI Eina_Bool
+EINA_DEPRECATED EAPI Eina_Bool
elm_web_history_enable_get(const Evas_Object *obj)
{
+ return elm_web_history_enabled_get(obj);
+}
+
+EAPI Eina_Bool
+elm_web_history_enabled_get(const Evas_Object *obj)
+{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
#ifdef HAVE_ELEMENTARY_WEB
Widget_Data *wd = elm_widget_data_get(obj);
#endif
}
-EAPI void
+EINA_DEPRECATED EAPI void
elm_web_history_enable_set(Evas_Object *obj, Eina_Bool enable)
{
+ elm_web_history_enabled_set(obj, enable);
+}
+
+EAPI void
+elm_web_history_enabled_set(Evas_Object *obj, Eina_Bool enable)
+{
ELM_CHECK_WIDTYPE(obj, widtype);
#ifdef HAVE_ELEMENTARY_WEB
Widget_Data *wd = elm_widget_data_get(obj);
#endif
}
-EAPI void
-elm_web_window_features_bool_property_get(const Elm_Web_Window_Features *wf, Eina_Bool *toolbar_visible, Eina_Bool *statusbar_visible, Eina_Bool *scrollbars_visible, Eina_Bool *menubar_visible, Eina_Bool *locationbar_visible, Eina_Bool *fullscreen)
+EAPI Eina_Bool
+elm_web_window_features_property_get(const Elm_Web_Window_Features *wf, Elm_Web_Window_Feature_Flag flag)
{
#ifdef HAVE_ELEMENTARY_WEB
+ Eina_Bool toolbar_visible, statusbar_visible;
+ Eina_Bool scrollbars_visible, menubar_visible;
+ Eina_Bool locationbar_visible, fullscreen;
+
ewk_window_features_bool_property_get((const Ewk_Window_Features *)wf,
- toolbar_visible, statusbar_visible,
- scrollbars_visible, menubar_visible,
- locationbar_visible, fullscreen);
+ &toolbar_visible, &statusbar_visible,
+ &scrollbars_visible, &menubar_visible,
+ &locationbar_visible, &fullscreen);
+
+ //TODO : Improve ewk API usage to get one value.
+ //
+ switch(flag)
+ {
+ case ELM_WEB_WINDOW_FEATURE_TOOLBAR:
+ return toolbar_visible;
+ break;
+ case ELM_WEB_WINDOW_FEATURE_STATUSBAR:
+ return statusbar_visible;
+ break;
+ case ELM_WEB_WINDOW_FEATURE_SCROLLBARS:
+ return scrollbars_visible;
+ break;
+ case ELM_WEB_WINDOW_FEATURE_MENUBAR:
+ return menubar_visible;
+ break;
+ case ELM_WEB_WINDOW_FEATURE_LOCATIONBAR:
+ return locationbar_visible;
+ break;
+ case ELM_WEB_WINDOW_FEATURE_FULLSCREEN:
+ return fullscreen;
+ break;
+ }
#else
+
+ if (!wf) return EINA_FALSE;
+ if (flag==ELM_WEB_WINDOW_FEATURE_TOOLBAR)
+ {
+ //TODO Handle unused variable warnings when
+ //ewk is not installed.
+ }
+
+ /* What to do with these ?
+
(void)wf;
(void)toolbar_visible;
(void)statusbar_visible;
(void)menubar_visible;
(void)locationbar_visible;
(void)fullscreen;
+
+ */
+
#endif
+ return EINA_FALSE;
}
EAPI void
-elm_web_window_features_int_property_get(const Elm_Web_Window_Features *wf, int *x, int *y, int *w, int *h)
+elm_web_window_features_region_get(const Elm_Web_Window_Features *wf, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
#ifdef HAVE_ELEMENTARY_WEB
ewk_window_features_int_property_get((const Ewk_Window_Features *)wf,
x, y, w, h);
#else
+
+ if (!wf || !x || !y || !w || !h) return;
+ /* What to do with these ?
+
(void)wf;
(void)x;
(void)y;
(void)w;
(void)h;
+
+ */
+
#endif
}