Next: , Previous: ClutterContainer, Up: Top


26 ClutterContent

Delegate for painting the content of an actor

26.1 Overview

<clutter-content> is an interface to implement types responsible for painting the content of a <clutter-actor>.

Multiple actors can use the same <clutter-content> instance, in order to share the resources associated with painting the same content.

<clutter-content> is available since Clutter 1.10.

26.2 Usage

— Function: clutter-content-get-preferred-size (self <clutter-content>) ⇒  (ret bool) (width float) (height float)
— Method: get-preferred-size

Retrieves the natural size of the content, if any.

The natural size of a <clutter-content> is defined as the size the content would have regardless of the allocation of the actor that is painting it, for instance the size of an image data.

content
a <clutter-content>
width
return location for the natural width of the content.
height
return location for the natural height of the content.
ret
#t’ if the content has a preferred size, and ‘#f’ otherwise

Since 1.10

— Function: clutter-content-invalidate (self <clutter-content>)
— Method: invalidate

Invalidates a <clutter-content>.

This function should be called by <clutter-content> implementations when they change the way a the content should be painted regardless of the actor state.

content
a <clutter-content>

Since 1.10