Module: Gtk
- Defined in:
- gtk3/lib/gtk3.rb
Overview
Defined Under Namespace
Modules: AccelFlags, Actionable, Activatable, Align, AppChooser, ApplicationInhibitFlags, ArrowPlacement, ArrowType, AssistantPageType, AttachOptions, BaselinePosition, BorderStyle, Buildable, BuilderError, ButtonBoxStyle, ButtonRole, ButtonsType, CalendarDisplayOptions, CellAccessibleParent, CellEditable, CellLayout, CellRendererAccelMode, CellRendererMode, CellRendererState, ColorChooser, CornerType, CssProviderError, CssSectionType, DebugFlag, DeleteType, DestDefaults, DialogFlags, DirectionType, DragResult, Editable, EntryIconPosition, EventControllerScrollFlags, EventSequenceState, ExpanderStyle, FileChooser, FileChooserAction, FileChooserConfirmation, FileChooserError, FileFilterFlags, FontChooser, FontChooserLevel, IMPreeditStyle, IMStatusStyle, IconLookupFlags, IconSize, IconThemeError, IconViewDropPosition, ImageType, InputHints, InputPurpose, JunctionSides, Justification, LevelBarMode, License, MenuDirectionType, MessageType, MovementStep, NotebookTab, NumberUpLayout, Orientable, Orientation, PackDirection, PackType, PadActionType, PageOrientation, PageSet, PanDirection, PathPriorityType, PathType, PlacesOpenFlags, PolicyType, PopoverConstraint, PositionType, PrintDuplex, PrintError, PrintOperationAction, PrintOperationPreview, PrintOperationResult, PrintPages, PrintQuality, PrintStatus, PropagationPhase, RcFlags, RcTokenType, RecentChooser, RecentChooserError, RecentFilterFlags, RecentManagerError, RecentSortType, RegionFlags, ReliefStyle, ResizeMode, ResponseType, RevealerTransitionType, ScrollStep, ScrollType, Scrollable, ScrollablePolicy, SelectionMode, SensitivityType, ShadowType, ShortcutType, SizeGroupMode, SizeRequestMode, SortType, SpinButtonUpdatePolicy, SpinType, StackTransitionType, StateFlags, StateType, StyleContextPrintFlags, StyleProvider, TargetFlags, TextBufferTargetInfo, TextDirection, TextExtendSelection, TextSearchFlags, TextViewLayer, TextWindowType, ToolPaletteDragTargets, ToolShell, ToolbarSpaceStyle, ToolbarStyle, TreeDragDest, TreeDragSource, TreeModel, TreeModelFlags, TreeSortable, TreeViewColumnSizing, TreeViewDropPosition, TreeViewGridLines, UIManagerItemType, Unit, WidgetHelpType, WindowPosition, WindowType, WrapMode Classes: AboutDialog, AccelGroup, AccelLabel, AccelMap, Accessible, Action, ActionBar, ActionGroup, Adjustment, Alignment, AppChooserButton, AppChooserDialog, AppChooserWidget, Application, ApplicationWindow, Arrow, ArrowAccessible, AspectFrame, Assistant, Bin, BooleanCellAccessible, Box, Builder, Button, ButtonAccessible, ButtonBox, Calendar, CellAccessible, CellArea, CellAreaBox, CellAreaContext, CellRenderer, CellRendererAccel, CellRendererCombo, CellRendererPixbuf, CellRendererProgress, CellRendererSpin, CellRendererSpinner, CellRendererText, CellRendererToggle, CellView, CheckButton, CheckMenuItem, CheckMenuItemAccessible, Clipboard, ColorButton, ColorChooserDialog, ColorChooserWidget, ColorSelection, ColorSelectionDialog, ComboBox, ComboBoxAccessible, ComboBoxText, Container, ContainerAccessible, ContainerCellAccessible, CssProvider, Dialog, DrawingArea, Entry, EntryAccessible, EntryBuffer, EntryCompletion, EntryIconAccessible, Error, EventBox, EventController, EventControllerKey, EventControllerMotion, EventControllerScroll, Expander, ExpanderAccessible, FileChooserButton, FileChooserDialog, FileChooserNative, FileChooserWidget, FileFilter, Fixed, FlowBox, FlowBoxAccessible, FlowBoxChild, FlowBoxChildAccessible, FontButton, FontChooserDialog, FontChooserWidget, FontSelection, FontSelectionDialog, Frame, FrameAccessible, GLArea, Gesture, GestureDrag, GestureLongPress, GestureMultiPress, GesturePan, GestureRotate, GestureSingle, GestureStylus, GestureSwipe, GestureZoom, Grid, HBox, HButtonBox, HPaned, HSV, HScale, HScrollbar, HSeparator, HandleBox, HeaderBar, HeaderBarAccessible, IMContext, IMContextSimple, IMMulticontext, IconFactory, IconInfo, IconTheme, IconView, IconViewAccessible, Image, ImageAccessible, ImageCellAccessible, ImageMenuItem, InfoBar, InitError, Invisible, Label, LabelAccessible, Layout, LevelBar, LevelBarAccessible, LinkButton, LinkButtonAccessible, ListBox, ListBoxAccessible, ListBoxRow, ListBoxRowAccessible, ListStore, LockButton, LockButtonAccessible, Menu, MenuAccessible, MenuBar, MenuButton, MenuButtonAccessible, MenuItem, MenuItemAccessible, MenuShell, MenuShellAccessible, MenuToolButton, MessageDialog, Misc, ModelButton, MountOperation, NativeDialog, Notebook, NotebookAccessible, NotebookPageAccessible, NumerableIcon, OffscreenWindow, Overlay, PadController, PageSetup, Paned, PanedAccessible, PlacesSidebar, Plug, Popover, PopoverAccessible, PopoverMenu, PrintContext, PrintOperation, PrintSettings, ProgressBar, ProgressBarAccessible, RadioAction, RadioButton, RadioButtonAccessible, RadioMenuItem, RadioMenuItemAccessible, RadioToolButton, Range, RangeAccessible, RcStyle, RecentAction, RecentChooserDialog, RecentChooserMenu, RecentChooserWidget, RecentFilter, RecentManager, RendererCellAccessible, Revealer, Scale, ScaleAccessible, ScaleButton, ScaleButtonAccessible, Scrollbar, ScrolledWindow, ScrolledWindowAccessible, SearchBar, SearchEntry, Separator, SeparatorMenuItem, SeparatorToolItem, Settings, ShortcutLabel, ShortcutsGroup, ShortcutsSection, ShortcutsShortcut, ShortcutsWindow, SizeGroup, Socket, SpinButton, SpinButtonAccessible, Spinner, SpinnerAccessible, Stack, StackAccessible, StackSidebar, StackSwitcher, StatusIcon, Statusbar, StatusbarAccessible, Style, StyleContext, StyleProperties, Switch, SwitchAccessible, Table, TearoffMenuItem, TextBuffer, TextCellAccessible, TextChildAnchor, TextMark, TextTag, TextTagTable, TextView, TextViewAccessible, ThemingEngine, ToggleAction, ToggleButton, ToggleButtonAccessible, ToggleToolButton, ToolButton, ToolItem, ToolItemGroup, ToolPalette, Toolbar, Tooltip, ToplevelAccessible, TreeModelFilter, TreeModelSort, TreeSelection, TreeStore, TreeView, TreeViewAccessible, TreeViewColumn, UIManager, VBox, VButtonBox, VPaned, VScale, VScrollbar, VSeparator, Viewport, VolumeButton, Widget, WidgetAccessible, Window, WindowAccessible, WindowGroup
Constant Summary collapse
- BINARY_AGE =
Like gtk_get_binary_age(), but from the headers used at application compile time, rather than from the library linked against at application run time.
2420
- INPUT_ERROR =
Constant to return from a signal handler for the Gtk::SpinButton::input signal in case of conversion failure.
-1
- INTERFACE_AGE =
Like gtk_get_interface_age(), but from the headers used at application compile time, rather than from the library linked against at application run time.
16
- LEVEL_BAR_OFFSET_FULL =
The name used for the stock full offset included by Gtk::LevelBar.
full
- LEVEL_BAR_OFFSET_HIGH =
The name used for the stock high offset included by Gtk::LevelBar.
high
- LEVEL_BAR_OFFSET_LOW =
The name used for the stock low offset included by Gtk::LevelBar.
low
- MAJOR_VERSION =
Like gtk_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
3
- MAX_COMPOSE_LEN =
The maximum length of sequences in compose tables.
7
- MICRO_VERSION =
Like gtk_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
20
- MINOR_VERSION =
Like gtk_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
24
- 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
- PAPER_NAME_LEGAL =
Name for the Legal paper size.
na_legal
- PAPER_NAME_LETTER =
Name for the Letter paper size.
na_letter
- PATH_PRIO_MASK =
15
- PRINT_SETTINGS_COLLATE =
collate
- PRINT_SETTINGS_DEFAULT_SOURCE =
default-source
- PRINT_SETTINGS_DITHER =
dither
- PRINT_SETTINGS_DUPLEX =
duplex
- PRINT_SETTINGS_FINISHINGS =
finishings
- PRINT_SETTINGS_MEDIA_TYPE =
media-type
- PRINT_SETTINGS_NUMBER_UP =
number-up
- PRINT_SETTINGS_NUMBER_UP_LAYOUT =
number-up-layout
- PRINT_SETTINGS_N_COPIES =
n-copies
- PRINT_SETTINGS_ORIENTATION =
orientation
- PRINT_SETTINGS_OUTPUT_BASENAME =
The key used by the “Print to file” printer to store the file name of the output without the path to the directory and the file extension.
output-basename
- PRINT_SETTINGS_OUTPUT_BIN =
output-bin
- PRINT_SETTINGS_OUTPUT_DIR =
The key used by the “Print to file” printer to store the directory to which the output should be written.
output-dir
- PRINT_SETTINGS_OUTPUT_FILE_FORMAT =
The key used by the “Print to file” printer to store the format of the output. The supported values are “PS” and “PDF”.
output-file-format
- PRINT_SETTINGS_OUTPUT_URI =
The key used by the “Print to file” printer to store the URI to which the output should be written. GTK+ itself supports only “file://” URIs.
output-uri
- PRINT_SETTINGS_PAGE_RANGES =
page-ranges
- PRINT_SETTINGS_PAGE_SET =
page-set
- PRINT_SETTINGS_PAPER_FORMAT =
paper-format
- PRINT_SETTINGS_PAPER_HEIGHT =
paper-height
- PRINT_SETTINGS_PAPER_WIDTH =
paper-width
- PRINT_SETTINGS_PRINTER =
printer
- PRINT_SETTINGS_PRINTER_LPI =
printer-lpi
- PRINT_SETTINGS_PRINT_PAGES =
print-pages
- PRINT_SETTINGS_QUALITY =
quality
- PRINT_SETTINGS_RESOLUTION =
resolution
- PRINT_SETTINGS_RESOLUTION_X =
resolution-x
- PRINT_SETTINGS_RESOLUTION_Y =
resolution-y
- PRINT_SETTINGS_REVERSE =
reverse
- PRINT_SETTINGS_SCALE =
scale
- PRINT_SETTINGS_USE_COLOR =
use-color
- PRINT_SETTINGS_WIN32_DRIVER_EXTRA =
win32-driver-extra
- PRINT_SETTINGS_WIN32_DRIVER_VERSION =
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
- STOCK_ABOUT =
The “About” item. 
gtk-about
- STOCK_ADD =
The “Add” item and icon.
gtk-add
- STOCK_APPLY =
The “Apply” item and icon.
gtk-apply
- STOCK_BOLD =
The “Bold” item and icon.
gtk-bold
- STOCK_CANCEL =
The “Cancel” item and icon.
gtk-cancel
- STOCK_CAPS_LOCK_WARNING =
The “Caps Lock Warning” icon.
gtk-caps-lock-warning
- STOCK_CDROM =
The “CD-Rom” item and icon.
gtk-cdrom
- STOCK_CLEAR =
The “Clear” item and icon.
gtk-clear
- STOCK_CLOSE =
The “Close” item and icon.
gtk-close
- STOCK_COLOR_PICKER =
The “Color Picker” item and icon.
gtk-color-picker
- STOCK_CONNECT =
The “Connect” icon.
gtk-connect
- STOCK_CONVERT =
The “Convert” item and icon.
gtk-convert
- STOCK_COPY =
The “Copy” item and icon.
gtk-copy
- STOCK_CUT =
The “Cut” item and icon.
gtk-cut
- STOCK_DELETE =
The “Delete” item and icon.
gtk-delete
- STOCK_DIALOG_AUTHENTICATION =
The “Authentication” item and icon.
gtk-dialog-authentication
- STOCK_DIALOG_ERROR =
The “Error” item and icon.
gtk-dialog-error
- STOCK_DIALOG_INFO =
The “Information” item and icon.
gtk-dialog-info
- STOCK_DIALOG_QUESTION =
The “Question” item and icon.
gtk-dialog-question
- STOCK_DIALOG_WARNING =
The “Warning” item and icon.
gtk-dialog-warning
- STOCK_DIRECTORY =
The “Directory” icon.
gtk-directory
- STOCK_DISCARD =
The “Discard” item.
gtk-discard
- STOCK_DISCONNECT =
The “Disconnect” icon.
gtk-disconnect
- STOCK_DND =
The “Drag-And-Drop” icon.
gtk-dnd
- STOCK_DND_MULTIPLE =
The “Drag-And-Drop multiple” icon.
gtk-dnd-multiple
- STOCK_EDIT =
The “Edit” item and icon.
gtk-edit
- STOCK_EXECUTE =
The “Execute” item and icon.
gtk-execute
- STOCK_FILE =
The “File” item and icon.
Since 3.0, this item has a label, before it only had an icon.
gtk-file
- STOCK_FIND =
The “Find” item and icon.
gtk-find
- STOCK_FIND_AND_REPLACE =
The “Find and Replace” item and icon.
gtk-find-and-replace
- STOCK_FLOPPY =
The “Floppy” item and icon.
gtk-floppy
- STOCK_FULLSCREEN =
The “Fullscreen” item and icon.
gtk-fullscreen
- STOCK_GOTO_BOTTOM =
The “Bottom” item and icon.
gtk-goto-bottom
- STOCK_GOTO_FIRST =
The “First” item and icon. The icon has an RTL variant.
gtk-goto-first
- STOCK_GOTO_LAST =
The “Last” item and icon. The icon has an RTL variant.
gtk-goto-last
- STOCK_GOTO_TOP =
The “Top” item and icon.
gtk-goto-top
- STOCK_GO_BACK =
The “Back” item and icon. The icon has an RTL variant.
gtk-go-back
- STOCK_GO_DOWN =
The “Down” item and icon.
gtk-go-down
- STOCK_GO_FORWARD =
The “Forward” item and icon. The icon has an RTL variant.
gtk-go-forward
- STOCK_GO_UP =
The “Up” item and icon.
gtk-go-up
- STOCK_HARDDISK =
The “Harddisk” item and icon.
gtk-harddisk
- STOCK_HELP =
The “Help” item and icon.
gtk-help
- STOCK_HOME =
The “Home” item and icon.
gtk-home
- STOCK_INDENT =
The “Indent” item and icon. The icon has an RTL variant.
gtk-indent
- STOCK_INDEX =
The “Index” item and icon.
gtk-index
- STOCK_INFO =
The “Info” item and icon.
gtk-info
- STOCK_ITALIC =
The “Italic” item and icon.
gtk-italic
- STOCK_JUMP_TO =
The “Jump to” item and icon. The icon has an RTL variant.
gtk-jump-to
- STOCK_JUSTIFY_CENTER =
The “Center” item and icon.
gtk-justify-center
- STOCK_JUSTIFY_FILL =
The “Fill” item and icon.
gtk-justify-fill
- STOCK_JUSTIFY_LEFT =
The “Left” item and icon.
gtk-justify-left
- STOCK_JUSTIFY_RIGHT =
The “Right” item and icon.
gtk-justify-right
- STOCK_LEAVE_FULLSCREEN =
The “Leave Fullscreen” item and icon.
gtk-leave-fullscreen
- STOCK_MEDIA_FORWARD =
The “Media Forward” item and icon. The icon has an RTL variant.
gtk-media-forward
- STOCK_MEDIA_NEXT =
The “Media Next” item and icon. The icon has an RTL variant.
gtk-media-next
- STOCK_MEDIA_PAUSE =
The “Media Pause” item and icon.
gtk-media-pause
- STOCK_MEDIA_PLAY =
The “Media Play” item and icon. The icon has an RTL variant.
gtk-media-play
- STOCK_MEDIA_PREVIOUS =
The “Media Previous” item and icon. The icon has an RTL variant.
gtk-media-previous
- STOCK_MEDIA_RECORD =
The “Media Record” item and icon.
gtk-media-record
- STOCK_MEDIA_REWIND =
The “Media Rewind” item and icon. The icon has an RTL variant.
gtk-media-rewind
- STOCK_MEDIA_STOP =
The “Media Stop” item and icon.
gtk-media-stop
- STOCK_MISSING_IMAGE =
The “Missing image” icon.
gtk-missing-image
- STOCK_NETWORK =
The “Network” item and icon.
gtk-network
- STOCK_NEW =
The “New” item and icon.
gtk-new
- STOCK_NO =
The “No” item and icon.
gtk-no
- STOCK_OK =
The “OK” item and icon.
gtk-ok
- STOCK_OPEN =
The “Open” item and icon.
gtk-open
- STOCK_ORIENTATION_LANDSCAPE =
The “Landscape Orientation” item and icon.
gtk-orientation-landscape
- STOCK_ORIENTATION_PORTRAIT =
The “Portrait Orientation” item and icon.
gtk-orientation-portrait
- STOCK_ORIENTATION_REVERSE_LANDSCAPE =
The “Reverse Landscape Orientation” item and icon.
gtk-orientation-reverse-landscape
- STOCK_ORIENTATION_REVERSE_PORTRAIT =
The “Reverse Portrait Orientation” item and icon.
gtk-orientation-reverse-portrait
- STOCK_PAGE_SETUP =
The “Page Setup” item and icon.
gtk-page-setup
- STOCK_PASTE =
The “Paste” item and icon.
gtk-paste
- STOCK_PREFERENCES =
The “Preferences” item and icon.
gtk-preferences
- STOCK_PRINT =
The “Print” item and icon.
gtk-print
- STOCK_PRINT_ERROR =
The “Print Error” icon.
gtk-print-error
- STOCK_PRINT_PAUSED =
The “Print Paused” icon.
gtk-print-paused
- STOCK_PRINT_PREVIEW =
The “Print Preview” item and icon.
gtk-print-preview
- STOCK_PRINT_REPORT =
The “Print Report” icon.
gtk-print-report
- STOCK_PRINT_WARNING =
The “Print Warning” icon.
gtk-print-warning
- STOCK_PROPERTIES =
The “Properties” item and icon.
gtk-properties
- STOCK_QUIT =
The “Quit” item and icon.
gtk-quit
- STOCK_REDO =
The “Redo” item and icon. The icon has an RTL variant.
gtk-redo
- STOCK_REFRESH =
The “Refresh” item and icon.
gtk-refresh
- STOCK_REMOVE =
The “Remove” item and icon.
gtk-remove
- STOCK_REVERT_TO_SAVED =
The “Revert” item and icon. The icon has an RTL variant.
gtk-revert-to-saved
- STOCK_SAVE =
The “Save” item and icon.
gtk-save
- STOCK_SAVE_AS =
The “Save As” item and icon.
gtk-save-as
- STOCK_SELECT_ALL =
The “Select All” item and icon.
gtk-select-all
- STOCK_SELECT_COLOR =
The “Color” item and icon.
gtk-select-color
- STOCK_SELECT_FONT =
The “Font” item and icon.
gtk-select-font
- STOCK_SORT_ASCENDING =
The “Ascending” item and icon.
gtk-sort-ascending
- STOCK_SORT_DESCENDING =
The “Descending” item and icon.
gtk-sort-descending
- STOCK_SPELL_CHECK =
The “Spell Check” item and icon.
gtk-spell-check
- STOCK_STOP =
The “Stop” item and icon.
gtk-stop
- STOCK_STRIKETHROUGH =
The “Strikethrough” item and icon.
gtk-strikethrough
- STOCK_UNDELETE =
The “Undelete” item and icon. The icon has an RTL variant.
gtk-undelete
- STOCK_UNDERLINE =
The “Underline” item and icon.
gtk-underline
- STOCK_UNDO =
The “Undo” item and icon. The icon has an RTL variant.
gtk-undo
- STOCK_UNINDENT =
The “Unindent” item and icon. The icon has an RTL variant.
gtk-unindent
- STOCK_YES =
The “Yes” item and icon.
gtk-yes
- STOCK_ZOOM_100 =
The “Zoom 100%” item and icon.
gtk-zoom-100
- STOCK_ZOOM_FIT =
The “Zoom to Fit” item and icon.
gtk-zoom-fit
- STOCK_ZOOM_IN =
The “Zoom In” item and icon.
gtk-zoom-in
- STOCK_ZOOM_OUT =
The “Zoom Out” item and icon.
gtk-zoom-out
- STYLE_CLASS_ACCELERATOR =
A CSS class to match an accelerator.
Refer to individual widget documentation for used style classes.
accelerator
- STYLE_CLASS_ARROW =
A CSS class used when rendering an arrow element.
Refer to individual widget documentation for used style classes.
arrow
- STYLE_CLASS_BACKGROUND =
A CSS class to match the window background.
Refer to individual widget documentation for used style classes.
background
- STYLE_CLASS_BOTTOM =
A CSS class to indicate an area at the bottom of a widget.
Refer to individual widget documentation for used style classes.
bottom
- STYLE_CLASS_BUTTON =
A CSS class to match buttons.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_CALENDAR =
A CSS class to match calendars.
Refer to individual widget documentation for used style classes.
calendar
- STYLE_CLASS_CELL =
A CSS class to match content rendered in cell views.
Refer to individual widget documentation for used style classes.
cell
- STYLE_CLASS_CHECK =
A CSS class to match check boxes.
Refer to individual widget documentation for used style classes.
check
- STYLE_CLASS_COMBOBOX_ENTRY =
A CSS class to match combobox entries.
Refer to individual widget documentation for used style classes.
combobox-entry
- STYLE_CLASS_CONTEXT_MENU =
A CSS class to match context menus.
Refer to individual widget documentation for used style classes.
context-
- STYLE_CLASS_CSD =
A CSS class that gets added to windows which have client-side decorations.
Refer to individual widget documentation for used style classes.
csd
- STYLE_CLASS_CURSOR_HANDLE =
A CSS class used when rendering a drag handle for text selection.
Refer to individual widget documentation for used style classes.
cursor-handle
- STYLE_CLASS_DEFAULT =
A CSS class to match the default widget.
Refer to individual widget documentation for used style classes.
default
- STYLE_CLASS_DESTRUCTIVE_ACTION =
A CSS class used when an action (usually a button) is one that is expected to remove or destroy something visible to the user.
Refer to individual widget documentation for used style classes.
destructive-action
- STYLE_CLASS_DIM_LABEL =
A CSS class to match dimmed labels.
Refer to individual widget documentation for used style classes.
dim-label
- STYLE_CLASS_DND =
A CSS class for a drag-and-drop indicator.
Refer to individual widget documentation for used style classes.
dnd
- STYLE_CLASS_DOCK =
A CSS class defining a dock area.
Refer to individual widget documentation for used style classes.
dock
- STYLE_CLASS_ENTRY =
A CSS class to match text entries.
Refer to individual widget documentation for used style classes.
entry
- STYLE_CLASS_ERROR =
A CSS class for an area displaying an error message, such as those in infobars.
Refer to individual widget documentation for used style classes.
error
- STYLE_CLASS_EXPANDER =
A CSS class defining an expander, such as those in treeviews.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_FLAT =
A CSS class that is added when widgets that usually have a frame or border (like buttons or entries) should appear without it.
Refer to individual widget documentation for used style classes.
flat
- STYLE_CLASS_FRAME =
A CSS class defining a frame delimiting content, such as Gtk::Frame or the scrolled window frame around the scrollable area.
Refer to individual widget documentation for used style classes.
frame
- STYLE_CLASS_GRIP =
A CSS class defining a resize grip.
Refer to individual widget documentation for used style classes.
grip
- STYLE_CLASS_HEADER =
A CSS class to match a header element.
Refer to individual widget documentation for used style classes.
header
- STYLE_CLASS_HIGHLIGHT =
A CSS class defining a highlighted area, such as headings in assistants and calendars.
Refer to individual widget documentation for used style classes.
highlight
- STYLE_CLASS_HORIZONTAL =
A CSS class for horizontally layered widgets.
Refer to individual widget documentation for used style classes.
horizontal
- STYLE_CLASS_IMAGE =
A CSS class defining an image, such as the icon in an entry.
Refer to individual widget documentation for used style classes.
image
- STYLE_CLASS_INFO =
A CSS class for an area displaying an informational message, such as those in infobars.
Refer to individual widget documentation for used style classes.
info
- STYLE_CLASS_INLINE_TOOLBAR =
A CSS class to match inline toolbars.
Refer to individual widget documentation for used style classes.
inline-
- STYLE_CLASS_INSERTION_CURSOR =
A CSS class used when rendering a drag handle for the insertion cursor position.
Refer to individual widget documentation for used style classes.
insertion-cursor
- STYLE_CLASS_LABEL =
A CSS class to match labels.
Refer to individual widget documentation for used style classes.
label
- STYLE_CLASS_LEFT =
A CSS class to indicate an area at the left of a widget.
Refer to individual widget documentation for used style classes.
left
- STYLE_CLASS_LEVEL_BAR =
A CSS class used when rendering a level indicator, such as a battery charge level, or a password strength.
Refer to individual widget documentation for used style classes.
level-
- STYLE_CLASS_LINKED =
A CSS class to match a linked area, such as a box containing buttons belonging to the same control.
Refer to individual widget documentation for used style classes.
linked
- STYLE_CLASS_LIST =
A CSS class to match lists.
Refer to individual widget documentation for used style classes.
list
- STYLE_CLASS_LIST_ROW =
A CSS class to match list rows.
Refer to individual widget documentation for used style classes.
list-row
- STYLE_CLASS_MARK =
A CSS class defining marks in a widget, such as in scales.
Refer to individual widget documentation for used style classes.
mark
- STYLE_CLASS_MENU =
A CSS class to match menus.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_MENUBAR =
A CSS class to menubars.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_MENUITEM =
A CSS class to match menu items.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_MESSAGE_DIALOG =
A CSS class that is added to message dialogs.
Refer to individual widget documentation for used style classes.
-dialog
- STYLE_CLASS_MONOSPACE =
A CSS class that is added to text view that should use a monospace font.
Refer to individual widget documentation for used style classes.
monospace
- STYLE_CLASS_NEEDS_ATTENTION =
A CSS class used when an element needs the user attention, for instance a button in a stack switcher corresponding to a hidden page that changed state.
Refer to individual widget documentation for used style classes.
needs-attention
- STYLE_CLASS_NOTEBOOK =
A CSS class defining a notebook.
Refer to individual widget documentation for used style classes.
notebook
- STYLE_CLASS_OSD =
A CSS class used when rendering an OSD (On Screen Display) element, on top of another container.
Refer to individual widget documentation for used style classes.
osd
- STYLE_CLASS_OVERSHOOT =
A CSS class that is added on the visual hints that happen when scrolling is attempted past the limits of a scrollable area.
Refer to individual widget documentation for used style classes.
overshoot
- STYLE_CLASS_PANE_SEPARATOR =
A CSS class for a pane separator, such as those in Gtk::Paned.
Refer to individual widget documentation for used style classes.
pane-separator
- STYLE_CLASS_PAPER =
A CSS class that is added to areas that should look like paper.
This is used in print previews and themes are encouraged to style it as black text on white background.
Refer to individual widget documentation for used style classes.
paper
- STYLE_CLASS_POPOVER =
A CSS class that matches popovers.
Refer to individual widget documentation for used style classes.
popover
- STYLE_CLASS_POPUP =
A CSS class that is added to the toplevel windows used for menus.
Refer to individual widget documentation for used style classes.
popup
- STYLE_CLASS_PRIMARY_TOOLBAR =
A CSS class to match primary toolbars.
Refer to individual widget documentation for used style classes.
primary-
- STYLE_CLASS_PROGRESSBAR =
A CSS class to use when rendering activity as a progressbar.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_PULSE =
A CSS class to use when rendering a pulse in an indeterminate progress bar.
Refer to individual widget documentation for used style classes.
pulse
- STYLE_CLASS_QUESTION =
A CSS class for an area displaying a question to the user, such as those in infobars.
Refer to individual widget documentation for used style classes.
question
- STYLE_CLASS_RADIO =
A CSS class to match radio buttons.
Refer to individual widget documentation for used style classes.
radio
- STYLE_CLASS_RAISED =
A CSS class to match a raised control, such as a raised button on a toolbar.
Refer to individual widget documentation for used style classes.
raised
- STYLE_CLASS_READ_ONLY =
A CSS class used to indicate a read-only state.
Refer to individual widget documentation for used style classes.
read-only
- STYLE_CLASS_RIGHT =
A CSS class to indicate an area at the right of a widget.
Refer to individual widget documentation for used style classes.
right
- STYLE_CLASS_RUBBERBAND =
A CSS class to match the rubberband selection rectangle.
Refer to individual widget documentation for used style classes.
rubberband
- STYLE_CLASS_SCALE =
A CSS class to match scale widgets.
Refer to individual widget documentation for used style classes.
scale
- STYLE_CLASS_SCALE_HAS_MARKS_ABOVE =
A CSS class to match scale widgets with marks attached, all the marks are above for horizontal Gtk::Scale. left for vertical Gtk::Scale.
Refer to individual widget documentation for used style classes.
scale-has-marks-above
- STYLE_CLASS_SCALE_HAS_MARKS_BELOW =
A CSS class to match scale widgets with marks attached, all the marks are below for horizontal Gtk::Scale, right for vertical Gtk::Scale.
Refer to individual widget documentation for used style classes.
scale-has-marks-below
- STYLE_CLASS_SCROLLBAR =
A CSS class to match scrollbars.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_SCROLLBARS_JUNCTION =
A CSS class to match the junction area between an horizontal and vertical scrollbar, when they’re both shown.
Refer to individual widget documentation for used style classes.
-junction
- STYLE_CLASS_SEPARATOR =
A CSS class for a separator.
Refer to individual widget documentation for used style classes.
separator
- STYLE_CLASS_SIDEBAR =
A CSS class defining a sidebar, such as the left side in a file chooser.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_SLIDER =
A CSS class to match sliders.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_SPINBUTTON =
A CSS class defining an spinbutton.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_SPINNER =
A CSS class to use when rendering activity as a “spinner”.
Refer to individual widget documentation for used style classes.
spinner
- STYLE_CLASS_STATUSBAR =
A CSS class to match statusbars.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_SUBTITLE =
A CSS class used for the subtitle label in a titlebar in a toplevel window.
Refer to individual widget documentation for used style classes.
subtitle
- STYLE_CLASS_SUGGESTED_ACTION =
A CSS class used when an action (usually a button) is the primary suggested action in a specific context.
Refer to individual widget documentation for used style classes.
suggested-action
- STYLE_CLASS_TITLE =
A CSS class used for the title label in a titlebar in a toplevel window.
Refer to individual widget documentation for used style classes.
title
- STYLE_CLASS_TITLEBAR =
A CSS class used when rendering a titlebar in a toplevel window.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_TOOLBAR =
A CSS class to match toolbars.
Refer to individual widget documentation for used style classes.
- STYLE_CLASS_TOOLTIP =
A CSS class to match tooltip windows.
Refer to individual widget documentation for used style classes.
tooltip
- STYLE_CLASS_TOP =
A CSS class to indicate an area at the top of a widget.
Refer to individual widget documentation for used style classes.
top
- STYLE_CLASS_TOUCH_SELECTION =
A CSS class for touch selection popups on entries and text views.
Refer to individual widget documentation for used style classes.
touch-selection
- STYLE_CLASS_TROUGH =
A CSS class to match troughs, as in scrollbars and progressbars.
Refer to individual widget documentation for used style classes.
trough
- STYLE_CLASS_UNDERSHOOT =
A CSS class that is added on the visual hints that happen where content is ‘scrolled off’ and can be made visible by scrolling.
Refer to individual widget documentation for used style classes.
undershoot
- STYLE_CLASS_VERTICAL =
A CSS class for vertically layered widgets.
Refer to individual widget documentation for used style classes.
vertical
- STYLE_CLASS_VIEW =
A CSS class defining a view, such as iconviews or treeviews.
Refer to individual widget documentation for used style classes.
view
- STYLE_CLASS_WARNING =
A CSS class for an area displaying a warning message, such as those in infobars.
Refer to individual widget documentation for used style classes.
warning
- STYLE_CLASS_WIDE =
A CSS class to indicate that a UI element should be ‘wide’. Used by Gtk::Paned.
Refer to individual widget documentation for used style classes.
wide
- STYLE_PROPERTY_BACKGROUND_COLOR =
A property holding the background color of rendered elements as a Gdk::RGBA.
background-color
- STYLE_PROPERTY_BACKGROUND_IMAGE =
A property holding the element’s background as a #cairo_pattern_t.
background-image
- STYLE_PROPERTY_BORDER_COLOR =
A property holding the element’s border color as a Gdk::RGBA.
border-color
- STYLE_PROPERTY_BORDER_RADIUS =
A property holding the rendered element’s border radius in pixels as a #gint.
border-radius
- STYLE_PROPERTY_BORDER_STYLE =
A property holding the element’s border style as a Gtk::BorderStyle.
border-style
- STYLE_PROPERTY_BORDER_WIDTH =
A property holding the rendered element’s border width in pixels as a Gtk::Border. The border is the intermediary spacing property of the padding/border/margin series.
gtk_render_frame() uses this property to find out the frame line width, so Gtk::Widgets rendering frames may need to add up this padding when requesting size
border-width
- STYLE_PROPERTY_COLOR =
A property holding the foreground color of rendered elements as a Gdk::RGBA.
color
- STYLE_PROPERTY_FONT =
A property holding the font properties used when rendering text as a Pango::FontDescription.
font
- STYLE_PROPERTY_MARGIN =
A property holding the rendered element’s margin as a Gtk::Border. The margin is defined as the spacing between the border of the element and its surrounding elements. It is external to Gtk::Widget’s size allocations, and the most external spacing property of the padding/border/margin series.
margin
- STYLE_PROPERTY_PADDING =
A property holding the rendered element’s padding as a Gtk::Border. The padding is defined as the spacing between the inner part of the element border and its child. It’s the innermost spacing property of the padding/border/margin series.
padding
- STYLE_PROVIDER_PRIORITY_APPLICATION =
A priority that can be used when adding a Gtk::StyleProvider 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 Gtk::Settings.
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-3.0/gtk.css`.
You should not use priorities higher than this, to give the user the last word.
800
- STYLE_REGION_COLUMN =
A widget region name to define a treeview column.
column
- STYLE_REGION_COLUMN_HEADER =
A widget region name to define a treeview column header.
column-header
- STYLE_REGION_ROW =
A widget region name to define a treeview row.
row
- STYLE_REGION_TAB =
A widget region name to define a notebook tab.
tab
- 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 =
The GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID can be used to make a Gtk::TreeSortable use the default sort function.
See also gtk_tree_sortable_set_sort_column_id()
-1
- TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID =
The GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID can be used to make a Gtk::TreeSortable use no sorting.
See also gtk_tree_sortable_set_sort_column_id()
-2
- LOG_DOMAIN =
"Gtk"
Class Method Summary collapse
Instance Method Summary collapse
-
#accel_groups_activate(object, accel_key, accel_mods) ⇒ TrueClass
Finds the first accelerator in any Gtk::AccelGroup attached to object that matches accel_key and accel_mods, and activates that accelerator.
-
#accel_groups_from_object(object) ⇒ GLib::SList
Gets a list of all accel groups which are attached to object.
-
#accelerator_get_default_mod_mask ⇒ Gdk::ModifierType
Gets the modifier mask.
-
#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.
-
#accelerator_get_label_with_keycode(display, accelerator_key, keycode, accelerator_mods) ⇒ String
Converts an accelerator keyval and modifier mask into a (possibly translated) string that can be displayed to a user, similarly to gtk_accelerator_get_label(), but handling keycodes.
-
#accelerator_name(accelerator_key, accelerator_mods) ⇒ String
Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse().
-
#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(), similarly to gtk_accelerator_name() but handling keycodes.
-
#accelerator_parse(accelerator, accelerator_key, accelerator_mods) ⇒ nil
Parses a string representing an accelerator.
-
#accelerator_parse_with_keycode(accelerator, accelerator_key, accelerator_codes, accelerator_mods) ⇒ nil
Parses a string representing an accelerator, similarly to gtk_accelerator_parse() but handles keycodes as well.
-
#accelerator_set_default_mod_mask(default_mod_mask) ⇒ nil
Sets the modifiers that will be considered significant for keyboard accelerators.
-
#accelerator_valid(keyval, modifiers) ⇒ TrueClass
Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.
-
#alternative_dialog_button_order(screen) ⇒ TrueClass
Returns true if dialogs are expected to use an alternative button order on the screen screen.
-
#binary_age ⇒ Integer
Returns the binary age as passed to ‘libtool` when building the GTK+ library the process is running against.
-
#binding_entry_add_signal_from_string(binding_set, signal_desc) ⇒ GLib::TokenType
Parses a signal description from signal_desc and incorporates it into binding_set.
-
#binding_entry_add_signall(binding_set, keyval, modifiers, signal_name, binding_args) ⇒ nil
Override or install a new key binding for keyval with modifiers on binding_set.
-
#binding_entry_remove(binding_set, keyval, modifiers) ⇒ nil
Remove a binding previously installed via gtk_binding_entry_add_signal() on binding_set.
-
#binding_entry_skip(binding_set, keyval, modifiers) ⇒ nil
Install a binding on binding_set which causes key lookups to be aborted, to prevent bindings from lower priority sets to be activated.
-
#binding_set_by_class(object_class) ⇒ Gtk::BindingSet
This function returns the binding set named after the type name of the passed in class structure.
-
#binding_set_find(set_name) ⇒ Gtk::BindingSet
Find a binding set by its globally unique name.
-
#binding_set_new(set_name) ⇒ Gtk::BindingSet
GTK+ maintains a global list of binding sets.
-
#bindings_activate(object, keyval, modifiers) ⇒ TrueClass
Find a key binding matching keyval and modifiers and activate the binding on object.
-
#bindings_activate_event(object, event) ⇒ TrueClass
Looks up key bindings for object to find one matching event, and if one was found, activate it.
- #builder_error_quark ⇒ GLib::Quark
-
#cairo_should_draw_window(cr, window) ⇒ TrueClass
This function is supposed to be called in Gtk::Widget::draw implementations for widgets that support multiple windows.
-
#cairo_transform_to_window(cr, widget, window) ⇒ nil
Transforms the given cairo context cr that from widget-relative coordinates to window-relative coordinates.
-
#check_version(required_major, required_minor, required_micro) ⇒ String
Checks that the GTK+ library in use is compatible with the given version.
- #css_provider_error_quark ⇒ GLib::Quark
-
#current_event ⇒ Gdk::Event
Obtains a copy of the event currently being processed by GTK+.
-
#current_event_device ⇒ Gdk::Device
If there is a current event and it has a device, return that device, otherwise return nil.
-
#current_event_time ⇒ Integer
If there is a current event and it has a timestamp, return that timestamp, otherwise return %GDK_CURRENT_TIME.
-
#debug_flags ⇒ Integer
Returns the GTK+ debug flags.
-
#debug_flags=(flags) ⇒ nil
Sets the GTK+ debug flags.
-
#default_language ⇒ Pango::Language
Returns the Pango::Language for the default language currently in effect.
-
#device_grab_add(widget, device, block_others) ⇒ nil
Adds a GTK+ grab on device, so all the events on device and its associated pointer or keyboard (if any) are delivered to widget.
-
#device_grab_remove(widget, device) ⇒ nil
Removes a device grab from the given widget.
-
#disable_setlocale ⇒ nil
Prevents gtk_init(), gtk_init_check(), gtk_init_with_args() and gtk_parse_args() from automatically calling ‘setlocale (LC_ALL, “”)`.
-
#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.
-
#drag_cancel(context) ⇒ nil
Cancels an ongoing drag operation on the source side.
-
#drag_finish(context, success, del, time_) ⇒ nil
Informs the drag source that the drop is finished, and that the data of the drag will no longer be required.
-
#drag_get_source_widget(context) ⇒ Gtk::Widget
Determines the source widget for a drag.
-
#drag_set_icon_default(context) ⇒ nil
Sets the icon for a particular drag to the default icon.
-
#drag_set_icon_gicon(context, icon, hot_x, hot_y) ⇒ nil
Sets the icon for a given drag from the given icon.
-
#drag_set_icon_name(context, icon_name, hot_x, hot_y) ⇒ nil
Sets the icon for a given drag from a named themed icon.
-
#drag_set_icon_pixbuf(context, pixbuf, hot_x, hot_y) ⇒ nil
Sets pixbuf as the icon for a given drag.
-
#drag_set_icon_stock(context, stock_id, hot_x, hot_y) ⇒ nil
Sets the icon for a given drag from a stock ID.
-
#drag_set_icon_surface(context, surface) ⇒ nil
Sets surface as the icon for a given drag.
-
#drag_set_icon_widget(context, widget, hot_x, hot_y) ⇒ nil
Changes the icon for drag operation to a given widget.
-
#draw_insertion_cursor(widget, cr, location, is_primary, direction, draw_arrow) ⇒ nil
Draws a text caret on cr at location.
-
#events_pending ⇒ TrueClass
Checks if any events are pending.
-
#false ⇒ TrueClass
Analogical to gtk_true(), this function does nothing but always returns false.
-
#file_chooser_error_quark ⇒ GLib::Quark
Registers an error quark for Gtk::FileChooser if necessary.
-
#get_current_event_state(state) ⇒ TrueClass
If there is a current event and it has a state field, place that state field in state and return true, otherwise return false.
-
#get_event_widget(event) ⇒ Gtk::Widget
If event is nil or the event was not associated with any widget, returns nil, otherwise returns the widget that received the event originally.
-
#get_option_group(open_default_display) ⇒ GLib::OptionGroup
Returns a GOption::Group for the commandline arguments recognized by GTK+ and GDK.
-
#grab_get_current ⇒ Gtk::Widget
Queries the current grab of the default window group.
-
#icon_size_from_name(name) ⇒ Integer
Looks up the icon size associated with name.
-
#icon_size_get_name(size) ⇒ String
Gets the canonical name of the given icon size.
-
#icon_size_lookup(size, width, height) ⇒ TrueClass
Obtains the pixel size of a semantic icon size size: #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc.
-
#icon_size_lookup_for_settings(settings, size, width, height) ⇒ TrueClass
Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular Gtk::Settings.
-
#icon_size_register(name, width, height) ⇒ Integer
Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU, etc.
-
#icon_size_register_alias(alias, target) ⇒ nil
Registers alias as another name for target.
- #icon_theme_error_quark ⇒ GLib::Quark
-
#init(argc, argv) ⇒ nil
Call this function before using any other GTK+ functions in your GUI applications.
-
#init_check(argc, argv) ⇒ TrueClass
This function does the same work as gtk_init() with only a single change: It does not terminate the program if the commandline arguments couldn’t be parsed or the windowing system can’t be initialized.
-
#init_with_args(argc, argv, parameter_string, entries, translation_domain) ⇒ TrueClass
This function does the same work as gtk_init_check().
-
#interface_age ⇒ Integer
Returns the interface age as passed to ‘libtool` when building the GTK+ library the process is running against.
-
#key_snooper_install(snooper, func_data) ⇒ Integer
Installs a key snooper function, which will get called on all key events before delivering them normally.
-
#key_snooper_remove(snooper_handler_id) ⇒ nil
Removes the key snooper function with the given id.
-
#locale_direction ⇒ Gtk::TextDirection
Get the direction of the current locale.
-
#main ⇒ nil
Runs the main loop until gtk_main_quit() is called.
-
#main_do_event(event) ⇒ nil
Processes a single GDK event.
-
#main_iteration ⇒ TrueClass
Runs a single iteration of the mainloop.
-
#main_iteration_do(blocking) ⇒ TrueClass
Runs a single iteration of the mainloop.
-
#main_level ⇒ Integer
Asks for the current nesting level of the main loop.
-
#main_quit ⇒ nil
Makes the innermost invocation of the main loop return when it regains control.
-
#major_version ⇒ Integer
Returns the major version number of the GTK+ library.
-
#micro_version ⇒ Integer
Returns the micro version number of the GTK+ library.
-
#minor_version ⇒ Integer
Returns the minor version number of the GTK+ library.
-
#paint_arrow(style, cr, state_type, shadow_type, widget, detail, arrow_type, fill, x, y, width, height) ⇒ nil
Draws an arrow in the given rectangle on cr using the given parameters.
-
#paint_box(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a box on cr with the given parameters.
-
#paint_box_gap(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, gap_side, gap_x, gap_width) ⇒ nil
Draws a box in cr using the given style and state and shadow type, leaving a gap in one side.
-
#paint_check(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a check button indicator in the given rectangle on cr with the given parameters.
-
#paint_diamond(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a diamond in the given rectangle on window using the given parameters.
-
#paint_expander(style, cr, state_type, widget, detail, x, y, expander_style) ⇒ nil
Draws an expander as used in Gtk::TreeView.
-
#paint_extension(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, gap_side) ⇒ nil
Draws an extension, i.e.
-
#paint_flat_box(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a flat box on cr with the given parameters.
-
#paint_focus(style, cr, state_type, widget, detail, x, y, width, height) ⇒ nil
Draws a focus indicator around the given rectangle on cr using the given style.
-
#paint_handle(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, orientation) ⇒ nil
Draws a handle as used in Gtk::HandleBox and #GtkPaned.
-
#paint_hline(style, cr, state_type, widget, detail, x1, x2, y) ⇒ nil
Draws a horizontal line from (x1, y) to (x2, y) in cr using the given style and state.
-
#paint_layout(style, cr, state_type, use_text, widget, detail, x, y, layout) ⇒ nil
Draws a layout on cr using the given parameters.
-
#paint_option(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a radio button indicator in the given rectangle on cr with the given parameters.
-
#paint_resize_grip(style, cr, state_type, widget, detail, edge, x, y, width, height) ⇒ nil
Draws a resize grip in the given rectangle on cr using the given parameters.
-
#paint_shadow(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a shadow around the given rectangle in cr using the given style and state and shadow type.
-
#paint_shadow_gap(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, gap_side, gap_x, gap_width) ⇒ nil
Draws a shadow around the given rectangle in cr using the given style and state and shadow type, leaving a gap in one side.
-
#paint_slider(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, orientation) ⇒ nil
Draws a slider in the given rectangle on cr using the given style and orientation.
-
#paint_spinner(style, cr, state_type, widget, detail, step, x, y, width, height) ⇒ nil
Draws a spinner on window using the given parameters.
-
#paint_tab(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws an option menu tab (i.e. the up and down pointing arrows) in the given rectangle on cr using the given parameters.
-
#paint_vline(style, cr, state_type, widget, detail, y1_, y2_, x) ⇒ nil
Draws a vertical line from (x, y1_) to (x, y2_) in cr using the given style and state.
-
#paper_size_get_default ⇒ String
Returns the name of the default paper size, which depends on the current locale.
-
#paper_size_get_paper_sizes(include_custom) ⇒ GLib::List
Creates a list of known paper sizes.
-
#parse_args(argc, argv) ⇒ TrueClass
Parses command line arguments, and initializes global attributes of GTK+, but does not actually open a connection to a display.
-
#print_error_quark ⇒ GLib::Quark
Registers an error quark for Gtk::PrintOperation if necessary.
-
#print_run_page_setup_dialog(parent, page_setup, settings) ⇒ Gtk::PageSetup
Runs a page setup dialog, letting the user modify the values from page_setup.
-
#print_run_page_setup_dialog_async(parent, page_setup, settings, done_cb, data) ⇒ nil
Runs a page setup dialog, letting the user modify the values from page_setup.
-
#propagate_event(widget, event) ⇒ nil
Sends an event to a widget, propagating the event to parent widgets if the event remains unhandled.
-
#rc_add_default_file(filename) ⇒ nil
Adds a file to the list of files to be parsed at the end of gtk_init().
-
#rc_find_module_in_path(module_file) ⇒ Gtk::filename
Searches for a theme engine in the GTK+ search path.
-
#rc_find_pixmap_in_path(settings, scanner, pixmap_file) ⇒ Gtk::filename
Looks up a file in pixmap path for the specified Gtk::Settings.
-
#rc_get_default_files ⇒ Array<Gtk::filename>
Retrieves the current list of RC files that will be parsed at the end of gtk_init().
-
#rc_get_im_module_file ⇒ Gtk::filename
Obtains the path to the IM modules file.
-
#rc_get_im_module_path ⇒ Gtk::filename
Obtains the path in which to look for IM modules.
-
#rc_get_module_dir ⇒ Gtk::filename
Returns a directory in which GTK+ looks for theme engines.
-
#rc_get_style(widget) ⇒ Gtk::Style
Finds all matching RC styles for a given widget, composites them together, and then creates a Gtk::Style representing the composite appearance.
-
#rc_get_style_by_paths(settings, widget_path, class_path, type) ⇒ Gtk::Style
Creates up a Gtk::Style from styles defined in a RC file by providing the raw components used in matching.
-
#rc_get_theme_dir ⇒ String
Returns the standard directory in which themes should be installed.
-
#rc_parse(filename) ⇒ nil
Parses a given resource file.
-
#rc_parse_color(scanner, color) ⇒ Integer
Parses a color in the format expected in a RC file.
-
#rc_parse_color_full(scanner, style, color) ⇒ Integer
Parses a color in the format expected in a RC file.
-
#rc_parse_priority(scanner, priority) ⇒ Integer
Parses a Gtk::PathPriorityType variable from the format expected in a RC file.
-
#rc_parse_state(scanner, state) ⇒ Integer
Parses a Gtk::StateType variable from the format expected in a RC file.
-
#rc_parse_string(rc_string) ⇒ nil
Parses resource information directly from a string.
-
#rc_property_parse_border(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses borders in the form ‘“{ left, right, top, bottom }”` for integers left, right, top and bottom.
-
#rc_property_parse_color(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a color given either by its name or in the form ‘{ red, green, blue }` where red, green and blue are integers between 0 and 65535 or floating-point numbers between 0 and 1.
-
#rc_property_parse_enum(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a single enumeration value.
-
#rc_property_parse_flags(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses flags.
-
#rc_property_parse_requisition(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a requisition in the form ‘“{ width, height }”` for integers %width and %height.
-
#rc_reparse_all ⇒ TrueClass
If the modification time on any previously read file for the default Gtk::Settings has changed, discard all style information and then reread all previously read RC files.
-
#rc_reparse_all_for_settings(settings, force_load) ⇒ TrueClass
If the modification time on any previously read file for the given Gtk::Settings has changed, discard all style information and then reread all previously read RC files.
-
#rc_reset_styles(settings) ⇒ nil
This function recomputes the styles for all widgets that use a particular Gtk::Settings object.
- #rc_scanner_new ⇒ GLib::Scanner
-
#rc_set_default_files(filenames) ⇒ nil
Sets the list of files that GTK+ will read at the end of gtk_init().
- #recent_chooser_error_quark ⇒ GLib::Quark
- #recent_manager_error_quark ⇒ GLib::Quark
-
#render_activity(context, cr, x, y, width, height) ⇒ nil
Renders an activity indicator (such as in Gtk::Spinner).
-
#render_arrow(context, cr, angle, x, y, size) ⇒ nil
Renders an arrow pointing to angle.
-
#render_background(context, cr, x, y, width, height) ⇒ nil
Renders the background of an element.
-
#render_background_get_clip(context, x, y, width, height, out_clip) ⇒ nil
Returns the area that will be affected (i.e. drawn to) when calling gtk_render_background() for the given context and rectangle.
-
#render_check(context, cr, x, y, width, height) ⇒ nil
Renders a checkmark (as in a Gtk::CheckButton).
-
#render_expander(context, cr, x, y, width, height) ⇒ nil
Renders an expander (as used in Gtk::TreeView and #GtkExpander) in the area defined by x, y, width, height.
-
#render_extension(context, cr, x, y, width, height, gap_side) ⇒ nil
Renders a extension (as in a Gtk::Notebook tab) in the rectangle defined by x, y, width, height.
-
#render_focus(context, cr, x, y, width, height) ⇒ nil
Renders a focus indicator on the rectangle determined by x, y, width, height.
-
#render_frame(context, cr, x, y, width, height) ⇒ nil
Renders a frame around the rectangle defined by x, y, width, height.
-
#render_frame_gap(context, cr, x, y, width, height, gap_side, xy0_gap, xy1_gap) ⇒ nil
Renders a frame around the rectangle defined by (x, y, width, height), leaving a gap on one side.
-
#render_handle(context, cr, x, y, width, height) ⇒ nil
Renders a handle (as in Gtk::HandleBox, #GtkPaned and Gtk::Window’s resize grip), in the rectangle determined by x, y, width, height.
-
#render_icon(context, cr, pixbuf, x, y) ⇒ nil
Renders the icon in pixbuf at the specified x and y coordinates.
-
#render_icon_pixbuf(context, source, size) ⇒ GdkPixbuf::Pixbuf
Renders the icon specified by source at the given size, returning the result in a pixbuf.
-
#render_icon_surface(context, cr, surface, x, y) ⇒ nil
Renders the icon in surface at the specified x and y coordinates.
-
#render_insertion_cursor(context, cr, x, y, layout, index, direction) ⇒ nil
Draws a text caret on cr at the specified index of layout.
-
#render_layout(context, cr, x, y, layout) ⇒ nil
Renders layout on the coordinates x, y.
-
#render_line(context, cr, x0, y0, x1, y1) ⇒ nil
Renders a line from (x0, y0) to (x1, y1).
-
#render_option(context, cr, x, y, width, height) ⇒ nil
Renders an option mark (as in a Gtk::RadioButton), 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.
-
#render_slider(context, cr, x, y, width, height, orientation) ⇒ nil
Renders a slider (as in Gtk::Scale) in the rectangle defined by x, y, width, height.
-
#rgb_to_hsv(r, g, b, h, s, v) ⇒ nil
Converts a color from RGB space to HSV.
-
#selection_add_target(widget, selection, target, info) ⇒ nil
Appends a specified target to the list of supported targets for a given widget and selection.
-
#selection_add_targets(widget, selection, targets, ntargets) ⇒ nil
Prepends a table of targets to the list of supported targets for a given widget and selection.
-
#selection_clear_targets(widget, selection) ⇒ nil
Remove all targets registered for the given selection for the widget.
-
#selection_convert(widget, selection, target, time_) ⇒ TrueClass
Requests the contents of a selection.
-
#selection_owner_set(widget, selection, time_) ⇒ TrueClass
Claims ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.
-
#selection_owner_set_for_display(display, widget, selection, time_) ⇒ TrueClass
Claim ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.
-
#selection_remove_all(widget) ⇒ nil
Removes all handlers and unsets ownership of all selections for a widget.
-
#show_about_dialog(parent, first_property_name, array) ⇒ nil
This is a convenience function for showing an application’s about box.
-
#show_uri(screen, uri, timestamp) ⇒ TrueClass
A convenience function for launching the default application to show the uri.
-
#show_uri_on_window(parent, uri, timestamp) ⇒ TrueClass
This is a convenience function for launching the default application to show the uri.
-
#stock_add(items, n_items) ⇒ nil
Registers each of the stock items in items.
-
#stock_add_static(items, n_items) ⇒ nil
Same as gtk_stock_add(), but doesn’t copy items, so items must persist until application exit.
-
#stock_list_ids ⇒ GLib::SList
Retrieves a list of all known stock IDs added to a Gtk::IconFactory or registered with gtk_stock_add().
-
#stock_lookup(stock_id, item) ⇒ TrueClass
Fills item with the registered values for stock_id, returning true if stock_id was known.
-
#stock_set_translate_func(domain, func, data, notify) ⇒ nil
Sets a function to be used for translating the label of a stock item.
-
#target_table_free(targets, n_targets) ⇒ nil
This function frees a target table as returned by gtk_target_table_new_from_list().
-
#target_table_new_from_list(list, n_targets) ⇒ Array<Gtk::TargetEntry>
This function creates an Gtk::TargetEntry array that contains the same targets as the passed %list.
-
#targets_include_image(targets, n_targets, writable) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide a Gdk::Pixbuf.
-
#targets_include_rich_text(targets, n_targets, buffer) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide rich text.
-
#targets_include_text(targets, n_targets) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide text.
-
#targets_include_uri(targets, n_targets) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide an uri list.
-
#test_create_simple_window(window_title, dialog_text) ⇒ Gtk::Widget
Create a simple window with window title window_title and text contents dialog_text.
-
#test_create_widget(widget_type, first_property_name, array) ⇒ Gtk::Widget
This function wraps g_object_new() for widget types.
-
#test_display_button_window(window_title, dialog_text, array) ⇒ Gtk::Widget
Create a window with window title window_title, text contents dialog_text, and a number of buttons, according to the paired argument list given as @…
-
#test_find_label(widget, label_pattern) ⇒ Gtk::Widget
This function will search widget and all its descendants for a GtkLabel widget with a text string matching label_pattern.
-
#test_find_sibling(base_widget, widget_type) ⇒ Gtk::Widget
This function will search siblings of base_widget and siblings of its ancestors for all widgets matching widget_type.
-
#test_find_widget(widget, label_pattern, widget_type) ⇒ Gtk::Widget
This function will search the descendants of widget for a widget of type widget_type that has a label matching label_pattern next to it.
-
#test_init(argcp, argvp, array) ⇒ nil
This function is used to initialize a GTK+ test program.
-
#test_list_all_types(n_types) ⇒ Array<GLib::Type>
Return the type ids that have been registered after calling gtk_test_register_all_types().
-
#test_register_all_types ⇒ nil
Force registration of all core Gtk+ and Gdk object types.
-
#test_slider_get_value(widget) ⇒ Float
Retrive the literal adjustment value for GtkRange based widgets and spin buttons.
-
#test_slider_set_perc(widget, percentage) ⇒ nil
This function will adjust the slider position of all GtkRange based widgets, such as scrollbars or scales, it’ll also adjust spin buttons.
-
#test_spin_button_click(spinner, button, upwards) ⇒ TrueClass
This function will generate a button click in the upwards or downwards spin button arrow areas, usually leading to an increase or decrease of spin button’s value.
-
#test_text_get(widget) ⇒ String
Retrive the text string of widget if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.
-
#test_text_set(widget, string) ⇒ nil
Set the text string of widget to string if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.
-
#test_widget_click(widget, button, modifiers) ⇒ TrueClass
This function will generate a button click (button press and button release event) in the middle of the first GdkWindow found that belongs to widget.
-
#test_widget_send_key(widget, keyval, modifiers) ⇒ TrueClass
This function will generate keyboard press and release events in the middle of the first GdkWindow found that belongs to widget.
-
#test_widget_wait_for_draw(widget) ⇒ nil
Enters the main loop and waits for widget to be “drawn”.
-
#tree_get_row_drag_data(selection_data, tree_model, path) ⇒ TrueClass
Obtains a tree_model and path from selection data of target type %GTK_TREE_MODEL_ROW.
-
#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 Gtk::TreeModel::row-deleted signal.
-
#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 Gtk::TreeModel::row-inserted signal.
-
#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 Gtk::TreeModel::rows-reordered signal.
-
#tree_set_row_drag_data(selection_data, tree_model, path) ⇒ TrueClass
Sets selection data of target type %GTK_TREE_MODEL_ROW.
-
#true ⇒ TrueClass
All this function does it to return true.
Class Method Details
.const_missing(name) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'gtk3/lib/gtk3.rb', line 34 def const_missing(name) init() if const_defined?(name) const_get(name) else super end end |
.init(*argv) ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'gtk3/lib/gtk3.rb', line 52 def init(*argv) class << self remove_method(:init) remove_method(:const_missing) remove_method(:method_missing) end Gdk.init if Gdk.respond_to?(:init) loader = Loader.new(self, argv) loader.load end |
.method_missing(name, *args, &block) ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'gtk3/lib/gtk3.rb', line 43 def method_missing(name, *args, &block) init() if respond_to?(name) __send__(name, *args, &block) else super end end |
Instance Method Details
#accel_groups_activate(object, accel_key, accel_mods) ⇒ TrueClass
Finds the first accelerator in any Gtk::AccelGroup attached to object that matches accel_key and accel_mods, and activates that accelerator.
#accel_groups_from_object(object) ⇒ GLib::SList
Gets a list of all accel groups which are attached to object.
#accelerator_get_default_mod_mask ⇒ Gdk::ModifierType
Gets the modifier mask.
The modifier mask determines which modifiers are considered significant for keyboard accelerators. See gtk_accelerator_set_default_mod_mask().
#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.
#accelerator_get_label_with_keycode(display, accelerator_key, keycode, accelerator_mods) ⇒ String
Converts an accelerator keyval and modifier mask into a (possibly translated) string that can be displayed to a user, similarly to gtk_accelerator_get_label(), but handling keycodes.
This is only useful for system-level components, applications should use gtk_accelerator_parse() instead.
#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 gtk_accelerator_get_label().
#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(), similarly to gtk_accelerator_name() but handling keycodes. This is only useful for system-level components, applications should use gtk_accelerator_parse() instead.
#accelerator_parse(accelerator, accelerator_key, accelerator_mods) ⇒ nil
Parses a string representing an accelerator. The format looks like “<Control>a” or “<Shift><Alt>F1” or “<Release>z” (the last one is for key release).
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_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>-”.
If the parse fails, accelerator_key and accelerator_mods will be set to 0 (zero).
#accelerator_parse_with_keycode(accelerator, accelerator_key, accelerator_codes, accelerator_mods) ⇒ nil
Parses a string representing an accelerator, similarly to gtk_accelerator_parse() but handles keycodes as well. This is only useful for system-level components, applications should use gtk_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).
#accelerator_set_default_mod_mask(default_mod_mask) ⇒ nil
Sets the modifiers that will be considered significant for keyboard accelerators. The default mod mask depends on the GDK backend in use, but will typically include #GDK_CONTROL_MASK | #GDK_SHIFT_MASK | #GDK_MOD1_MASK | #GDK_SUPER_MASK | #GDK_HYPER_MASK | #GDK_META_MASK. In other words, Control, Shift, Alt, Super, Hyper and Meta. Other modifiers will by default be ignored by Gtk::AccelGroup.
You must include at least the three modifiers Control, Shift and Alt in any value you pass to this function.
The default mod mask should be changed on application startup, before using any accelerator groups.
#accelerator_valid(keyval, modifiers) ⇒ TrueClass
Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator. For example, the #GDK_KEY_a keyval plus #GDK_CONTROL_MASK is valid - this is a “Ctrl+a” accelerator. But, you can’t, for instance, use the #GDK_KEY_Control_L keyval as an accelerator.
#alternative_dialog_button_order(screen) ⇒ TrueClass
Returns true if dialogs are expected to use an alternative button order on the screen screen. See gtk_dialog_set_alternative_button_order() for more details about alternative button order.
If you need to use this function, you should probably connect to the ::notify:gtk-alternative-button-order signal on the Gtk::Settings object associated to screen, in order to be notified if the button order setting changes.
#binary_age ⇒ Integer
Returns the binary age as passed to ‘libtool` when building the GTK+ library the process is running against. If `libtool` means nothing to you, don’t worry about it.
#binding_entry_add_signal_from_string(binding_set, signal_desc) ⇒ GLib::TokenType
Parses a signal description from signal_desc and incorporates it into binding_set.
Signal descriptions may either bind a key combination to one or more signals: |[
bind "key" {
"signalname" (param, ...)
...
}
]|
Or they may also unbind a key combination: |[
unbind "key"
]|
Key combinations must be in a format that can be parsed by gtk_accelerator_parse().
#binding_entry_add_signall(binding_set, keyval, modifiers, signal_name, binding_args) ⇒ nil
Override or install a new key binding for keyval with modifiers on binding_set.
#binding_entry_remove(binding_set, keyval, modifiers) ⇒ nil
Remove a binding previously installed via gtk_binding_entry_add_signal() on binding_set.
#binding_entry_skip(binding_set, keyval, modifiers) ⇒ nil
Install a binding on binding_set which causes key lookups to be aborted, to prevent bindings from lower priority sets to be activated.
#binding_set_by_class(object_class) ⇒ Gtk::BindingSet
This function returns the binding set named after the type name of the passed in class structure. New binding sets are created on demand by this function.
#binding_set_find(set_name) ⇒ Gtk::BindingSet
Find a binding set by its globally unique name.
The set_name can either be a name used for gtk_binding_set_new() or the type name of a class used in gtk_binding_set_by_class().
#binding_set_new(set_name) ⇒ Gtk::BindingSet
GTK+ maintains a global list of binding sets. Each binding set has a unique name which needs to be specified upon creation.
#bindings_activate(object, keyval, modifiers) ⇒ TrueClass
Find a key binding matching keyval and modifiers and activate the binding on object.
#bindings_activate_event(object, event) ⇒ TrueClass
Looks up key bindings for object to find one matching event, and if one was found, activate it.
#builder_error_quark ⇒ GLib::Quark
#cairo_should_draw_window(cr, window) ⇒ TrueClass
This function is supposed to be called in Gtk::Widget::draw implementations for widgets that support multiple windows. cr must be untransformed from invoking of the draw function. This function will return true if the contents of the given window are supposed to be drawn and false otherwise. Note that when the drawing was not initiated by the windowing system this function will return true for all windows, so you need to draw the bottommost window first. Also, do not use “else if” statements to check which window should be drawn.
#cairo_transform_to_window(cr, widget, window) ⇒ nil
Transforms the given cairo context cr that from widget-relative coordinates to window-relative coordinates. If the widget’s window is not an ancestor of window, no modification will be applied.
This is the inverse to the transformation GTK applies when preparing an expose event to be emitted with the Gtk::Widget::draw signal. It is intended to help porting multiwindow widgets from GTK+ 2 to the rendering architecture of GTK+ 3.
#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+.
#css_provider_error_quark ⇒ GLib::Quark
#current_event ⇒ Gdk::Event
Obtains a copy of the event currently being processed by GTK+.
For example, if you are handling a Gtk::Button::clicked signal, the current event will be the Gdk::EventButton that triggered the ::clicked signal.
#current_event_device ⇒ Gdk::Device
If there is a current event and it has a device, return that device, otherwise return nil.
#current_event_time ⇒ Integer
If there is a current event and it has a timestamp, return that timestamp, otherwise return %GDK_CURRENT_TIME.
#debug_flags ⇒ Integer
Returns the GTK+ debug flags.
This function is intended for GTK+ modules that want to adjust their debug output based on GTK+ debug flags.
#debug_flags=(flags) ⇒ nil
Sets the GTK+ debug flags.
#default_language ⇒ Pango::Language
Returns the Pango::Language 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 pango_language_get_default(). See that function for details.
#device_grab_add(widget, device, block_others) ⇒ nil
Adds a GTK+ grab on device, so all the events on device and its associated pointer or keyboard (if any) are delivered to widget. If the block_others parameter is true, any other devices will be unable to interact with widget during the grab.
#device_grab_remove(widget, device) ⇒ nil
Removes a device grab from the given widget.
You have to pair calls to gtk_device_grab_add() and gtk_device_grab_remove().
#disable_setlocale ⇒ nil
Prevents gtk_init(), gtk_init_check(), gtk_init_with_args() and gtk_parse_args() 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.
#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.
#drag_cancel(context) ⇒ nil
Cancels an ongoing drag operation on the source side.
If you want to be able to cancel a drag operation in this way, you need to keep a pointer to the drag context, either from an explicit call to gtk_drag_begin_with_coordinates(), or by connecting to Gtk::Widget::drag-begin.
If context does not refer to an ongoing drag operation, this function does nothing.
If a drag is cancelled in this way, the result argument of Gtk::Widget::drag-failed is set to GTK_DRAG_RESULT_ERROR.
#drag_finish(context, success, del, time_) ⇒ nil
Informs the drag source that the drop is finished, and that the data of the drag will no longer be required.
#drag_get_source_widget(context) ⇒ Gtk::Widget
Determines the source widget for a drag.
#drag_set_icon_default(context) ⇒ nil
Sets the icon for a particular drag to the default icon.
#drag_set_icon_gicon(context, icon, hot_x, hot_y) ⇒ nil
Sets the icon for a given drag from the given icon. See the documentation for gtk_drag_set_icon_name() for more details about using icons in drag and drop.
#drag_set_icon_name(context, icon_name, hot_x, hot_y) ⇒ nil
Sets the icon for a given drag from a named themed icon. See the docs for Gtk::IconTheme for more details. Note that the size of the icon depends on the icon theme (the icon is loaded at the symbolic size #GTK_ICON_SIZE_DND), thus hot_x and hot_y have to be used with care.
#drag_set_icon_pixbuf(context, pixbuf, hot_x, hot_y) ⇒ nil
Sets pixbuf as the icon for a given drag.
#drag_set_icon_stock(context, stock_id, hot_x, hot_y) ⇒ nil
Sets the icon for a given drag from a stock ID.
#drag_set_icon_surface(context, surface) ⇒ nil
Sets surface as the icon for a given drag. GTK+ retains references for the arguments, and will release them when they are no longer needed.
To position the surface relative to the mouse, use cairo_surface_set_device_offset() on surface. The mouse cursor will be positioned at the (0,0) coordinate of the surface.
#drag_set_icon_widget(context, widget, hot_x, hot_y) ⇒ nil
Changes the icon for drag operation to a given widget. GTK+ will not destroy the widget, so if you don’t want it to persist, you should connect to the “drag-end” signal and destroy it yourself.
#draw_insertion_cursor(widget, cr, location, is_primary, direction, draw_arrow) ⇒ nil
Draws a text caret on cr at location. This is not a style function but merely a convenience function for drawing the standard cursor shape.
#events_pending ⇒ TrueClass
Checks if any events are pending.
This can be used to update the UI and invoke timeouts etc. while doing some time intensive computation.
## Updating the UI during a long computation
// computation going on...
while (gtk_events_pending ())
gtk_main_iteration ();
// ...computation continued
#false ⇒ TrueClass
Analogical to gtk_true(), this function does nothing but always returns false.
#file_chooser_error_quark ⇒ GLib::Quark
Registers an error quark for Gtk::FileChooser if necessary.
#get_current_event_state(state) ⇒ TrueClass
If there is a current event and it has a state field, place that state field in state and return true, otherwise return false.
#get_event_widget(event) ⇒ Gtk::Widget
If event is nil or the event was not associated with any widget, returns nil, otherwise returns the widget that received the event originally.
#get_option_group(open_default_display) ⇒ GLib::OptionGroup
Returns a GOption::Group for the commandline arguments recognized by GTK+ and GDK.
You should add this group to your GOption::Context with g_option_context_add_group(), if you are using g_option_context_parse() to parse your commandline arguments.
#grab_get_current ⇒ Gtk::Widget
Queries the current grab of the default window group.
#icon_size_from_name(name) ⇒ Integer
Looks up the icon size associated with name.
#icon_size_get_name(size) ⇒ String
Gets the canonical name of the given icon size. The returned string is statically allocated and should not be freed.
#icon_size_lookup(size, width, height) ⇒ TrueClass
Obtains the pixel size of a semantic icon size size: #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function isn’t normally needed, gtk_icon_theme_load_icon() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.
#icon_size_lookup_for_settings(settings, size, width, height) ⇒ TrueClass
Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular Gtk::Settings. Normally size would be #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function isn’t normally needed, gtk_widget_render_icon_pixbuf() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.
#icon_size_register(name, width, height) ⇒ Integer
Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU, etc. Returns the integer value for the size.
#icon_size_register_alias(alias, target) ⇒ nil
Registers alias as another name for target. So calling gtk_icon_size_from_name() with alias as argument will return target.
#icon_theme_error_quark ⇒ GLib::Quark
#init(argc, argv) ⇒ nil
Call this function before using any other GTK+ functions in your GUI applications. It will initialize everything needed to operate the toolkit and parses some standard command line options.
Although you are expected to pass the argc, argv parameters from main() to this function, it is possible to pass nil if argv is not available or commandline handling is not required.
argc and argv are adjusted accordingly so your own code will never see those standard arguments.
Note that there are some alternative ways to initialize GTK+: if you are calling gtk_parse_args(), gtk_init_check(), gtk_init_with_args() or g_option_context_parse() with the option group returned by gtk_get_option_group(), you don’t have to call gtk_init().
And if you are using Gtk::Application, you don’t have to call any of the initialization functions either; the Gtk::Application::startup handler does it for you.
This function will terminate your program if it was unable to initialize the windowing system for some reason. If you want your program to fall back to a textual interface you want to call gtk_init_check() instead.
Since 2.18, 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.
#init_check(argc, argv) ⇒ TrueClass
This function does the same work as gtk_init() with only a single change: It does not terminate the program if the commandline arguments couldn’t be parsed or 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.
Note that calling any GTK function or instantiating any GTK type after this function returns false results in undefined behavior.
#init_with_args(argc, argv, parameter_string, entries, translation_domain) ⇒ TrueClass
This function does the same work as gtk_init_check(). Additionally, it allows you to add your own commandline options, and it automatically generates nicely formatted ‘–help` output. Note that your program will be terminated after writing out the help output.
#interface_age ⇒ Integer
Returns the interface age as passed to ‘libtool` when building the GTK+ library the process is running against. If `libtool` means nothing to you, don’t worry about it.
#key_snooper_install(snooper, func_data) ⇒ Integer
Installs a key snooper function, which will get called on all key events before delivering them normally.
#key_snooper_remove(snooper_handler_id) ⇒ nil
Removes the key snooper function with the given id.
#locale_direction ⇒ Gtk::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 direcion.
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:
setlocale (LC_ALL, new_locale);
direction = gtk_get_locale_direction ();
gtk_widget_set_default_direction (direction);
#main ⇒ nil
Runs the main loop until gtk_main_quit() is called.
You can nest calls to gtk_main(). In that case gtk_main_quit() will make the innermost invocation of the main loop return.
#main_do_event(event) ⇒ nil
Processes a single GDK event.
This is public only to allow filtering of events between GDK and GTK+. You will not usually need to call this function directly.
While you should not call this function directly, you might want to know how exactly events are handled. So here is what this function does with the event:
-
Compress enter/leave notify events. If the event passed build an enter/leave pair together with the next event (peeked from GDK), both events are thrown away. This is to avoid a backlog of (de-)highlighting widgets crossed by the pointer.
-
Find the widget which got the event. If the widget can’t be determined the event is thrown away unless it belongs to a INCR transaction.
-
Then the event is pushed onto a stack so you can query the currently handled event with gtk_get_current_event().
-
The event is sent to a widget. If a grab is active all events for widgets that are not in the contained in the grab widget are sent to the latter with a few exceptions:
-
Deletion and destruction events are still sent to the event widget for obvious reasons.
-
Events which directly relate to the visual representation of the event widget.
-
Leave events are delivered to the event widget if there was an enter event delivered to it before without the paired leave event.
-
Drag events are not redirected because it is unclear what the semantics of that would be.
Another point of interest might be that all key events are first passed through the key snooper functions if there are any. Read the description of gtk_key_snooper_install() if you need this feature.
-
-
After finishing the delivery the event is popped from the event stack.
#main_iteration ⇒ TrueClass
Runs a single iteration of the mainloop.
If no events are waiting to be processed GTK+ will block until the next event is noticed. If you don’t want to block look at gtk_main_iteration_do() or check if any events are pending with gtk_events_pending() first.
#main_iteration_do(blocking) ⇒ TrueClass
Runs a single iteration of the mainloop. If no events are available either return or block depending on the value of blocking.
#main_level ⇒ Integer
Asks for the current nesting level of the main loop.
#main_quit ⇒ nil
Makes the innermost invocation of the main loop return when it regains control.
#major_version ⇒ Integer
Returns the major version number of the GTK+ library. (e.g. 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.
#micro_version ⇒ Integer
Returns the micro version number of the GTK+ library. (e.g. 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.
#minor_version ⇒ Integer
Returns the minor version number of the GTK+ library. (e.g. 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.
#paint_arrow(style, cr, state_type, shadow_type, widget, detail, arrow_type, fill, x, y, width, height) ⇒ nil
Draws an arrow in the given rectangle on cr using the given parameters. arrow_type determines the direction of the arrow.
#paint_box(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a box on cr with the given parameters.
#paint_box_gap(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, gap_side, gap_x, gap_width) ⇒ nil
Draws a box in cr using the given style and state and shadow type, leaving a gap in one side.
#paint_check(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a check button indicator in the given rectangle on cr with the given parameters.
#paint_diamond(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a diamond in the given rectangle on window using the given parameters.
#paint_expander(style, cr, state_type, widget, detail, x, y, expander_style) ⇒ nil
Draws an expander as used in Gtk::TreeView. x and y specify the center the expander. The size of the expander is determined by the “expander-size” style property of widget. (If widget is not specified or doesn’t have an “expander-size” property, an unspecified default size will be used, since the caller doesn’t have sufficient information to position the expander, this is likely not useful.) The expander is expander_size pixels tall in the collapsed position and expander_size pixels wide in the expanded position.
#paint_extension(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, gap_side) ⇒ nil
Draws an extension, i.e. a notebook tab.
#paint_flat_box(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a flat box on cr with the given parameters.
#paint_focus(style, cr, state_type, widget, detail, x, y, width, height) ⇒ nil
Draws a focus indicator around the given rectangle on cr using the given style.
#paint_handle(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, orientation) ⇒ nil
Draws a handle as used in Gtk::HandleBox and #GtkPaned.
#paint_hline(style, cr, state_type, widget, detail, x1, x2, y) ⇒ nil
Draws a horizontal line from (x1, y) to (x2, y) in cr using the given style and state.
#paint_layout(style, cr, state_type, use_text, widget, detail, x, y, layout) ⇒ nil
Draws a layout on cr using the given parameters.
#paint_option(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a radio button indicator in the given rectangle on cr with the given parameters.
#paint_resize_grip(style, cr, state_type, widget, detail, edge, x, y, width, height) ⇒ nil
Draws a resize grip in the given rectangle on cr using the given parameters.
#paint_shadow(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws a shadow around the given rectangle in cr using the given style and state and shadow type.
#paint_shadow_gap(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, gap_side, gap_x, gap_width) ⇒ nil
Draws a shadow around the given rectangle in cr using the given style and state and shadow type, leaving a gap in one side.
#paint_slider(style, cr, state_type, shadow_type, widget, detail, x, y, width, height, orientation) ⇒ nil
Draws a slider in the given rectangle on cr using the given style and orientation.
#paint_spinner(style, cr, state_type, widget, detail, step, x, y, width, height) ⇒ nil
Draws a spinner on window using the given parameters.
#paint_tab(style, cr, state_type, shadow_type, widget, detail, x, y, width, height) ⇒ nil
Draws an option menu tab (i.e. the up and down pointing arrows) in the given rectangle on cr using the given parameters.
#paint_vline(style, cr, state_type, widget, detail, y1_, y2_, x) ⇒ nil
Draws a vertical line from (x, y1_) to (x, y2_) in cr using the given style and state.
#paper_size_get_default ⇒ String
Returns the name of the default paper size, which depends on the current locale. is owned by GTK+ and should not be modified.
#paper_size_get_paper_sizes(include_custom) ⇒ GLib::List
Creates a list of known paper sizes.
#parse_args(argc, argv) ⇒ TrueClass
Parses command line arguments, and initializes global attributes of GTK+, but does not actually open a connection to a display. (See gdk_display_open(), gdk_get_display_arg_name())
Any arguments used by GTK+ or GDK are removed from the array and argc and argv are updated accordingly.
There is no need to call this function explicitly if you are using gtk_init(), or gtk_init_check().
Note that many aspects of GTK+ require a display connection to function, so this way of initializing GTK+ is really only useful for specialized use cases.
#print_error_quark ⇒ GLib::Quark
Registers an error quark for Gtk::PrintOperation if necessary.
#print_run_page_setup_dialog(parent, page_setup, settings) ⇒ Gtk::PageSetup
Runs a page setup dialog, letting the user modify the values from page_setup. If the user cancels the dialog, the returned Gtk::PageSetup 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.
#print_run_page_setup_dialog_async(parent, page_setup, settings, done_cb, data) ⇒ nil
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.
#propagate_event(widget, event) ⇒ nil
Sends an event to a widget, propagating the event to parent widgets if the event remains unhandled.
Events received by GTK+ from GDK normally begin in gtk_main_do_event(). Depending on the type of event, existence of modal dialogs, grabs, etc., the event may be propagated; if so, this function is used.
gtk_propagate_event() calls gtk_widget_event() on each widget it decides to send the event to. So gtk_widget_event() is the lowest-level function; it simply emits the Gtk::Widget::event and possibly an event-specific signal on a widget. gtk_propagate_event() is a bit higher-level, and gtk_main_do_event() is the highest level.
All that said, you most likely don’t want to use any of these functions; synthesizing events is rarely needed. There are almost certainly better ways to achieve your goals. For example, use gdk_window_invalidate_rect() or gtk_widget_queue_draw() instead of making up expose events.
#rc_add_default_file(filename) ⇒ nil
Adds a file to the list of files to be parsed at the end of gtk_init().
#rc_find_module_in_path(module_file) ⇒ Gtk::filename
Searches for a theme engine in the GTK+ search path. This function is not useful for applications and should not be used.
#rc_find_pixmap_in_path(settings, scanner, pixmap_file) ⇒ Gtk::filename
Looks up a file in pixmap path for the specified Gtk::Settings. If the file is not found, it outputs a warning message using g_warning() and returns nil.
#rc_get_default_files ⇒ Array<Gtk::filename>
Retrieves the current list of RC files that will be parsed at the end of gtk_init().
by GTK+ and must not be freed by the application. If you want
to store this information, you should make a copy.
#rc_get_im_module_file ⇒ Gtk::filename
Obtains the path to the IM modules file. See the documentation of the ‘GTK_IM_MODULE_FILE` environment variable for more details.
#rc_get_im_module_path ⇒ Gtk::filename
Obtains the path in which to look for IM modules. See the documentation of the ‘GTK_PATH` environment variable for more details about looking up modules. This function is useful solely for utilities supplied with GTK+ and should not be used by applications under normal circumstances.
#rc_get_module_dir ⇒ Gtk::filename
Returns a directory in which GTK+ looks for theme engines. For full information about the search for theme engines, see the docs for ‘GTK_PATH` in [Running GTK+ Applications].
#rc_get_style(widget) ⇒ Gtk::Style
Finds all matching RC styles for a given widget, composites them together, and then creates a Gtk::Style representing the composite appearance. (GTK+ actually keeps a cache of previously created styles, so a new style may not be created.)
#rc_get_style_by_paths(settings, widget_path, class_path, type) ⇒ Gtk::Style
Creates up a Gtk::Style from styles defined in a RC file by providing the raw components used in matching. This function may be useful when creating pseudo-widgets that should be themed like widgets but don’t actually have corresponding GTK+ widgets. An example of this would be items inside a GNOME canvas widget.
The action of gtk_rc_get_style() is similar to:
gtk_widget_path (widget, NULL, &path, NULL);
gtk_widget_class_path (widget, NULL, &class_path, NULL);
gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget),
path, class_path,
G_OBJECT_TYPE (widget));
#rc_get_theme_dir ⇒ String
Returns the standard directory in which themes should be installed. (GTK+ does not actually use this directory itself.)
#rc_parse(filename) ⇒ nil
Parses a given resource file.
#rc_parse_color(scanner, color) ⇒ Integer
Parses a color in the format expected in a RC file.
Note that theme engines should use gtk_rc_parse_color_full() in order to support symbolic colors.
#rc_parse_color_full(scanner, style, color) ⇒ Integer
Parses a color in the format expected in a RC file. If style is not nil, it will be consulted to resolve references to symbolic colors.
#rc_parse_priority(scanner, priority) ⇒ Integer
Parses a Gtk::PathPriorityType variable from the format expected in a RC file.
#rc_parse_state(scanner, state) ⇒ Integer
Parses a Gtk::StateType variable from the format expected in a RC file.
#rc_parse_string(rc_string) ⇒ nil
Parses resource information directly from a string.
#rc_property_parse_border(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses borders in the form ‘“{ left, right, top, bottom }”` for integers left, right, top and bottom. has been set to the resulting Gtk::Border.
#rc_property_parse_color(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a color given either by its name or in the form ‘{ red, green, blue }` where red, green and blue are integers between 0 and 65535 or floating-point numbers between 0 and 1. has been set to the resulting Gdk::Color.
#rc_property_parse_enum(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a single enumeration value.
The enumeration value can be specified by its name, its nickname or its numeric value. For consistency with flags parsing, the value may be surrounded by parentheses. has been set to the resulting GEnum::Value.
#rc_property_parse_flags(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses flags.
Flags can be specified by their name, their nickname or numerically. Multiple flags can be specified in the form ‘“( flag1 | flag2 | … )”`. has been set to the resulting flags value.
#rc_property_parse_requisition(pspec, gstring, property_value) ⇒ TrueClass
A Gtk::RcPropertyParser for use with gtk_settings_install_property_parser() or gtk_widget_class_install_style_property_parser() which parses a requisition in the form ‘“{ width, height }”` for integers %width and %height. has been set to the resulting Gtk::Requisition.
#rc_reparse_all ⇒ TrueClass
If the modification time on any previously read file for the default Gtk::Settings has changed, discard all style information and then reread all previously read RC files.
#rc_reparse_all_for_settings(settings, force_load) ⇒ TrueClass
If the modification time on any previously read file for the given Gtk::Settings has changed, discard all style information and then reread all previously read RC files.
#rc_reset_styles(settings) ⇒ nil
This function recomputes the styles for all widgets that use a particular Gtk::Settings object. (There is one #GtkSettings object per Gdk::Screen, see gtk_settings_get_for_screen()); It is useful when some global parameter has changed that affects the appearance of all widgets, because when a widget gets a new style, it will both redraw and recompute any cached information about its appearance. As an example, it is used when the default font size set by the operating system changes. Note that this function doesn’t affect widgets that have a style set explicitly on them with gtk_widget_set_style().
#rc_scanner_new ⇒ GLib::Scanner
#rc_set_default_files(filenames) ⇒ nil
Sets the list of files that GTK+ will read at the end of gtk_init().
#recent_chooser_error_quark ⇒ GLib::Quark
#recent_manager_error_quark ⇒ GLib::Quark
#render_activity(context, cr, x, y, width, height) ⇒ nil
Renders an activity indicator (such as in Gtk::Spinner). The state %GTK_STATE_FLAG_CHECKED determines whether there is activity going on.
#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 π:

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

#render_background_get_clip(context, x, y, width, height, out_clip) ⇒ nil
Returns the area that will be affected (i.e. drawn to) when calling gtk_render_background() for the given context and rectangle.
#render_check(context, cr, x, y, width, height) ⇒ nil
Renders a checkmark (as in a Gtk::CheckButton).
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:

#render_expander(context, cr, x, y, width, height) ⇒ nil
Renders an expander (as used in Gtk::TreeView 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:

#render_extension(context, cr, x, y, width, height, gap_side) ⇒ nil
Renders a extension (as in a Gtk::Notebook tab) in the rectangle defined by x, y, width, height. The side where the extension connects to is defined by gap_side.
Typical extension rendering:

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

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

#render_frame_gap(context, cr, x, y, width, height, gap_side, xy0_gap, xy1_gap) ⇒ nil
Renders a frame around the rectangle defined by (x, y, width, height), leaving a gap on one side. xy0_gap and xy1_gap will mean X coordinates for %GTK_POS_TOP and %GTK_POS_BOTTOM gap sides, and Y coordinates for %GTK_POS_LEFT and %GTK_POS_RIGHT.
Typical rendering of a frame with a gap:

#render_handle(context, cr, x, y, width, height) ⇒ nil
Renders a handle (as in Gtk::HandleBox, #GtkPaned and Gtk::Window’s resize grip), in the rectangle determined by x, y, width, height.
Handles rendered for the paned and grip classes:

#render_icon(context, cr, pixbuf, x, y) ⇒ nil
Renders the icon in pixbuf at the specified x and y coordinates.
This function will render the icon in pixbuf at exactly its size, regardless of scaling factors, which may not be appropriate when drawing on displays with high pixel densities.
You probably want to use gtk_render_icon_surface() instead, if you already have a Cairo surface.
#render_icon_pixbuf(context, source, size) ⇒ GdkPixbuf::Pixbuf
Renders the icon specified by source at the given size, returning the result in a pixbuf.
#render_icon_surface(context, cr, surface, x, y) ⇒ nil
Renders the icon in surface at the specified x and y coordinates.
#render_insertion_cursor(context, cr, x, y, layout, index, direction) ⇒ nil
Draws a text caret on cr at the specified index of layout.
#render_layout(context, cr, x, y, layout) ⇒ nil
Renders layout on the coordinates x, y
#render_line(context, cr, x0, y0, x1, y1) ⇒ nil
Renders a line from (x0, y0) to (x1, y1).
#render_option(context, cr, x, y, width, height) ⇒ nil
Renders an option mark (as in a Gtk::RadioButton), 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:

#render_slider(context, cr, x, y, width, height, orientation) ⇒ nil
Renders a slider (as in Gtk::Scale) in the rectangle defined by x, y, width, height. orientation defines whether the slider is vertical or horizontal.
Typical slider rendering:

#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.
#selection_add_target(widget, selection, target, info) ⇒ nil
Appends a specified target to the list of supported targets for a given widget and selection.
#selection_add_targets(widget, selection, targets, ntargets) ⇒ nil
Prepends a table of targets to the list of supported targets for a given widget and selection.
#selection_clear_targets(widget, selection) ⇒ nil
Remove all targets registered for the given selection for the widget.
#selection_convert(widget, selection, target, time_) ⇒ TrueClass
Requests the contents of a selection. When received, a “selection-received” signal will be generated.
#selection_owner_set(widget, selection, time_) ⇒ TrueClass
Claims ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.
#selection_owner_set_for_display(display, widget, selection, time_) ⇒ TrueClass
Claim ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.
#selection_remove_all(widget) ⇒ nil
Removes all handlers and unsets ownership of all selections for a widget. Called when widget is being destroyed. This function will not generally be called by applications.
#show_about_dialog(parent, first_property_name, array) ⇒ nil
This is a convenience function for showing an application’s about box. The constructed dialog is associated with the parent window and reused for future invocations of this function.
#show_uri(screen, uri, timestamp) ⇒ TrueClass
A convenience function for launching the default application to show the uri. Like gtk_show_uri_on_window(), but takes a screen as transient parent instead of a window.
Note that this function is deprecated as it does not pass the necessary information for helpers to parent their dialog properly, when run from sandboxed applications for example.
#show_uri_on_window(parent, uri, timestamp) ⇒ TrueClass
This is a convenience function for launching the default application to show the uri. The uri must be of a form understood by GIO (i.e. you need to install gvfs to get support for uri schemes such as http:// or ftp://, as only local files are handled by GIO itself). Typical examples are
-
‘file:///home/gnome/pict.jpg`
Ideally the timestamp is taken from the event triggering the gtk_show_uri() call. If timestamp is not known you can take %GDK_CURRENT_TIME.
This is the recommended call to be used as it passes information necessary for sandbox helpers to parent their dialogs properly.
#stock_add(items, n_items) ⇒ nil
Registers each of the stock items in items. If an item already exists with the same stock ID as one of the items, the old item gets replaced. The stock items are copied, so GTK+ does not hold any pointer into items and items can be freed. Use gtk_stock_add_static() if items is persistent and GTK+ need not copy the array.
#stock_add_static(items, n_items) ⇒ nil
Same as gtk_stock_add(), but doesn’t copy items, so items must persist until application exit.
#stock_list_ids ⇒ GLib::SList
Retrieves a list of all known stock IDs added to a Gtk::IconFactory or registered with gtk_stock_add(). The list must be freed with g_slist_free(), and each string in the list must be freed with g_free().
#stock_lookup(stock_id, item) ⇒ TrueClass
Fills item with the registered values for stock_id, returning true if stock_id was known.
#stock_set_translate_func(domain, func, data, notify) ⇒ nil
Sets a function to be used for translating the label of a stock item.
If no function is registered for a translation domain, g_dgettext() is used.
The function is used for all stock items whose translation_domain matches domain. Note that it is possible to use strings different from the actual gettext translation domain of your application for this, as long as your Gtk::TranslateFunc uses the correct domain when calling dgettext(). This can be useful, e.g. when dealing with message contexts:
GtkStockItem items[] = {
{ MY_ITEM1, NC_("odd items", "Item 1"), 0, 0, "odd-item-domain" },
{ MY_ITEM2, NC_("even items", "Item 2"), 0, 0, "even-item-domain" },
};
gchar *
my_translate_func (const gchar *msgid,
gpointer data)
{
gchar *msgctxt = data;
return (gchar*)g_dpgettext2 (GETTEXT_PACKAGE, msgctxt, msgid);
}
...
gtk_stock_add (items, G_N_ELEMENTS (items));
gtk_stock_set_translate_func ("odd-item-domain", my_translate_func, "odd items");
gtk_stock_set_translate_func ("even-item-domain", my_translate_func, "even items");
#target_table_free(targets, n_targets) ⇒ nil
This function frees a target table as returned by gtk_target_table_new_from_list()
#target_table_new_from_list(list, n_targets) ⇒ Array<Gtk::TargetEntry>
This function creates an Gtk::TargetEntry array that contains the same targets as the passed %list. The returned table is newly allocated and should be freed using gtk_target_table_free() when no longer needed.
#targets_include_image(targets, n_targets, writable) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide a Gdk::Pixbuf.
#targets_include_rich_text(targets, n_targets, buffer) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide rich text.
#targets_include_text(targets, n_targets) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide text.
#targets_include_uri(targets, n_targets) ⇒ TrueClass
Determines if any of the targets in targets can be used to provide an uri list.
#test_create_simple_window(window_title, dialog_text) ⇒ Gtk::Widget
Create a simple window with window title window_title and text contents dialog_text. The window will quit any running gtk_main()-loop when destroyed, and it will automatically be destroyed upon test function teardown.
#test_create_widget(widget_type, first_property_name, array) ⇒ Gtk::Widget
This function wraps g_object_new() for widget types. It’ll automatically show all created non window widgets, also g_object_ref_sink() them (to keep them alive across a running test) and set them up for destruction during the next test teardown phase.
#test_display_button_window(window_title, dialog_text, array) ⇒ Gtk::Widget
Create a window with window title window_title, text contents dialog_text, and a number of buttons, according to the paired argument list given as @… parameters. Each button is created with a label and a ::clicked signal handler that incremrents the integer stored in nump. The window will be automatically shown with gtk_widget_show_now() after creation, so when this function returns it has already been mapped, resized and positioned on screen. The window will quit any running gtk_main()-loop when destroyed, and it will automatically be destroyed upon test function teardown.
#test_find_label(widget, label_pattern) ⇒ Gtk::Widget
This function will search widget and all its descendants for a GtkLabel widget with a text string matching label_pattern. The label_pattern may contain asterisks “*” and question marks “?” as placeholders, g_pattern_match() is used for the matching. Note that locales other than “C“ tend to alter (translate” label strings, so this function is genrally only useful in test programs with predetermined locales, see gtk_test_init() for more details.
#test_find_sibling(base_widget, widget_type) ⇒ Gtk::Widget
This function will search siblings of base_widget and siblings of its ancestors for all widgets matching widget_type. Of the matching widgets, the one that is geometrically closest to base_widget will be returned. The general purpose of this function is to find the most likely “action” widget, relative to another labeling widget. Such as finding a button or text entry widget, given its corresponding label widget.
#test_find_widget(widget, label_pattern, widget_type) ⇒ Gtk::Widget
This function will search the descendants of widget for a widget of type widget_type that has a label matching label_pattern next to it. This is most useful for automated GUI testing, e.g. to find the “OK” button in a dialog and synthesize clicks on it. However see gtk_test_find_label(), gtk_test_find_sibling() and gtk_test_widget_click() for possible caveats involving the search of such widgets and synthesizing widget events.
#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” and prevent loading of rc files and Gtk+ modules. This is done to make tets 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.
#test_list_all_types(n_types) ⇒ Array<GLib::Type>
Return the type ids that have been registered after calling gtk_test_register_all_types().
#test_register_all_types ⇒ nil
Force registration of all core Gtk+ and Gdk object types. This allowes to refer to any of those object types via g_type_from_name() after calling this function.
#test_slider_get_value(widget) ⇒ Float
Retrive the literal adjustment value for GtkRange based widgets and spin buttons. Note that the value returned by this function is anything between the lower and upper bounds of the adjustment belonging to widget, and is not a percentage as passed in to gtk_test_slider_set_perc().
#test_slider_set_perc(widget, percentage) ⇒ nil
This function will adjust the slider position of all GtkRange based widgets, such as scrollbars or scales, it’ll also adjust spin buttons. The adjustment value of these widgets is set to a value between the lower and upper limits, according to the percentage argument.
#test_spin_button_click(spinner, button, upwards) ⇒ TrueClass
This function will generate a button click in the upwards or downwards spin button arrow areas, usually leading to an increase or decrease of spin button’s value.
#test_text_get(widget) ⇒ String
Retrive the text string of widget if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.
#test_text_set(widget, string) ⇒ nil
Set the text string of widget to string if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.
#test_widget_click(widget, button, modifiers) ⇒ TrueClass
This function will generate a button click (button press and button release event) in the middle of the first GdkWindow found that belongs to widget. For windowless widgets like Gtk::Button (which returns false from gtk_widget_get_has_window()), this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the button click location, see gdk_test_simulate_button() for details.
#test_widget_send_key(widget, keyval, modifiers) ⇒ TrueClass
This function will generate keyboard press and release events in the middle of the first GdkWindow found that belongs to widget. For windowless widgets like Gtk::Button (which returns false from gtk_widget_get_has_window()), this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the key press location, see gdk_test_simulate_key() for details.
#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.
#tree_get_row_drag_data(selection_data, tree_model, path) ⇒ TrueClass
Obtains a tree_model and path from selection data of target type %GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler. This function can only be used if selection_data originates from the same process that’s calling this function, because a pointer to the tree model is being passed around. If you aren’t in the same process, then you’ll get memory corruption. In the Gtk::TreeDragDest drag_data_received handler, you can assume that selection data of type %GTK_TREE_MODEL_ROW is in from the current process. The returned path must be freed with gtk_tree_path_free().
#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 Gtk::TreeModel::row-deleted signal.
#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 Gtk::TreeModel::row-inserted signal.
#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 Gtk::TreeModel::rows-reordered signal.
#tree_set_row_drag_data(selection_data, tree_model, path) ⇒ TrueClass
Sets selection data of target type %GTK_TREE_MODEL_ROW. Normally used in a drag_data_get handler.
#true ⇒ TrueClass
All this function does it to return true.
This can be useful for example if you want to inhibit the deletion of a window. Of course you should not do this as the user expects a reaction from clicking the close icon of the window…
## A persistent window
#include <gtk/gtk.h>
int
main (int argc, char **argv)
{
GtkWidget *win, *but;
const char *text = "Close yourself. I mean it!";
gtk_init (&argc, &argv);
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (win,
"delete-event",
G_CALLBACK (gtk_true),
NULL);
g_signal_connect (win, "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
but = gtk_button_new_with_label (text);
g_signal_connect_swapped (but, "clicked",
G_CALLBACK (gtk_object_destroy),
win);
gtk_container_add (GTK_CONTAINER (win), but);
gtk_widget_show_all (win);
gtk_main ();
return 0;
}