diff --git a/ChangeLog b/ChangeLog index ba8b0de9b6..6d976bb0c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-04-21 Sven Neumann + + * libgimp/gimpdrawablecombobox.c + * libgimp/gimpimagecombobox.c + * libgimp/gimppixbuf.c + * libgimpwidgets/gimpintcombobox.c + * libgimpwidgets/gimpintstore.c: API documentation. + 2004-04-21 Sven Neumann * libgimpwidgets/gimpintcombobox.[ch]: added new functions diff --git a/devel-docs/ChangeLog b/devel-docs/ChangeLog index 201f8f0e7f..dffd2bff5c 100644 --- a/devel-docs/ChangeLog +++ b/devel-docs/ChangeLog @@ -1,3 +1,11 @@ +2004-04-21 Sven Neumann + + * libgimp/libgimp-docs.sgml + * libgimp/libgimp-sections.txt + * libgimp/tmpl/gimpdrawablecombobox.sgml + * libgimp/tmpl/gimpimagecombobox.sgml + * libgimp/tmpl/gimppixbuf.sgml: added docs for new functions. + 2004-04-21 Sven Neumann * libgimpwidgets/libgimpwidgets-sections.txt diff --git a/devel-docs/libgimp/libgimp-docs.sgml b/devel-docs/libgimp/libgimp-docs.sgml index 096a72c795..c7a34bdc1a 100644 --- a/devel-docs/libgimp/libgimp-docs.sgml +++ b/devel-docs/libgimp/libgimp-docs.sgml @@ -68,6 +68,9 @@ GIMP User Interface Library + + + diff --git a/devel-docs/libgimp/libgimp-sections.txt b/devel-docs/libgimp/libgimp-sections.txt index 621c5343b1..801d07795d 100644 --- a/devel-docs/libgimp/libgimp-sections.txt +++ b/devel-docs/libgimp/libgimp-sections.txt @@ -622,6 +622,27 @@ gimp_image_undo_freeze gimp_image_undo_thaw +
+gimppixbuf +GimpPixbufTransparency +gimp_image_get_thumbnail +gimp_drawable_get_thumbnail +
+ +
+gimpdrawablecombobox +GimpDrawableConstraintFunc +gimp_drawable_combo_box_new +gimp_channel_combo_box_new +gimp_layer_combo_box_new +
+ +
+gimpimagecombobox +GimpImageConstraintFunc +gimp_image_combo_box_new +
+
gimpmenu GimpConstraintFunc diff --git a/devel-docs/libgimp/tmpl/gimpdrawablecombobox.sgml b/devel-docs/libgimp/tmpl/gimpdrawablecombobox.sgml new file mode 100644 index 0000000000..916f098d83 --- /dev/null +++ b/devel-docs/libgimp/tmpl/gimpdrawablecombobox.sgml @@ -0,0 +1,59 @@ + +gimpdrawablecombobox + + + + + + + + + + + + + + + + + + + + + +@image_id: +@drawable_id: +@data: +@Returns: + + + + + + + +@constraint: +@data: +@Returns: + + + + + + + +@constraint: +@data: +@Returns: + + + + + + + +@constraint: +@data: +@Returns: + + diff --git a/devel-docs/libgimp/tmpl/gimpimagecombobox.sgml b/devel-docs/libgimp/tmpl/gimpimagecombobox.sgml new file mode 100644 index 0000000000..19768f26ae --- /dev/null +++ b/devel-docs/libgimp/tmpl/gimpimagecombobox.sgml @@ -0,0 +1,38 @@ + +gimpimagecombobox + + + + + + + + + + + + + + + + + + + + + +@image_id: +@data: +@Returns: + + + + + + + +@constraint: +@data: +@Returns: + + diff --git a/devel-docs/libgimp/tmpl/gimppixbuf.sgml b/devel-docs/libgimp/tmpl/gimppixbuf.sgml new file mode 100644 index 0000000000..b6b741af68 --- /dev/null +++ b/devel-docs/libgimp/tmpl/gimppixbuf.sgml @@ -0,0 +1,51 @@ + +gimppixbuf + + + + + + + + + + + + + + + + + + + + + +@GIMP_PIXBUF_KEEP_ALPHA: +@GIMP_PIXBUF_SMALL_CHECKS: +@GIMP_PIXBUF_LARGE_CHECKS: + + + + + + +@image_ID: +@width: +@height: +@alpha: +@Returns: + + + + + + + +@drawable_ID: +@width: +@height: +@alpha: +@Returns: + + diff --git a/libgimp/gimpdrawablecombobox.c b/libgimp/gimpdrawablecombobox.c index b93e50bff4..e73e234cc4 100644 --- a/libgimp/gimpdrawablecombobox.c +++ b/libgimp/gimpdrawablecombobox.c @@ -46,6 +46,24 @@ static gint gimp_drawable_combo_box_model_add (GtkListStore static void gimp_drawable_combo_box_model_add_none (GtkListStore *store); +/** + * gimp_drawable_combo_box_new: + * @constraint: a #GimpDrawableConstraintFunc or %NULL + * @data: a pointer that is passed to @constraint + * + * Creates a new #GimpIntComboBox filled with all currently opened + * drawables. If a @constraint function is specified, it is called for + * each drawable and only if the function returns %TRUE, the drawable + * is added to the combobox. + * + * Use gimp_int_combo_box_set_active() to get the active drawable ID + * and gimp_int_combo_box_get_active() to retrieve the ID of the + * selected drawable. + * + * Return value: a new #GimpIntComboBox. + * + * Since: GIMP 2.2 + **/ GtkWidget * gimp_drawable_combo_box_new (GimpDrawableConstraintFunc constraint, gpointer data) @@ -95,6 +113,18 @@ gimp_drawable_combo_box_new (GimpDrawableConstraintFunc constraint, return combo_box; } +/** + * gimp_channel_combo_box_new: + * @constraint: a #GimpDrawableConstraintFunc or %NULL + * @data: a pointer that is passed to @constraint + * + * Creates a new #GimpIntComboBox filled with all currently opened + * channels. See gimp_drawable_combo_box() for more info. + * + * Return value: a new #GimpIntComboBox. + * + * Since: GIMP 2.2 + **/ GtkWidget * gimp_channel_combo_box_new (GimpDrawableConstraintFunc constraint, gpointer data) @@ -137,6 +167,18 @@ gimp_channel_combo_box_new (GimpDrawableConstraintFunc constraint, return combo_box; } +/** + * gimp_layer_combo_box_new: + * @constraint: a #GimpDrawableConstraintFunc or %NULL + * @data: a pointer that is passed to @constraint + * + * Creates a new #GimpIntComboBox filled with all currently opened + * layers. See gimp_drawable_combo_box() for more info. + * + * Return value: a new #GimpIntComboBox. + * + * Since: GIMP 2.2 + **/ GtkWidget * gimp_layer_combo_box_new (GimpDrawableConstraintFunc constraint, gpointer data) diff --git a/libgimp/gimpimagecombobox.c b/libgimp/gimpimagecombobox.c index af2a090185..05ca5c70c6 100644 --- a/libgimp/gimpimagecombobox.c +++ b/libgimp/gimpimagecombobox.c @@ -45,6 +45,24 @@ static void gimp_image_combo_box_model_add (GtkListStore *store static void gimp_image_combo_box_model_add_none (GtkListStore *store); +/** + * gimp_image_combo_box_new: + * @constraint: a #GimpImageConstraintFunc or %NULL + * @data: a pointer that is passed to @constraint + * + * Creates a new #GimpIntComboBox filled with all currently opened + * images. If a @constraint function is specified, it is called for + * each image and only if the function returns %TRUE, the image is + * added to the combobox. + * + * Use gimp_int_combo_box_set_active() to get the active image ID and + * gimp_int_combo_box_get_active() to retrieve the ID of the selected + * image. + * + * Return value: a new #GimpIntComboBox. + * + * Since: GIMP 2.2 + **/ GtkWidget * gimp_image_combo_box_new (GimpImageConstraintFunc constraint, gpointer data) diff --git a/libgimp/gimpitemcombobox.c b/libgimp/gimpitemcombobox.c index b93e50bff4..e73e234cc4 100644 --- a/libgimp/gimpitemcombobox.c +++ b/libgimp/gimpitemcombobox.c @@ -46,6 +46,24 @@ static gint gimp_drawable_combo_box_model_add (GtkListStore static void gimp_drawable_combo_box_model_add_none (GtkListStore *store); +/** + * gimp_drawable_combo_box_new: + * @constraint: a #GimpDrawableConstraintFunc or %NULL + * @data: a pointer that is passed to @constraint + * + * Creates a new #GimpIntComboBox filled with all currently opened + * drawables. If a @constraint function is specified, it is called for + * each drawable and only if the function returns %TRUE, the drawable + * is added to the combobox. + * + * Use gimp_int_combo_box_set_active() to get the active drawable ID + * and gimp_int_combo_box_get_active() to retrieve the ID of the + * selected drawable. + * + * Return value: a new #GimpIntComboBox. + * + * Since: GIMP 2.2 + **/ GtkWidget * gimp_drawable_combo_box_new (GimpDrawableConstraintFunc constraint, gpointer data) @@ -95,6 +113,18 @@ gimp_drawable_combo_box_new (GimpDrawableConstraintFunc constraint, return combo_box; } +/** + * gimp_channel_combo_box_new: + * @constraint: a #GimpDrawableConstraintFunc or %NULL + * @data: a pointer that is passed to @constraint + * + * Creates a new #GimpIntComboBox filled with all currently opened + * channels. See gimp_drawable_combo_box() for more info. + * + * Return value: a new #GimpIntComboBox. + * + * Since: GIMP 2.2 + **/ GtkWidget * gimp_channel_combo_box_new (GimpDrawableConstraintFunc constraint, gpointer data) @@ -137,6 +167,18 @@ gimp_channel_combo_box_new (GimpDrawableConstraintFunc constraint, return combo_box; } +/** + * gimp_layer_combo_box_new: + * @constraint: a #GimpDrawableConstraintFunc or %NULL + * @data: a pointer that is passed to @constraint + * + * Creates a new #GimpIntComboBox filled with all currently opened + * layers. See gimp_drawable_combo_box() for more info. + * + * Return value: a new #GimpIntComboBox. + * + * Since: GIMP 2.2 + **/ GtkWidget * gimp_layer_combo_box_new (GimpDrawableConstraintFunc constraint, gpointer data) diff --git a/libgimp/gimppixbuf.c b/libgimp/gimppixbuf.c index d215c7d378..8b8140d57b 100644 --- a/libgimp/gimppixbuf.c +++ b/libgimp/gimppixbuf.c @@ -36,6 +36,20 @@ static GdkPixbuf * gimp_pixbuf_from_data (guchar *data, GimpPixbufTransparency alpha); +/** + * gimp_image_get_thumbnail: + * @image_ID: the image ID + * @width: the requested thumbnail width (<= 256 pixels) + * @height: the requested thumbnail height (<= 256 pixels) + * @alpha: how to handle an alpha channel + * + * Retrieves a thumbnail pixbuf for the image identified by @image_ID. + * The thumbnail will be not larger than the requested size. + * + * Return value: a new #GdkPixbuf + * + * Since: GIMP 2.2 + **/ GdkPixbuf * gimp_image_get_thumbnail (gint32 image_ID, gint width, @@ -65,6 +79,21 @@ gimp_image_get_thumbnail (gint32 image_ID, alpha); } +/** + * gimp_drawable_get_thumbnail: + * @drawable_ID: the drawable ID + * @width: the requested thumbnail width (<= 256 pixels) + * @height: the requested thumbnail height (<= 256 pixels) + * @alpha: how to handle an alpha channel + * + * Retrieves a thumbnail pixbuf for the drawable identified by + * @drawable_ID. The thumbnail will be not larger than the requested + * size. + * + * Return value: a new #GdkPixbuf + * + * Since: GIMP 2.2 + **/ GdkPixbuf * gimp_drawable_get_thumbnail (gint32 drawable_ID, gint width, diff --git a/libgimpwidgets/gimpintcombobox.c b/libgimpwidgets/gimpintcombobox.c index c6288badf9..f00a33a37d 100644 --- a/libgimpwidgets/gimpintcombobox.c +++ b/libgimpwidgets/gimpintcombobox.c @@ -227,6 +227,8 @@ gimp_int_combo_box_new_array (gint n_values, * and calls gtk_list_store_set() for you. * * The column number must be taken from the enum #GimpIntStoreColumns. + * + * Since: GIMP 2.2 **/ void gimp_int_combo_box_prepend (GimpIntComboBox *combo_box, @@ -258,6 +260,8 @@ gimp_int_combo_box_prepend (GimpIntComboBox *combo_box, * and calls gtk_list_store_set() for you. * * The column number must be taken from the enum #GimpIntStoreColumns. + * + * Since: GIMP 2.2 **/ void gimp_int_combo_box_append (GimpIntComboBox *combo_box, diff --git a/libgimpwidgets/gimpintstore.c b/libgimpwidgets/gimpintstore.c index 686da06382..107558c216 100644 --- a/libgimpwidgets/gimpintstore.c +++ b/libgimpwidgets/gimpintstore.c @@ -103,6 +103,8 @@ gimp_int_store_new (void) * * Return value: %TRUE if the value has been located and @iter is * valid, %FALSE otherwise. + * + * Since: GIMP 2.2 **/ gboolean gimp_int_store_lookup_by_value (GtkTreeModel *model,