### Class

# Gimp Procedure

#### Description [src]

    class Gimp.Procedure : GObject.Object
    {
      /* No available fields */
    }

Procedures are registered functions which can be run across GIMP ecosystem. They can be created by plug-ins and can then run by the core application when called from menus (or through other interaction depending on specific procedure subclasses).

A plug-in can also run procedures created by the core, but also the ones created by other plug-ins (see `GimpPDB`).

#### Ancestors

- GObject

#### Descendants

- GimpBatchProcedure
- GimpFileProcedure
- GimpImageProcedure
- GimpThumbnailProcedure

#### Constructors

###### gimp_procedure_new

Creates a new procedure named `name` which will call `run_func` when invoked.

since: 3.0

#### Instance methods

###### gimp_procedure_add_boolean_argument

Add a new boolean argument to `procedure`.

since: 3.0

###### gimp_procedure_add_boolean_aux_argument

Add a new boolean auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_boolean_return_value

Add a new boolean return value to `procedure`.

since: 3.0

###### gimp_procedure_add_brush_argument

Add a new `GimpBrush` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_brush_aux_argument

Add a new `GimpBrush` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_brush_return_value

Add a new `GimpBrush` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_bytes_argument

Add a new `GBytes` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_bytes_aux_argument

Add a new `GBytes` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_bytes_return_value

Add a new `GBytes` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_channel_argument

Add a new `GimpChannel` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_channel_aux_argument

Add a new `GimpChannel` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_channel_return_value

Add a new `GimpChannel` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_choice_argument

Add a new `GimpChoice` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_choice_aux_argument

Add a new `GimpChoice` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_choice_return_value

Add a new `GimpChoice` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_color_argument

Add a new `GeglColor` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_color_aux_argument

Add a new `GeglColor` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_color_from_string_argument

Add a new `GeglColor` argument to `procedure` from a string representation.

since: 3.0

###### gimp_procedure_add_color_from_string_aux_argument

Add a new `GeglColor` auxiliary argument to `procedure` from a string representation.

since: 3.0

###### gimp_procedure_add_color_from_string_return_value

Add a new `GeglColor` return value to `procedure` from a string representation.

since: 3.0

###### gimp_procedure_add_color_return_value

Add a new `GeglColor` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_core_object_array_argument

Add a new object array argument to `procedure`.

since: 3.0

###### gimp_procedure_add_core_object_array_aux_argument

Add a new object array auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_core_object_array_return_value

Add a new object array return value to `procedure`.

since: 3.0

###### gimp_procedure_add_display_argument

Add a new `GimpDisplay` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_display_aux_argument

Add a new `GimpDisplay` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_display_return_value

Add a new `GimpDisplay` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_double_argument

Add a new floating-point in double precision argument to `procedure`.

since: 3.0

###### gimp_procedure_add_double_array_argument

Add a new double array argument to `procedure`.

since: 3.0

###### gimp_procedure_add_double_array_aux_argument

Add a new double array auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_double_array_return_value

Add a new double array return value to `procedure`.

since: 3.0

###### gimp_procedure_add_double_aux_argument

Add a new floating-point in double precision auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_double_return_value

Add a new floating-point in double precision return value to `procedure`.

since: 3.0

###### gimp_procedure_add_drawable_argument

Add a new `GimpDrawable` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_drawable_aux_argument

Add a new `GimpDrawable` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_drawable_return_value

Add a new `GimpDrawable` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_enum_argument

Add a new enum argument to `procedure`.

since: 3.0

###### gimp_procedure_add_enum_aux_argument

Add a new enum auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_enum_return_value

Add a new enum return value to `procedure`.

since: 3.0

###### gimp_procedure_add_file_argument

Add a new `GFile` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_file_aux_argument

Add a new `GFile` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_file_return_value

Add a new `GFile` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_font_argument

Add a new `GimpFont` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_font_aux_argument

Add a new `GimpFont` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_font_return_value

Add a new `GimpFont` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_gradient_argument

Add a new `GimpGradient` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_gradient_aux_argument

Add a new `GimpGradient` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_gradient_return_value

Add a new `GimpGradient` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_group_layer_argument

Add a new `GimpGroupLayer` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_group_layer_aux_argument

Add a new `GimpGroupLayer` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_group_layer_return_value

Add a new `GimpGroupLayer` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_image_argument

Add a new `GimpImage` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_image_aux_argument

Add a new `GimpImage` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_image_return_value

Add a new `GimpImage` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_int32_array_argument

Add a new integer array argument to `procedure`.

since: 3.0

###### gimp_procedure_add_int32_array_aux_argument

Add a new integer array auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_int32_array_return_value

Add a new integer array return value to `procedure`.

since: 3.0

###### gimp_procedure_add_int_argument

Add a new integer argument to `procedure`.

since: 3.0

###### gimp_procedure_add_int_aux_argument

Add a new integer auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_int_return_value

Add a new integer return value to `procedure`.

since: 3.0

###### gimp_procedure_add_item_argument

Add a new `GimpItem` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_item_aux_argument

Add a new `GimpItem` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_item_return_value

Add a new `GimpItem` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_layer_argument

Add a new `GimpLayer` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_layer_aux_argument

Add a new `GimpLayer` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_layer_mask_argument

Add a new `GimpLayerMask` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_layer_mask_aux_argument

Add a new `GimpLayerMask` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_layer_mask_return_value

Add a new `GimpLayerMask` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_layer_return_value

Add a new `GimpLayer` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_link_layer_argument

Add a new `GimpLinkLayer` argument to `procedure`.

since: 3.2

###### gimp_procedure_add_link_layer_aux_argument

Add a new `GimpLinkLayer` auxiliary argument to `procedure`.

since: 3.2

###### gimp_procedure_add_link_layer_return_value

Add a new `GimpLinkLayer` return value to `procedure`.

since: 3.2

###### gimp_procedure_add_menu_path

Adds a menu path to the procedure. Only procedures which have a menu label can add a menu path.

since: 3.0

###### gimp_procedure_add_palette_argument

Add a new `GimpPalette` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_palette_aux_argument

Add a new `GimpPalette` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_palette_return_value

Add a new `GimpPalette` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_param_argument

Add a new param argument to `procedure`.

since: 3.0

###### gimp_procedure_add_param_aux_argument

Add a new param auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_param_return_value

Add a new param return value to `procedure`.

since: 3.0

###### gimp_procedure_add_parasite_argument

Add a new `GimpParasite` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_parasite_aux_argument

Add a new `GimpParasite` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_parasite_return_value

Add a new `GimpParasite` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_path_argument

Add a new `GimpPath` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_path_aux_argument

Add a new `GimpPath` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_path_return_value

Add a new `GimpPath` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_pattern_argument

Add a new `GimpPattern` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_pattern_aux_argument

Add a new `GimpPattern` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_pattern_return_value

Add a new `GimpPattern` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_resource_argument

Add a new `GimpResource` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_resource_aux_argument

Add a new `GimpResource` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_resource_return_value

Add a new `GimpResource` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_selection_argument

Add a new `GimpSelection` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_selection_aux_argument

Add a new `GimpSelection` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_selection_return_value

Add a new `GimpSelection` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_string_argument

Add a new string argument to `procedure`.

since: 3.0

###### gimp_procedure_add_string_array_argument

Add a new string array argument to `procedure`.

since: 3.0

###### gimp_procedure_add_string_array_aux_argument

Add a new string array auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_string_array_return_value

Add a new string array return value to `procedure`.

since: 3.0

###### gimp_procedure_add_string_aux_argument

Add a new string auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_string_return_value

Add a new string return value to `procedure`.

since: 3.0

###### gimp_procedure_add_text_layer_argument

Add a new `GimpTextLayer` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_text_layer_aux_argument

Add a new `GimpTextLayer` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_text_layer_return_value

Add a new `GimpTextLayer` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_uint_argument

Add a new unsigned integer argument to `procedure`.

since: 3.0

###### gimp_procedure_add_uint_aux_argument

Add a new unsigned integer auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_uint_return_value

Add a new unsigned integer return value to `procedure`.

since: 3.0

###### gimp_procedure_add_unit_argument

Add a new `GimpUnit` argument to `procedure`.

since: 3.0

###### gimp_procedure_add_unit_aux_argument

Add a new `GimpUnit` auxiliary argument to `procedure`.

since: 3.0

###### gimp_procedure_add_unit_return_value

Add a new `GimpUnit` return value to `procedure`.

since: 3.0

###### gimp_procedure_add_vector_layer_argument

Add a new `GimpVectorLayer` argument to `procedure`.

since: 3.2

###### gimp_procedure_add_vector_layer_aux_argument

Add a new `GimpVectorLayer` auxiliary argument to `procedure`.

since: 3.2

###### gimp_procedure_add_vector_layer_return_value

Add a new `GimpVectorLayer` return value to `procedure`.

since: 3.2

###### gimp_procedure_create_config

Create a `GimpConfig` with properties that match `procedure`‘s arguments, to be used in `gimp_procedure_run_config()` method.

since: 3.0

###### gimp_procedure_find_argument

Searches the `procedure`‘s arguments for a `GParamSpec` called `name`.

since: 3.0

###### gimp_procedure_find_aux_argument

Searches the `procedure`‘s auxiliary arguments for a `GParamSpec` called `name`.

since: 3.0

###### gimp_procedure_find_return_value

Searches the `procedure`‘s return values for a `GParamSpec` called `name`.

since: 3.0

###### gimp_procedure_get_argument_sync

No description available.

since: 3.0

###### gimp_procedure_get_arguments

No description available.

since: 3.0

###### gimp_procedure_get_authors

No description available.

since: 3.0

###### gimp_procedure_get_aux_arguments

No description available.

since: 3.0

###### gimp_procedure_get_blurb

No description available.

since: 3.0

###### gimp_procedure_get_copyright

No description available.

since: 3.0

###### gimp_procedure_get_date

No description available.

since: 3.0

###### gimp_procedure_get_help

No description available.

since: 3.0

###### gimp_procedure_get_help_id

No description available.

since: 3.0

###### gimp_procedure_get_icon_file

Gets the file of the icon if one was set for `procedure`.

since: 3.0

###### gimp_procedure_get_icon_name

Gets the name of the icon if one was set for `procedure`.

since: 3.0

###### gimp_procedure_get_icon_pixbuf

Gets the `GdkPixbuf` of the icon if an icon was set this way for `procedure`.

since: 3.0

###### gimp_procedure_get_icon_type

Gets the type of data set as `procedure`‘s icon. Depending on the result, you can call the relevant specific function, such as `gimp_procedure_get_icon_name()`.

since: 3.0

###### gimp_procedure_get_image_types

This function retrieves the list of image types the procedure can operate on. See gimp_procedure_set_image_types().

since: 3.0

###### gimp_procedure_get_menu_label

No description available.

since: 3.0

###### gimp_procedure_get_menu_paths

No description available.

since: 3.0

###### gimp_procedure_get_name

No description available.

since: 3.0

###### gimp_procedure_get_plug_in

No description available.

since: 3.0

###### gimp_procedure_get_proc_type

No description available.

since: 3.0

###### gimp_procedure_get_return_values

No description available.

since: 3.0

###### gimp_procedure_get_sensitivity_mask

No description available.

since: 3.0

###### gimp_procedure_is_internal

Provide the information if `procedure` is an internal procedure. Only a procedure looked up in the `GimpPDB` can be internal. Procedures created by a plug-in in particular are never internal.

since: 3.0

###### gimp_procedure_new_return_values

Format the expected return values from procedures.

since: 3.0

###### gimp_procedure_persistent_ready

Notify the main GIMP application that the persistent procedure has been properly initialized and is ready to run.

since: 3.0

###### gimp_procedure_run

Runs the procedure named `procedure_name` with arguments given as list of `(name, value)` pairs, terminated by `NULL`.

since: 3.0

###### gimp_procedure_run_config

Runs `procedure`, calling the run_func given in `gimp_procedure_new()`.

since: 3.0

###### gimp_procedure_run_valist

Runs `procedure` with arguments names and values, given in the order as passed to `gimp_procedure_run()`.

since: 3.0

###### gimp_procedure_set_argument_sync

When the procedure’s `run()` function exits, a `GimpProcedure`‘s arguments or auxiliary arguments can be automatically synced with a `GimpParasite` of the `GimpImage` the procedure is running on.

since: 3.0

###### gimp_procedure_set_attribution

Sets various attribution strings on `procedure`.

since: 3.0

###### gimp_procedure_set_documentation

Sets various documentation strings on `procedure`:.

since: 3.0

###### gimp_procedure_set_icon_file

Sets the icon for `procedure` to the contents of an image file.

since: 3.0

###### gimp_procedure_set_icon_name

Sets the icon for `procedure` to the icon referenced by `icon_name`.

since: 3.0

###### gimp_procedure_set_icon_pixbuf

Sets the icon for `procedure` to `pixbuf`.

since: 3.0

###### gimp_procedure_set_image_types

This is a comma separated list of image types, or actually drawable types, that this procedure can deal with. Wildcards are possible here, so you could say “RGB*” instead of “RGB, RGBA” or “*” for all image types.

since: 3.0

###### gimp_procedure_set_menu_label

Sets the label to use for the `procedure`‘s menu entry, The location(s) where to register in the menu hierarchy is chosen using gimp_procedure_add_menu_path().

since: 3.0

###### gimp_procedure_set_sensitivity_mask

Sets the cases when `procedure` is supposed to be sensitive or not.

since: 3.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gimp.Procedure:name

No description available.

###### Gimp.Procedure:plug-in

No description available.

###### Gimp.Procedure:procedure-type

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GimpProcedureClass {
      GObjectClass parent_class;
      void (* install) (
        GimpProcedure* procedure
      );
      void (* uninstall) (
        GimpProcedure* procedure
      );
      GimpValueArray* (* run) (
        GimpProcedure* procedure,
        const GimpValueArray* args
      );
      GimpProcedureConfig* (* create_config) (
        GimpProcedure* procedure,
        GParamSpec** args,
        gint n_args
      );
      gboolean (* set_sensitivity) (
        GimpProcedure* procedure,
        gint sensitivity_mask
      );
      void (* _gimp_reserved0) (
    void
      );
      void (* _gimp_reserved1) (
    void
      );
      void (* _gimp_reserved2) (
    void
      );
      void (* _gimp_reserved3) (
    void
      );
      void (* _gimp_reserved4) (
    void
      );
      void (* _gimp_reserved5) (
    void
      );
      void (* _gimp_reserved6) (
    void
      );
      void (* _gimp_reserved7) (
    void
      );
      void (* _gimp_reserved8) (
    void
      );
      void (* _gimp_reserved9) (
    void
      );

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.

`install: void (* install) ( GimpProcedure* procedure )`

  Called to install the procedure with the main GIMP application. This is an implementation detail and must never be called by any plug-in code.

`uninstall: void (* uninstall) ( GimpProcedure* procedure )`

  Called to uninstall the procedure from the main GIMP application. This is an implementation detail and must never be called by any plug-in code.

`run: GimpValueArray* (* run) ( GimpProcedure* procedure, const GimpValueArray* args )`

  Called when the procedure is executed via gimp_procedure_run(). the default implementation simply calls the procedure’s `GimpRunFunc`, `GimpProcedure` subclasses are free to modify the passed `args` and call their own, subclass-specific run functions.

`create_config: GimpProcedureConfig* (* create_config) ( GimpProcedure* procedure, GParamSpec** args, gint n_args )`

  Called when a `GimpConfig` object is created using gimp_procedure_create_config().

`set_sensitivity: gboolean (* set_sensitivity) ( GimpProcedure* procedure, gint sensitivity_mask )`

  No description available.

`_gimp_reserved0: void (* _gimp_reserved0) ( void )`

  No description available.

`_gimp_reserved1: void (* _gimp_reserved1) ( void )`

  No description available.

`_gimp_reserved2: void (* _gimp_reserved2) ( void )`

  No description available.

`_gimp_reserved3: void (* _gimp_reserved3) ( void )`

  No description available.

`_gimp_reserved4: void (* _gimp_reserved4) ( void )`

  No description available.

`_gimp_reserved5: void (* _gimp_reserved5) ( void )`

  No description available.

`_gimp_reserved6: void (* _gimp_reserved6) ( void )`

  No description available.

`_gimp_reserved7: void (* _gimp_reserved7) ( void )`

  No description available.

`_gimp_reserved8: void (* _gimp_reserved8) ( void )`

  No description available.

`_gimp_reserved9: void (* _gimp_reserved9) ( void )`

  No description available.

#### Virtual methods

###### Gimp.ProcedureClass.create_config

Called when a `GimpConfig` object is created using gimp_procedure_create_config().

###### Gimp.ProcedureClass.install

Called to install the procedure with the main GIMP application. This is an implementation detail and must never be called by any plug-in code.

###### Gimp.ProcedureClass.run

Called when the procedure is executed via gimp_procedure_run(). the default implementation simply calls the procedure’s `GimpRunFunc`, `GimpProcedure` subclasses are free to modify the passed `args` and call their own, subclass-specific run functions.

###### Gimp.ProcedureClass.set_sensitivity

No description available.

###### Gimp.ProcedureClass.uninstall

Called to uninstall the procedure from the main GIMP application. This is an implementation detail and must never be called by any plug-in code.