{
Evas_Coord x, y, w, h, x2, y2, w2, h2;
evas_object_geometry_get(obj, &x, &y, &w, &h);
- edje_object_part_geometry_get(elm_layout_edje_get(obj), "map", &x2, &y2, &w, &h);
double scale_w = (double) w / ORIGIN_W;
double scale_h = (double) h / ORIGIN_H;
{
if (!city[idx].obj) continue;
evas_object_move(city[idx].obj,
- (x + city[idx].ci.x) - (city[idx].w / 2),
- (y + city[idx].ci.y) - (city[idx].h / 2));
- evas_object_move(city[idx].obj,
- (int)((double)city[idx].ci.x * scale_w) + x + x2 - (city[idx].w / 2),
- (int)((double)city[idx].ci.y * scale_h) + y + y2 - (city[idx].h / 2));
- }
+ (int)((double)city[idx].ci.x * scale_w) + x - (city[idx].w / 2),
+ (int)((double)city[idx].ci.y * scale_h) + y - (city[idx].h / 2));
+ }
}
static void
snprintf(buf, sizeof(buf), "city%d", idx);
city[idx].obj = elm_layout_add(map_layout);
elm_layout_file_set(city[idx].obj, full_path, buf);
- evas_object_smart_member_add(city[idx].obj, map_layout);
+// evas_object_smart_member_add(city[idx].obj, map_layout);
evas_object_show(city[idx].obj);
Evas_Object *edje = elm_layout_edje_get(city[idx].obj);
Eina_Bool
set_time_range(Evas_Object *item, int idx, double p1, double p2, double p3, double p4)
{
- if (!item) return EINA_FALSE;
- if (idx < 0 || idx >= MAXIMUM_SELECTED_CITY) return EINA_FALSE;
+ retv_if(!item, EINA_FALSE);
+ retv_if(idx < 0 || idx >= 6, EINA_FALSE); /* FIXME */
if (0.0f != p1)
p1 /= 24.0f;
//Part 1
rect = evas_object_rectangle_add(evas_object_evas_get(item));
+ evas_object_smart_member_add(rect, item);
switch (idx)
{
case 0:
if ((p3 == 0 && p4 == 0)) return EINA_TRUE;
rect = evas_object_rectangle_add(evas_object_evas_get(item));
+ evas_object_smart_member_add(rect, item);
+
switch (idx)
{
case 0: