docs: Update minimum size accessors

Expand the documentation for set_minimum_size() and get_minimum_size(),
and add introspection annotations for get_minimum_size().
This commit is contained in:
Emmanuele Bassi 2010-02-27 18:56:34 +00:00
parent 52ba9a1800
commit 7ffb62eab9

View File

@ -2375,8 +2375,16 @@ clutter_stage_get_use_alpha (ClutterStage *stage)
* @width: width, in pixels * @width: width, in pixels
* @height: height, in pixels * @height: height, in pixels
* *
* Sets the minimum size for a stage window. This has no effect if the stage * Sets the minimum size for a stage window, if the default backend
* is fullscreen. * uses #ClutterStage inside a window
*
* This is a convenience function, and it is equivalent to setting the
* #ClutterActor:min-width and #ClutterActor:min-height on @stage
*
* If the current size of @stage is smaller than the minimum size, the
* @stage will be resized to the new @width and @height
*
* This function has no effect if @stage is fullscreen
* *
* Since: 1.2 * Since: 1.2
*/ */
@ -2397,12 +2405,17 @@ clutter_stage_set_minimum_size (ClutterStage *stage,
/** /**
* clutter_stage_get_minimum_size: * clutter_stage_get_minimum_size:
* @stage: a #ClutterStage * @stage: a #ClutterStage
* @width: width, in pixels * @width: (out): return location for the minimum width, in pixels,
* @height: height, in pixels * or %NULL
* @height: (out): return location for the minimum height, in pixels,
* or %NULL
* *
* Gets the set minimum size for a stage window. This may not correspond * Retrieves the minimum size for a stage window as set using
* to the actual minimum size and is specific to the back-end * clutter_stage_set_minimum_size().
* implementation. *
* The returned size may not correspond to the actual minimum size and
* it is specific to the #ClutterStage implementation inside the
* Clutter backend
* *
* Since: 1.2 * Since: 1.2
*/ */
@ -2423,13 +2436,18 @@ clutter_stage_get_minimum_size (ClutterStage *stage,
"min-height-set", &height_set, "min-height-set", &height_set,
NULL); NULL);
/* if not width or height have been set, then the Stage
* minimum size is defined to be 1x1
*/
if (!width_set) if (!width_set)
width = 1; width = 1;
if (!height_set) if (!height_set)
height = 1; height = 1;
if (width_p) if (width_p)
*width_p = (guint) width; *width_p = (guint) width;
if (height_p) if (height_p)
*height_p = (guint) height; *height_p = (guint) height;
} }
@ -2449,4 +2467,3 @@ _clutter_stage_get_pending_swaps (ClutterStage *stage)
return _clutter_stage_window_get_pending_swaps (stage_window); return _clutter_stage_window_get_pending_swaps (stage_window);
} }