Remove internal usage of ClutterGeometry in StageWindow

The ClutterGeometry type is a poor substitute of cairo_rectangle_int_t,
with unsigned integers for width and height to complicate matters.

Let's remove the internal usage of ClutterGeometry and switch to the
rectangle type from Cairo.

https://bugzilla.gnome.org/show_bug.cgi?id=656663
This commit is contained in:
Emmanuele Bassi
2011-08-16 16:01:22 +01:00
parent c59f9ef79f
commit 1776ac8ed5
13 changed files with 154 additions and 124 deletions

View File

@ -95,8 +95,8 @@ _clutter_stage_window_resize (ClutterStageWindow *window,
}
void
_clutter_stage_window_get_geometry (ClutterStageWindow *window,
ClutterGeometry *geometry)
_clutter_stage_window_get_geometry (ClutterStageWindow *window,
cairo_rectangle_int_t *geometry)
{
CLUTTER_STAGE_WINDOW_GET_IFACE (window)->get_geometry (window, geometry);
}
@ -119,15 +119,15 @@ _clutter_stage_window_get_pending_swaps (ClutterStageWindow *window)
}
void
_clutter_stage_window_add_redraw_clip (ClutterStageWindow *window,
ClutterGeometry *stage_clip)
_clutter_stage_window_add_redraw_clip (ClutterStageWindow *window,
cairo_rectangle_int_t *stage_clip)
{
ClutterStageWindowIface *iface;
g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window));
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->add_redraw_clip)
if (iface->add_redraw_clip != NULL)
iface->add_redraw_clip (window, stage_clip);
}
@ -147,7 +147,7 @@ _clutter_stage_window_has_redraw_clips (ClutterStageWindow *window)
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->has_redraw_clips)
if (iface->has_redraw_clips != NULL)
return iface->has_redraw_clips (window);
return FALSE;
@ -169,7 +169,7 @@ _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window)
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->ignoring_redraw_clips)
if (iface->ignoring_redraw_clips != NULL)
return iface->ignoring_redraw_clips (window);
return TRUE;
@ -184,7 +184,7 @@ _clutter_stage_window_get_redraw_clip_bounds (ClutterStageWindow *window,
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->get_redraw_clip_bounds)
if (iface->get_redraw_clip_bounds != NULL)
return iface->get_redraw_clip_bounds (window, stage_clip);
return FALSE;