2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-backend.c:
	(clutter_backend_get_display_size): Provide a fallback for
	backends not implementing get_display_size().

	* clutter/clutter-stage.c:
	(clutter_stage_allocate): Add debug messages.

	* clutter/sdl/clutter-backend-sdl.c:
	(clutter_backend_sdl_get_display_size),
	(clutter_backend_sdl_class_init): Implement get_display_size()
	on the SDL backend.
This commit is contained in:
Emmanuele Bassi
2008-06-25 13:32:03 +00:00
parent 631277be44
commit d651cc4337
4 changed files with 73 additions and 14 deletions

View File

@ -482,6 +482,16 @@ clutter_backend_get_font_options (ClutterBackend *backend)
return priv->font_options;
}
/**
* clutter_backend_get_display_size:
* @backend: a #ClutterBackend
* @width: return location for the display width in pixels, or %NULL
* @height: return location for the display height in pixels, or %NULL
*
* Retrieves the size of the display from the #ClutterBackend.
*
* Since: 0.8
*/
void
clutter_backend_get_display_size (ClutterBackend *backend,
gint *width,
@ -499,9 +509,7 @@ clutter_backend_get_display_size (ClutterBackend *backend,
if (height)
*height = 0;
return;
}
klass->get_display_size (backend, width, height);
else
klass->get_display_size (backend, width, height);
}