Module: Gtk

Extended by:
GLib::Deprecatable
Defined in:
lib/gtksourceview3/deprecated.rb

Overview

Version:

  • 4.0

Defined Under Namespace

Modules: Accessible, AccessibleAnnouncementPriority, AccessibleAutocomplete, AccessibleInvalidState, AccessiblePlatformState, AccessibleProperty, AccessibleRange, AccessibleRelation, AccessibleRole, AccessibleSort, AccessibleState, AccessibleText, AccessibleTextContentChange, AccessibleTextGranularity, AccessibleTristate, Actionable, Align, AppChooser, ApplicationInhibitFlags, ArrowType, AssistantPageType, BaselinePosition, BorderStyle, Buildable, BuilderClosureFlags, BuilderError, BuilderScope, ButtonsType, CellEditable, CellLayout, CellRendererAccelMode, CellRendererMode, CellRendererState, Collation, ColorChooser, ConstraintAttribute, ConstraintRelation, ConstraintStrength, ConstraintTarget, ConstraintVflParserError, ContentFit, CornerType, CssParserError, CssParserWarning, DebugFlags, DeleteType, DialogError, DialogFlags, DirectionType, Editable, EditableProperties, EntryIconPosition, EventControllerScrollFlags, EventSequenceState, FileChooser, FileChooserAction, FileChooserError, FilterChange, FilterMatch, FontChooser, FontChooserLevel, FontLevel, GraphicsOffloadEnabled, IconLookupFlags, IconSize, IconThemeError, IconViewDropPosition, ImageType, InputHints, InputPurpose, InscriptionOverflow, Justification, LevelBarMode, License, ListScrollFlags, ListTabBehavior, MessageType, MovementStep, Native, NaturalWrapMode, NotebookTab, NumberUpLayout, Ordering, Orientable, Orientation, Overflow, PackType, PadActionType, PageOrientation, PageSet, PanDirection, PickFlags, PolicyType, PopoverMenuFlags, PositionType, PrintCapabilities, PrintDuplex, PrintError, PrintOperationAction, PrintOperationPreview, PrintOperationResult, PrintPages, PrintQuality, PrintStatus, PropagationLimit, PropagationPhase, RecentManagerError, ResponseType, RevealerTransitionType, Root, ScrollStep, ScrollType, Scrollable, ScrollablePolicy, SectionModel, SelectionMode, SelectionModel, SensitivityType, ShortcutActionFlags, ShortcutManager, ShortcutScope, ShortcutType, SizeGroupMode, SizeRequestMode, SortType, SorterChange, SorterOrder, SpinButtonUpdatePolicy, SpinType, StackTransitionType, StateFlags, StringFilterMatchMode, StyleContextPrintFlags, StyleProvider, SymbolicColor, SymbolicPaintable, SystemSetting, TextDirection, TextExtendSelection, TextSearchFlags, TextViewLayer, TextWindowType, TreeDragDest, TreeDragSource, TreeModel, TreeModelFlags, TreeSortable, TreeViewColumnSizing, TreeViewDropPosition, TreeViewGridLines, Unit, WrapMode Classes: ATContext, AboutDialog, ActionBar, ActivateAction, Adjustment, AlertDialog, AlternativeTrigger, AnyFilter, AppChooserButton, AppChooserDialog, AppChooserWidget, Application, ApplicationWindow, AspectFrame, Assistant, AssistantPage, BinLayout, BookmarkList, BoolFilter, Box, BoxLayout, Builder, BuilderCScope, BuilderListItemFactory, Button, CClosureExpression, Calendar, CallbackAction, CellArea, CellAreaBox, CellAreaContext, CellRenderer, CellRendererAccel, CellRendererCombo, CellRendererPixbuf, CellRendererProgress, CellRendererSpin, CellRendererSpinner, CellRendererText, CellRendererToggle, CellView, CenterBox, CenterLayout, CheckButton, ClosureExpression, ColorButton, ColorChooserDialog, ColorChooserWidget, ColorDialog, ColorDialogButton, ColumnView, ColumnViewCell, ColumnViewColumn, ColumnViewRow, ColumnViewSorter, ComboBox, ComboBoxText, ConstantExpression, Constraint, ConstraintGuide, ConstraintLayout, ConstraintLayoutChild, CssProvider, CustomFilter, CustomLayout, CustomSorter, Dialog, DirectoryList, DragIcon, DragSource, DrawingArea, DropControllerMotion, DropDown, DropTarget, DropTargetAsync, EditableLabel, EmojiChooser, Entry, EntryBuffer, EntryCompletion, EventController, EventControllerFocus, EventControllerKey, EventControllerLegacy, EventControllerMotion, EventControllerScroll, EveryFilter, Expander, Expression, FileChooserDialog, FileChooserNative, FileChooserWidget, FileDialog, FileFilter, FileLauncher, Filter, FilterListModel, Fixed, FixedLayout, FixedLayoutChild, FlattenListModel, FlowBox, FlowBoxChild, FontButton, FontChooserDialog, FontChooserWidget, FontDialog, FontDialogButton, Frame, GLArea, Gesture, GestureClick, GestureDrag, GestureLongPress, GesturePan, GestureRotate, GestureSingle, GestureStylus, GestureSwipe, GestureZoom, GraphicsOffload, Grid, GridLayout, GridLayoutChild, GridView, HeaderBar, IMContext, IMContextSimple, IMMulticontext, IconPaintable, IconTheme, IconView, Image, InfoBar, Inscription, KeyvalTrigger, Label, LayoutChild, LayoutManager, LevelBar, LinkButton, ListBase, ListBox, ListBoxRow, ListHeader, ListItem, ListItemFactory, ListStore, ListView, LockButton, MapListModel, MediaControls, MediaFile, MediaStream, MenuButton, MessageDialog, MnemonicAction, MnemonicTrigger, MountOperation, MultiFilter, MultiSelection, MultiSorter, NamedAction, NativeDialog, NeverTrigger, NoSelection, Notebook, NotebookPage, NothingAction, NumericSorter, ObjectExpression, Overlay, OverlayLayout, OverlayLayoutChild, PadController, PageSetup, PageSetupUnixDialog, Paned, ParamSpecExpression, PasswordEntry, PasswordEntryBuffer, Picture, Popover, PopoverMenu, PopoverMenuBar, PrintContext, PrintDialog, PrintJob, PrintOperation, PrintSettings, PrintUnixDialog, Printer, ProgressBar, PropertyExpression, Range, RecentManager, Revealer, Scale, ScaleButton, Scrollbar, ScrolledWindow, SearchBar, SearchEntry, SelectionFilterModel, Separator, Settings, Shortcut, ShortcutAction, ShortcutController, ShortcutLabel, ShortcutTrigger, ShortcutsGroup, ShortcutsSection, ShortcutsShortcut, ShortcutsWindow, SignalAction, SignalListItemFactory, SingleSelection, SizeGroup, SliceListModel, Snapshot, SortListModel, Sorter, SpinButton, Spinner, Stack, StackPage, StackSidebar, StackSwitcher, Statusbar, StringFilter, StringList, StringObject, StringSorter, StyleContext, Switch, Text, TextBuffer, TextChildAnchor, TextMark, TextTag, TextTagTable, TextView, ToggleButton, Tooltip, TreeExpander, TreeListModel, TreeListRow, TreeListRowSorter, TreeModelFilter, TreeModelSort, TreeSelection, TreeStore, TreeView, TreeViewColumn, UriLauncher, Video, Viewport, VolumeButton, Widget, WidgetPaintable, Window, WindowControls, WindowGroup, WindowHandle

Constant Summary collapse

ACCESSIBLE_ATTRIBUTE_BACKGROUND =

An attribute for the background color, expressed as an RGB value encoded in a string using the format: {r8},{g8},{b8}.

bg-color
ACCESSIBLE_ATTRIBUTE_FAMILY =

An attribute for the font family name.

family-name
ACCESSIBLE_ATTRIBUTE_FOREGROUND =

An attribute for the foreground color, expressed as an RGB value encoded in a string using the format: {r8},{g8},{b8}.

fg-color
ACCESSIBLE_ATTRIBUTE_OVERLINE =

An attribute for the overline style.

Possible values are:

  • [constGtk.ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE]
overline
ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE =

The "none" overline value for [constGtk.ACCESSIBLE_ATTRIBUTE_OVERLINE].

none
ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE =

The "single" overline value for [constGtk.ACCESSIBLE_ATTRIBUTE_OVERLINE].

single
ACCESSIBLE_ATTRIBUTE_SIZE =

An attribute for the font size, expressed in points.

size
ACCESSIBLE_ATTRIBUTE_STRETCH =

An attribute for the font stretch type.

Possible values are:

  • [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED]
stretch
ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED =

The "condensed" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

condensed
ACCESSIBLE_ATTRIBUTE_STRETCH_EXPANDED =

The "expanded" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

expanded
ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED =

The "extra condensed" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

extra_condensed
ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_EXPANDED =

The "extra expanded" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

extra_expanded
ACCESSIBLE_ATTRIBUTE_STRETCH_NORMAL =

The "normal" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

normal
ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED =

The "semi condensed" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

semi_condensed
ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_EXPANDED =

The "semi expanded" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

semi_expanded
ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED =

The "ultra condensed" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

ultra_condensed
ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_EXPANDED =

The "ultra expanded" stretch value for [constGtk.ACCESSIBLE_ATTRIBUTE_STRETCH].

ultra_expanded
ACCESSIBLE_ATTRIBUTE_STRIKETHROUGH =

An attribute for strikethrough text.

Possible values are true or false.

strikethrough
ACCESSIBLE_ATTRIBUTE_STYLE =

An attribute for the font style.

Possible values are:

  • [constGtk.ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC]
style
ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC =

The "italic" style value for [constGtk.ACCESSIBLE_ATTRIBUTE_STYLE].

italic
ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL =

The "normal" style value for [constGtk.ACCESSIBLE_ATTRIBUTE_STYLE].

normal
ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE =

The "oblique" style value for [constGtk.ACCESSIBLE_ATTRIBUTE_STYLE].

oblique
ACCESSIBLE_ATTRIBUTE_UNDERLINE =

An attribute for the underline style.

Possible values are:

  • [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR]
underline
ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE =

The "double" underline value for [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].

double
ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR =

The "error" underline value for [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].

error
ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE =

The "none" underline value for [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].

none
ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE =

The "single" underline value for [constGtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].

single
ACCESSIBLE_ATTRIBUTE_VARIANT =

An attribute for the font variant.

Possible values are:

  • [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE]
  • [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS]
variant
ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS =

The "all petite caps" variant value for [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT].

all-petite-caps
ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS =

The "all small caps" variant value for [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT].

all-small-caps
ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS =

The "petite caps" variant value for [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT].

petite-caps
ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS =

The "small caps" variant value for [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT].

small-caps
ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS =

The "title caps" variant value for [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT].

title-caps
ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE =

The "unicase" variant value for [constGtk.ACCESSIBLE_ATTRIBUTE_VARIANT].

unicase
ACCESSIBLE_ATTRIBUTE_WEIGHT =

An attribute for the font weight.

weight
ACCESSIBLE_VALUE_UNDEFINED =

An undefined value. The accessible attribute is either unset, or its value is undefined.

-1
BINARY_AGE =

Like [funcget_binary_age], but from the headers used at application compile time, rather than from the library linked against at application run time.

1405
IM_MODULE_EXTENSION_POINT_NAME =
gtk-im-module
INPUT_ERROR =

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

See [signalGtk.SpinButton::input].

-1
INTERFACE_AGE =

Like [funcget_interface_age], but from the headers used at application compile time, rather than from the library linked against at application run time.

5
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.

4294967295
LEVEL_BAR_OFFSET_FULL =

The name used for the stock full offset included by GtkLevelBar.

full
LEVEL_BAR_OFFSET_HIGH =

The name used for the stock high offset included by GtkLevelBar.

high
LEVEL_BAR_OFFSET_LOW =

The name used for the stock low offset included by GtkLevelBar.

low
MAJOR_VERSION =

Like [funcget_major_version], but from the headers used at application compile time, rather than from the library linked against at application run time.

4
MAX_COMPOSE_LEN =
7
MEDIA_FILE_EXTENSION_POINT_NAME =
gtk-media-file
MICRO_VERSION =

Like [funcget_micro_version], but from the headers used at application compile time, rather than from the library linked against at application run time.

5
MINOR_VERSION =

Like [funcget_minor_version], but from the headers used at application compile time, rather than from the library linked against at application run time.

14
PAPER_NAME_A3 =

Name for the A3 paper size.

iso_a3
PAPER_NAME_A4 =

Name for the A4 paper size.

iso_a4
PAPER_NAME_A5 =

Name for the A5 paper size.

iso_a5
PAPER_NAME_B5 =

Name for the B5 paper size.

iso_b5
PAPER_NAME_EXECUTIVE =

Name for the Executive paper size.

na_executive
na_legal
PAPER_NAME_LETTER =

Name for the Letter paper size.

na_letter
collate
default-source
dither
duplex
finishings
media-type
number-up
number-up-layout
n-copies
orientation
output-basename
output-bin
output-dir
output-file-format
output-uri
page-ranges
page-set
paper-format
paper-height
paper-width
printer
printer-lpi
print-pages
quality
resolution
resolution-x
resolution-y
reverse
scale
use-color
win32-driver-extra
win32-driver-version
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.

110
STYLE_PROVIDER_PRIORITY_APPLICATION =

A priority that can be used when adding a GtkStyleProvider for application-specific style information.

600
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.

1
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.

400
STYLE_PROVIDER_PRIORITY_THEME =

The priority used for style information provided by themes.

200
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.

800
TEXT_VIEW_PRIORITY_VALIDATE =

The priority at which the text view validates onscreen lines in an idle job in the background.

125
TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID =

Uses the default sort function in a [ifaceGtk.TreeSortable].

See also: [methodGtk.TreeSortable.set_sort_column_id]

-1
TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID =

Disables sorting in a [ifaceGtk.TreeSortable].

See also: [methodGtk.TreeSortable.set_sort_column_id]

-2

Instance Method Summary collapse

Instance Method Details

#accelerator_get_default_mod_maskGdk::ModifierType

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:

  • (Gdk::ModifierType)

    the modifier mask for accelerators

#accelerator_get_label(accelerator_key, accelerator_mods) ⇒ String

Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.

Parameters:

  • accelerator_key (Integer)

    accelerator keyval

  • accelerator_mods (Gdk::ModifierType)

    accelerator modifier mask

Returns:

  • (String)

    a newly-allocated string representing the accelerator

#accelerator_get_label_with_keycode(display, accelerator_key, keycode, accelerator_mods) ⇒ String

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 [funcGtk.accelerator_get_label], but handling keycodes. This is only useful for system-level components, applications should use [funcGtk.accelerator_get_label] instead.

Parameters:

  • display (Gdk::Display)

    a GdkDisplay or nil to use the default display

  • accelerator_key (Integer)

    accelerator keyval

  • keycode (Integer)

    accelerator keycode

  • accelerator_mods (Gdk::ModifierType)

    accelerator modifier mask

Returns:

  • (String)

    a newly-allocated string representing the accelerator

#accelerator_name(accelerator_key, accelerator_mods) ⇒ String

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 [funcGtk.accelerator_get_label].

Parameters:

  • accelerator_key (Integer)

    accelerator keyval

  • accelerator_mods (Gdk::ModifierType)

    accelerator modifier mask

Returns:

  • (String)

    a newly-allocated accelerator name

#accelerator_name_with_keycode(display, accelerator_key, keycode, accelerator_mods) ⇒ String

Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse_with_keycode().

This is similar to [funcGtk.accelerator_name] but handling keycodes. This is only useful for system-level components, applications should use [funcGtk.accelerator_name] instead.

Parameters:

  • display (Gdk::Display)

    a GdkDisplay or nil to use the default display

  • accelerator_key (Integer)

    accelerator keyval

  • keycode (Integer)

    accelerator keycode

  • accelerator_mods (Gdk::ModifierType)

    accelerator modifier mask

Returns:

  • (String)

    a newly allocated accelerator name.

#accelerator_parse(accelerator, accelerator_key, accelerator_mods) ⇒ Boolean

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 [funcGdk.keyval_from_name]. 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 [flagsGdk.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, accelerator_key and accelerator_mods will be set to 0 (zero).

Parameters:

  • accelerator (String)

    string representing an accelerator

  • accelerator_key (Integer)

    return location for accelerator keyval

  • accelerator_mods (Gdk::ModifierType)

    return location for accelerator modifier mask

Returns:

  • (Boolean)

#accelerator_parse_with_keycode(accelerator, display, accelerator_key, accelerator_codes, accelerator_mods) ⇒ Boolean

Parses a string representing an accelerator.

This is similar to [funcGtk.accelerator_parse] but handles keycodes as well. This is only useful for system-level components, applications should use [funcGtk.accelerator_parse] instead.

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

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

If the parse fails, accelerator_key, accelerator_mods and accelerator_codes will be set to 0 (zero).

Parameters:

  • accelerator (String)

    string representing an accelerator

  • display (Gdk::Display)

    the GdkDisplay to look up accelerator_codes in

  • accelerator_key (Integer)

    return location for accelerator keyval

  • accelerator_codes (Array<Integer>)

    return location for accelerator keycodes

  • accelerator_mods (Gdk::ModifierType)

    return location for accelerator modifier mask

Returns:

  • (Boolean)

    true if parsing succeeded

#accelerator_valid(keyval, modifiers) ⇒ Boolean

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 (Integer)

    a GDK keyval

  • modifiers (Gdk::ModifierType)

    modifier mask

Returns:

  • (Boolean)

    true if the accelerator is valid

#accessible_property_init_value(property, value) ⇒ nil

Parameters:

Returns:

  • (nil)

#accessible_relation_init_value(relation, value) ⇒ nil

Parameters:

Returns:

  • (nil)

#accessible_state_init_value(state, value) ⇒ nil

Parameters:

Returns:

  • (nil)

#binary_ageInteger

Returns the binary age as passed to libtool.

If libtool means nothing to you, don't worry about it.

Returns:

  • (Integer)

    the binary age of the GTK library

#bitset_iter_init_at(iter, set, target, value) ⇒ Boolean

Initializes iter to point to target.

If target is not found, finds the next value after it. If no value >= target exists in set, this function returns false.

Parameters:

  • iter (Gtk::BitsetIter)

    a pointer to an uninitialized GtkBitsetIter

  • set (Gtk::Bitset)

    a GtkBitset

  • target (Integer)

    target value to start iterating at

  • value (Integer)

    Set to the found value in set

Returns:

  • (Boolean)

    true if a value was found.

#bitset_iter_init_first(iter, set, value) ⇒ Boolean

Initializes an iterator for set and points it to the first value in set.

If set is empty, false is returned and value is set to %G_MAXUINT.

Parameters:

  • iter (Gtk::BitsetIter)

    a pointer to an uninitialized GtkBitsetIter

  • set (Gtk::Bitset)

    a GtkBitset

  • value (Integer)

    Set to the first value in set

Returns:

  • (Boolean)

    true if set isn't empty.

#bitset_iter_init_last(iter, set, value) ⇒ Boolean

Initializes an iterator for set and points it to the last value in set.

If set is empty, false is returned.

Parameters:

  • iter (Gtk::BitsetIter)

    a pointer to an uninitialized GtkBitsetIter

  • set (Gtk::Bitset)

    a GtkBitset

  • value (Integer)

    Set to the last value in set

Returns:

  • (Boolean)

    true if set isn't empty.

#builder_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#check_version(required_major, required_minor, required_micro) ⇒ String

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 (Integer)

    the required major version

  • required_minor (Integer)

    the required minor version

  • required_micro (Integer)

    the required micro version

Returns:

  • (String)

    nil 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.

#constraint_vfl_parser_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#css_parser_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#css_parser_warning_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#debug_flagsGtk::DebugFlags

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:

#debug_flags=(flags) ⇒ nil

Sets the GTK debug flags.

Parameters:

Returns:

  • (nil)

#default_languagePango::Language

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 [funcPango.Language.get_default]. See that function for details.

Returns:

  • (Pango::Language)

    the default language

#dialog_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#disable_setlocalenil

Prevents [funcGtk.init] and [funcGtk.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.

Returns:

  • (nil)

#distribute_natural_allocation(extra_space, n_requested_sizes, sizes) ⇒ Integer

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

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

Parameters:

  • extra_space (Integer)

    Extra space to redistribute among children after subtracting minimum sizes and any child padding from the overall allocation

  • n_requested_sizes (Integer)

    Number of requests to fit into the allocation

  • sizes (Array<Gtk::RequestedSize>)

    An array of structs with a client pointer and a minimum/natural size in the orientation of the allocation.

Returns:

  • (Integer)

    The remainder of extra_space after redistributing space

#editable_delegate_get_property(object, prop_id, value, pspec) ⇒ Boolean

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 (GObject::Object)

    a GObject

  • prop_id (Integer)

    a property ID

  • value (GObject::Value)

    value to set

  • pspec (GObject::ParamSpec)

    the GParamSpec for the property

Returns:

  • (Boolean)

    true if the property was found

#editable_delegate_set_property(object, prop_id, value, pspec) ⇒ Boolean

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 (GObject::Object)

    a GObject

  • prop_id (Integer)

    a property ID

  • value (GObject::Value)

    value to set

  • pspec (GObject::ParamSpec)

    the GParamSpec for the property

Returns:

  • (Boolean)

    true if the property was found

#editable_install_properties(object_class, first_prop) ⇒ Integer

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 [funcGtk.Editable.delegate_set_property] and [funcGtk.Editable.delegate_get_property] (if you are using a delegate), or remember the first_prop offset and add it to the values in the [enumGtk.EditableProperties] enumeration to get the property IDs for these properties.

Parameters:

  • object_class (GObject::ObjectClass)

    a GObjectClass

  • first_prop (Integer)

    property ID to use for the first property

Returns:

  • (Integer)

    the number of properties that were installed

#enumerate_printers(func, data, destroy, wait) ⇒ nil

Calls a function for all GtkPrinters.

If func returns true, the enumeration is stopped.

Parameters:

  • func (Gtk::PrinterFunc)

    a function to call for each printer

  • data (GObject)

    user data to pass to func

  • destroy (GLib::DestroyNotify)

    function to call if data is no longer needed

  • wait (Boolean)

    if true, wait in a recursive mainloop until all printers are enumerated; otherwise return early

Returns:

  • (nil)

#file_chooser_error_quarkGLib::Quark

Registers an error quark for GtkFileChooser errors.

Returns:

  • (GLib::Quark)

    The error quark used for GtkFileChooser errors.

#hsv_to_rgb(h, s, v, r, g, b) ⇒ nil

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 (Gtk::gfloat)

    Hue

  • s (Gtk::gfloat)

    Saturation

  • v (Gtk::gfloat)

    Value

  • r (Gtk::gfloat)

    Return value for the red component

  • g (Gtk::gfloat)

    Return value for the green component

  • b (Gtk::gfloat)

    Return value for the blue component

Returns:

  • (nil)

#icon_theme_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#initnil

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 usually don't have to call this function; the GApplication::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 stuff 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 [funcGtk.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.

Returns:

  • (nil)

#init_checkBoolean

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:

  • (Boolean)

    true if the windowing system has been successfully initialized, false otherwise

#interface_ageInteger

Returns the interface age as passed to libtool.

If libtool means nothing to you, don't worry about it.

Returns:

  • (Integer)

    the interface age of the GTK library

#is_initializedBoolean

Use this function to check if GTK has been initialized.

See [funcGtk.init].

Returns:

  • (Boolean)

    the initialization status

#locale_directionGtk::TextDirection

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:

#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:

#major_versionInteger

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:

  • (Integer)

    the major version number of the GTK library

#micro_versionInteger

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:

  • (Integer)

    the micro version number of the GTK library

#minor_versionInteger

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:

  • (Integer)

    the minor version number of the GTK library

#native_get_for_surface(surface) ⇒ Gtk::Native

Finds the GtkNative associated with the surface.

Parameters:

  • surface (Gdk::Surface)

    a GdkSurface

Returns:

  • (Gtk::Native)

    the GtkNative that is associated with surface

#ordering_from_cmpfunc(cmpfunc_result) ⇒ Gtk::Ordering

Converts the result of a GCompareFunc like strcmp() to a GtkOrdering value.

Parameters:

  • cmpfunc_result (Integer)

    Result of a comparison function

Returns:

#paper_size_get_defaultString

Returns the name of the default paper size, which depends on the current locale. is owned by GTK and should not be modified.

Returns:

  • (String)

    the name of the default paper size. The string

#paper_size_get_paper_sizes(include_custom) ⇒ GLib::List<Gtk::PaperSize>

Creates a list of known paper sizes.

Parameters:

  • include_custom (Boolean)

    whether to include custom paper sizes as defined in the page setup dialog

Returns:

  • (GLib::List<Gtk::PaperSize>)

    a newly allocated list of newly allocated GtkPaperSize objects

#param_spec_expression(name, nick, blurb, flags) ⇒ GObject::ParamSpec

Creates a new GParamSpec instance for a property holding a GtkExpression.

See g_param_spec_internal() for details on the property strings.

Parameters:

  • name (String)

    canonical name of the property

  • nick (String)

    a user-readable name for the property

  • blurb (String)

    a user-readable description of the property

  • flags (GObject::ParamFlags)

    flags for the property

Returns:

  • (GObject::ParamSpec)

    a newly created property specification

Registers an error quark for GtkPrintOperation if necessary.

Returns:

  • (GLib::Quark)

    The error quark used for GtkPrintOperation errors.

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:

Returns:

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 (Gtk::Window)

    transient parent

  • page_setup (Gtk::PageSetup)

    an existing GtkPageSetup

  • settings (Gtk::PrintSettings)

    a GtkPrintSettings

  • done_cb (Gtk::PageSetupDoneFunc)

    a function to call when the user saves the modified page setup

  • data (GObject)

    user data to pass to done_cb

Returns:

  • (nil)

#recent_manager_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#render_activity(context, cr, x, y, width, height) ⇒ nil

Renders an activity indicator (such as in GtkSpinner). The state %GTK_STATE_FLAG_CHECKED determines whether there is activity going on.

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#render_arrow(context, cr, angle, x, y, size) ⇒ nil

Renders an arrow pointing to angle.

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

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • angle (Float)

    arrow angle from 0 to 2 * %G_PI, being 0 the arrow pointing to the north

  • x (Float)

    X origin of the render area

  • y (Float)

    Y origin of the render area

  • size (Float)

    square side for render area

Returns:

  • (nil)

#render_background(context, cr, x, y, width, height) ⇒ nil

Renders the background of an element.

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

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#render_check(context, cr, x, y, width, height) ⇒ nil

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:

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#render_expander(context, cr, x, y, width, height) ⇒ nil

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:

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#render_focus(context, cr, x, y, width, height) ⇒ nil

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

Typical focus rendering:

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#render_frame(context, cr, x, y, width, height) ⇒ nil

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 (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#render_handle(context, cr, x, y, width, height) ⇒ nil

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 (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#render_icon(context, cr, texture, x, y) ⇒ nil

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 (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • texture (Gdk::Texture)

    a GdkTexture containing the icon to draw

  • x (Float)

    X position for the texture

  • y (Float)

    Y position for the texture

Returns:

  • (nil)

#render_layout(context, cr, x, y, layout) ⇒ nil

Renders layout on the coordinates x, y

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin

  • y (Float)

    Y origin

  • layout (Pango::Layout)

    the PangoLayout to render

Returns:

  • (nil)

#render_line(context, cr, x0, y0, x1, y1) ⇒ nil

Renders a line from (x0, y0) to (x1, y1).

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x0 (Float)

    X coordinate for the origin of the line

  • y0 (Float)

    Y coordinate for the origin of the line

  • x1 (Float)

    X coordinate for the end of the line

  • y1 (Float)

    Y coordinate for the end of the line

Returns:

  • (nil)

#render_option(context, cr, x, y, width, height) ⇒ nil

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:

Parameters:

  • context (Gtk::StyleContext)

    a GtkStyleContext

  • cr (cairo::Context)

    a cairo_t

  • x (Float)

    X origin of the rectangle

  • y (Float)

    Y origin of the rectangle

  • width (Float)

    rectangle width

  • height (Float)

    rectangle height

Returns:

  • (nil)

#rgb_to_hsv(r, g, b, h, s, v) ⇒ nil

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 (Gtk::gfloat)

    Red

  • g (Gtk::gfloat)

    Green

  • b (Gtk::gfloat)

    Blue

  • h (Gtk::gfloat)

    Return value for the hue component

  • s (Gtk::gfloat)

    Return value for the saturation component

  • v (Gtk::gfloat)

    Return value for the value component

Returns:

  • (nil)

#show_about_dialog(parent, first_property_name, array) ⇒ nil

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 (Gtk::Window)

    the parent top-level window

  • first_property_name (String)

    the name of the first property

  • array (Array)

    value of first property, followed by more pairs of property name and value, NULL-terminated

Returns:

  • (nil)

#show_uri(parent, uri, timestamp) ⇒ nil

This function launches the default application for showing a given uri, or shows an error dialog if that fails.

Parameters:

  • parent (Gtk::Window)

    parent window

  • uri (String)

    the uri to show

  • timestamp (Integer)

    timestamp from the event that triggered this call, or %GDK_CURRENT_TIME

Returns:

  • (nil)

#show_uri_full(parent, uri, timestamp, cancellable, callback, user_data) ⇒ nil

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 (Gtk::Window)

    parent window

  • uri (String)

    the uri to show

  • timestamp (Integer)

    timestamp from the event that triggered this call, or %GDK_CURRENT_TIME

  • cancellable (Gio::Cancellable)

    a GCancellable to cancel the launch

  • callback (Gio::AsyncReadyCallback)

    a callback to call when the action is complete

  • user_data (GObject)

    data to pass to callback

Returns:

  • (nil)

#show_uri_full_finish(parent, result) ⇒ Boolean

Finishes the gtk_show_uri() call and returns the result of the operation.

Parameters:

  • parent (Gtk::Window)

    the GtkWindow passed to gtk_show_uri()

  • result (Gio::AsyncResult)

    GAsyncResult that was passed to callback

Returns:

  • (Boolean)

    true if the URI was shown successfully. Otherwise, false is returned and error is set

#test_accessible_assertion_message_role(domain, file, line, func, expr, accessible, expected_role, actual_role) ⇒ nil

Parameters:

Returns:

  • (nil)

#test_accessible_check_property(accessible, property, array) ⇒ String

Checks whether the accessible property of accessible is set to a specific value.

Parameters:

Returns:

  • (String)

    the value of the accessible property

#test_accessible_check_relation(accessible, relation, array) ⇒ String

Checks whether the accessible relation of accessible is set to a specific value.

Parameters:

Returns:

  • (String)

    the value of the accessible relation

#test_accessible_check_state(accessible, state, array) ⇒ String

Checks whether the accessible state of accessible is set to a specific value.

Parameters:

Returns:

  • (String)

    the value of the accessible state

#test_accessible_has_property(accessible, property) ⇒ Boolean

Checks whether the GtkAccessible has property set.

Parameters:

Returns:

  • (Boolean)

    true if the property is set in the accessible

#test_accessible_has_relation(accessible, relation) ⇒ Boolean

Checks whether the GtkAccessible has relation set.

Parameters:

Returns:

  • (Boolean)

    true if the relation is set in the accessible

#test_accessible_has_role(accessible, role) ⇒ Boolean

Checks whether the GtkAccessible:accessible-role of the accessible is role.

Parameters:

Returns:

  • (Boolean)

    true if the role matches

#test_accessible_has_state(accessible, state) ⇒ Boolean

Checks whether the GtkAccessible has state set.

Parameters:

Returns:

  • (Boolean)

    true if the state is set in the accessible

#test_init(argcp, argvp, array) ⇒ nil

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:

  • argcp (Integer)

    Address of the argc parameter of the main() function. Changed if any arguments were handled.

  • argvp (Array<String>)

    Address of the argv parameter of main(). Any parameters understood by g_test_init() or gtk_init() are stripped before return.

  • array (Array)

    currently unused

Returns:

  • (nil)

#test_list_all_types(n_types) ⇒ Array<GLib::Type>

Return the type ids that have been registered after calling gtk_test_register_all_types().

Parameters:

  • n_types (Integer)

    location to store number of types

Returns:

  • (Array<GLib::Type>)

    0-terminated array of type ids

#test_register_all_typesnil

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.

Returns:

  • (nil)

#test_widget_wait_for_draw(widget) ⇒ nil

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:

Returns:

  • (nil)

#tree_create_row_drag_content(tree_model, path) ⇒ Gdk::ContentProvider

Creates a content provider for dragging path from tree_model.

Parameters:

  • tree_model (Gtk::TreeModel)

    a GtkTreeModel

  • path (Gtk::TreePath)

    a row in tree_model

Returns:

  • (Gdk::ContentProvider)

    a new GdkContentProvider

#tree_get_row_drag_data(value, tree_model, path) ⇒ Boolean

Obtains a tree_model 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 (GObject::Value)

    a GValue

  • tree_model (Gtk::TreeModel)

    a GtkTreeModel

  • path (Gtk::TreePath)

    row in tree_model

Returns:

  • (Boolean)

    true if selection_data had target type %GTK_TYPE_TREE_ROW_DATA is otherwise valid

#tree_row_reference_deleted(proxy, path) ⇒ nil

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 (GObject::Object)

    a GObject

  • path (Gtk::TreePath)

    the path position that was deleted

Returns:

  • (nil)

#tree_row_reference_inserted(proxy, path) ⇒ nil

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 (GObject::Object)

    a GObject

  • path (Gtk::TreePath)

    the row position that was inserted

Returns:

  • (nil)

#tree_row_reference_reordered(proxy, path, iter, new_order) ⇒ nil

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 (GObject::Object)

    a GObject

  • path (Gtk::TreePath)

    the parent path of the reordered signal

  • iter (Gtk::TreeIter)

    the iter pointing to the parent of the reordered

  • new_order (Array<Integer>)

    the new order of rows

Returns:

  • (nil)

#value_dup_expression(value) ⇒ Gtk::Expression

Retrieves the GtkExpression stored inside the given value, and acquires a reference to it.

Parameters:

  • value (GObject::Value)

    a GValue initialized with type GTK_TYPE_EXPRESSION

Returns:

#value_get_expression(value) ⇒ Gtk::Expression

Retrieves the GtkExpression stored inside the given value.

Parameters:

  • value (GObject::Value)

    a GValue initialized with type GTK_TYPE_EXPRESSION

Returns:

#value_set_expression(value, expression) ⇒ nil

Stores the given GtkExpression inside value.

The GValue will acquire a reference to the expression.

Parameters:

  • value (GObject::Value)

    a GValue initialized with type GTK_TYPE_EXPRESSION

  • expression (Gtk::Expression)

    a GtkExpression

Returns:

  • (nil)

#value_take_expression(value, expression) ⇒ nil

Stores the given GtkExpression inside value.

This function transfers the ownership of the expression to the GValue.

Parameters:

  • value (GObject::Value)

    a GValue initialized with type GTK_TYPE_EXPRESSION

  • expression (Gtk::Expression)

    a GtkExpression

Returns:

  • (nil)