From b6403b01a14677d0ec88928f292aa1aa08b39283 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 9 Mar 2012 17:11:19 +0000 Subject: [PATCH] Documentation fixes --- clutter/clutter-actor.c | 19 ++++++---- clutter/clutter-enums.h | 12 +++++++ clutter/clutter-image.c | 40 ++++++++++++++++++++-- doc/reference/clutter/clutter-sections.txt | 20 +++++++++++ 4 files changed, 83 insertions(+), 8 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 9c3b6c26d..0aae50763 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -17793,10 +17793,15 @@ clutter_actor_get_content_box (ClutterActor *self, /** * clutter_actor_set_content_scaling_filters: * @self: a #ClutterActor - * @min_filter: FIXME - * @mag_filter: FIXME + * @min_filter: the minification filter for the content + * @mag_filter: the magnification filter for the content * - * FIXME + * Sets the minification and magnification filter to be applied when + * scaling the #ClutterActor:content of a #ClutterActor. + * + * The #ClutterActor:minification-filter will be used when reducing + * the size of the content; the #ClutterActor:magnification-filter + * will be used when increasing the size of the content. * * Since: 1.10 */ @@ -17843,10 +17848,12 @@ clutter_actor_set_content_scaling_filters (ClutterActor *self, /** * clutter_actor_get_content_scaling_filters: * @self: a #ClutterActor - * @min_filter: (out): FIXME - * @mag_filter: (out): FIXME + * @min_filter: (out) (allow-none): return location for the minification + * filter, or %NULL + * @mag_filter: (out) (allow-none): return location for the magnification + * filter, or %NULL * - * FIXME + * Retrieves the values set using clutter_actor_set_content_scaling_filters(). * * Since: 1.10 */ diff --git a/clutter/clutter-enums.h b/clutter/clutter-enums.h index b9323cbb8..38e5dfd7e 100644 --- a/clutter/clutter-enums.h +++ b/clutter/clutter-enums.h @@ -1149,6 +1149,18 @@ typedef enum { CLUTTER_CONTENT_GRAVITY_RESIZE_ASPECT } ClutterContentGravity; +/** + * ClutterScalingFilter: + * @CLUTTER_SCALING_FILTER_LINEAR: Linear interpolation filter + * @CLUTTER_SCALING_FILTER_NEAREST: Nearest neighbor interpolation filter + * @CLUTTER_SCALING_FILTER_BILINEAR: Bilinear minification filter; this + * filter enables mipmap generation. + * + * The scaling filters to be used with the #ClutterActor:minification-filter + * and #ClutterActor:magnification-filter properties. + * + * Since: 1.10 + */ typedef enum { CLUTTER_SCALING_FILTER_LINEAR, CLUTTER_SCALING_FILTER_NEAREST, diff --git a/clutter/clutter-image.c b/clutter/clutter-image.c index 9002bd8dd..9e608df78 100644 --- a/clutter/clutter-image.c +++ b/clutter/clutter-image.c @@ -22,6 +22,17 @@ * Emmanuele Bassi */ +/** + * SECTION:clutter-image + * @Title: ClutterImage + * @Short_Description: Image data content + * + * #ClutterImage is a #ClutterContent implementation that displays + * image data. + * + * #ClutterImage is available since Clutter 1.10. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -141,9 +152,10 @@ clutter_content_iface_init (ClutterContentIface *iface) /** * clutter_image_new: * - * FIXME + * Creates a new #ClutterImage instance. * - * Return value: (transfer full): FIXME + * Return value: (transfer full): the newly created #ClutterImage instance. + * Use g_object_unref() when done. * * Since: 1.10 */ @@ -153,6 +165,30 @@ clutter_image_new (void) return g_object_new (CLUTTER_TYPE_IMAGE, NULL); } +/** + * clutter_image_set_data: + * @image: a #ClutterImage + * @data: (array): the image data, as an array of bytes + * @pixel_format: the Cogl pixel format of the image data + * @width: the width of the image data + * @height: the height of the image data + * @row_stride: the length of each row inside @data + * @error: return location for a #GError, or %NULL + * + * Sets the image data to be display by @image. + * + * If the image data was successfully loaded, the @image will be invalidated. + * + * In case of error, the @error value will be set, and this function will + * return %FALSE. + * + * The image data is copied in texture memory. + * + * Return value: %TRUE if the image data was successfully loaded, + * and %FALSE otherwise. + * + * Since: 1.10 + */ gboolean clutter_image_set_data (ClutterImage *image, const guint8 *data, diff --git a/doc/reference/clutter/clutter-sections.txt b/doc/reference/clutter/clutter-sections.txt index 0c2f91eea..2db597362 100644 --- a/doc/reference/clutter/clutter-sections.txt +++ b/doc/reference/clutter/clutter-sections.txt @@ -3149,3 +3149,23 @@ CLUTTER_IS_CANVAS_CLASS ClutterCanvasPrivate clutter_canvas_get_type + +
+clutter-image +ClutterImage +ClutterImageClass +ClutterImageError +clutter_image_new +clutter_image_set_data + +CLUTTER_TYPE_IMAGE +CLUTTER_IMAGE +CLUTTER_IMAGE_CLASS +CLUTTER_IS_IMAGE +CLUTTER_IS_IMAGE_CLASS +CLUTTER_IMAGE_ERROR + +ClutterImagePrivate +clutter_image_get_type +clutter_image_error_quark +