maps_view_object_type_e type;
maps_view_object_get_type(object, &type);
- if (type == MAPS_VIEW_OBJECT_OVERLAY)
+ if (type == MAPS_VIEW_OBJECT_OVERLAY) {
return _maps_view_object_overlay_operation(view, object, operation);
- else {
+ } else {
if(!__get_plugin_interface(view)->maps_plugin_on_object)
return MAPS_ERROR_INVALID_PARAMETER;
int maps_view_object_get_type(maps_view_object_h object, maps_view_object_type_e *type);
int subtype = 0;
- if (type == MAPS_VIEW_EVENT_GESTURE)
+ if (type == MAPS_VIEW_EVENT_GESTURE) {
maps_view_event_data_get_gesture_type(event_data, (maps_view_gesture_e*)&subtype);
- else if (type == MAPS_VIEW_EVENT_ACTION)
+ } else if (type == MAPS_VIEW_EVENT_ACTION) {
maps_view_event_data_get_action_type(event_data, (maps_view_action_e*)&subtype);
- else if (type == MAPS_VIEW_EVENT_OBJECT) {
+ } else if (type == MAPS_VIEW_EVENT_OBJECT) {
maps_view_object_h object;
maps_view_event_data_get_object(event_data, &object);
maps_view_object_get_type(object, (maps_view_object_type_e*)&subtype);
}
if (type == MAPS_VIEW_EVENT_READY)
- MAPS_LOGD("[invoked event] type=%d, subtype=%d", type, subtype);
+ MAPS_LOGD("[invoked event] type=%d, subtype=%d", type, subtype);
#endif
v->event_callbacks[type].callback(type, event_data, v->event_callbacks[type].user_data);
*overlay = (maps_view_overlay_data_s *) m;
return MAPS_ERROR_NONE;
- } while(false);
+ } while (false);
__maps_view_overlay_data_destroy(m);
return error;
pixels = (unsigned char *)evas_object_image_data_get(m->bubble, EINA_TRUE);
row_stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, w);
- surface = cairo_image_surface_create_for_data(pixels,CAIRO_FORMAT_ARGB32,
+ surface = cairo_image_surface_create_for_data(pixels, CAIRO_FORMAT_ARGB32,
w, h, row_stride);
/* Create the cairo context */
- cairo = cairo_create (surface);
+ cairo = cairo_create(surface);
/* Configuration */
cairo_set_source_rgba(cairo, 0, 0, 0, 0);
int bh = h - by - _OVERLAY_BUBBLE_PIN_SIZE;
/* build a path */
- cairo_new_path (cairo);
+ cairo_new_path(cairo);
if (m->type == MAPS_VIEW_OVERLAY_BUBBLE) {
double r = bh / 8.;
double d = M_PI / 180.;
- cairo_arc (cairo, bx + bw - r, by + r, r, -90 * d, 0 * d);
- cairo_arc (cairo, bx + bw - r, by + bh - r, r, 0 * d, 90 * d);
+ cairo_arc(cairo, bx + bw - r, by + r, r, -90 * d, 0 * d);
+ cairo_arc(cairo, bx + bw - r, by + bh - r, r, 0 * d, 90 * d);
cairo_line_to(cairo, bx + bw / 2 + _OVERLAY_BUBBLE_PIN_SIZE, by + bh);
cairo_line_to(cairo, bx + bw / 2, by + bh + _OVERLAY_BUBBLE_PIN_SIZE);
cairo_line_to(cairo, bx + bw / 2 - _OVERLAY_BUBBLE_PIN_SIZE, by + bh);
- cairo_arc (cairo, bx + r, by + bh - r, r, 90 * d, 180 * d);
- cairo_arc (cairo, bx + r, by + r, r, 180 * d, 270 * d);
- }
- else {
+ cairo_arc(cairo, bx + r, by + bh - r, r, 90 * d, 180 * d);
+ cairo_arc(cairo, bx + r, by + r, r, 180 * d, 270 * d);
+ } else {
cairo_move_to(cairo, 1., 1.);
cairo_line_to(cairo, 1., bh);
cairo_line_to(cairo, bw / 2 - _OVERLAY_BUBBLE_PIN_SIZE, bh);
evas_object_hide(m->object);
if (m->bubble)
evas_object_hide(m->bubble);
- }
- else {
+ } else {
evas_object_show(m->object);
if (m->bubble)
evas_object_show(m->bubble);
}
- }
- else {
+ } else {
evas_object_hide(m->object);
if (m->bubble)
evas_object_hide(m->bubble);
y -= _OVERLAY_BUBBLE_MARGIN ;
evas_object_move(m->bubble, x, y);
}
- }
- else
+ } else {
evas_object_move(m->object, x, y);
+ }
return true;
}
if (!overlay || !clipper)
return false;
- bool ret = false;
+ bool ret = false;
maps_coordinates_h coordinates = NULL;
do {
maps_view_object_overlay_get_coordinates(overlay, &coordinates);
ret = __maps_view_object_overlay_move(overlay, coordinates);
- } while(0);
+ } while (0);
if (coordinates)
maps_coordinates_destroy(coordinates);