AboutDialogRef

public struct AboutDialogRef : AboutDialogProtocol, GWeakCapturing

The GtkAboutDialog offers a simple way to display information about a program like its logo, name, copyright, website and license. It is also possible to give credits to the authors, documenters, translators and artists who have worked on the program. An about dialog is typically opened when the user selects the About option from the Help menu. All parts of the dialog are optional.

About dialogs often contain links and email addresses. GtkAboutDialog displays these as clickable links. By default, it calls gtk_show_uri_on_window() when a user clicks one. The behaviour can be overridden with the GtkAboutDialog::activate-link signal.

To specify a person with an email address, use a string like “Edgar Allan Poe <edgar`poe.com`>”. To specify a website with a title, use a string like “GTK+ team http://www.gtk.org”.

To make constructing a GtkAboutDialog as convenient as possible, you can use the function gtk_show_about_dialog() which constructs and shows a dialog and keeps it around so that it can be shown again.

Note that GTK+ sets a default title of _("About %s") on the dialog window (where `s` is replaced by the name of the application, but in order to ensure proper translation of the title, applications should set the title property explicitly when constructing a GtkAboutDialog, as shown in the following example: (C Language Example):

GdkPixbuf *example_logo = gdk_pixbuf_new_from_file ("./logo.png", NULL);
gtk_show_about_dialog (NULL,
                       "program-name", "ExampleCode",
                       "logo", example_logo,
                       "title", _("About ExampleCode"),
                       NULL);

It is also possible to show a GtkAboutDialog like any other GtkDialog, e.g. using gtk_dialog_run(). In this case, you might need to know that the “Close” button returns the GTK_RESPONSE_CANCEL response id.

The AboutDialogRef type acts as a lightweight Swift reference to an underlying GtkAboutDialog instance. It exposes methods that can operate on this data type through AboutDialogProtocol conformance. Use AboutDialogRef only as an unowned reference to an existing GtkAboutDialog instance.

  • ptr
    Untyped pointer to the underlying `GtkAboutDialog` instance.
    

    For type-safe access, use the generated, typed pointer about_dialog_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

AboutDialog Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkAboutDialog>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkAboutDialog>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkAboutDialog>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkAboutDialog>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements AboutDialogProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : AboutDialogProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> AboutDialogRef where T : AboutDialogProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AboutDialogProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AboutDialogProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AboutDialogProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AboutDialogProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AboutDialogProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new GtkAboutDialog.

    Declaration

    Swift

    @inlinable
    init()