mirror of
https://github.com/brl/mutter.git
synced 2025-02-12 19:34:10 +00:00
2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
Bug #961 - Fails to build on OSX * clutter/osx/clutter-stage-osx.c: Update the OSX backend to use the new size negotiation API.
This commit is contained in:
parent
7014b9ed2c
commit
df86cb1ae3
@ -1,3 +1,10 @@
|
|||||||
|
2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
Bug #961 - Fails to build on OSX
|
||||||
|
|
||||||
|
* clutter/osx/clutter-stage-osx.c: Update the OSX backend to
|
||||||
|
use the new size negotiation API.
|
||||||
|
|
||||||
2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-06-11 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* autogen.sh: Force overwriting when glib-gettextize is
|
* autogen.sh: Force overwriting when glib-gettextize is
|
||||||
|
@ -298,8 +298,8 @@ clutter_stage_osx_realize (ClutterActor *actor)
|
|||||||
/* FIXME: ClutterStage:realize is using the class pointer directly rather
|
/* FIXME: ClutterStage:realize is using the class pointer directly rather
|
||||||
* than clutter_actor_realize which would set the REALIZED flag for us.
|
* than clutter_actor_realize which would set the REALIZED flag for us.
|
||||||
*/
|
*/
|
||||||
CLUTTER_ACTOR_SET_FLAGS(self, CLUTTER_ACTOR_REALIZED);
|
CLUTTER_NOTE (BACKEND, "Marking stage as realized");
|
||||||
CLUTTER_SET_PRIVATE_FLAGS(self, CLUTTER_ACTOR_SYNC_MATRICES);
|
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -366,28 +366,68 @@ clutter_stage_osx_hide (ClutterActor *actor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_stage_osx_query_coords (ClutterActor *actor,
|
clutter_stage_osx_get_preferred_width (ClutterActor *actor,
|
||||||
ClutterActorBox *box)
|
ClutterUnit for_height,
|
||||||
|
ClutterUnit *min_width_p,
|
||||||
|
ClutterUnit *natural_width_p)
|
||||||
{
|
{
|
||||||
ClutterStageOSX *self = CLUTTER_STAGE_OSX (actor);
|
ClutterStageOSX *self = CLUTTER_STAGE_OSX (actor);
|
||||||
|
gboolean is_resizable;
|
||||||
|
|
||||||
CLUTTER_OSX_POOL_ALLOC();
|
CLUTTER_OSX_POOL_ALLOC();
|
||||||
|
|
||||||
box->x1 = 0;
|
is_resizable = clutter_stage_get_user_resizable (self->wrapper);
|
||||||
box->y1 = 0;
|
|
||||||
box->x2 = box->x1 + CLUTTER_UNITS_FROM_FLOAT (self->requisition_width);
|
if (min_width_p)
|
||||||
box->y2 = box->y1 + CLUTTER_UNITS_FROM_FLOAT (self->requisition_height);
|
{
|
||||||
|
if (is_resizable)
|
||||||
|
*min_width_p = CLUTTER_UNITS_FROM_FLOAT (1.0);
|
||||||
|
else
|
||||||
|
*min_width_p = CLUTTER_UNITS_FROM_FLOAT (self->requisition_width);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (natural_width_p)
|
||||||
|
*natural_width_p = CLUTTER_UNITS_FROM_FLOAT (self->requisition_width);
|
||||||
|
|
||||||
CLUTTER_OSX_POOL_RELEASE();
|
CLUTTER_OSX_POOL_RELEASE();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_stage_osx_request_coords (ClutterActor *actor,
|
clutter_stage_osx_get_preferred_height (ClutterActor *actor,
|
||||||
ClutterActorBox *box)
|
ClutterUnit for_width,
|
||||||
|
ClutterUnit *min_height_p,
|
||||||
|
ClutterUnit *natural_height_p)
|
||||||
{
|
{
|
||||||
ClutterStageOSX *self = CLUTTER_STAGE_OSX (actor);
|
ClutterStageOSX *self = CLUTTER_STAGE_OSX (actor);
|
||||||
|
gboolean is_resizable;
|
||||||
|
|
||||||
CLUTTER_NOTE (BACKEND, "[%p], request_coords: %d,%d %dx%d", self,
|
CLUTTER_OSX_POOL_ALLOC();
|
||||||
|
|
||||||
|
is_resizable = clutter_stage_get_user_resizable (self->wrapper);
|
||||||
|
|
||||||
|
if (min_height_p)
|
||||||
|
{
|
||||||
|
if (is_resizable)
|
||||||
|
*min_height_p = CLUTTER_UNITS_FROM_FLOAT (1.0);
|
||||||
|
else
|
||||||
|
*min_height_p = CLUTTER_UNITS_FROM_FLOAT (self->requisition_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (natural_height_p)
|
||||||
|
*natural_height_p = CLUTTER_UNITS_FROM_FLOAT (self->requisition_height);
|
||||||
|
|
||||||
|
CLUTTER_OSX_POOL_RELEASE();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_stage_osx_allocate (ClutterActor *actor,
|
||||||
|
const ClutterActorBox *box,
|
||||||
|
gboolean origin_changed)
|
||||||
|
{
|
||||||
|
ClutterStageOSX *self = CLUTTER_STAGE_OSX (actor);
|
||||||
|
ClutterActorClass *parent_class;
|
||||||
|
|
||||||
|
CLUTTER_NOTE (BACKEND, "[%p], allocate: %d, %d - %d x %d", self,
|
||||||
CLUTTER_UNITS_TO_INT (box->x1),
|
CLUTTER_UNITS_TO_INT (box->x1),
|
||||||
CLUTTER_UNITS_TO_INT (box->y1),
|
CLUTTER_UNITS_TO_INT (box->y1),
|
||||||
CLUTTER_UNITS_TO_INT (box->x2 - box->x1),
|
CLUTTER_UNITS_TO_INT (box->x2 - box->x1),
|
||||||
@ -406,6 +446,13 @@ clutter_stage_osx_request_coords (ClutterActor *actor,
|
|||||||
|
|
||||||
CLUTTER_OSX_POOL_RELEASE();
|
CLUTTER_OSX_POOL_RELEASE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make sure that the viewport is updated */
|
||||||
|
CLUTTER_SET_PRIVATE_FLAGS (self->wrapper, CLUTTER_ACTOR_SYNC_MATRICES);
|
||||||
|
|
||||||
|
/* chain up */
|
||||||
|
parent_class = CLUTTER_ACTOR_CLASS (clutter_stage_osx_parent_class);
|
||||||
|
parent_class->allocate (actor, box, origin_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -519,6 +566,7 @@ clutter_stage_osx_class_init (ClutterStageOSXClass *klass)
|
|||||||
actor_class->show = clutter_stage_osx_show;
|
actor_class->show = clutter_stage_osx_show;
|
||||||
actor_class->hide = clutter_stage_osx_hide;
|
actor_class->hide = clutter_stage_osx_hide;
|
||||||
|
|
||||||
actor_class->query_coords = clutter_stage_osx_query_coords;
|
actor_class->allocate = clutter_stage_osx_allocate;
|
||||||
actor_class->request_coords = clutter_stage_osx_request_coords;
|
actor_class->get_preferred_width = clutter_stage_osx_get_preferred_width;
|
||||||
|
actor_class->get_preferred_height = clutter_stage_osx_get_preferred_height;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user