{
ClutterActorPrivate *priv = actor->priv;
+ if (root == NULL)
+ return FALSE;
+
if (priv->bg_color_set &&
!clutter_color_equal (&priv->bg_color, CLUTTER_COLOR_Transparent))
{
/* if the content does not have a preferred size then there is
* no point in computing the content box
*/
- if (!_clutter_content_get_preferred_size (priv->content,
- &content_w,
- &content_h))
+ if (!clutter_content_get_preferred_size (priv->content,
+ &content_w,
+ &content_h))
return;
clutter_actor_box_get_size (&priv->allocation, &alloc_w, &alloc_h);
G_BEGIN_DECLS
-gboolean _clutter_content_get_preferred_size (ClutterContent *content,
- gfloat *width,
- gfloat *height);
-
void _clutter_content_attached (ClutterContent *content,
ClutterActor *actor);
void _clutter_content_detached (ClutterContent *content,
CLUTTER_CONTENT_GET_IFACE (content)->paint_content (content, actor, node);
}
-/*< private >
- * _clutter_content_get_preferred_size:
+/**
+ * clutter_content_get_preferred_size:
* @content: a #ClutterContent
* @width: (out): return location for the natural width of the content
* @height: (out): return location for the natural height of the content
*
* Return value: %TRUE if the content has a preferred size, and %FALSE
* otherwise
+ *
+ * Since: 1.10
*/
gboolean
-_clutter_content_get_preferred_size (ClutterContent *content,
- gfloat *width,
- gfloat *height)
+clutter_content_get_preferred_size (ClutterContent *content,
+ gfloat *width,
+ gfloat *height)
{
+ g_return_val_if_fail (CLUTTER_IS_CONTENT (content), FALSE);
+
return CLUTTER_CONTENT_GET_IFACE (content)->get_preferred_size (content,
width,
height);
GType clutter_content_get_type (void) G_GNUC_CONST;
+gboolean clutter_content_get_preferred_size (ClutterContent *content,
+ gfloat *width,
+ gfloat *height);
void clutter_content_invalidate (ClutterContent *content);
G_END_DECLS