## gimpgradientselect

gimpgradientselect — Functions providing a gradient selection dialog.

## Functions

void | ( *GimpRunGradientCallback ) ()
const gchar * | gimp_gradient_select_new ()
void | gimp_gradient_select_destroy ()
gboolean | gimp_gradients_popup ()
gboolean | gimp_gradients_close_popup ()
gboolean | gimp_gradients_set_popup ()

## Description

Functions providing a gradient selection dialog.

## Functions

### GimpRunGradientCallback ()

    void
    (*GimpRunGradientCallback) (const gchar *gradient_name,
                                gint width,
                                const gdouble *grad_data,
                                gboolean dialog_closing,
                                gpointer user_data);

### gimp_gradient_select_new ()

    const gchar *
    gimp_gradient_select_new (const gchar *title,
                              const gchar *gradient_name,
                              gint sample_size,
                              GimpRunGradientCallback callback,
                              gpointer data);

### gimp_gradient_select_destroy ()

    void
    gimp_gradient_select_destroy (const gchar *gradient_callback);

### gimp_gradients_popup ()

    gboolean
    gimp_gradients_popup (const gchar *gradient_callback,
                          const gchar *popup_title,
                          const gchar *initial_gradient,
                          gint sample_size);

Invokes the Gimp gradients selection.

This procedure opens the gradient selection dialog.

#### Parameters

gradient_callback | The callback PDB proc to call when gradient selection is made. |
popup_title | Title of the gradient selection dialog. |
initial_gradient | The name of the gradient to set as the first selected. |
sample_size | Size of the sample to return when the gradient is changed. |

#### Returns

TRUE on success.

### gimp_gradients_close_popup ()

    gboolean
    gimp_gradients_close_popup (const gchar *gradient_callback);

Close the gradient selection dialog.

This procedure closes an opened gradient selection dialog.

#### Parameters

gradient_callback | The name of the callback registered for this pop-up. |

#### Returns

TRUE on success.

### gimp_gradients_set_popup ()

    gboolean
    gimp_gradients_set_popup (const gchar *gradient_callback,
                              const gchar *gradient_name);

Sets the current gradient in a gradient selection dialog.

Sets the current gradient in a gradient selection dialog.

#### Parameters

gradient_callback | The name of the callback registered for this pop-up. |
gradient_name | The name of the gradient to set as selected. |

#### Returns

TRUE on success.