)
AC_SUBST(ELM_EFREET_DEF)
+ELM_EWEATHER_DEF="#undef"
+have_elementary_eweather="no"
+PKG_CHECK_MODULES([ELEMENTARY_EWEATHER],
+ [
+ eweather
+ ],
+ [
+ AC_DEFINE(HAVE_ELEMENTARY_EWEATHER, 1, [EWeather support for Elementary])
+ have_elementary_eweather="yes"
+ ELM_EWEATHER_DEF="#define"
+ requirement_elm="eweather ${requirement_elm}"
+ ],
+ [have_elementary_eweather="no"]
+)
+AC_SUBST(ELM_EWEATHER_DEF)
+
ELM_ALLOCA_H_DEF="#undef"
AC_CHECK_HEADER(alloca.h, [ELM_ALLOCA_H_DEF="#define"])
AC_SUBST(ELM_ALLOCA_H_DEF)
echo "Features:"
echo " EDBus.........: ${have_elementary_edbus}"
echo " EFreet........: ${have_elementary_efreet}"
+echo " EWeather......: ${have_elementary_eweather}"
echo
echo "edje_cc.........: ${edje_cc}"
echo
@ELEMENTARY_WIN32_CFLAGS@ \
@ELEMENTARY_WINCE_CFLAGS@ \
@ELEMENTARY_EDBUS_CFLAGS@ \
-@ELEMENTARY_EFREET_CFLAGS@
+@ELEMENTARY_EFREET_CFLAGS@ \
+@ELEMENTARY_EWEATHER_CFLAGS@
if ELEMENTARY_WINDOWS_BUILD
AM_CPPFLAGS += -DELEMENTARY_BUILD
test_slideshow.c \
test_menu.c \
test_panel.c \
-test_map.c
+test_map.c \
+test_weather.c
-elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la
+elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@
elementary_test_LDFLAGS =
if BUILD_QUICKLAUNCH
elementary_quicklaunch_SOURCES = quicklaunch.c
-elementary_quicklaunch_LDADD = $(top_builddir)/src/lib/libelementary.la
+elementary_quicklaunch_LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@
elementary_quicklaunch_LDFLAGS =
if BUILD_RUN
void test_menu(void *data, Evas_Object *obj, void *event_info);
void test_panel(void *data, Evas_Object *obj, void *event_info);
void test_map(void *data, Evas_Object *obj, void *event_info);
+void test_weather(void *data, Evas_Object *obj, void *event_info);
+
static void
my_win_del(void *data, Evas_Object *obj, void *event_info)
elm_list_item_append(li, "Menu", NULL, NULL, test_menu, NULL);
elm_list_item_append(li, "Panel", NULL, NULL, test_panel, NULL);
elm_list_item_append(li, "Map", NULL, NULL, test_map, NULL);
+ elm_list_item_append(li, "Weather", NULL, NULL, test_weather, NULL);
elm_list_go(li);
static void
my_map_clicked(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("clicked\n");
}
static void
my_map_press(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("press\n");
}
static void
my_map_longpressed(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("longpressed\n");
}
static void
my_map_clicked_double(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("clicked,double\n");
}
static void
my_map_load(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("load\n");
}
static void
my_map_loaded(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("loaded\n");
}
static void
my_map_load_details(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("load,details\n");
}
static void
my_map_loaded_details(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("loaded,details\n");
}
static void
my_map_zoom_start(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("zoom,start\n");
}
static void
my_map_zoom_stop(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("zoom,stop\n");
}
static void
my_map_zoom_change(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("zoom,change\n");
}
static void
my_map_anim_start(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("anim,start\n");
}
static void
my_map_anim_stop(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("anim,stop\n");
}
static void
my_map_drag_start(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("drag,start\n");
}
static void
my_map_drag_stop(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
printf("drag_stop\n");
}
static void
my_map_scroll(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *win = data;
+ //Evas_Object *win = data;
double lon, lat;
elm_map_geo_region_get(obj, &lon, &lat);
printf("scroll longitude : %f latitude : %f\n", lon, lat);
}
static void
-sel_done(void *data, Evas_Object *obj, void *event_info)
-{
- Evas_Object *map, *iw;
-
- map = data;
- iw = evas_object_data_get(map, "inwin");
- evas_object_del(iw);
-}
-
-static void
my_bt_show_reg(void *data, Evas_Object *obj, void *event_info)
{
Eina_Bool b = elm_map_paused_get(data);
_map_mouse_wheel_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Object *map = data;
- Evas_Object *ph = data;
Evas_Event_Mouse_Wheel *ev = (Evas_Event_Mouse_Wheel*) event_info;
int zoom;
//unset the mouse wheel
test_map(void *data, Evas_Object *obj, void *event_info)
{
Evas_Object *win, *bg, *map, *tb2, *bt;
- char buf[PATH_MAX];
win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
elm_win_title_set(win, "Map");
--- /dev/null
+#include <Elementary.h>
+#include "../../elementary_config.h"
+#ifndef ELM_LIB_QUICKLAUNCH
+
+#ifdef HAVE_ELEMENTARY_EWEATHER
+# include "EWeather_Smart.h"
+#endif
+
+static Evas_Object *en, *hv;
+static EWeather *eweather;
+static Eina_Module *module;
+
+
+static void _apply_cb(void *data, Evas_Object *o, void *event_info)
+{
+ if(module)
+ eweather_plugin_set(eweather, module);
+
+ eweather_code_set(eweather, elm_entry_entry_get(en));
+}
+
+static void _hover_select_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ module = data;
+}
+
+void
+test_weather(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *win, *bg, *weather, *bx, *bx0, *bt;
+ Eina_Array_Iterator it;
+ Eina_Array *array;
+ Eina_Module *m;
+ int i;
+
+ win = elm_win_add(NULL, "weather", ELM_WIN_BASIC);
+ elm_win_title_set(win, "Weather");
+ elm_win_autodel_set(win, 1);
+
+ bg = elm_bg_add(win);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, bg);
+ evas_object_show(bg);
+
+#ifdef HAVE_ELEMENTARY_EWEATHER
+ 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);
+ evas_object_show(bx);
+
+ weather = eweather_object_add(evas_object_evas_get(win));
+ eweather = eweather_object_eweather_get(weather);
+ evas_object_size_hint_weight_set(weather, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(weather, -1.0, -1.0);
+ elm_box_pack_end(bx, weather);
+ evas_object_show(weather);
+
+ bx0 = elm_box_add(win);
+ elm_box_horizontal_set(bx0, EINA_TRUE);
+ evas_object_size_hint_weight_set(bx0, 1.0, 0.0);
+ elm_box_pack_end(bx, bx0);
+ evas_object_show(bx0);
+
+ hv = elm_hoversel_add(win);
+ elm_hoversel_hover_parent_set(hv, win);
+ elm_hoversel_label_set(hv, "data source");
+ evas_object_size_hint_weight_set(hv, 0.0, 0.0);
+ evas_object_size_hint_align_set(hv, 0.5, 0.5);
+ elm_box_pack_end(bx0, hv);
+ evas_object_show(hv);
+
+ array = eweather_plugins_list_get(eweather);
+
+ EINA_ARRAY_ITER_NEXT(array, i, m, it)
+ {
+ elm_hoversel_item_add(hv, eweather_plugin_name_get(eweather, i), NULL, ELM_ICON_NONE, _hover_select_cb, m);
+ }
+
+ en = elm_entry_add(win);
+ elm_entry_line_wrap_set(en, 0);
+ elm_entry_single_line_set(en, EINA_TRUE);
+ elm_entry_entry_set(en, "Paris");
+ evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(bx0, en);
+ evas_object_show(en);
+
+ bt = elm_button_add(win);
+ elm_button_label_set(bt, "Apply");
+ evas_object_show(bt);
+ elm_box_pack_end(bx0, bt);
+ evas_object_smart_callback_add(bt, "clicked", _apply_cb, NULL);
+
+
+#else
+ Evas_Object *lbl;
+
+ lbl = elm_label_add(win);
+ elm_win_resize_object_add(win, lbl);
+ elm_label_label_set(lbl, "libeweather is required to display the forecast.");
+ evas_object_show(lbl);
+#endif
+
+ evas_object_resize(win, 244, 388);
+ evas_object_show(win);
+}
+
+#endif
{
wd->markers[i] = eina_list_remove(wd->markers[i], marker->groups[i]);
_group_object_free(marker->groups[i]);
+ _group_bubble_free(marker->groups[i]);
free(marker->groups[i]);
}
}