-#include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
+#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
typedef struct
elm_object_text_set(wt->url_entry, event_info);
- elm_object_disabled_set(wt->btn_back, !elm_web_back_possible(wt->web));
- elm_object_disabled_set(wt->btn_fwd, !elm_web_forward_possible(wt->web));
+ elm_object_disabled_set(wt->btn_back, !elm_web_back_possible_get(wt->web));
+ elm_object_disabled_set(wt->btn_fwd, !elm_web_forward_possible_get(wt->web));
}
static void
_new_window_hook(void *data, Evas_Object *obj __UNUSED__, Eina_Bool js __UNUSED__, const Elm_Web_Window_Features *wf __UNUSED__)
{
Web_Test *wt = data;
- Evas_Object *new_win, *new_web, *bg;
+ Evas_Object *new_win, *new_web;
- new_win = elm_win_add(NULL, "elm-web-test-popup", ELM_WIN_BASIC);
+ new_win = elm_win_util_standard_add("elm-web-test-popup", "Elm Web Test Popup");
elm_win_autodel_set(new_win, EINA_TRUE);
evas_object_resize(new_win, 300, 300);
evas_object_show(new_win);
- bg = elm_bg_add(new_win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(new_win, bg);
- evas_object_show(bg);
-
new_web = elm_web_add(new_win);
elm_web_useragent_set(new_web, wt->user_agent);
evas_object_size_hint_weight_set(new_web, EVAS_HINT_EXPAND,
{
const char user_agent_firefox[] = "Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1";
const char user_agent_mobile[] = "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3";
- Evas_Object *win, *bg, *bx, *bx2, *bt, *web, *url;
+ Evas_Object *win, *bx, *bx2, *bt, *web, *url;
Web_Test *wt;
elm_need_web();
wt = calloc(1, sizeof(*wt));
- win = elm_win_add(NULL, "web", ELM_WIN_BASIC);
-
if (mobile == EINA_TRUE)
- {
- wt->user_agent = user_agent_mobile;
- elm_win_title_set(win, "Web-mobile");
- }
+ {
+ win = elm_win_util_standard_add("web-mobile", "Web Mobile");
+ wt->user_agent = user_agent_mobile;
+ }
else
- {
- wt->user_agent = user_agent_firefox;
- elm_win_title_set(win, "Web");
- }
+ {
+ win = elm_win_util_standard_add("web", "Web");
+ wt->user_agent = user_agent_firefox;
+ }
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);