int main(int argc, char *argv[]) { (void) argc; (void) argv; eo_init(); Eo *obj = eo_add(SIMPLE_CLASS, NULL); eo_do(obj, simple_a_set(1), simple_b_set(2)); int a, b, sum = 0; eo_do(obj, simple_a_get(&a), simple_b_get(&b), mixin_ab_sum_get(&sum)); fail_if(sum != a + b + 2); /* 2 for the two mixins... */ eo_do(obj, mixin_ab_sum_get(&sum), mixin_ab_sum_get(&sum)); Mixin2_Public_Data *pd2 = eo_data_get(obj, MIXIN2_CLASS); fail_if(pd2->count != 6); Mixin3_Public_Data *pd3 = eo_data_get(obj, MIXIN3_CLASS); fail_if(pd3->count != 9); eo_unref(obj); obj = eo_add(INHERIT_CLASS, NULL); eo_do(obj, simple_a_set(5), simple_a_get(&a)); fail_if(a != 5); eo_unref(obj); eo_shutdown(); return 0; }
int main(int argc, char *argv[]) { (void) argc; (void) argv; eo_init(); Eo *obj = eo_add(INHERIT2_CLASS, NULL); eo_do(obj, simple_a_set(1)); Simple_Public_Data *pd = eo_data_get(obj, SIMPLE_CLASS); fail_if(pd->a != 2); eo_unref(obj); obj = eo_add(INHERIT3_CLASS, NULL); eo_do(obj, simple_a_set(1)); pd = eo_data_get(obj, SIMPLE_CLASS); fail_if(pd->a != 3); eo_unref(obj); obj = eo_add(INHERIT2_CLASS, NULL); eo_do(obj, inherit2_print()); eo_unref(obj); obj = eo_add(SIMPLE_CLASS, NULL); fail_if(eo_do(obj, inherit2_print2())); fail_if(eo_do_super(obj, simple_a_print())); fail_if(eo_do(obj, simple_class_print())); fail_if(!eo_class_do(SIMPLE_CLASS, simple_class_print())); fail_if(!eo_class_do(INHERIT_CLASS, simple_class_print())); fail_if(!eo_class_do(INHERIT2_CLASS, simple_class_print())); fail_if(!eo_class_do(INHERIT3_CLASS, simple_class_print())); fail_if(eo_class_do(SIMPLE_CLASS, simple_a_print())); eo_constructor_super(obj); eo_destructor_super(obj); eo_unref(obj); eo_shutdown(); return 0; }
void evas_fonts_zero_presure(Evas *eo_evas) { Fndat *fd; Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); while (fonts_zero && eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */ { fd = eina_list_data_get(fonts_zero); if (fd->ref != 0) break; fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); if (fd->fdesc) evas_font_desc_unref(fd->fdesc); if (fd->source) eina_stringshare_del(fd->source); evas->engine.func->font_free(evas->engine.data.output, fd->font); #ifdef HAVE_FONTCONFIG if (fd->set) FcFontSetDestroy(fd->set); if (fd->p_nm) FcPatternDestroy(fd->p_nm); #endif free(fd); if (eina_list_count(fonts_zero) < 5) break; } }
static void _evas_map_calc_geom_change(Evas_Object *eo_obj) { int is, was = 0; Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); evas_object_clip_dirty(eo_obj, obj); if (!(obj->layer->evas->is_frozen)) { evas_object_recalc_clippees(eo_obj, obj); if (!obj->is_smart) { is = evas_object_is_in_output_rect(eo_obj, obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is ^ was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } evas_object_inform_call_move(eo_obj, obj); evas_object_inform_call_resize(eo_obj); }
void evas_object_inform_call_image_resize(Evas_Object *eo_obj) { Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas); }
void evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj) { Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas); }
void evas_object_inform_call_image_preloaded(Evas_Object *eo_obj) { Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); if (!_evas_object_image_preloading_get(eo_obj)) return; _evas_object_image_preloading_check(eo_obj); _evas_object_image_preloading_set(eo_obj, 0); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas); }
static Eina_Bool _evas_object_map_parent_check(Evas_Object *eo_parent) { const Eina_Inlist *list; const Evas_Object_Protected_Data *o; if (!eo_parent) return EINA_FALSE; Evas_Object_Protected_Data *parent = eo_data_get(eo_parent, EVAS_OBJ_CLASS); list = evas_object_smart_members_get_direct(parent->smart.parent); EINA_INLIST_FOREACH(list, o) if (o->cur.usemap) break ; if (o) return EINA_FALSE; /* Still some child have a map enable */ parent->child_has_map = EINA_FALSE; _evas_object_map_parent_check(parent->smart.parent); return EINA_TRUE; }
static void _line_xy_get(Eo *eo_obj, void *_pd, va_list *list) { const Evas_Object_Line *o = _pd; Evas_Coord *x1 = va_arg(*list, Evas_Coord *); Evas_Coord *y1 = va_arg(*list, Evas_Coord *); Evas_Coord *x2 = va_arg(*list, Evas_Coord *); Evas_Coord *y2 = va_arg(*list, Evas_Coord *); Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); if (x1) *x1 = obj->cur.geometry.x + o->cur.x1; if (y1) *y1 = obj->cur.geometry.y + o->cur.y1; if (x2) *x2 = obj->cur.geometry.x + o->cur.x2; if (y2) *y2 = obj->cur.geometry.y + o->cur.y2; }
static inline void _evas_map_free(Evas_Object *eo_obj, Evas_Map *m) { if (eo_obj) { Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); if (obj->spans) { obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->spans); free(obj->spans); obj->spans = NULL; } } m->magic = 0; free(m); }
void evas_fonts_zero_free(Evas *eo_evas) { Fndat *fd; Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); EINA_LIST_FREE(fonts_zero, fd) { if (fd->fdesc) evas_font_desc_unref(fd->fdesc); if (fd->source) eina_stringshare_del(fd->source); evas->engine.func->font_free(evas->engine.data.output, fd->font); #ifdef HAVE_FONTCONFIG if (fd->set) FcFontSetDestroy(fd->set); if (fd->p_nm) FcPatternDestroy(fd->p_nm); #endif free(fd); } }
void evas_font_free(Evas *eo_evas, void *font) { Eina_List *l; Fndat *fd; Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); EINA_LIST_FOREACH(fonts_cache, l, fd) { if (fd->font == font) { fd->ref--; if (fd->ref == 0) { fonts_cache = eina_list_remove_list(fonts_cache, l); fonts_zero = eina_list_append(fonts_zero, fd); } break; } } while (fonts_zero && eina_list_count(fonts_zero) > 42) /* 42 is arbitrary */ { fd = eina_list_data_get(fonts_zero); if (fd->ref != 0) break; fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); if (fd->fdesc) evas_font_desc_unref(fd->fdesc); if (fd->source) eina_stringshare_del(fd->source); evas->engine.func->font_free(evas->engine.data.output, fd->font); #ifdef HAVE_FONTCONFIG if (fd->set) FcFontSetDestroy(fd->set); if (fd->p_nm) FcPatternDestroy(fd->p_nm); #endif free(fd); if (eina_list_count(fonts_zero) < 43) break; } }
/* all nice and private */ static void evas_object_line_init(Evas_Object *eo_obj) { Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); /* set up default settings for this kind of object */ obj->cur.color.r = 255; obj->cur.color.g = 255; obj->cur.color.b = 255; obj->cur.color.a = 255; obj->cur.geometry.x = 0; obj->cur.geometry.y = 0; obj->cur.geometry.w = 0; obj->cur.geometry.h = 0; obj->cur.layer = 0; obj->cur.anti_alias = EINA_TRUE; obj->cur.render_op = EVAS_RENDER_BLEND; /* set up object-specific settings */ obj->prev = obj->cur; /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; }
static int eng_setup(Evas *eo_e, void *info) { Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_Direct3D *in; re = (Render_Engine *)e->engine.data.output; in = (Evas_Engine_Info_Direct3D *)info; if (!e->engine.data.output) { e->engine.data.output = _output_setup(e->output.w, e->output.h, in->info.rotation, in->info.window, in->info.depth, in->info.fullscreen); } else if (in->info.fullscreen != 0) { if (re) evas_direct3d_set_layered(re->d3d, 0, 0, 0, NULL); evas_direct3d_set_fullscreen(re->d3d, -1, -1, 1); } else if (in->info.fullscreen == 0) { evas_direct3d_set_fullscreen(re->d3d, re->width, re->height, 0); if (re && in->info.layered == 0) evas_direct3d_set_layered(re->d3d, 0, 0, 0, NULL); else if (re && in->info.layered != 0 && in->shape) evas_direct3d_set_layered(re->d3d, 1, in->shape->width, in->shape->height, in->shape->mask); } if (!e->engine.data.output) return 0; if (!e->engine.data.context) e->engine.data.context = e->engine.func->context_new(e->engine.data.output); return 1; }
static Evas_Font_Set * evas_load_fontconfig(Evas *eo_evas, FcFontSet *set, int size, Font_Rend_Flags wanted_rend) { Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); Evas_Font_Set *font = NULL; int i; /* Do loading for all in family */ for (i = 0; i < set->nfont; i++) { FcValue filename; FcPatternGet(set->fonts[i], FC_FILE, 0, &filename); if (font) evas->engine.func->font_add(evas->engine.data.output, font, (char *)filename.u.s, size, wanted_rend); else font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size, wanted_rend); } return font; }
static void _sizing_eval(Evas_Object *obj) { Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; double scale; ELM_PHOTO_DATA_GET(obj, sd); Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS); if (sd->size <= 0) return; scale = (sd->size * elm_widget_scale_get(obj) * elm_config_scale_get()); evas_object_size_hint_min_set(sd->icon, scale, scale); elm_coords_finger_size_adjust(1, &minw, 1, &minh); edje_object_size_min_restricted_calc (wd->resize_obj, &minw, &minh, minw, minh); elm_coords_finger_size_adjust(1, &minw, 1, &minh); maxw = minw; maxh = minh; evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_max_set(obj, maxw, maxh); }
static void _line_xy_set(Eo *eo_obj, void *_pd, va_list *list) { Evas_Coord x1 = va_arg(*list, Evas_Coord); Evas_Coord y1 = va_arg(*list, Evas_Coord); Evas_Coord x2 = va_arg(*list, Evas_Coord); Evas_Coord y2 = va_arg(*list, Evas_Coord); Evas_Object_Line *o = _pd; Evas_Coord min_x, max_x, min_y, max_y; int is, was = 0; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if ((x1 == o->cur.x1) && (y1 == o->cur.y1) && (x2 == o->cur.x2) && (y2 == o->cur.y2)) return; Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); if (!(obj->layer->evas->is_frozen)) { if (!evas_event_passes_through(eo_obj, obj) && !evas_event_freezes_through(eo_obj, obj) && !evas_object_is_source_invisible(eo_obj, obj)) was = evas_object_is_in_output_rect(eo_obj, obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); } if (x1 < x2) { min_x = x1; max_x = x2; } else { min_x = x2; max_x = x1; } if (y1 < y2) { min_y = y1; max_y = y2; } else { min_y = y2; max_y = y1; } obj->cur.geometry.x = min_x; obj->cur.geometry.y = min_y; obj->cur.geometry.w = max_x - min_x + 2; obj->cur.geometry.h = max_y - min_y + 2; //// obj->cur.cache.geometry.validity = 0; o->cur.x1 = x1 - min_x; o->cur.y1 = y1 - min_y; o->cur.x2 = x2 - min_x; o->cur.y2 = y2 - min_y; o->changed = EINA_TRUE; evas_object_change(eo_obj, obj); evas_object_coords_recalc(eo_obj, obj); evas_object_clip_dirty(eo_obj, obj); if (!(obj->layer->evas->is_frozen)) { is = evas_object_is_in_output_rect(eo_obj, obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if (!evas_event_passes_through(eo_obj, obj) && !evas_event_freezes_through(eo_obj, obj) && !evas_object_is_source_invisible(eo_obj, obj)) { if ((is ^ was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } evas_object_inform_call_move(eo_obj, obj); evas_object_inform_call_resize(eo_obj); }
int main(int argc, char *argv[]) { (void) argc; (void) argv; eo_init(); Eo *obj = eo_add(SIMPLE_CLASS, NULL); Simple_Public_Data *pd = eo_data_get(obj, SIMPLE_CLASS); /* The order of these two is undetermined. */ eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2)); eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1)); /* This will be called afterwards. */ eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_DEFAULT, _a_changed_cb, (void *) 3)); /* This will never be called because the previous callback returns NULL. */ eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_AFTER, _a_changed_cb, (void *) 4)); eo_do(obj, simple_a_set(1)); fail_if(cb_count != 3); eo_do(obj, eo_event_callback_del(EV_A_CHANGED, _a_changed_cb, (void *) 3)); fail_if(pd->cb_count != 3); eo_do(obj, eo_event_callback_del(EV_A_CHANGED, _a_changed_cb, (void *) 12)); fail_if(pd->cb_count != 3); eo_do(obj, eo_event_callback_del(EV_A_CHANGED, _a_changed_cb, (void *) 4)); fail_if(pd->cb_count != 2); void *ret; eo_do(obj, eo_event_callback_del_lazy(EV_A_CHANGED, _a_changed_cb, &ret)); fail_if(pd->cb_count != 1); eo_do(obj, eo_event_callback_del_lazy(EV_A_CHANGED, NULL, &ret)); fail_if(ret); fail_if(pd->cb_count != 1); eo_do(obj, eo_event_callback_del(EV_A_CHANGED, NULL, 0)); fail_if(pd->cb_count != 1); eo_do(obj, eo_event_callback_del_lazy(EV_A_CHANGED, _a_changed_cb, &ret)); fail_if(pd->cb_count != 0); eo_do(obj, eo_event_callback_del_lazy(EV_A_CHANGED, _a_changed_cb, &ret)); fail_if(ret); fail_if(pd->cb_count != 0); /* Freeze/thaw. */ int fcount = 0; cb_count = 0; eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1)); fail_if(pd->cb_count != 1); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 0); eo_do(obj, eo_event_freeze()); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 1); eo_do(obj, eo_event_freeze()); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 2); eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2)); fail_if(pd->cb_count != 1); eo_do(obj, simple_a_set(2)); fail_if(cb_count != 0); eo_do(obj, eo_event_thaw()); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 1); eo_do(obj, eo_event_thaw()); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 0); eo_do(obj, simple_a_set(3)); fail_if(cb_count != 2); cb_count = 0; eo_do(obj, eo_event_thaw()); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 0); eo_do(obj, eo_event_freeze()); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 1); eo_do(obj, simple_a_set(2)); fail_if(cb_count != 0); eo_do(obj, eo_event_thaw()); eo_do(obj, eo_event_freeze_get(&fcount)); fail_if(fcount != 0); eo_do(obj, eo_event_callback_del_lazy(EV_A_CHANGED, _a_changed_cb, &ret)); fail_if(!ret); eo_do(obj, eo_event_callback_del_lazy(EV_A_CHANGED, _a_changed_cb, &ret)); fail_if(!ret); eo_do(obj, eo_event_callback_del_lazy(EV_A_CHANGED, _a_changed_cb, &ret)); fail_if(ret); /* Global Freeze/thaw. */ fcount = 0; cb_count = 0; pd->cb_count = 0; eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1)); fail_if(pd->cb_count != 1); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 0); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze()); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 1); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze()); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 2); eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2)); fail_if(pd->cb_count != 1); eo_do(obj, simple_a_set(2)); fail_if(cb_count != 0); eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 1); eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 0); eo_do(obj, simple_a_set(3)); fail_if(cb_count != 2); cb_count = 0; eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 0); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze()); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 1); eo_do(obj, simple_a_set(2)); fail_if(cb_count != 0); eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); fail_if(fcount != 0); eo_unref(obj); eo_shutdown(); return 0; }
static void _evas_map_calc_map_geometry(Evas_Object *eo_obj) { Evas_Coord x1, x2, yy1, yy2; const Evas_Map_Point *p, *p_end; Eina_Bool ch = EINA_FALSE; Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); if (!obj->cur.map) return; // WARN: Do not merge below code to SLP until it is fixed. // It has an infinite loop bug. if (obj->prev.map) { if (obj->prev.map != obj->cur.map) { // FIXME: this causes an infinite loop somewhere... hard to debug if (obj->prev.map->count == obj->cur.map->count) { const Evas_Map_Point *p2; p = obj->cur.map->points; p2 = obj->prev.map->points; if (memcmp(p, p2, sizeof(Evas_Map_Point) * obj->prev.map->count) != 0) ch = EINA_TRUE; if (!ch) { if (obj->cache_map) evas_map_free(obj->cache_map); obj->cache_map = obj->cur.map; obj->cur.map = obj->prev.map; } } else ch = EINA_TRUE; } } else ch = EINA_TRUE; p = obj->cur.map->points; p_end = p + obj->cur.map->count; x1 = x2 = lround(p->x); yy1 = yy2 = lround(p->y); p++; for (; p < p_end; p++) { Evas_Coord x, y; x = lround(p->x); y = lround(p->y); if (x < x1) x1 = x; if (x > x2) x2 = x; if (y < yy1) yy1 = y; if (y > yy2) yy2 = y; } // this causes clip-out bugs now mapped objs canbe opaque!!! // // add 1 pixel of fuzz around the map region to ensure updates are correct // x1 -= 1; yy1 -= 1; // x2 += 1; yy2 += 1; if (obj->cur.map->normal_geometry.x != x1) ch = 1; if (obj->cur.map->normal_geometry.y != yy1) ch = 1; if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1; if (obj->cur.map->normal_geometry.h != (yy2 - yy1)) ch = 1; obj->cur.map->normal_geometry.x = x1; obj->cur.map->normal_geometry.y = yy1; obj->cur.map->normal_geometry.w = (x2 - x1); obj->cur.map->normal_geometry.h = (yy2 - yy1); obj->changed_map = ch; // This shouldn't really be needed, but without it we do have case // where the clip is wrong when a map doesn't change, so always forcing // it, as long as someone doesn't find a better fix. evas_object_clip_dirty(eo_obj, obj); if (ch) _evas_map_calc_geom_change(eo_obj); }
static const char SIG_FOCUSED[] = "focused"; static const char SIG_UNFOCUSED[] = "unfocused"; /* smart callbacks coming from elm glview objects: */ static const Evas_Smart_Cb_Description _smart_callbacks[] = { {SIG_FOCUSED, ""}, {SIG_UNFOCUSED, ""}, {NULL, NULL} }; static void _elm_glview_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list) { Eina_Bool *ret = va_arg(*list, Eina_Bool *); Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS); if (elm_widget_focus_get(obj)) { evas_object_focus_set(wd->resize_obj, EINA_TRUE); evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL); } else { evas_object_focus_set(wd->resize_obj, EINA_FALSE); evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL); } if (ret) *ret = EINA_TRUE; }
evas_object_polygon_add(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); Evas_Object *eo_obj = eo_add(EVAS_OBJ_POLYGON_CLASS, e); eo_unref(eo_obj); return eo_obj; } static void _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) { eo_do_super(eo_obj, eo_constructor()); Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); evas_object_polygon_init(eo_obj); evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); } EAPI void evas_object_polygon_point_add(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y) { MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); eo_do(eo_obj, evas_obj_polygon_point_add(x, y)); } static void _polygon_point_add(Eo *eo_obj, void *_pd, va_list *list)