PREFIX value ml_evas_object_size_hint_align_get(value v_obj) { CAMLparam0(); CAMLlocal1(v); double x, y; evas_object_size_hint_align_get((Evas_Object*) v_obj, &x, &y); v = caml_alloc(2, 0); Store_field(v, 0, copy_double(x)); Store_field(v, 1, copy_double(y)); CAMLreturn(v); }
static void _btn_cursors_move_cb(void *data, Evas_Object *btn, void *ev) { App_Data *app = data; double ax, ay; if (!app->icon_still) { Evas_Object *icon; app->icon_still = elm_object_content_unset(app->mid); evas_object_hide(app->icon_still); icon = elm_icon_add(app->mid); elm_icon_standard_set(icon, "chat"); elm_object_part_content_set(app->mid, "icon", icon); } evas_object_size_hint_align_get(app->mid, &ax, &ay); if (btn == app->cursors.up) { ay -= 0.05; if (ay < 0.0) ay = 0.0; } else if (btn == app->cursors.down) { ay += 0.05; if (ay > 1.0) ay = 1.0; } else if (btn == app->cursors.left) { ax -= 0.05; if (ax < 0.0) ax = 0.0; } else if (btn == app->cursors.right) { ax += 0.05; if (ax > 1.0) ax = 1.0; } evas_object_size_hint_align_set(app->mid, ax, ay); }
static void _print_rect_stats(Evas_Object *rect) { Evas_Coord w, h, l, r, t, b; double x, y; evas_object_size_hint_align_get(rect, &x, &y); fprintf(stdout, "\talign hints: h(%f), v(%f)\n", x, y); evas_object_size_hint_min_get(rect, &w, &h); fprintf(stdout, "\tmin. size hints: h(%d), v(%d)\n", w, h); evas_object_size_hint_max_get(rect, &w, &h); fprintf(stdout, "\tmax. size hints: h(%d), v(%d)\n", w, h); evas_object_size_hint_padding_get(rect, &l, &r, &t, &b); fprintf(stdout, "\tpadding hints: l(%d), r(%d), t(%d), b(%d)\n", l, r, t, b); evas_object_size_hint_weight_get(rect, &x, &y); fprintf(stdout, "\tweight hints: h(%f), v(%f)\n", x, y); }
void Object::getSizeHintAlign (double &outX, double &outY) const { evas_object_size_hint_align_get (o, &outX, &outY); }