imagebox: merge geometry and extents

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-08-25 18:26:58 +02:00
parent fdefa387aa
commit 59a0f7e34b
1 changed files with 2 additions and 10 deletions

View File

@ -33,9 +33,9 @@ typedef struct
} imagebox_data_t;
static area_t
imagebox_geometry(widget_t *widget, int screen)
imagebox_extents(lua_State *L, widget_t *widget)
{
area_t geometry;
area_t geometry = { .x = 0, .y = 0 };
imagebox_data_t *d = widget->data;
if(d->image)
@ -49,17 +49,9 @@ imagebox_geometry(widget_t *widget, int screen)
geometry.height = 0;
}
geometry.x = geometry.y = 0;
return geometry;
}
static area_t
imagebox_extents(lua_State *L, widget_t *widget)
{
return imagebox_geometry(widget, 0);
}
/** Draw an image.
* \param widget The widget.
* \param ctx The draw context.