Class Gtk

java.lang.Object
org.gnome.gtk.Gtk

@Generated("org.javagi.JavaGI") public final class Gtk extends Object
Constants and functions that are declared in the global Gtk namespace.
  • Field Details

    • ACCESSIBLE_ATTRIBUTE_BACKGROUND

      public static final String ACCESSIBLE_ATTRIBUTE_BACKGROUND
      An attribute for the background color, expressed as an RGB value encoded in a string using the format: {r8},{g8},{b8}.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_FAMILY

      public static final String ACCESSIBLE_ATTRIBUTE_FAMILY
      An attribute for the font family name.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_FOREGROUND

      public static final String ACCESSIBLE_ATTRIBUTE_FOREGROUND
      An attribute for the foreground color, expressed as an RGB value encoded in a string using the format: {r8},{g8},{b8}.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_OVERLINE

      public static final String ACCESSIBLE_ATTRIBUTE_OVERLINE

      An attribute for the overline style.

      Possible values are:

      • Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE
      • Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE

      public static final String ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE
      The "none" overline value for Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE

      public static final String ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE
      The "single" overline value for Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_SIZE

      public static final String ACCESSIBLE_ATTRIBUTE_SIZE
      An attribute for the font size, expressed in points.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH

      An attribute for the font stretch type.

      Possible values are:

      • Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED
      • Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED
      • Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED
      • Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED
      The "condensed" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_EXPANDED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_EXPANDED
      The "expanded" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED
      The "extra condensed" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_EXPANDED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_EXPANDED
      The "extra expanded" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_NORMAL

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_NORMAL
      The "normal" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED
      The "semi condensed" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_EXPANDED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_EXPANDED
      The "semi expanded" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED
      The "ultra condensed" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_EXPANDED

      public static final String ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_EXPANDED
      The "ultra expanded" stretch value for Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STRIKETHROUGH

      public static final String ACCESSIBLE_ATTRIBUTE_STRIKETHROUGH

      An attribute for strikethrough text.

      Possible values are true or false.

      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STYLE

      public static final String ACCESSIBLE_ATTRIBUTE_STYLE

      An attribute for the font style.

      Possible values are:

      • Gtk.ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL
      • Gtk.ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE
      • Gtk.ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC

      public static final String ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC
      The "italic" style value for Gtk.ACCESSIBLE_ATTRIBUTE_STYLE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL

      public static final String ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL
      The "normal" style value for Gtk.ACCESSIBLE_ATTRIBUTE_STYLE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE

      public static final String ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE
      The "oblique" style value for Gtk.ACCESSIBLE_ATTRIBUTE_STYLE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_UNDERLINE

      public static final String ACCESSIBLE_ATTRIBUTE_UNDERLINE

      An attribute for the underline style.

      Possible values are:

      • Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE
      • Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE
      • Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE
      • Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE

      public static final String ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE
      The "double" underline value for Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR

      public static final String ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR
      The "error" underline value for Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE

      public static final String ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE
      The "none" underline value for Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE

      public static final String ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE
      The "single" underline value for Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_VARIANT

      public static final String ACCESSIBLE_ATTRIBUTE_VARIANT

      An attribute for the font variant.

      Possible values are:

      • Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS
      • Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS
      • Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS
      • Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS
      • Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE
      • Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS

      public static final String ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS
      The "all petite caps" variant value for Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS

      public static final String ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS
      The "all small caps" variant value for Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS

      public static final String ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS
      The "petite caps" variant value for Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS

      public static final String ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS
      The "small caps" variant value for Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS

      public static final String ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS
      The "title caps" variant value for Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE

      public static final String ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE
      The "unicase" variant value for Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_ATTRIBUTE_WEIGHT

      public static final String ACCESSIBLE_ATTRIBUTE_WEIGHT
      An attribute for the font weight.
      Since:
      4.14
      See Also:
    • ACCESSIBLE_VALUE_UNDEFINED

      public static final int ACCESSIBLE_VALUE_UNDEFINED
      An undefined value. The accessible attribute is either unset, or its value is undefined.
      See Also:
    • BINARY_AGE

      public static final int BINARY_AGE
      Like getBinaryAge(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • IM_MODULE_EXTENSION_POINT_NAME

      public static final String IM_MODULE_EXTENSION_POINT_NAME
      The default name of the extension point.
      See Also:
    • INPUT_ERROR

      public static final int INPUT_ERROR

      Constant to return from a signal handler for the ::input signal in case of conversion failure.

      See Gtk.SpinButton::input.

      See Also:
    • INTERFACE_AGE

      public static final int INTERFACE_AGE
      Like getInterfaceAge(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • INVALID_LIST_POSITION

      public static final int INVALID_LIST_POSITION

      The value used to refer to a guaranteed invalid position in a GListModel.

      This value may be returned from some functions, others may accept it as input. Its interpretation may differ for different functions.

      Refer to each function's documentation for if this value is allowed and what it does.

      See Also:
    • LEVEL_BAR_OFFSET_FULL

      public static final String LEVEL_BAR_OFFSET_FULL
      The name used for the stock full offset included by GtkLevelBar.
      See Also:
    • LEVEL_BAR_OFFSET_HIGH

      public static final String LEVEL_BAR_OFFSET_HIGH
      The name used for the stock high offset included by GtkLevelBar.
      See Also:
    • LEVEL_BAR_OFFSET_LOW

      public static final String LEVEL_BAR_OFFSET_LOW
      The name used for the stock low offset included by GtkLevelBar.
      See Also:
    • MAJOR_VERSION

      public static final int MAJOR_VERSION
      Like getMajorVersion(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • MAX_COMPOSE_LEN

      public static final int MAX_COMPOSE_LEN

      Evaluates to the maximum length of a compose sequence.

      This macro is longer used by GTK.

      See Also:
    • MEDIA_FILE_EXTENSION_POINT_NAME

      public static final String MEDIA_FILE_EXTENSION_POINT_NAME
      The default extension point name for media file.
      See Also:
    • MICRO_VERSION

      public static final int MICRO_VERSION
      Like getMicroVersion(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • MINOR_VERSION

      public static final int MINOR_VERSION
      Like getMinorVersion(), but from the headers used at application compile time, rather than from the library linked against at application run time.
      See Also:
    • PAPER_NAME_A3

      public static final String PAPER_NAME_A3
      Name for the A3 paper size.
      See Also:
    • PAPER_NAME_A4

      public static final String PAPER_NAME_A4
      Name for the A4 paper size.
      See Also:
    • PAPER_NAME_A5

      public static final String PAPER_NAME_A5
      Name for the A5 paper size.
      See Also:
    • PAPER_NAME_B5

      public static final String PAPER_NAME_B5
      Name for the B5 paper size.
      See Also:
    • PAPER_NAME_EXECUTIVE

      public static final String PAPER_NAME_EXECUTIVE
      Name for the Executive paper size.
      See Also:
    • PAPER_NAME_LETTER

      public static final String PAPER_NAME_LETTER
      Name for the Letter paper size.
      See Also:
    • PRIORITY_RESIZE

      public static final int PRIORITY_RESIZE

      Use this priority for functionality related to size allocation.

      It is used internally by GTK+ to compute the sizes of widgets. This priority is higher than GDK_PRIORITY_REDRAW to avoid resizing a widget which was just redrawn.

      See Also:
    • STYLE_PROVIDER_PRIORITY_APPLICATION

      public static final int STYLE_PROVIDER_PRIORITY_APPLICATION
      A priority that can be used when adding a GtkStyleProvider for application-specific style information.
      See Also:
    • STYLE_PROVIDER_PRIORITY_FALLBACK

      public static final int STYLE_PROVIDER_PRIORITY_FALLBACK

      The priority used for default style information that is used in the absence of themes.

      Note that this is not very useful for providing default styling for custom style classes - themes are likely to override styling provided at this priority with catch-all * {...} rules.

      See Also:
    • STYLE_PROVIDER_PRIORITY_SETTINGS

      public static final int STYLE_PROVIDER_PRIORITY_SETTINGS

      The priority used for style information provided via GtkSettings.

      This priority is higher than GTK_STYLE_PROVIDER_PRIORITY_THEME to let settings override themes.

      See Also:
    • STYLE_PROVIDER_PRIORITY_THEME

      public static final int STYLE_PROVIDER_PRIORITY_THEME
      The priority used for style information provided by themes.
      See Also:
    • STYLE_PROVIDER_PRIORITY_USER

      public static final int STYLE_PROVIDER_PRIORITY_USER

      The priority used for the style information from $XDG_CONFIG_HOME/gtk-4.0/gtk.css.

      You should not use priorities higher than this, to give the user the last word.

      See Also:
    • SVG_DEFAULT_FEATURES

      public static final int SVG_DEFAULT_FEATURES
      The GtkSvgFeatures that are enabled by default.
      Since:
      4.22
      See Also:
    • TEXT_VIEW_PRIORITY_VALIDATE

      public static final int TEXT_VIEW_PRIORITY_VALIDATE
      The priority at which the text view validates onscreen lines in an idle job in the background.
      See Also:
    • TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID

      @Deprecated public static final int TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID
      Deprecated.
      There is no replacement

      Uses the default sort function in a TreeSortable.

      See also: TreeSortable.setSortColumnId(int, SortType)

      See Also:
    • TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID

      @Deprecated public static final int TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID
      Deprecated.
      There is no replacement
      See Also:
  • Constructor Details

    • Gtk

      public Gtk()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • acceleratorGetAccessibleLabel

      public static String acceleratorGetAccessibleLabel(int acceleratorKey, Set<ModifierType> acceleratorMods)

      Generates an accessible description of an accelerator.

      This function is similar to acceleratorGetLabel(int, Set) but it is meant for accessibility layers labels rather than user-facing labels. The output of this function is fit for Gtk.AccessibleProperty.KEY_SHORTCUTS.

      For more information, see the WAI-ARIA reference.

      Parameters:
      acceleratorKey - accelerator keyval
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly-allocated string representing the accelerator
      Since:
      4.22
    • acceleratorGetAccessibleLabel

      public static String acceleratorGetAccessibleLabel(int acceleratorKey, ModifierType... acceleratorMods)

      Generates an accessible description of an accelerator.

      This function is similar to acceleratorGetLabel(int, Set) but it is meant for accessibility layers labels rather than user-facing labels. The output of this function is fit for Gtk.AccessibleProperty.KEY_SHORTCUTS.

      For more information, see the WAI-ARIA reference.

      Parameters:
      acceleratorKey - accelerator keyval
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly-allocated string representing the accelerator
      Since:
      4.22
    • acceleratorGetDefaultModMask

      public static Set<ModifierType> 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 String acceleratorGetLabel(int acceleratorKey, Set<ModifierType> acceleratorMods)
      Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.
      Parameters:
      acceleratorKey - accelerator keyval
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly-allocated string representing the accelerator
    • acceleratorGetLabel

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

      public static String acceleratorGetLabelWithKeycode(@Nullable Display display, int acceleratorKey, int keycode, Set<ModifierType> acceleratorMods)

      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 acceleratorGetLabel(int, Set), but handling keycodes. This is only useful for system-level components, applications should use acceleratorGetLabel(int, Set) instead.

      Parameters:
      display - a GdkDisplay
      acceleratorKey - accelerator keyval
      keycode - accelerator keycode
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly-allocated string representing the accelerator
    • acceleratorGetLabelWithKeycode

      public static String acceleratorGetLabelWithKeycode(@Nullable Display display, int acceleratorKey, int keycode, ModifierType... acceleratorMods)

      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 acceleratorGetLabel(int, Set), but handling keycodes. This is only useful for system-level components, applications should use acceleratorGetLabel(int, Set) instead.

      Parameters:
      display - a GdkDisplay
      acceleratorKey - accelerator keyval
      keycode - accelerator keycode
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly-allocated string representing the accelerator
    • acceleratorName

      public static String acceleratorName(int acceleratorKey, Set<ModifierType> acceleratorMods)

      Converts an accelerator keyval and modifier mask into a string that can be parsed by acceleratorParse(String, Out, Out).

      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 acceleratorGetLabel(int, Set).

      Parameters:
      acceleratorKey - accelerator keyval
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly-allocated accelerator name
    • acceleratorName

      public static String acceleratorName(int acceleratorKey, ModifierType... acceleratorMods)

      Converts an accelerator keyval and modifier mask into a string that can be parsed by acceleratorParse(String, Out, Out).

      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 acceleratorGetLabel(int, Set).

      Parameters:
      acceleratorKey - accelerator keyval
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly-allocated accelerator name
    • acceleratorNameWithKeycode

      public static String acceleratorNameWithKeycode(@Nullable Display display, int acceleratorKey, int keycode, Set<ModifierType> acceleratorMods)

      Converts an accelerator keyval and modifier mask into a string that can be parsed by acceleratorParseWithKeycode(String, Display, Out, Out, Out).

      This is similar to acceleratorName(int, Set) but handling keycodes. This is only useful for system-level components, applications should use acceleratorName(int, Set) instead.

      Parameters:
      display - a GdkDisplay
      acceleratorKey - accelerator keyval
      keycode - accelerator keycode
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly allocated accelerator name.
    • acceleratorNameWithKeycode

      public static String acceleratorNameWithKeycode(@Nullable Display display, int acceleratorKey, int keycode, ModifierType... acceleratorMods)

      Converts an accelerator keyval and modifier mask into a string that can be parsed by acceleratorParseWithKeycode(String, Display, Out, Out, Out).

      This is similar to acceleratorName(int, Set) but handling keycodes. This is only useful for system-level components, applications should use acceleratorName(int, Set) instead.

      Parameters:
      display - a GdkDisplay
      acceleratorKey - accelerator keyval
      keycode - accelerator keycode
      acceleratorMods - accelerator modifier mask
      Returns:
      a newly allocated accelerator name.
    • acceleratorParse

      public static boolean acceleratorParse(String accelerator, @Nullable Out<Integer> acceleratorKey, @Nullable Out<Set<ModifierType>> acceleratorMods)

      Parses a string representing an accelerator.

      The format looks like “<Control>a” or “<Shift><Alt>F1”.

      The parser is fairly liberal and allows lower or upper case, and also abbreviations such as “<Ctl>” and “<Ctrl>”.

      Key names are parsed using Gdk#keyvalFromName. For character keys the name is not the symbol, but the lowercase name, e.g. one would use “<Ctrl>minus” instead of “<Ctrl>-”.

      Modifiers are enclosed in angular brackets <>, and match the Gdk.ModifierType mask:

      • <Shift> for GDK_SHIFT_MASK
      • <Ctrl> for GDK_CONTROL_MASK
      • <Alt> for GDK_ALT_MASK
      • <Meta> for GDK_META_MASK
      • <Super> for GDK_SUPER_MASK
      • <Hyper> for GDK_HYPER_MASK

      If the parse operation fails, acceleratorKey and acceleratorMods will be set to 0 (zero).

      Parameters:
      accelerator - string representing an accelerator
      acceleratorKey - return location for accelerator keyval
      acceleratorMods - return location for accelerator modifier mask
      Returns:
      whether parsing succeeded
    • acceleratorParseWithKeycode

      public static boolean acceleratorParseWithKeycode(String accelerator, @Nullable Display display, @Nullable Out<Integer> acceleratorKey, @Nullable Out<int[]> acceleratorCodes, @Nullable Out<Set<ModifierType>> acceleratorMods)

      Parses a string representing an accelerator.

      This is similar to acceleratorParse(String, Out, Out) but handles keycodes as well. This is only useful for system-level components, applications should use acceleratorParse(String, Out, Out) instead.

      If acceleratorCodes is given and the result stored in it is non-null, the result must be freed with g_free().

      If a keycode is present in the accelerator and no acceleratorCodes is given, the parse will fail.

      If the parse fails, acceleratorKey, acceleratorMods and acceleratorCodes will be set to 0 (zero).

      Parameters:
      accelerator - string representing an accelerator
      display - the GdkDisplay to look up acceleratorCodes in
      acceleratorKey - return location for accelerator keyval
      acceleratorCodes - return location for accelerator keycodes
      acceleratorMods - return location for accelerator modifier mask
      Returns:
      true if parsing succeeded
    • acceleratorValid

      public static boolean acceleratorValid(int keyval, Set<ModifierType> 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 mask 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
    • acceleratorValid

      public static boolean acceleratorValid(int keyval, ModifierType... 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 mask 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
    • checkVersion

      public static @Nullable String checkVersion(int requiredMajor, int requiredMinor, int requiredMicro)

      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 requiredMicro. Second the running library must be binary compatible with the version requiredMicro (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:
      requiredMajor - the required major version
      requiredMinor - the required minor version
      requiredMicro - 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.
    • cssParserErrorQuark

      public static Quark cssParserErrorQuark()
      Registers an error quark for CSS parsing errors.
      Returns:
      the error quark
    • cssParserWarningQuark

      public static Quark cssParserWarningQuark()
      Registers an error quark for CSS parsing warnings.
      Returns:
      the warning quark
    • disablePortalInterfaces

      public static void disablePortalInterfaces(@Nullable String @Nullable [] portalInterfaces)

      Prevents GTK from using the specified portals.

      This should only be used in portal implementations, apps must not call it.

      Parameters:
      portalInterfaces - a null-terminated array of portal interface names to disable
      Since:
      4.22
    • disablePortals

      public static void disablePortals()

      Prevents GTK from using portals.

      This is equivalent to setting GDK_DEBUG=no-portals in the environment.

      This should only be used in portal implementations, apps must not call it.

      Since:
      4.18
    • disableSetlocale

      public static void disableSetlocale()

      Prevents init() and initCheck() from calling setlocale().

      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.

    • distributeNaturalAllocation

      public static int distributeNaturalAllocation(int extraSpace, @Nullable RequestedSize @Nullable [] sizes)

      Distributes extraSpace to child sizes by bringing smaller children up to natural size first.

      The remaining space will be added to the minimumSize member of the GtkRequestedSize struct. If all sizes reach their natural size then the remaining space is returned.

      Parameters:
      extraSpace - Extra space to redistribute among children after subtracting minimum sizes and any child padding from the overall allocation
      sizes - An array of structs with a client pointer and a minimum/natural size in the orientation of the allocation.
      Returns:
      The remainder of extraSpace after redistributing space to sizes.
    • enumeratePrinters

      public static void enumeratePrinters(@Nullable PrinterFunc func, boolean wait_)

      Calls a function for all printers that are known to GTK.

      If func returns true, the enumeration is stopped.

      Parameters:
      func - a function to call for each printer
      wait_ - if true, wait in a recursive mainloop until all printers are enumerated; otherwise return early
    • 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 Set<DebugFlags> 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 Language#getDefault. See that function for details.

      Returns:
      the default language
    • 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 TextDirection getLocaleDirection()

      Gets 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 init(), and you should normally use Widget.getDirection() or Widget.getDefaultDirection() 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:

      #include <locale.h>
      
      static void
      update_locale (const char *new_locale)
      {
        setlocale (LC_ALL, new_locale);
        gtk_widget_set_default_direction (gtk_get_locale_direction ());
      }
      
      Returns:
      the direction 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, Out<Float> r, Out<Float> g, Out<Float> 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
    • init

      public static void init()

      Initializes GTK.

      This function must be called before using any other GTK functions in your GUI applications.

      It will initialize everything needed to operate the toolkit. In particular, it will open the default display (see Display#getDefault).

      If you are using Application, you usually don't have to call this function; the Application#startup handler does it for you. Though, if you are using GApplication methods that will be invoked before startup, such as local_command_line, you may need to initialize GTK explicitly.

      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, call initCheck() 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()

      Initializes GTK.

      This function does the same work as 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()

      Returns whether GTK has been initialized.

      See init().

      Returns:
      the initialization status
    • paramSpecExpression

      public static ParamSpec paramSpecExpression(String name, String nick, String blurb, Set<ParamFlags> 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
    • paramSpecExpression

      public static ParamSpec paramSpecExpression(String name, String nick, String blurb, ParamFlags... 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
    • printRunPageSetupDialog

      public static PageSetup printRunPageSetupDialog(@Nullable Window parent, @Nullable PageSetup pageSetup, PrintSettings settings)

      Runs a page setup dialog, letting the user modify the values from pageSetup.

      If the user cancels the dialog, the returned GtkPageSetup is identical to the passed in pageSetup, 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 printRunPageSetupDialogAsync(Window, PageSetup, PrintSettings, PageSetupDoneFunc) if this is a problem.

      Parameters:
      parent - transient parent
      pageSetup - an existing GtkPageSetup
      settings - a GtkPrintSettings
      Returns:
      a new GtkPageSetup
    • printRunPageSetupDialogAsync

      public static void printRunPageSetupDialogAsync(@Nullable Window parent, @Nullable PageSetup pageSetup, PrintSettings settings, @Nullable PageSetupDoneFunc doneCb)

      Runs a page setup dialog, letting the user modify the values from pageSetup.

      In contrast to printRunPageSetupDialog(Window, PageSetup, PrintSettings), this function returns after showing the page setup dialog on platforms that support this, and calls doneCb from a signal handler for the ::response signal of the dialog.

      Parameters:
      parent - transient parent
      pageSetup - an existing GtkPageSetup
      settings - a GtkPrintSettings
      doneCb - a function to call when the user saves the modified page setup
    • renderActivity

      @Deprecated public static void renderActivity(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.
      Renders an activity indicator (such as in GtkSpinner). The state StateFlags.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

      @Deprecated public static void renderArrow(StyleContext context, org.freedesktop.cairo.Context cr, double angle, double x, double y, double size)
      Deprecated.

      Renders an arrow pointing to angle.

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

      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

      @Deprecated public static void renderBackground(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.

      Renders the background of an element.

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

      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

      @Deprecated public static void renderCheck(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.

      Renders a checkmark (as in a GtkCheckButton).

      The StateFlags.CHECKED state determines whether the check is on or off, and StateFlags.INCONSISTENT determines whether it should be marked as undefined.

      Typical checkmark rendering:

      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

      @Deprecated public static void renderExpander(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.

      Renders an expander (as used in GtkTreeView and GtkExpander) in the area defined by x, y, width, height. The state StateFlags.CHECKED determines whether the expander is collapsed or expanded.

      Typical expander rendering:

      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

      @Deprecated public static void renderFocus(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.

      Renders a focus indicator on the rectangle determined by x, y, width, height.

      Typical focus rendering:

      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

      @Deprecated public static void renderFrame(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.

      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:

      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

      @Deprecated public static void renderHandle(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.

      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:

      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

      @Deprecated public static void renderIcon(StyleContext context, org.freedesktop.cairo.Context cr, Texture texture, double x, double y)
      Deprecated.

      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

      @Deprecated public static void renderLayout(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, Layout layout)
      Deprecated.
      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

      @Deprecated public static void renderLine(StyleContext context, org.freedesktop.cairo.Context cr, double x0, double y0, double x1, double y1)
      Deprecated.
      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

      @Deprecated public static void renderOption(StyleContext context, org.freedesktop.cairo.Context cr, double x, double y, double width, double height)
      Deprecated.

      Renders an option mark (as in a radio button), the StateFlags.CHECKED state will determine whether the option is on or off, and StateFlags.INCONSISTENT whether it should be marked as undefined.

      Typical option mark rendering:

      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, Out<Float> h, Out<Float> s, Out<Float> 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(Set<DebugFlags> flags)
      Sets the GTK debug flags.
      Parameters:
      flags - the debug flags to set
    • setDebugFlags

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

      public static void showAboutDialog(@Nullable Window parent, String firstPropertyName, Object... varargs)

      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
      firstPropertyName - the name of the first property
      varargs - value of first property, followed by more pairs of property name and value, NULL-terminated
    • showUri

      @Deprecated public static void showUri(@Nullable Window parent, String 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

      @Deprecated public static void showUriFull(@Nullable Window parent, String uri, int timestamp, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback)

      This function launches the default application for showing a given uri.

      The callback will be called when the launch is completed.

      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
    • showUriFullFinish

      @Deprecated public static boolean showUriFullFinish(Window parent, AsyncResult result) throws GErrorException
      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:
      GErrorException - see GError
    • testAccessibleAssertionMessageRole

      public static void testAccessibleAssertionMessageRole(String domain, String file, int line, String func, String expr, Accessible accessible, AccessibleRole expectedRole, AccessibleRole actualRole)
      Prints an assertion message for gtk_test_accessible_assert_role().
      Parameters:
      domain - a domain
      file - a file name
      line - the line in file
      func - a function name in file
      expr - the expression being tested
      accessible - a GtkAccessible
      expectedRole - the expected GtkAccessibleRole
      actualRole - the actual GtkAccessibleRole
    • testAccessibleCheckProperty

      public static String testAccessibleCheckProperty(Accessible accessible, AccessibleProperty property, Object... varargs)
      Checks whether the accessible property of accessible is set to a specific value.
      Parameters:
      accessible - a GtkAccessible
      property - a GtkAccessibleProperty
      varargs - the expected value of property
      Returns:
      the value of the accessible property
    • testAccessibleCheckRelation

      public static String testAccessibleCheckRelation(Accessible accessible, AccessibleRelation relation, Object... varargs)
      Checks whether the accessible relation of accessible is set to a specific value.
      Parameters:
      accessible - a GtkAccessible
      relation - a GtkAccessibleRelation
      varargs - the expected value of relation
      Returns:
      the value of the accessible relation
    • testAccessibleCheckState

      public static String testAccessibleCheckState(Accessible accessible, AccessibleState state, Object... varargs)
      Checks whether the accessible state of accessible is set to a specific value.
      Parameters:
      accessible - a GtkAccessible
      state - a GtkAccessibleState
      varargs - the expected value of state
      Returns:
      the value of the accessible state
    • testAccessibleHasProperty

      public static boolean testAccessibleHasProperty(Accessible accessible, AccessibleProperty 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(Accessible accessible, AccessibleRelation 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(Accessible accessible, AccessibleRole 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(Accessible accessible, AccessibleState 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
    • testInit

      public static void testInit(@Nullable Out<String[]> argvp, Object... varargs)

      This function is used to initialize a GTK test program.

      It will in turn call g_test_init() and gtk_init() to properly initialize the testing framework and graphical toolkit. It’ll also set the program’s locale to “C”. This is done to make test program environments as deterministic as possible.

      Like gtk_init() and g_test_init(), any known arguments will be processed and stripped from argc and argv.

      Parameters:
      argvp - Address of the argv parameter of main(). Any parameters understood by g_test_init() or gtk_init() are stripped before return.
      varargs - currently unused
    • testListAllTypes

      public static Type[] testListAllTypes()
      Return the type ids that have been registered after calling gtk_test_register_all_types().
      Returns:
      0-terminated array of type ids
    • testRegisterAllTypes

      public static void testRegisterAllTypes()

      Force registration of all core GTK object types.

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

    • testWidgetWaitForDraw

      public static void testWidgetWaitForDraw(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

      @Deprecated public static ContentProvider treeCreateRowDragContent(TreeModel treeModel, TreePath path)
      Deprecated.
      Use list models instead
      Creates a content provider for dragging path from treeModel.
      Parameters:
      treeModel - a GtkTreeModel
      path - a row in treeModel
      Returns:
      a new GdkContentProvider
    • treeGetRowDragData

      @Deprecated public static boolean treeGetRowDragData(Value value, @Nullable Out<TreeModel> treeModel, @Nullable Out<TreePath> path)
      Deprecated.
      Use list models instead

      Obtains a treeModel and path from value of target type GTK_TYPE_TREE_ROW_DATA.

      The returned path must be freed with gtk_tree_path_free().

      Parameters:
      value - a GValue
      treeModel - a GtkTreeModel
      path - row in treeModel
      Returns:
      true if selectionData had target type GTK_TYPE_TREE_ROW_DATA is otherwise valid
    • valueDupExpression

      public static @Nullable Expression valueDupExpression(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 @Nullable Expression valueGetExpression(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(Value value, 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(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
    • initAbiCheck

      public static void initAbiCheck(int numChecks, long sizeofGtkWindow, long sizeofGtkBox)
    • initCheckAbiCheck

      public static boolean initCheckAbiCheck(int numChecks, long sizeofGtkWindow, long sizeofGtkBox)
    • styleContextAddProviderForDisplay

      public static void styleContextAddProviderForDisplay(Display display, StyleProvider provider, int priority)

      Adds a global style provider to display, which will be used in style construction for all GtkStyleContexts under display.

      GTK uses this to make styling information from GtkSettings available.

      Note: If both priorities are the same, A GtkStyleProvider added through StyleContext.addProvider(StyleProvider, int) takes precedence over another added through this function.

      Parameters:
      display - a GdkDisplay
      provider - a GtkStyleProvider
      priority - the priority of the style provider. The lower it is, the earlier it will be used in the style construction. Typically this will be in the range between GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and GTK_STYLE_PROVIDER_PRIORITY_USER
    • styleContextRemoveProviderForDisplay

      public static void styleContextRemoveProviderForDisplay(Display display, StyleProvider provider)
      Removes provider from the global style providers list in display.
      Parameters:
      display - a GdkDisplay
      provider - a GtkStyleProvider