2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-stage-egl.c: Update the EGL native backend to use the new size negotiation API.
This commit is contained in:
parent
bae4bd0796
commit
d642636fd1
@ -1,3 +1,8 @@
|
|||||||
|
2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/eglnative/clutter-stage-egl.c: Update the EGL native
|
||||||
|
backend to use the new size negotiation API.
|
||||||
|
|
||||||
2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/sdl/clutter-stage-sdl.c: Update the SDL backend to
|
* clutter/sdl/clutter-stage-sdl.c: Update the SDL backend to
|
||||||
|
@ -204,30 +204,48 @@ clutter_stage_egl_realize (ClutterActor *actor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_stage_egl_query_coords (ClutterActor *self,
|
clutter_stage_egl_get_preferred_width (ClutterActor *self,
|
||||||
ClutterActorBox *box)
|
ClutterUnit for_height,
|
||||||
|
ClutterUnit *min_width_p,
|
||||||
|
ClutterUnit *natural_width_p)
|
||||||
{
|
{
|
||||||
ClutterStageEGL *stage_egl = CLUTTER_STAGE_EGL (self);
|
ClutterStageEGL *stage_egl = CLUTTER_STAGE_EGL (self);
|
||||||
|
|
||||||
box->x1 = box->y1 = 0;
|
if (min_width_p)
|
||||||
box->x2 = box->x1 + CLUTTER_UNITS_FROM_INT (stage_egl->surface_width);
|
*min_width_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_width);
|
||||||
box->y2 = box->y1 + CLUTTER_UNITS_FROM_INT (stage_egl->surface_height);
|
|
||||||
|
if (natural_width_p)
|
||||||
|
*natural_width_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_stage_egl_request_coords (ClutterActor *self,
|
clutter_stage_egl_get_preferred_width (ClutterActor *self,
|
||||||
ClutterActorBox *box)
|
ClutterUnit for_height,
|
||||||
|
ClutterUnit *min_width_p,
|
||||||
|
ClutterUnit *natural_width_p)
|
||||||
{
|
{
|
||||||
ClutterStageEGL *stage_egl = CLUTTER_STAGE_EGL (self);
|
ClutterStageEGL *stage_egl = CLUTTER_STAGE_EGL (self);
|
||||||
|
|
||||||
/* framebuffer no resize */
|
if (min_width_p)
|
||||||
box->x1 = 0;
|
*min_width_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_width);
|
||||||
box->y1 = 0;
|
|
||||||
box->x2 = CLUTTER_UNITS_FROM_INT (stage_egl->surface_width);
|
|
||||||
box->y2 = CLUTTER_UNITS_FROM_INT (stage_egl->surface_height);
|
|
||||||
|
|
||||||
CLUTTER_ACTOR_CLASS (clutter_stage_egl_parent_class)->request_coords (self,
|
if (natural_width_p)
|
||||||
box);
|
*natural_width_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_stage_egl_get_preferred_height (ClutterActor *self,
|
||||||
|
ClutterUnit for_width,
|
||||||
|
ClutterUnit *min_height_p,
|
||||||
|
ClutterUnit *natural_height_p)
|
||||||
|
{
|
||||||
|
ClutterStageEGL *stage_egl = CLUTTER_STAGE_EGL (self);
|
||||||
|
|
||||||
|
if (min_height_p)
|
||||||
|
*min_height_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_height);
|
||||||
|
|
||||||
|
if (natural_height_p)
|
||||||
|
*natural_height_p = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -248,12 +266,12 @@ clutter_stage_egl_class_init (ClutterStageEGLClass *klass)
|
|||||||
|
|
||||||
gobject_class->dispose = clutter_stage_egl_dispose;
|
gobject_class->dispose = clutter_stage_egl_dispose;
|
||||||
|
|
||||||
actor_class->show = clutter_stage_egl_show;
|
actor_class->show = clutter_stage_egl_show;
|
||||||
actor_class->hide = clutter_stage_egl_hide;
|
actor_class->hide = clutter_stage_egl_hide;
|
||||||
actor_class->realize = clutter_stage_egl_realize;
|
actor_class->realize = clutter_stage_egl_realize;
|
||||||
actor_class->unrealize = clutter_stage_egl_unrealize;
|
actor_class->unrealize = clutter_stage_egl_unrealize;
|
||||||
actor_class->request_coords = clutter_stage_egl_request_coords;
|
actor_class->get_preferred_width = clutter_stage_egl_get_preferred_width;
|
||||||
actor_class->query_coords = clutter_stage_egl_query_coords;
|
actor_class->get_preferred_height = clutter_stage_egl_get_preferred_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user