Class Gtk


public class Gtk extends Package
  • Constructor Details

    • Gtk

      public Gtk()
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • acceleratorGetDefaultModMask

      public static int acceleratorGetDefaultModMask()
      Gets the modifier mask.

      The modifier mask determines which modifiers are considered significant
      for keyboard accelerators. This includes all keyboard modifiers except
      for %GDK_LOCK_MASK.
      Returns:
      the modifier mask for accelerators
    • acceleratorGetLabel

      public static Str acceleratorGetLabel(int accelerator_key, int accelerator_mods)
      Converts an accelerator keyval and modifier mask into a string
      which can be used to represent the accelerator to the user.
      Parameters:
      accelerator_key - accelerator keyval
      accelerator_mods - accelerator modifier mask
      Returns:
      a newly-allocated string representing the accelerator
    • acceleratorGetLabelWithKeycode

      public static Str acceleratorGetLabelWithKeycode(@Nullable Display display, int accelerator_key, int keycode, int accelerator_mods)
      Converts an accelerator keyval and modifier mask
      into a string that can be displayed to the user.

      The string may be translated.

      This function is similar to [func@Gtk.accelerator_get_label],
      but handling keycodes. This is only useful for system-level
      components, applications should use [func@Gtk.accelerator_get_label]
      instead.
      Parameters:
      display - a `GdkDisplay` or %NULL to use the default display
      accelerator_key - accelerator keyval
      keycode - accelerator keycode
      accelerator_mods - accelerator modifier mask
      Returns:
      a newly-allocated string representing the accelerator
    • acceleratorName

      public static Str acceleratorName(int accelerator_key, int accelerator_mods)
      Converts an accelerator keyval and modifier mask into a string
      parseable by gtk_accelerator_parse().

      For example, if you pass in %GDK_KEY_q and %GDK_CONTROL_MASK,
      this function returns `<Control>q`.

      If you need to display accelerators in the user interface,
      see [func@Gtk.accelerator_get_label].
      Parameters:
      accelerator_key - accelerator keyval
      accelerator_mods - accelerator modifier mask
      Returns:
      a newly-allocated accelerator name
    • acceleratorNameWithKeycode

      public static Str acceleratorNameWithKeycode(@Nullable Display display, int accelerator_key, int keycode, int accelerator_mods)
      Converts an accelerator keyval and modifier mask
      into a string parseable by gtk_accelerator_parse_with_keycode().

      This is similar to [func@Gtk.accelerator_name] but handling keycodes.
      This is only useful for system-level components, applications
      should use [func@Gtk.accelerator_name] instead.
      Parameters:
      display - a `GdkDisplay` or %NULL to use the default display
      accelerator_key - accelerator keyval
      keycode - accelerator keycode
      accelerator_mods - accelerator modifier mask
      Returns:
      a newly allocated accelerator name.
    • acceleratorValid

      public static boolean acceleratorValid(int keyval, int modifiers)
      Determines whether a given keyval and modifier mask constitute
      a valid keyboard accelerator.

      For example, the %GDK_KEY_a keyval plus %GDK_CONTROL_MASK mark is valid,
      and matches the “Ctrl+a” accelerator. But, you can't, for instance, use
      the %GDK_KEY_Control_L keyval as an accelerator.
      Parameters:
      keyval - a GDK keyval
      modifiers - modifier mask
      Returns:
      %TRUE if the accelerator is valid
    • accessiblePropertyInitValue

      public static void accessiblePropertyInitValue(int property, @Nonnull Value value)
      Parameters:
      property -
      value -
    • accessibleRelationInitValue

      public static void accessibleRelationInitValue(int relation, @Nonnull Value value)
      Parameters:
      relation -
      value -
    • accessibleStateInitValue

      public static void accessibleStateInitValue(int state, @Nonnull Value value)
      Parameters:
      state -
      value -
    • builderErrorQuark

      public static int builderErrorQuark()
      Returns:
    • checkVersion

      public static Str checkVersion(int required_major, int required_minor, int required_micro)
      Checks that the GTK library in use is compatible with the
      given version.

      Generally you would pass in the constants %GTK_MAJOR_VERSION,
      %GTK_MINOR_VERSION, %GTK_MICRO_VERSION as the three arguments
      to this function; that produces a check that the library in
      use is compatible with the version of GTK the application or
      module was compiled against.

      Compatibility is defined by two things: first the version
      of the running library is newer than the version
      @required_major.required_minor.@required_micro. Second
      the running library must be binary compatible with the
      version @required_major.required_minor.@required_micro
      (same major version.)

      This function is primarily for GTK modules; the module
      can call this function to check that it wasn’t loaded
      into an incompatible version of GTK. However, such a
      check isn’t completely reliable, since the module may be
      linked against an old version of GTK and calling the
      old version of gtk_check_version(), but still get loaded
      into an application using a newer version of GTK.
      Parameters:
      required_major - the required major version
      required_minor - the required minor version
      required_micro - the required micro version
      Returns:
      %NULL if the GTK library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by GTK and should not be modified or freed.
    • constraintVflParserErrorQuark

      public static int constraintVflParserErrorQuark()
      Returns:
    • cssParserErrorQuark

      public static int cssParserErrorQuark()
      Returns:
    • cssParserWarningQuark

      public static int cssParserWarningQuark()
      Returns:
    • disableSetlocale

      public static void disableSetlocale()
      Prevents [id@gtk_init] and [id@gtk_init_check] from automatically calling
      `setlocale (LC_ALL, "")`.

      You would want to use this function if you wanted to set the locale for
      your program to something other than the user’s locale, or if
      you wanted to set different values for different locale categories.

      Most programs should not need to call this function.
    • editableDelegateGetProperty

      public static boolean editableDelegateGetProperty(@Nonnull Object object, int prop_id, @Nonnull Value value, @Nonnull ParamSpec pspec)
      Gets a property of the `GtkEditable` delegate for @object.

      This is helper function that should be called in the `get_property`
      function of your `GtkEditable` implementation, before handling your
      own properties.
      Parameters:
      object - a `GObject`
      prop_id - a property ID
      value - value to set
      pspec - the `GParamSpec` for the property
      Returns:
      %TRUE if the property was found
    • editableDelegateSetProperty

      public static boolean editableDelegateSetProperty(@Nonnull Object object, int prop_id, @Nonnull Value value, @Nonnull ParamSpec pspec)
      Sets a property on the `GtkEditable` delegate for @object.

      This is a helper function that should be called in the `set_property`
      function of your `GtkEditable` implementation, before handling your
      own properties.
      Parameters:
      object - a `GObject`
      prop_id - a property ID
      value - value to set
      pspec - the `GParamSpec` for the property
      Returns:
      %TRUE if the property was found
    • editableInstallProperties

      public static int editableInstallProperties(@Nonnull ObjectClass object_class, int first_prop)
      Overrides the `GtkEditable` properties for @class.

      This is a helper function that should be called in class_init,
      after installing your own properties.

      Note that your class must have "text", "cursor-position",
      "selection-bound", "editable", "width-chars", "max-width-chars",
      "xalign" and "enable-undo" properties for this function to work.

      To handle the properties in your set_property and get_property
      functions, you can either use [func@Gtk.Editable.delegate_set_property]
      and [func@Gtk.Editable.delegate_get_property] (if you are using
      a delegate), or remember the @first_prop offset and add it to the
      values in the [enum@Gtk.EditableProperties] enumeration to get the
      property IDs for these properties.
      Parameters:
      object_class - a `GObjectClass`
      first_prop - property ID to use for the first property
      Returns:
      the number of properties that were installed
    • enumeratePrinters

      public static void enumeratePrinters(Gtk.OnPrinterFunc func, @Nullable Pointer data, Gtk.OnDestroyNotify destroy, boolean wait)
      Calls a function for all `GtkPrinter`s.

      If @func returns %TRUE, the enumeration is stopped.
      Parameters:
      func - a function to call for each printer
      data - user data to pass to @func
      destroy - function to call if @data is no longer needed
      wait - if %TRUE, wait in a recursive mainloop until all printers are enumerated; otherwise return early
    • fileChooserErrorQuark

      public static int fileChooserErrorQuark()
      Registers an error quark for `GtkFileChooser` errors.
      Returns:
      The error quark used for `GtkFileChooser` errors.
    • getBinaryAge

      public static int getBinaryAge()
      Returns the binary age as passed to `libtool`.

      If `libtool` means nothing to you, don't worry about it.
      Returns:
      the binary age of the GTK library
    • getDebugFlags

      public static int getDebugFlags()
      Returns the GTK debug flags that are currently active.

      This function is intended for GTK modules that want
      to adjust their debug output based on GTK debug flags.
      Returns:
      the GTK debug flags.
    • getDefaultLanguage

      public static Language getDefaultLanguage()
      Returns the `PangoLanguage` for the default language
      currently in effect.

      Note that this can change over the life of an
      application.

      The default language is derived from the current
      locale. It determines, for example, whether GTK uses
      the right-to-left or left-to-right text direction.

      This function is equivalent to
      [func@Pango.Language.get_default].
      See that function for details.
      Returns:
      the default language as a `PangoLanguage`
    • getInterfaceAge

      public static int getInterfaceAge()
      Returns the interface age as passed to `libtool`.

      If `libtool` means nothing to you, don't worry about it.
      Returns:
      the interface age of the GTK library
    • getLocaleDirection

      public static int getLocaleDirection()
      Get the direction of the current locale. This is the expected
      reading direction for text and UI.

      This function depends on the current locale being set with
      setlocale() and will default to setting the %GTK_TEXT_DIR_LTR
      direction otherwise. %GTK_TEXT_DIR_NONE will never be returned.

      GTK sets the default text direction according to the locale
      during gtk_init(), and you should normally use
      gtk_widget_get_direction() or gtk_widget_get_default_direction()
      to obtain the current direction.

      This function is only needed rare cases when the locale is
      changed after GTK has already been initialized. In this case,
      you can use it to update the default text direction as follows:
      <!-- language="C" -->
       #include <locale.h>
       
       static void
       update_locale (const char *new_locale)
       {
         setlocale (LC_ALL, new_locale);
         GtkTextDirection direction = gtk_get_locale_direction ();
         gtk_widget_set_default_direction (direction);
       }
       
      Returns:
      the `GtkTextDirection` of the current locale
    • getMajorVersion

      public static int getMajorVersion()
      Returns the major version number of the GTK library.

      For example, in GTK version 3.1.5 this is 3.

      This function is in the library, so it represents the GTK library
      your code is running against. Contrast with the %GTK_MAJOR_VERSION
      macro, which represents the major version of the GTK headers you
      have included when compiling your code.
      Returns:
      the major version number of the GTK library
    • getMicroVersion

      public static int getMicroVersion()
      Returns the micro version number of the GTK library.

      For example, in GTK version 3.1.5 this is 5.

      This function is in the library, so it represents the GTK library
      your code is are running against. Contrast with the
      %GTK_MICRO_VERSION macro, which represents the micro version of the
      GTK headers you have included when compiling your code.
      Returns:
      the micro version number of the GTK library
    • getMinorVersion

      public static int getMinorVersion()
      Returns the minor version number of the GTK library.

      For example, in GTK version 3.1.5 this is 1.

      This function is in the library, so it represents the GTK library
      your code is are running against. Contrast with the
      %GTK_MINOR_VERSION macro, which represents the minor version of the
      GTK headers you have included when compiling your code.
      Returns:
      the minor version number of the GTK library
    • hsvToRgb

      public static void hsvToRgb(float h, float s, float v, @Nonnull Flt r, @Nonnull Flt g, @Nonnull Flt b)
      Converts a color from HSV space to RGB.

      Input values must be in the [0.0, 1.0] range;
      output values will be in the same range.
      Parameters:
      h - Hue
      s - Saturation
      v - Value
      r - Return value for the red component
      g - Return value for the green component
      b - Return value for the blue component
    • iconThemeErrorQuark

      public static int iconThemeErrorQuark()
      Returns:
    • init

      public static void init()
      Call this function before using any other GTK functions in your GUI
      applications. It will initialize everything needed to operate the
      toolkit.

      If you are using `GtkApplication`, you don't have to call gtk_init()
      or gtk_init_check(); the `GApplication::startup` handler
      does it for you.

      This function will terminate your program if it was unable to
      initialize the windowing system for some reason. If you want
      your program to fall back to a textual interface you want to
      call gtk_init_check() instead.

      GTK calls `signal (SIGPIPE, SIG_IGN)`
      during initialization, to ignore SIGPIPE signals, since these are
      almost never wanted in graphical applications. If you do need to
      handle SIGPIPE for some reason, reset the handler after gtk_init(),
      but notice that other libraries (e.g. libdbus or gvfs) might do
      similar things.
    • initCheck

      public static boolean initCheck()
      This function does the same work as gtk_init() with only a single
      change: It does not terminate the program if the windowing system
      can’t be initialized. Instead it returns %FALSE on failure.

      This way the application can fall back to some other means of
      communication with the user - for example a curses or command line
      interface.
      Returns:
      %TRUE if the windowing system has been successfully initialized, %FALSE otherwise
    • isInitialized

      public static boolean isInitialized()
      Use this function to check if GTK has been initialized with gtk_init()
      or gtk_init_check().
      Returns:
      the initialization status
    • nativeGetForSurface

      public static Native nativeGetForSurface(@Nonnull Surface surface)
      Finds the `GtkNative` associated with the surface.
      Parameters:
      surface - a `GdkSurface`
      Returns:
      the `GtkNative` that is associated with @surface
    • orderingFromCmpfunc

      public static int orderingFromCmpfunc(int cmpfunc_result)
      Converts the result of a `GCompareFunc` like strcmp() to a
      `GtkOrdering` value.
      Parameters:
      cmpfunc_result - Result of a comparison function
      Returns:
      the corresponding `GtkOrdering`
    • paperSizeGetDefault

      public static Str paperSizeGetDefault()
      Returns the name of the default paper size, which
      depends on the current locale.
      Returns:
      the name of the default paper size. The string is owned by GTK and should not be modified.
    • paperSizeGetPaperSizes

      public static List paperSizeGetPaperSizes(boolean include_custom)
      Creates a list of known paper sizes.
      Parameters:
      include_custom - whether to include custom paper sizes as defined in the page setup dialog
      Returns:
      a newly allocated list of newly allocated `GtkPaperSize` objects
    • paramSpecExpression

      public static ParamSpec paramSpecExpression(@Nonnull Str name, @Nonnull Str nick, @Nonnull Str blurb, int flags)
      Creates a new `GParamSpec` instance for a property holding a `GtkExpression`.

      See `g_param_spec_internal()` for details on the property strings.
      Parameters:
      name - canonical name of the property
      nick - a user-readable name for the property
      blurb - a user-readable description of the property
      flags - flags for the property
      Returns:
      a newly created property specification
    • printErrorQuark

      public static int printErrorQuark()
      Registers an error quark for `GtkPrintOperation` if necessary.
      Returns:
      The error quark used for `GtkPrintOperation` errors.
    • printRunPageSetupDialog

      public static PageSetup printRunPageSetupDialog(@Nullable Window parent, @Nullable PageSetup page_setup, @Nonnull PrintSettings settings)
      Runs a page setup dialog, letting the user modify the values from
      @page_setup. If the user cancels the dialog, the returned `GtkPageSetup`
      is identical to the passed in @page_setup, otherwise it contains the
      modifications done in the dialog.

      Note that this function may use a recursive mainloop to show the page
      setup dialog. See gtk_print_run_page_setup_dialog_async() if this is
      a problem.
      Parameters:
      parent - transient parent
      page_setup - an existing `GtkPageSetup`
      settings - a `GtkPrintSettings`
      Returns:
      a new `GtkPageSetup`
    • printRunPageSetupDialogAsync

      public static void printRunPageSetupDialogAsync(@Nullable Window parent, @Nullable PageSetup page_setup, @Nonnull PrintSettings settings, Gtk.OnPageSetupDoneFunc done_cb, @Nullable Pointer data)
      Runs a page setup dialog, letting the user modify the values from @page_setup.

      In contrast to gtk_print_run_page_setup_dialog(), this function returns after
      showing the page setup dialog on platforms that support this, and calls @done_cb
      from a signal handler for the ::response signal of the dialog.
      Parameters:
      parent - transient parent
      page_setup - an existing `GtkPageSetup`
      settings - a `GtkPrintSettings`
      done_cb - a function to call when the user saves the modified page setup
      data - user data to pass to @done_cb
    • recentManagerErrorQuark

      public static int recentManagerErrorQuark()
      Returns:
    • renderActivity

      public static void renderActivity(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders an activity indicator (such as in `GtkSpinner`).
      The state %GTK_STATE_FLAG_CHECKED determines whether there is
      activity going on.
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • renderArrow

      public static void renderArrow(@Nonnull StyleContext context, @Nonnull Context cr, double angle, double x, double y, double size)
      Renders an arrow pointing to @angle.

      Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:

      ![](arrows.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      angle - arrow angle from 0 to 2 * %G_PI, being 0 the arrow pointing to the north
      x - X origin of the render area
      y - Y origin of the render area
      size - square side for render area
    • renderBackground

      public static void renderBackground(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders the background of an element.

      Typical background rendering, showing the effect of
      `background-image`, `border-width` and `border-radius`:

      ![](background.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • renderCheck

      public static void renderCheck(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders a checkmark (as in a `GtkCheckButton`).

      The %GTK_STATE_FLAG_CHECKED state determines whether the check is
      on or off, and %GTK_STATE_FLAG_INCONSISTENT determines whether it
      should be marked as undefined.

      Typical checkmark rendering:

      ![](checks.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • renderExpander

      public static void renderExpander(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders an expander (as used in `GtkTreeView` and `GtkExpander`) in the area
      defined by @x, @y, @width, @height. The state %GTK_STATE_FLAG_CHECKED
      determines whether the expander is collapsed or expanded.

      Typical expander rendering:

      ![](expanders.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • renderFocus

      public static void renderFocus(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders a focus indicator on the rectangle determined by @x, @y, @width, @height.

      Typical focus rendering:

      ![](focus.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • renderFrame

      public static void renderFrame(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders a frame around the rectangle defined by @x, @y, @width, @height.

      Examples of frame rendering, showing the effect of `border-image`,
      `border-color`, `border-width`, `border-radius` and junctions:

      ![](frames.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • renderHandle

      public static void renderHandle(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders a handle (as in `GtkPaned` and `GtkWindow`’s resize grip),
      in the rectangle determined by @x, @y, @width, @height.

      Handles rendered for the paned and grip classes:

      ![](handles.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • renderIcon

      public static void renderIcon(@Nonnull StyleContext context, @Nonnull Context cr, @Nonnull Texture texture, double x, double y)
      Renders the icon in @texture at the specified @x and @y coordinates.

      This function will render the icon in @texture at exactly its size,
      regardless of scaling factors, which may not be appropriate when
      drawing on displays with high pixel densities.
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      texture - a `GdkTexture` containing the icon to draw
      x - X position for the @texture
      y - Y position for the @texture
    • renderLayout

      public static void renderLayout(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, @Nonnull Layout layout)
      Renders @layout on the coordinates @x, @y
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin
      y - Y origin
      layout - the `PangoLayout` to render
    • renderLine

      public static void renderLine(@Nonnull StyleContext context, @Nonnull Context cr, double x0, double y0, double x1, double y1)
      Renders a line from (x0, y0) to (x1, y1).
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x0 - X coordinate for the origin of the line
      y0 - Y coordinate for the origin of the line
      x1 - X coordinate for the end of the line
      y1 - Y coordinate for the end of the line
    • renderOption

      public static void renderOption(@Nonnull StyleContext context, @Nonnull Context cr, double x, double y, double width, double height)
      Renders an option mark (as in a radio button), the %GTK_STATE_FLAG_CHECKED
      state will determine whether the option is on or off, and
      %GTK_STATE_FLAG_INCONSISTENT whether it should be marked as undefined.

      Typical option mark rendering:

      ![](options.png)
      Parameters:
      context - a `GtkStyleContext`
      cr - a `cairo_t`
      x - X origin of the rectangle
      y - Y origin of the rectangle
      width - rectangle width
      height - rectangle height
    • rgbToHsv

      public static void rgbToHsv(float r, float g, float b, @Nonnull Flt h, @Nonnull Flt s, @Nonnull Flt v)
      Converts a color from RGB space to HSV.

      Input values must be in the [0.0, 1.0] range;
      output values will be in the same range.
      Parameters:
      r - Red
      g - Green
      b - Blue
      h - Return value for the hue component
      s - Return value for the saturation component
      v - Return value for the value component
    • setDebugFlags

      public static void setDebugFlags(int flags)
      Sets the GTK debug flags.
      Parameters:
      flags - the debug flags to set
    • showAboutDialog

      public static void showAboutDialog(@Nullable Window parent, @Nonnull Str first_property_name, Object... _elipse)
      A convenience function for showing an application’s about dialog.

      The constructed dialog is associated with the parent window and
      reused for future invocations of this function.
      Parameters:
      parent - the parent top-level window
      first_property_name - the name of the first property
      _elipse - value of first property, followed by more pairs of property name and value, `NULL`-terminated
    • showUri

      public static void showUri(@Nullable Window parent, @Nonnull Str uri, int timestamp)
      This function launches the default application for showing
      a given uri, or shows an error dialog if that fails.
      Parameters:
      parent - parent window
      uri - the uri to show
      timestamp - timestamp from the event that triggered this call, or %GDK_CURRENT_TIME
    • showUriFull

      public static void showUriFull(@Nullable Window parent, @Nonnull Str uri, int timestamp, @Nullable Cancellable cancellable, Gtk.OnAsyncReadyCallback callback, @Nullable Pointer user_data)
      This function launches the default application for showing
      a given uri.

      The @callback will be called when the launch is completed.
      It should call gtk_show_uri_full_finish() to obtain the result.

      This is the recommended call to be used as it passes information
      necessary for sandbox helpers to parent their dialogs properly.
      Parameters:
      parent - parent window
      uri - the uri to show
      timestamp - timestamp from the event that triggered this call, or %GDK_CURRENT_TIME
      cancellable - a `GCancellable` to cancel the launch
      callback - a callback to call when the action is complete
      user_data - data to pass to @callback
    • showUriFullFinish

      public static boolean showUriFullFinish(@Nonnull Window parent, @Nonnull AsyncResult result) throws AllocationError
      Finishes the gtk_show_uri() call and returns the result
      of the operation.
      Parameters:
      parent - the `GtkWindow` passed to gtk_show_uri()
      result - `GAsyncResult` that was passed to @callback
      Returns:
      %TRUE if the URI was shown successfully. Otherwise, %FALSE is returned and @error is set
      Throws:
      AllocationError
    • testAccessibleAssertionMessageRole

      public static void testAccessibleAssertionMessageRole(@Nonnull Str domain, @Nonnull Str file, int line, @Nonnull Str func, @Nonnull Str expr, @Nonnull Accessible accessible, int expected_role, int actual_role)
      Parameters:
      domain -
      file -
      line -
      func -
      expr -
      accessible -
      expected_role -
      actual_role -
    • testAccessibleCheckProperty

      public static Str testAccessibleCheckProperty(@Nonnull Accessible accessible, int property, Object... _elipse)
      Checks whether the accessible @property of @accessible is set to
      a specific value.
      Parameters:
      accessible - a `GtkAccessible`
      property - a `GtkAccessibleProperty`
      _elipse - the expected value of @property
      Returns:
      the value of the accessible property
    • testAccessibleCheckRelation

      public static Str testAccessibleCheckRelation(@Nonnull Accessible accessible, int relation, Object... _elipse)
      Checks whether the accessible @relation of @accessible is set to
      a specific value.
      Parameters:
      accessible - a `GtkAccessible`
      relation - a `GtkAccessibleRelation`
      _elipse - the expected value of @relation
      Returns:
      the value of the accessible relation
    • testAccessibleCheckState

      public static Str testAccessibleCheckState(@Nonnull Accessible accessible, int state, Object... _elipse)
      Checks whether the accessible @state of @accessible is set to
      a specific value.
      Parameters:
      accessible - a `GtkAccessible`
      state - a `GtkAccessibleState`
      _elipse - the expected value of @state
      Returns:
      the value of the accessible state
    • testAccessibleHasProperty

      public static boolean testAccessibleHasProperty(@Nonnull Accessible accessible, int property)
      Checks whether the `GtkAccessible` has @property set.
      Parameters:
      accessible - a `GtkAccessible`
      property - a `GtkAccessibleProperty`
      Returns:
      %TRUE if the @property is set in the @accessible
    • testAccessibleHasRelation

      public static boolean testAccessibleHasRelation(@Nonnull Accessible accessible, int relation)
      Checks whether the `GtkAccessible` has @relation set.
      Parameters:
      accessible - a `GtkAccessible`
      relation - a `GtkAccessibleRelation`
      Returns:
      %TRUE if the @relation is set in the @accessible
    • testAccessibleHasRole

      public static boolean testAccessibleHasRole(@Nonnull Accessible accessible, int role)
      Checks whether the `GtkAccessible:accessible-role` of the accessible
      is @role.
      Parameters:
      accessible - a `GtkAccessible`
      role - a `GtkAccessibleRole`
      Returns:
      %TRUE if the role matches
    • testAccessibleHasState

      public static boolean testAccessibleHasState(@Nonnull Accessible accessible, int state)
      Checks whether the `GtkAccessible` has @state set.
      Parameters:
      accessible - a `GtkAccessible`
      state - a `GtkAccessibleState`
      Returns:
      %TRUE if the @state is set in the @accessible
    • testRegisterAllTypes

      public static void testRegisterAllTypes()
      Force registration of all core GTK object types.

      This allowes to refer to any of those object types via
      g_type_from_name() after calling this function.
    • testWidgetWaitForDraw

      public static void testWidgetWaitForDraw(@Nonnull Widget widget)
      Enters the main loop and waits for @widget to be “drawn”.

      In this context that means it waits for the frame clock of
      @widget to have run a full styling, layout and drawing cycle.

      This function is intended to be used for syncing with actions that
      depend on @widget relayouting or on interaction with the display
      server.
      Parameters:
      widget - the widget to wait for
    • treeCreateRowDragContent

      public static ContentProvider treeCreateRowDragContent(@Nonnull TreeModel tree_model, @Nonnull TreePath path)
      Creates a content provider for dragging @path from @tree_model.
      Parameters:
      tree_model - a `GtkTreeModel`
      path - a row in @tree_model
      Returns:
      a new `GdkContentProvider`
    • treeRowReferenceDeleted

      public static void treeRowReferenceDeleted(@Nonnull Object proxy, @Nonnull TreePath path)
      Lets a set of row reference created by
      gtk_tree_row_reference_new_proxy() know that the
      model emitted the ::row-deleted signal.
      Parameters:
      proxy - a `GObject`
      path - the path position that was deleted
    • treeRowReferenceInserted

      public static void treeRowReferenceInserted(@Nonnull Object proxy, @Nonnull TreePath path)
      Lets a set of row reference created by
      gtk_tree_row_reference_new_proxy() know that the
      model emitted the ::row-inserted signal.
      Parameters:
      proxy - a `GObject`
      path - the row position that was inserted
    • treeRowReferenceReordered

      public static void treeRowReferenceReordered(@Nonnull Object proxy, @Nonnull TreePath path, @Nonnull TreeIter iter, @Nonnull Int new_order)
      Lets a set of row reference created by
      gtk_tree_row_reference_new_proxy() know that the
      model emitted the ::rows-reordered signal.
      Parameters:
      proxy - a `GObject`
      path - the parent path of the reordered signal
      iter - the iter pointing to the parent of the reordered
      new_order - the new order of rows
    • valueDupExpression

      public static Expression valueDupExpression(@Nonnull Value value)
      Retrieves the `GtkExpression` stored inside the given `value`, and acquires
      a reference to it.
      Parameters:
      value - a `GValue` initialized with type `GTK_TYPE_EXPRESSION`
      Returns:
      a `GtkExpression`
    • valueGetExpression

      public static Expression valueGetExpression(@Nonnull Value value)
      Retrieves the `GtkExpression` stored inside the given `value`.
      Parameters:
      value - a `GValue` initialized with type `GTK_TYPE_EXPRESSION`
      Returns:
      a `GtkExpression`
    • valueSetExpression

      public static void valueSetExpression(@Nonnull Value value, @Nonnull Expression expression)
      Stores the given `GtkExpression` inside `value`.

      The `GValue` will acquire a reference to the `expression`.
      Parameters:
      value - a `GValue` initialized with type `GTK_TYPE_EXPRESSION`
      expression - a `GtkExpression`
    • valueTakeExpression

      public static void valueTakeExpression(@Nonnull Value value, @Nullable Expression expression)
      Stores the given `GtkExpression` inside `value`.

      This function transfers the ownership of the `expression` to the `GValue`.
      Parameters:
      value - a `GValue` initialized with type `GTK_TYPE_EXPRESSION`
      expression - a `GtkExpression`