summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Aguirre <aguirre.nicolas@gmail.com>2013-07-26 11:47:20 +0200
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2013-07-26 11:47:20 +0200
commitf95fdd91f3909a8a052c43cff3fdf713b6ecbc43 (patch)
tree88635fa1795650c29df7d1742c6828759c4e6279
parentacbf6034203cbfa0965226322db36e1350477e07 (diff)
elementary-1.7: Fix build of elm_map when ecore_con support is not present
-rw-r--r--src/lib/elm_map.c59
1 files changed, 50 insertions, 9 deletions
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index ac4a82065..60fbe3aa4 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -3881,6 +3881,7 @@ _elm_map_smart_event(Evas_Object *obj,
3881static void 3881static void
3882_elm_map_smart_add(Evas_Object *obj) 3882_elm_map_smart_add(Evas_Object *obj)
3883{ 3883{
3884#ifdef HAVE_ELEMENTARY_ECORE_CON
3884 Evas_Coord minw, minh; 3885 Evas_Coord minw, minh;
3885 Elm_Map_Pan_Smart_Data *pan_data; 3886 Elm_Map_Pan_Smart_Data *pan_data;
3886 3887
@@ -3986,11 +3987,15 @@ _elm_map_smart_add(Evas_Object *obj)
3986 3987
3987 if (!ecore_file_download_protocol_available("http://")) 3988 if (!ecore_file_download_protocol_available("http://"))
3988 ERR("Ecore must be built with curl support for the map widget!"); 3989 ERR("Ecore must be built with curl support for the map widget!");
3990#else
3991 (void)obj;
3992#endif
3989} 3993}
3990 3994
3991static void 3995static void
3992_elm_map_smart_del(Evas_Object *obj) 3996_elm_map_smart_del(Evas_Object *obj)
3993{ 3997{
3998#ifdef HAVE_ELEMENTARY_ECORE_CON
3994 Elm_Map_Route *r; 3999 Elm_Map_Route *r;
3995 Elm_Map_Name *na; 4000 Elm_Map_Name *na;
3996 Delayed_Data *dd; 4001 Delayed_Data *dd;
@@ -4064,6 +4069,9 @@ _elm_map_smart_del(Evas_Object *obj)
4064 if (sd->map) evas_map_free(sd->map); 4069 if (sd->map) evas_map_free(sd->map);
4065 4070
4066 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.del(obj); 4071 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.del(obj);
4072#else
4073 (void)obj;
4074#endif
4067} 4075}
4068 4076
4069static void 4077static void
@@ -4071,11 +4079,17 @@ _elm_map_smart_move(Evas_Object *obj,
4071 Evas_Coord x, 4079 Evas_Coord x,
4072 Evas_Coord y) 4080 Evas_Coord y)
4073{ 4081{
4082#ifdef HAVE_ELEMENTARY_ECORE_CON
4074 ELM_MAP_DATA_GET(obj, sd); 4083 ELM_MAP_DATA_GET(obj, sd);
4075 4084
4076 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.move(obj, x, y); 4085 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.move(obj, x, y);
4077 4086
4078 evas_object_move(sd->hit_rect, x, y); 4087 evas_object_move(sd->hit_rect, x, y);
4088#else
4089 (void)obj;
4090 (void)x;
4091 (void)y;
4092#endif
4079} 4093}
4080 4094
4081static void 4095static void
@@ -4083,28 +4097,40 @@ _elm_map_smart_resize(Evas_Object *obj,
4083 Evas_Coord w, 4097 Evas_Coord w,
4084 Evas_Coord h) 4098 Evas_Coord h)
4085{ 4099{
4086 ELM_MAP_DATA_GET(obj, sd); 4100 #ifdef HAVE_ELEMENTARY_ECORE_CON
4101 ELM_MAP_DATA_GET(obj, sd);
4087 4102
4088 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.resize(obj, w, h); 4103 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.resize(obj, w, h);
4089 4104
4090 evas_object_resize(sd->hit_rect, w, h); 4105 evas_object_resize(sd->hit_rect, w, h);
4106#else
4107 (void)obj;
4108 (void)w;
4109 (void)h;
4110#endif
4091} 4111}
4092 4112
4093static void 4113static void
4094_elm_map_smart_member_add(Evas_Object *obj, 4114_elm_map_smart_member_add(Evas_Object *obj,
4095 Evas_Object *member) 4115 Evas_Object *member)
4096{ 4116{
4117#ifdef HAVE_ELEMENTARY_ECORE_CON
4097 ELM_MAP_DATA_GET(obj, sd); 4118 ELM_MAP_DATA_GET(obj, sd);
4098 4119
4099 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.member_add(obj, member); 4120 ELM_WIDGET_CLASS(_elm_map_parent_sc)->base.member_add(obj, member);
4100 4121
4101 if (sd->hit_rect) 4122 if (sd->hit_rect)
4102 evas_object_raise(sd->hit_rect); 4123 evas_object_raise(sd->hit_rect);
4124#else
4125 (void)obj;
4126 (void)member;
4127#endif
4103} 4128}
4104 4129
4105static void 4130static void
4106_elm_map_smart_set_user(Elm_Map_Smart_Class *sc) 4131_elm_map_smart_set_user(Elm_Map_Smart_Class *sc)
4107{ 4132{
4133#ifdef HAVE_ELEMENTARY_ECORE_CON
4108 ELM_WIDGET_CLASS(sc)->base.add = _elm_map_smart_add; 4134 ELM_WIDGET_CLASS(sc)->base.add = _elm_map_smart_add;
4109 ELM_WIDGET_CLASS(sc)->base.del = _elm_map_smart_del; 4135 ELM_WIDGET_CLASS(sc)->base.del = _elm_map_smart_del;
4110 ELM_WIDGET_CLASS(sc)->base.move = _elm_map_smart_move; 4136 ELM_WIDGET_CLASS(sc)->base.move = _elm_map_smart_move;
@@ -4114,11 +4140,15 @@ _elm_map_smart_set_user(Elm_Map_Smart_Class *sc)
4114 ELM_WIDGET_CLASS(sc)->on_focus = _elm_map_smart_on_focus; 4140 ELM_WIDGET_CLASS(sc)->on_focus = _elm_map_smart_on_focus;
4115 ELM_WIDGET_CLASS(sc)->theme = _elm_map_smart_theme; 4141 ELM_WIDGET_CLASS(sc)->theme = _elm_map_smart_theme;
4116 ELM_WIDGET_CLASS(sc)->event = _elm_map_smart_event; 4142 ELM_WIDGET_CLASS(sc)->event = _elm_map_smart_event;
4143#else
4144 (void)sc;
4145#endif
4117} 4146}
4118 4147
4119EAPI const Elm_Map_Smart_Class * 4148EAPI const Elm_Map_Smart_Class *
4120elm_map_smart_class_get(void) 4149elm_map_smart_class_get(void)
4121{ 4150{
4151#ifdef HAVE_ELEMENTARY_ECORE_CON
4122 static Elm_Map_Smart_Class _sc = 4152 static Elm_Map_Smart_Class _sc =
4123 ELM_MAP_SMART_CLASS_INIT_NAME_VERSION(ELM_MAP_SMART_NAME); 4153 ELM_MAP_SMART_CLASS_INIT_NAME_VERSION(ELM_MAP_SMART_NAME);
4124 static const Elm_Map_Smart_Class *class = NULL; 4154 static const Elm_Map_Smart_Class *class = NULL;
@@ -4131,6 +4161,9 @@ elm_map_smart_class_get(void)
4131 class = &_sc; 4161 class = &_sc;
4132 4162
4133 return class; 4163 return class;
4164#else
4165 return NULL;
4166#endif
4134} 4167}
4135 4168
4136EAPI Evas_Object * 4169EAPI Evas_Object *
@@ -4613,6 +4646,7 @@ elm_map_source_set(Evas_Object *obj,
4613 4646
4614#else 4647#else
4615 (void)obj; 4648 (void)obj;
4649 (void)type;
4616 (void)source_name; 4650 (void)source_name;
4617#endif 4651#endif
4618} 4652}
@@ -4637,6 +4671,7 @@ elm_map_source_get(const Evas_Object *obj,
4637 return NULL; 4671 return NULL;
4638#else 4672#else
4639 (void)obj; 4673 (void)obj;
4674 (void)type;
4640 return NULL; 4675 return NULL;
4641#endif 4676#endif
4642} 4677}
@@ -4659,6 +4694,7 @@ elm_map_sources_get(const Evas_Object *obj,
4659 return NULL; 4694 return NULL;
4660#else 4695#else
4661 (void)obj; 4696 (void)obj;
4697 (void)type;
4662 return NULL; 4698 return NULL;
4663#endif 4699#endif
4664} 4700}
@@ -5397,7 +5433,7 @@ elm_map_overlay_content_set(Elm_Map_Overlay *overlay,
5397 evas_object_smart_changed(overlay->wsd->pan_obj); 5433 evas_object_smart_changed(overlay->wsd->pan_obj);
5398#else 5434#else
5399 (void)overlay; 5435 (void)overlay;
5400 (void)obj; 5436 (void)content;
5401#endif 5437#endif
5402} 5438}
5403 5439
@@ -5698,8 +5734,8 @@ elm_map_overlay_group_members_get(const Elm_Map_Overlay *grp)
5698 ovl = grp->ovl; 5734 ovl = grp->ovl;
5699 return ovl->members; 5735 return ovl->members;
5700#else 5736#else
5701 (void)clas; 5737 (void)grp;
5702 return OVERLAY_CLASS_ZOOM_MAX; 5738 return NULL;
5703#endif 5739#endif
5704} 5740}
5705 5741
@@ -5861,8 +5897,8 @@ elm_map_overlay_line_add(Evas_Object *obj,
5861#else 5897#else
5862 (void)obj; 5898 (void)obj;
5863 (void)flon; 5899 (void)flon;
5864 (void)flat 5900 (void)flat;
5865 (void) tlon; 5901 (void)tlon;
5866 (void)tlat; 5902 (void)tlat;
5867 return NULL; 5903 return NULL;
5868#endif 5904#endif
@@ -5918,8 +5954,8 @@ elm_map_overlay_polygon_region_add(Elm_Map_Overlay *overlay,
5918#else 5954#else
5919 (void)overlay; 5955 (void)overlay;
5920 (void)lon; 5956 (void)lon;
5921 (void)lat 5957 (void)lat;
5922 #endif 5958#endif
5923} 5959}
5924 5960
5925EAPI Elm_Map_Overlay * 5961EAPI Elm_Map_Overlay *
@@ -5949,6 +5985,9 @@ elm_map_overlay_circle_add(Evas_Object *obj,
5949 return overlay; 5985 return overlay;
5950#else 5986#else
5951 (void)obj; 5987 (void)obj;
5988 (void)lon;
5989 (void)lat;
5990 (void)radius;
5952 return NULL; 5991 return NULL;
5953#endif 5992#endif
5954} 5993}
@@ -5979,6 +6018,8 @@ elm_map_overlay_scale_add(Evas_Object *obj,
5979 return overlay; 6018 return overlay;
5980#else 6019#else
5981 (void)obj; 6020 (void)obj;
6021 (void)x;
6022 (void)y;
5982 return NULL; 6023 return NULL;
5983#endif 6024#endif
5984} 6025}