## gimpui gimpui — Common user interface functions. This header includes all other GIMP User Interface Library headers. |

## Synopsis

    void                gimp_ui_init                        (const gchar *prog_name,
                                                             gboolean preview);
    GdkWindow*          gimp_ui_get_display_window          (guint32 gdisp_ID);
    GdkWindow*          gimp_ui_get_progress_window         (void);
    void                gimp_window_set_transient           (GtkWindow *window);
    void                gimp_window_set_transient_for_display
                                                            (GtkWindow *window,
                                                             guint32 gdisp_ID);

## Description

Common user interface functions. This header includes all other GIMP User Interface Library headers.

## Details

### gimp_ui_init ()

    void                gimp_ui_init                        (const gchar *prog_name,
                                                             gboolean preview);

This function initializes GTK+ with `gtk_init()` and initializes GDK's image rendering subsystem (GdkRGB) to follow the GIMP main program's colormap allocation/installation policy.

GIMP's colormap policy can be determinded by the user with the gimprc variables `min_colors` and `install_cmap`.

`prog_name` : | The name of the plug-in which will be passed as argv[0] to `gtk_init()`. It's a convention to use the name of the executable and _not_ the PDB procedure name or something.
`preview` : | This parameter is unused and exists for historical reasons only.

### gimp_ui_get_display_window ()

    GdkWindow*          gimp_ui_get_display_window          (guint32 gdisp_ID);

Returns the GdkWindow of a display window. The purpose is to allow to make plug-in dialogs transient to the image display as explained with `gdk_window_set_transient_for()`.

You shouldn't have to call this function directly. Use `gimp_window_set_transient_for_display()` instead.

`gdisp_ID` : |
Returns : | A reference to a GdkWindow or `NULL`. You should unref the window using `g_object_unref()` as soon as you don't need it any longer.

Since GIMP 2.4

### gimp_ui_get_progress_window ()

    GdkWindow*          gimp_ui_get_progress_window         (void);

Returns the GdkWindow of the window this plug-in's progress bar is shown in. Use it to make plug-in dialogs transient to this window as explained with `gdk_window_set_transient_for()`.

You shouldn't have to call this function directly. Use `gimp_window_set_transient()` instead.

Returns : | A reference to a GdkWindow or `NULL`. You should unref the window using `g_object_unref()` as soon as you don't need it any longer.

Since GIMP 2.4

### gimp_window_set_transient ()

    void                gimp_window_set_transient           (GtkWindow *window);

Indicates to the window manager that `window` is a transient dialog associated with the GIMP window that the plug-in has been started from. See also `gimp_window_set_transient_for_display()`.

`window` : | the GtkWindow that should become transient

Since GIMP 2.4

### gimp_window_set_transient_for_display ()

    void                gimp_window_set_transient_for_display
                                                            (GtkWindow *window,
                                                             guint32 gdisp_ID);

Indicates to the window manager that `window` is a transient dialog associated with the GIMP image window that is identified by it's display ID. See `gdk_window_set_transient_for()` for more information.

Most of the time you will want to use the convenience function `gimp_window_set_transient()`.

`window` : | the GtkWindow that should become transient
`gdisp_ID` : | display ID of the image window that should become the parent

Since GIMP 2.4

## See Also

`gtk_init()`, `gdk_set_use_xshm()`, `gdk_rgb_set_min_colors()`, `gdk_rgb_set_install()`, `gdk_rgb_get_visual()`, `gdk_rgb_get_cmap()`, `gtk_widget_set_default_visual()`, `gtk_widget_set_default_colormap()`, `gtk_preview_set_gamma()`.