forked from enlightenment/efl
parent
a5ba53be87
commit
95353b03d2
|
@ -73,6 +73,7 @@ default:
|
||||||
void
|
void
|
||||||
evas_render(Evas e)
|
evas_render(Evas e)
|
||||||
{
|
{
|
||||||
|
Imlib_Updates up;
|
||||||
Evas_List delete_objects;
|
Evas_List delete_objects;
|
||||||
Evas_List l, ll;
|
Evas_List l, ll;
|
||||||
void (*func_draw_add_rect) (Display *disp, Window win, int x, int y, int w, int h);
|
void (*func_draw_add_rect) (Display *disp, Window win, int x, int y, int w, int h);
|
||||||
|
@ -254,124 +255,117 @@ evas_render(Evas e)
|
||||||
evas_list_free(delete_objects);
|
evas_list_free(delete_objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func_init(e->current.display, e->current.screen);
|
||||||
|
if (e->updates)
|
||||||
{
|
{
|
||||||
Imlib_Updates up;
|
up = imlib_updates_merge_for_rendering(e->updates,
|
||||||
|
e->current.drawable_width,
|
||||||
func_init(e->current.display, e->current.screen);
|
e->current.drawable_height);
|
||||||
if (e->updates)
|
e->updates = NULL;
|
||||||
|
if (up)
|
||||||
{
|
{
|
||||||
up = imlib_updates_merge_for_rendering(e->updates,
|
Imlib_Updates u;
|
||||||
e->current.drawable_width,
|
|
||||||
e->current.drawable_height);
|
u = up;
|
||||||
e->updates = NULL;
|
while (u)
|
||||||
if (up)
|
|
||||||
{
|
{
|
||||||
Imlib_Updates u;
|
int x, y, w, h;
|
||||||
|
|
||||||
u = up;
|
imlib_updates_get_coordinates(u, &x, &y, &w, &h);
|
||||||
while (u)
|
func_draw_add_rect(e->current.display,
|
||||||
|
e->current.drawable,
|
||||||
|
x, y, w, h);
|
||||||
|
u = imlib_updates_get_next(u);
|
||||||
|
}
|
||||||
|
imlib_updates_free(up);
|
||||||
|
/* draw all objects now */
|
||||||
|
for (l = e->layers; l; l = l->next)
|
||||||
|
{
|
||||||
|
Evas_Layer layer;
|
||||||
|
|
||||||
|
layer = l->data;
|
||||||
|
for (ll = layer->objects; ll; ll = ll->next)
|
||||||
{
|
{
|
||||||
int x, y, w, h;
|
Evas_Object_Any o;
|
||||||
|
|
||||||
imlib_updates_get_coordinates(u, &x, &y, &w, &h);
|
o = ll->data;
|
||||||
func_draw_add_rect(e->current.display,
|
if (o->current.visible)
|
||||||
e->current.drawable,
|
|
||||||
x, y, w, h);
|
|
||||||
u = imlib_updates_get_next(u);
|
|
||||||
}
|
|
||||||
imlib_updates_free(up);
|
|
||||||
/* draw all objects now */
|
|
||||||
for (l = e->layers; l; l = l->next)
|
|
||||||
{
|
|
||||||
Evas_Layer layer;
|
|
||||||
|
|
||||||
layer = l->data;
|
|
||||||
for (ll = layer->objects; ll; ll = ll->next)
|
|
||||||
{
|
{
|
||||||
Evas_Object_Any o;
|
int x, y, w, h;
|
||||||
|
|
||||||
o = ll->data;
|
_evas_object_get_current_translated_coords(e, o,
|
||||||
if (o->current.visible)
|
&x, &y,
|
||||||
|
&w, &h);
|
||||||
|
if (RECTS_INTERSECT(0, 0,
|
||||||
|
e->current.drawable_width,
|
||||||
|
e->current.drawable_height,
|
||||||
|
x, y, w, h))
|
||||||
{
|
{
|
||||||
int x, y, w, h;
|
switch (o->type)
|
||||||
|
|
||||||
_evas_object_get_current_translated_coords(e, o,
|
|
||||||
&x, &y,
|
|
||||||
&w, &h);
|
|
||||||
if (RECTS_INTERSECT(0, 0,
|
|
||||||
e->current.drawable_width,
|
|
||||||
e->current.drawable_height,
|
|
||||||
x, y, w, h))
|
|
||||||
{
|
{
|
||||||
switch (o->type)
|
case OBJECT_IMAGE:
|
||||||
{
|
{
|
||||||
case OBJECT_IMAGE:
|
Evas_Object_Image oo;
|
||||||
|
void *im;
|
||||||
|
|
||||||
|
oo = o;
|
||||||
|
im = func_image_new_from_file(e->current.display, oo->current.file);
|
||||||
|
if (im)
|
||||||
{
|
{
|
||||||
Evas_Object_Image oo;
|
func_image_draw(im,
|
||||||
|
e->current.display,
|
||||||
oo = o;
|
e->current.drawable,
|
||||||
{
|
e->current.drawable_width,
|
||||||
void *im;
|
e->current.drawable_height,
|
||||||
|
0, 0,
|
||||||
im = func_image_new_from_file(e->current.display, oo->current.file);
|
func_image_get_width(im),
|
||||||
if (im)
|
func_image_get_height(im),
|
||||||
{
|
x, y, w, h);
|
||||||
func_image_draw(im,
|
func_image_free(im);
|
||||||
e->current.display,
|
|
||||||
e->current.drawable,
|
|
||||||
e->current.drawable_width,
|
|
||||||
e->current.drawable_height,
|
|
||||||
0, 0,
|
|
||||||
func_image_get_width(im),
|
|
||||||
func_image_get_height(im),
|
|
||||||
x, y, w, h);
|
|
||||||
func_image_free(im);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case OBJECT_TEXT:
|
|
||||||
{
|
|
||||||
Evas_Object_Text oo;
|
|
||||||
|
|
||||||
oo = o;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OBJECT_RECTANGLE:
|
|
||||||
{
|
|
||||||
Evas_Object_Rectangle oo;
|
|
||||||
|
|
||||||
oo = o;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OBJECT_LINE:
|
|
||||||
{
|
|
||||||
Evas_Object_Line oo;
|
|
||||||
|
|
||||||
oo = o;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OBJECT_GRADIENT_BOX:
|
|
||||||
{
|
|
||||||
Evas_Object_Gradient_Box oo;
|
|
||||||
|
|
||||||
oo = o;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OBJECT_BITS:
|
|
||||||
{
|
|
||||||
Evas_Object_Bits oo;
|
|
||||||
|
|
||||||
oo = o;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case OBJECT_TEXT:
|
||||||
|
{
|
||||||
|
Evas_Object_Text oo;
|
||||||
|
|
||||||
|
oo = o;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OBJECT_RECTANGLE:
|
||||||
|
{
|
||||||
|
Evas_Object_Rectangle oo;
|
||||||
|
|
||||||
|
oo = o;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OBJECT_LINE:
|
||||||
|
{
|
||||||
|
Evas_Object_Line oo;
|
||||||
|
|
||||||
|
oo = o;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OBJECT_GRADIENT_BOX:
|
||||||
|
{
|
||||||
|
Evas_Object_Gradient_Box oo;
|
||||||
|
|
||||||
|
oo = o;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OBJECT_BITS:
|
||||||
|
{
|
||||||
|
Evas_Object_Bits oo;
|
||||||
|
|
||||||
|
oo = o;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func_flush_draw(e->current.display, e->current.drawable);
|
|
||||||
}
|
}
|
||||||
|
func_flush_draw(e->current.display, e->current.drawable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
e->previous = e->current;
|
e->previous = e->current;
|
||||||
|
|
Loading…
Reference in New Issue