parent
1bf34243f6
commit
00d83df7eb
|
@ -12,7 +12,7 @@ struct _Demo_Edje
|
|||
Evas_Object *title;
|
||||
Evas_Object *title_clip;
|
||||
Evas_Object *image;
|
||||
double minw, minh;
|
||||
Evas_Coord minw, minh;
|
||||
int hdir;
|
||||
int vdir;
|
||||
char down_top : 1;
|
||||
|
@ -25,7 +25,7 @@ struct _Collection
|
|||
{
|
||||
char header : 1;
|
||||
char clicked : 1;
|
||||
double maxw;
|
||||
Evas_Coord maxw;
|
||||
char *file;
|
||||
char *part;
|
||||
Evas_Object *text;
|
||||
|
@ -42,7 +42,7 @@ static void main_pre_rend(Ecore_Evas *ee);
|
|||
static void main_post_rend(Ecore_Evas *ee);
|
||||
|
||||
void bg_setup(void);
|
||||
void bg_resize(double w, double h);
|
||||
void bg_resize(Evas_Coord w, Evas_Coord h);
|
||||
static void bg_key_down(void *data, Evas * e, Evas_Object * obj, void *event_info);
|
||||
|
||||
void test_list_move(Collection *co_head);
|
||||
|
@ -134,7 +134,7 @@ main_stop(void)
|
|||
static void
|
||||
main_resize(Ecore_Evas *ee)
|
||||
{
|
||||
double w, h;
|
||||
Evas_Coord w, h;
|
||||
|
||||
evas_output_viewport_get(evas, NULL, NULL, &w, &h);
|
||||
bg_resize(w, h);
|
||||
|
@ -197,7 +197,7 @@ bg_setup(void)
|
|||
}
|
||||
|
||||
void
|
||||
bg_resize(double w, double h)
|
||||
bg_resize(Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
evas_object_resize(o_bg, w, h);
|
||||
evas_object_resize(o_shadow, w, h);
|
||||
|
@ -294,7 +294,7 @@ top_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
ev = event_info;
|
||||
if (de->down_top)
|
||||
{
|
||||
double x, y;
|
||||
Evas_Coord x, y;
|
||||
|
||||
evas_object_geometry_get(de->left, &x, &y, NULL, NULL);
|
||||
evas_object_move(de->left,
|
||||
|
@ -336,7 +336,7 @@ bottom_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
{
|
||||
Demo_Edje *de;
|
||||
Evas_Event_Mouse_Down *ev;
|
||||
double x, y, w, h;
|
||||
Evas_Coord x, y, w, h;
|
||||
int hdir, vdir;
|
||||
|
||||
de = data;
|
||||
|
@ -374,8 +374,8 @@ bottom_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
ev = event_info;
|
||||
if (de->down_bottom)
|
||||
{
|
||||
double x, y, w, h, tw, th;
|
||||
double minw, minh;
|
||||
Evas_Coord x, y, w, h, tw, th;
|
||||
Evas_Coord minw, minh;
|
||||
int hdir, vdir;
|
||||
|
||||
evas_object_geometry_get(de->edje, &x, &y, &w, &h);
|
||||
|
@ -467,7 +467,7 @@ static void
|
|||
list_head_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Collection *co;
|
||||
double x, y;
|
||||
Evas_Coord x, y;
|
||||
Evas_Event_Mouse_Move *ev;
|
||||
|
||||
co = data;
|
||||
|
@ -486,7 +486,7 @@ cb (void *data, Evas_Object *o, const char *sig, const char *src)
|
|||
printf("CALLBACK for %p %p \"%s\" \"%s\"\n", data, o, sig, src);
|
||||
if (!strcmp(sig, "drag"))
|
||||
{
|
||||
double x, y;
|
||||
Evas_Coord x, y;
|
||||
|
||||
edje_object_part_drag_value_get(o, src, &x, &y);
|
||||
printf("Drag %3.3f %3.3f\n", x, y);
|
||||
|
@ -497,13 +497,13 @@ void
|
|||
test_list_move(Collection *co_head)
|
||||
{
|
||||
Evas_List *l;
|
||||
double x, y;
|
||||
Evas_Coord x, y;
|
||||
|
||||
evas_object_geometry_get(co_head->bg, &x, &y, NULL, NULL);
|
||||
for (l = co_head->entries; l; l = l->next)
|
||||
{
|
||||
Collection *co;
|
||||
double w, h;
|
||||
Evas_Coord w, h;
|
||||
|
||||
co = l->data;
|
||||
evas_object_geometry_get(co->text, NULL, NULL, &w, &h);
|
||||
|
@ -521,7 +521,7 @@ void
|
|||
test_list(char *file)
|
||||
{
|
||||
Evas_List *entries;
|
||||
double maxw = 128;
|
||||
Evas_Coord maxw = 128;
|
||||
Collection *co_head;
|
||||
Evas_List *collections = NULL;
|
||||
|
||||
|
@ -531,7 +531,7 @@ test_list(char *file)
|
|||
{
|
||||
Collection *co;
|
||||
Evas_Object *o;
|
||||
double w, h;
|
||||
Evas_Coord w, h;
|
||||
char buf[1024];
|
||||
|
||||
co = calloc(1, sizeof(Collection));
|
||||
|
@ -564,14 +564,14 @@ test_list(char *file)
|
|||
if (entries)
|
||||
{
|
||||
Evas_List *l;
|
||||
double x = 0, y = 0;
|
||||
Evas_Coord x = 0, y = 0;
|
||||
|
||||
for (l = entries; l; l = l->next)
|
||||
{
|
||||
char *name;
|
||||
Collection *co;
|
||||
Evas_Object *o;
|
||||
double w, h;
|
||||
Evas_Coord w, h;
|
||||
|
||||
name = l->data;
|
||||
co = calloc(1, sizeof(Collection));
|
||||
|
@ -608,8 +608,8 @@ test_list(char *file)
|
|||
void
|
||||
test_resize(Demo_Edje *de)
|
||||
{
|
||||
double x, y, w, h, tw, th;
|
||||
double minw, minh;
|
||||
Evas_Coord x, y, w, h, tw, th;
|
||||
Evas_Coord minw, minh;
|
||||
|
||||
evas_object_geometry_get(de->edje, &x, &y, &w, &h);
|
||||
x -= 10;
|
||||
|
@ -643,8 +643,8 @@ test_setup(char *file, char *name)
|
|||
Evas_Object *o;
|
||||
Demo_Edje *de;
|
||||
char buf[1024];
|
||||
double tw, th, w, h;
|
||||
double xx, yy, ww, hh;
|
||||
Evas_Coord tw, th, w, h;
|
||||
Evas_Coord xx, yy, ww, hh;
|
||||
|
||||
xx = 10;
|
||||
yy = 10;
|
||||
|
|
|
@ -22,8 +22,8 @@ extern "C" {
|
|||
void edje_file_collection_list_free (Evas_List *lst);
|
||||
char *edje_file_data_get (const char *file, const char *key);
|
||||
|
||||
void edje_extern_object_min_size_set (Evas_Object *obj, double minw, double minh);
|
||||
void edje_extern_object_max_size_set (Evas_Object *obj, double maxw, double maxh);
|
||||
void edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
|
||||
void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
|
||||
|
||||
Evas_Object *edje_object_add (Evas *evas);
|
||||
const char *edje_object_data_get (Evas_Object *obj, const char *key);
|
||||
|
@ -39,12 +39,12 @@ extern "C" {
|
|||
int edje_object_freeze (Evas_Object *o);
|
||||
int edje_object_thaw (Evas_Object *o);
|
||||
void edje_object_color_class_set (Evas_Object *o, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
||||
void edje_object_text_class_set (Evas_Object *o, const char *text_class, const char *font, double size);
|
||||
void edje_object_size_min_get (Evas_Object *o, double *minw, double *minh);
|
||||
void edje_object_size_max_get (Evas_Object *o, double *maxw, double *maxh);
|
||||
void edje_object_size_min_calc (Evas_Object *o, double *minw, double *minh);
|
||||
void edje_object_text_class_set (Evas_Object *o, const char *text_class, const char *font, Evas_Font_Size size);
|
||||
void edje_object_size_min_get (Evas_Object *o, Evas_Coord *minw, Evas_Coord *minh);
|
||||
void edje_object_size_max_get (Evas_Object *o, Evas_Coord *maxw, Evas_Coord *maxh);
|
||||
void edje_object_size_min_calc (Evas_Object *o, Evas_Coord *minw, Evas_Coord *minh);
|
||||
int edje_object_part_exists (Evas_Object *o, const char *part);
|
||||
void edje_object_part_geometry_get (Evas_Object *o, const char *part, double *x, double *y, double *w, double *h);
|
||||
void edje_object_part_geometry_get (Evas_Object *o, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
||||
void edje_object_part_text_set (Evas_Object *o, const char *part, const char *text);
|
||||
const char *edje_object_part_text_get (Evas_Object *o, const char *part);
|
||||
void edje_object_part_swallow (Evas_Object *o, const char *part, Evas_Object *o_swallow);
|
||||
|
|
|
@ -599,7 +599,12 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep)
|
|||
double pos = 0.0;
|
||||
|
||||
if (ep->calculated) return;
|
||||
if (ep->calculating) return;
|
||||
if (ep->calculating)
|
||||
{
|
||||
printf("EDJE ERROR: circular dependancy when calculating part \"%s\"\n",
|
||||
ep->part->name);
|
||||
return;
|
||||
}
|
||||
ep->calculating = 1;
|
||||
if (ep->param1.rel1_to_x) _edje_part_recalc(ed, ep->param1.rel1_to_x);
|
||||
if (ep->param1.rel1_to_y) _edje_part_recalc(ed, ep->param1.rel1_to_y);
|
||||
|
|
|
@ -141,7 +141,7 @@ _edje_mouse_move_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
if (!rp) return;
|
||||
if (rp->still_in)
|
||||
{
|
||||
double x, y, w, h;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
if ((ev->cur.canvas.x < x) || (ev->cur.canvas.y < y) ||
|
||||
|
@ -150,7 +150,7 @@ _edje_mouse_move_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
}
|
||||
else
|
||||
{
|
||||
double x, y, w, h;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
if ((ev->cur.canvas.x >= x) && (ev->cur.canvas.y >= y) &&
|
||||
|
|
|
@ -8,8 +8,8 @@ static void _edje_smart_raise(Evas_Object * obj);
|
|||
static void _edje_smart_lower(Evas_Object * obj);
|
||||
static void _edje_smart_stack_above(Evas_Object * obj, Evas_Object * above);
|
||||
static void _edje_smart_stack_below(Evas_Object * obj, Evas_Object * below);
|
||||
static void _edje_smart_move(Evas_Object * obj, double x, double y);
|
||||
static void _edje_smart_resize(Evas_Object * obj, double w, double h);
|
||||
static void _edje_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y);
|
||||
static void _edje_smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h);
|
||||
static void _edje_smart_show(Evas_Object * obj);
|
||||
static void _edje_smart_hide(Evas_Object * obj);
|
||||
static void _edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a);
|
||||
|
@ -237,11 +237,11 @@ _edje_smart_stack_below(Evas_Object * obj, Evas_Object * below)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_smart_move(Evas_Object * obj, double x, double y)
|
||||
_edje_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
double xx, yy;
|
||||
Evas_Coord xx, yy;
|
||||
|
||||
ed = evas_object_smart_data_get(obj);
|
||||
if (!ed) return;
|
||||
|
@ -253,7 +253,7 @@ _edje_smart_move(Evas_Object * obj, double x, double y)
|
|||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *ep;
|
||||
double ox, oy;
|
||||
Evas_Coord ox, oy;
|
||||
|
||||
ep = l->data;
|
||||
evas_object_geometry_get(ep->object, &ox, &oy, NULL, NULL);
|
||||
|
@ -270,7 +270,7 @@ _edje_smart_move(Evas_Object * obj, double x, double y)
|
|||
for (el = ep->extra_objects; el; el = el->next)
|
||||
{
|
||||
Evas_Object *o;
|
||||
double oox, ooy;
|
||||
Evas_Coord oox, ooy;
|
||||
|
||||
o = el->data;
|
||||
evas_object_geometry_get(o, &oox, &ooy, NULL, NULL);
|
||||
|
@ -282,7 +282,7 @@ _edje_smart_move(Evas_Object * obj, double x, double y)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_smart_resize(Evas_Object * obj, double w, double h)
|
||||
_edje_smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
|
|
@ -235,8 +235,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
char *text;
|
||||
char *font;
|
||||
int size;
|
||||
double tw, th;
|
||||
double ox, oy, sw, sh;
|
||||
Evas_Coord tw, th;
|
||||
Evas_Coord ox, oy, sw, sh;
|
||||
char *buf = NULL;
|
||||
|
||||
text = chosen_desc->text.text;
|
||||
|
@ -319,12 +319,10 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (th < sh)
|
||||
{
|
||||
int dif;
|
||||
double change;
|
||||
|
||||
dif = (th - sh) / 4;
|
||||
if (dif < 1) dif = 1;
|
||||
change = 0;
|
||||
while ((th < sh) && (sw > 0.0))
|
||||
while ((th < sh) && (sw > 0))
|
||||
{
|
||||
size += dif;
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
|
@ -351,7 +349,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (size < 1) size = 1;
|
||||
if (!chosen_desc->text.fit_x)
|
||||
{
|
||||
double p;
|
||||
Evas_Coord p;
|
||||
int c1, c2;
|
||||
int loop;
|
||||
int orig_len;
|
||||
|
|
|
@ -130,7 +130,7 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in
|
|||
}
|
||||
|
||||
void
|
||||
edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, double size)
|
||||
edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size)
|
||||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
|
@ -189,7 +189,7 @@ edje_object_part_exists(Evas_Object *obj, const char *part)
|
|||
}
|
||||
|
||||
void
|
||||
edje_object_part_geometry_get(Evas_Object *obj, const char *part, double *x, double *y, double *w, double *h )
|
||||
edje_object_part_geometry_get(Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h )
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
@ -295,7 +295,7 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
|
|||
rp->swallow_params.max.h = -1;
|
||||
if ((type) && (!strcmp(type, "edje")))
|
||||
{
|
||||
double w, h;
|
||||
Evas_Coord w, h;
|
||||
|
||||
edje_object_size_min_get(obj_swallow, &w, &h);
|
||||
rp->swallow_params.min.w = w;
|
||||
|
@ -308,7 +308,7 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
|
|||
(!strcmp(type, "polygon")) ||
|
||||
(!strcmp(type, "line"))))
|
||||
{
|
||||
double w, h;
|
||||
Evas_Coord w, h;
|
||||
|
||||
evas_object_geometry_get(obj_swallow, NULL, NULL, &w, &h);
|
||||
rp->swallow_params.min.w = w;
|
||||
|
@ -333,7 +333,7 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
|
|||
}
|
||||
|
||||
void
|
||||
edje_extern_object_min_size_set(Evas_Object *obj, double minw, double minh)
|
||||
edje_extern_object_min_size_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
|
||||
{
|
||||
int mw, mh;
|
||||
|
||||
|
@ -352,7 +352,7 @@ edje_extern_object_min_size_set(Evas_Object *obj, double minw, double minh)
|
|||
}
|
||||
|
||||
void
|
||||
edje_extern_object_max_size_set(Evas_Object *obj, double maxw, double maxh)
|
||||
edje_extern_object_max_size_set(Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh)
|
||||
{
|
||||
int mw, mh;
|
||||
|
||||
|
@ -411,7 +411,7 @@ edje_object_part_swallow_get(Evas_Object *obj, const char *part)
|
|||
}
|
||||
|
||||
void
|
||||
edje_object_size_min_get(Evas_Object *obj, double *minw, double *minh)
|
||||
edje_object_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
@ -427,7 +427,7 @@ edje_object_size_min_get(Evas_Object *obj, double *minw, double *minh)
|
|||
}
|
||||
|
||||
void
|
||||
edje_object_size_max_get(Evas_Object *obj, double *maxw, double *maxh)
|
||||
edje_object_size_max_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
@ -457,10 +457,10 @@ edje_object_size_max_get(Evas_Object *obj, double *maxw, double *maxh)
|
|||
}
|
||||
|
||||
void
|
||||
edje_object_size_min_calc(Evas_Object *obj, double *minw, double *minh)
|
||||
edje_object_size_min_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
||||
{
|
||||
Edje *ed;
|
||||
double pw, ph;
|
||||
Evas_Coord pw, ph;
|
||||
int maxw, maxh;
|
||||
int ok;
|
||||
|
||||
|
|
Loading…
Reference in New Issue