Gtk.NativeDialog
Description: Reference for Gtk.NativeDialog

### Class

# GtkNativeDialog

#### Description [src]

    abstract class Gtk.NativeDialog : GObject.Object
    {
      /* No available fields */
    }

Base class for platform dialogs that don’t use `GtkDialog`.

Native dialogs are used in order to integrate better with a platform, by looking the same as other native applications and supporting platform specific features.

The `GtkDialog` functions cannot be used on such objects, but we need a similar API in order to drive them. The `GtkNativeDialog` object is an API that allows you to do this. It allows you to set various common properties on the dialog, as well as show and hide it and get a `GtkNativeDialog::response` signal when the user finished with the dialog.

Note that unlike `GtkDialog`, `GtkNativeDialog` objects are not toplevel widgets, and GTK does not keep them alive. It is your responsibility to keep a reference until you are done with the object.

#### Hierarchy

#### Ancestors

- GObject

#### Descendants

- GtkFileChooserNative

#### Instance methods

###### gtk_native_dialog_destroy

Destroys a dialog.

###### gtk_native_dialog_get_modal

Returns whether the dialog is modal.

###### gtk_native_dialog_get_title

Gets the title of the `GtkNativeDialog`.

###### gtk_native_dialog_get_transient_for

Fetches the transient parent for this window.

###### gtk_native_dialog_get_visible

Determines whether the dialog is visible.

###### gtk_native_dialog_hide

Hides the dialog if it is visible, aborting any interaction.

###### gtk_native_dialog_set_modal

Sets a dialog modal or non-modal.

###### gtk_native_dialog_set_title

Sets the title of the `GtkNativeDialog.`.

###### gtk_native_dialog_set_transient_for

Dialog windows should be set transient for the main application window they were spawned from.

###### gtk_native_dialog_show

Shows the dialog on the display.

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

Please see GObject for a full list of methods.

#### Properties

###### Gtk.NativeDialog:modal

Whether the window should be modal with respect to its transient parent.

###### Gtk.NativeDialog:title

The title of the dialog window.

###### Gtk.NativeDialog:transient-for

The transient parent of the dialog, or `NULL` for none.

###### Gtk.NativeDialog:visible

Whether the window is currently visible.

#### Signals

###### Gtk.NativeDialog::response

Emitted when the user responds to the dialog.

##### 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 GtkNativeDialogClass {
      void (* response) (
        GtkNativeDialog* self,
        int response_id
      );
      void (* show) (
        GtkNativeDialog* self
      );
      void (* hide) (
        GtkNativeDialog* self
      );
      void (* _gtk_reserved1) (
    void
      );
      void (* _gtk_reserved2) (
    void
      );
      void (* _gtk_reserved3) (
    void
      );
      void (* _gtk_reserved4) (
    void
      );

    }

Class structure for `GtkNativeDialog`.

###### Class members

`response: void (* response) ( GtkNativeDialog* self, int response_id )`

  Class handler for the `GtkNativeDialog::response` signal.

`show: void (* show) ( GtkNativeDialog* self )`

  No description available.

`hide: void (* hide) ( GtkNativeDialog* self )`

  No description available.

`_gtk_reserved1: void (* _gtk_reserved1) ( void )`

  No description available.

`_gtk_reserved2: void (* _gtk_reserved2) ( void )`

  No description available.

`_gtk_reserved3: void (* _gtk_reserved3) ( void )`

  No description available.

`_gtk_reserved4: void (* _gtk_reserved4) ( void )`

  No description available.

#### Virtual methods

###### Gtk.NativeDialogClass.hide

Hides the dialog if it is visible, aborting any interaction.

###### Gtk.NativeDialogClass.response

Class handler for the `GtkNativeDialog::response` signal.

###### Gtk.NativeDialogClass.show

Shows the dialog on the display.