| Top |  |  |  |  | 
ClutterContent is an interface to implement types responsible for painting the content of a ClutterActor.
Multiple actors can use the same ClutterContent instance, in order to share the resources associated with painting the same content.
ClutterContent is available since Clutter 1.10.
gboolean clutter_content_get_preferred_size (ClutterContent *content,gfloat *width,gfloat *height);
Retrieves the natural size of the content
, if any.
The natural size of a ClutterContent 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 | ||
| width | return location for the natural width of the content. | [out] | 
| height | return location for the natural height of the content. | [out] | 
Since: 1.10
void
clutter_content_invalidate (ClutterContent *content);
Invalidates a ClutterContent.
This function should be called by ClutterContent implementations when they change the way a the content should be painted regardless of the actor state.
Since: 1.10
typedef struct _ClutterContent ClutterContent;
The ClutterContent structure is an opaque type whose members cannot be acccessed directly.
Since: 1.10
struct ClutterContentIface {
  gboolean      (* get_preferred_size)  (ClutterContent   *content,
                                         gfloat           *width,
                                         gfloat           *height);
  void          (* paint_content)       (ClutterContent   *content,
                                         ClutterActor     *actor,
                                         ClutterPaintNode *node);
  void          (* attached)            (ClutterContent   *content,
                                         ClutterActor     *actor);
  void          (* detached)            (ClutterContent   *content,
                                         ClutterActor     *actor);
  void          (* invalidate)          (ClutterContent   *content);
};
The ClutterContentIface structure contains only private data.
| virtual function; should be overridden by subclasses of ClutterContent that have a natural size | ||
| virtual function; called each time the content needs to paint itself | ||
| virtual function; called each time a ClutterContent is attached to a ClutterActor. | ||
| virtual function; called each time a ClutterContent is detached from a ClutterActor. | ||
| virtual function; called each time a ClutterContent state is changed. | 
Since: 1.10
“attached” signalvoid user_function (ClutterContent *content, ClutterActor *actor, gpointer user_data)
This signal is emitted each time a ClutterContent implementation is assigned to a ClutterActor.
| content | the object that emitted the signal | |
| actor | ||
| user_data | user data set when the signal handler was connected. | 
Flags: Run First
Since: 1.10
“detached” signalvoid user_function (ClutterContent *content, ClutterActor *actor, gpointer user_data)
This signal is emitted each time a ClutterContent implementation is removed from a ClutterActor.
| content | the object that emitted the signal | |
| actor | ||
| user_data | user data set when the signal handler was connected. | 
Flags: Run First
Since: 1.10