libgimpwidgets: more docs and annotations

This commit is contained in:
Michael Natterer 2019-08-09 12:32:09 +02:00
parent d28af77fc2
commit 8cfef5e60d
3 changed files with 31 additions and 3 deletions

View file

@ -2532,11 +2532,23 @@ static void gimp_prop_path_editor_writable_notify (GObject *config,
GParamSpec *param_spec,
GimpPathEditor *editor);
/**
* gimp_prop_path_editor_new:
* @config: object to which property is attached.
* @path_property_name: name of path property.
* @writable_property_name: name of writable path property.
* @filechooser_title: window title of #GtkFileChooserDialog widget.
*
* Creates a #GimpPathEditor to edit the specified path and writable
* path properties.
*
* Returns: (transfer full): A new #GimpPathEditor.
**/
GtkWidget *
gimp_prop_path_editor_new (GObject *config,
const gchar *path_property_name,
const gchar *writable_property_name,
const gchar *filesel_title)
const gchar *filechooser_title)
{
GParamSpec *path_param_spec;
GParamSpec *writable_param_spec = NULL;
@ -2568,7 +2580,7 @@ gimp_prop_path_editor_new (GObject *config,
filename = value ? gimp_config_path_expand (value, TRUE, NULL) : NULL;
g_free (value);
editor = gimp_path_editor_new (filesel_title, filename);
editor = gimp_path_editor_new (filechooser_title, filename);
g_free (filename);
if (writable_property_name)

View file

@ -167,7 +167,7 @@ GtkWidget * gimp_prop_file_chooser_button_new_with_dialog (GObject *conf
GtkWidget * gimp_prop_path_editor_new (GObject *config,
const gchar *path_property_name,
const gchar *writable_property_name,
const gchar *filesel_title);
const gchar *filechooser_title);
/* GParamInt, GParamUInt, GParamDouble unit: GimpParamUnit */

View file

@ -732,6 +732,22 @@ transform_cache_config_notify (GObject *config,
g_printerr ("deleted cache %p\n", cache);
}
/**
* gimp_widget_get_color_transform:
* @widget: a #GtkWidget
* @config: a #GimpColorConfig
* @src_profile: a #GimpColorProfile
* @src_format: Babl format for the transform's source pixels
* @dest_format: Babl format for the transforms's destination pixels
*
* This function returns the #GimpColorTransform that transforms pixels
* from @src_profile to the profile of the #GdkMonitor the @widget is
* displayed on.
*
* Returns: (nullable) (transfer full): the #GimpColorTransform.
*
* Since: 2.10
**/
GimpColorTransform *
gimp_widget_get_color_transform (GtkWidget *widget,
GimpColorConfig *config,