gtk.global

Global functions for gtk3 library

fn acceleratorGetDefaultModMask acceleratorGetLabel acceleratorGetLabelWithKeycode acceleratorName acceleratorNameWithKeycode acceleratorParse acceleratorParseWithKeycode acceleratorSetDefaultModMask acceleratorValid accelGroupsActivate accelGroupsFromObject alternativeDialogButtonOrder bindingsActivate bindingsActivateEvent cairoShouldDrawWindow cairoTransformToWindow checkVersion deviceGrabAdd deviceGrabRemove disableSetlocale distributeNaturalAllocation dragCancel dragFinish dragGetSourceWidget dragSetIconDefault dragSetIconGicon dragSetIconName dragSetIconPixbuf dragSetIconStock dragSetIconSurface dragSetIconWidget drawInsertionCursor eventsPending false_ getBinaryAge getCurrentEvent getCurrentEventDevice getCurrentEventState getCurrentEventTime getDebugFlags getDefaultLanguage getEventWidget getInterfaceAge getLocaleDirection getMajorVersion getMicroVersion getMinorVersion getOptionGroup grabGetCurrent keySnooperRemove main_ mainDoEvent mainIteration mainIterationDo mainLevel mainQuit paintArrow paintBox paintBoxGap paintCheck paintDiamond paintExpander paintExtension paintFlatBox paintFocus paintHandle paintHline paintLayout paintOption paintResizeGrip paintShadow paintShadowGap paintSlider paintSpinner paintTab paintVline printRunPageSetupDialog printRunPageSetupDialogAsync propagateEvent rcAddDefaultFile rcFindModuleInPath rcFindPixmapInPath rcGetDefaultFiles rcGetImModuleFile rcGetImModulePath rcGetModuleDir rcGetStyle rcGetStyleByPaths rcGetThemeDir rcParse rcParseColor rcParseColorFull rcParsePriority rcParseState rcParseString rcReparseAll rcReparseAllForSettings rcResetStyles rcSetDefaultFiles renderActivity renderArrow renderBackground renderBackgroundGetClip renderCheck renderExpander renderExtension renderFocus renderFrame renderFrameGap renderHandle renderIcon renderIconPixbuf renderIconSurface renderInsertionCursor renderLayout renderLine renderOption renderSlider rgbToHsv selectionAddTarget selectionAddTargets selectionClearTargets selectionConvert selectionOwnerSet selectionOwnerSetForDisplay selectionRemoveAll setDebugFlags showUri showUriOnWindow stockListIds stockLookup stockSetTranslateFunc targetTableFree targetTableNewFromList testCreateSimpleWindow testFindLabel testFindSibling testFindWidget testListAllTypes testRegisterAllTypes testSliderGetValue testSliderSetPerc testSpinButtonClick testTextGet testTextSet testWidgetClick testWidgetSendKey testWidgetWaitForDraw treeGetRowDragData treeSetRowDragData true_

Functions 151

fnbool accelGroupsActivate(gobject.object.ObjectWrap object, uint accelKey, gdk.types.ModifierType accelMods)Finds the first accelerator in any #GtkAccelGroup attached to object that matches accelkey and accelmods, and activates that accelerator.
fngtk.accel_group.AccelGroup[] accelGroupsFromObject(gobject.object.ObjectWrap object)Gets a list of all accel groups which are attached to object.
fnstring acceleratorGetLabel(uint acceleratorKey, gdk.types.ModifierType acceleratorMods)Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.
fnstring acceleratorGetLabelWithKeycode(gdk.display.Display display, uint acceleratorKey, uint keycode, gdk.types.ModifierType acceleratorMods)Converts an accelerator keyval and modifier mask into a (possibly translated) string that can be displayed to a user, similarly to [gtk.global.acceleratorGetLabel], but handling keycodes.
fnstring acceleratorName(uint acceleratorKey, gdk.types.ModifierType acceleratorMods)Converts an accelerator keyval and modifier mask into a string parseable by [gtk.global.acceleratorParse]. For example, if you pass in #GDKKEYq and #GDKCONTROLMASK, this function returns “<Contro...
fnstring acceleratorNameWithKeycode(gdk.display.Display display, uint acceleratorKey, uint keycode, gdk.types.ModifierType acceleratorMods)Converts an accelerator keyval and modifier mask into a string parseable by [gtk.global.acceleratorParseWithKeycode], similarly to [gtk.global.acceleratorName] but handling keycodes. This is only u...
fnvoid acceleratorParse(string accelerator, out uint acceleratorKey, out gdk.types.ModifierType acceleratorMods)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).
fnvoid acceleratorParseWithKeycode(string accelerator, out uint acceleratorKey, out uint[] acceleratorCodes, out gdk.types.ModifierType acceleratorMods)Parses a string representing an accelerator, similarly to [gtk.global.acceleratorParse] but handles keycodes as well. This is only useful for system-level components, applications should use [gtk.g...
fnvoid acceleratorSetDefaultModMask(gdk.types.ModifierType defaultModMask)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 #GDKCONTROLMASK | #GDKSHIFTMASK ...
fnbool acceleratorValid(uint keyval, gdk.types.ModifierType modifiers)Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator. For example, the #GDKKEYa keyval plus #GDKCONTROLMASK is valid - this is a “Ctrl+a” accelerator. But...
fnbool alternativeDialogButtonOrder(gdk.screen.Screen screen = null)Returns true if dialogs are expected to use an alternative button order on the screen screen. See [gtk.dialog.Dialog.setAlternativeButtonOrder] for more details about alternative button order.
fnbool bindingsActivate(gobject.object.ObjectWrap object, uint keyval, gdk.types.ModifierType modifiers)Find a key binding matching keyval and modifiers and activate the binding on object.
fnbool bindingsActivateEvent(gobject.object.ObjectWrap object, gdk.event_key.EventKey event)Looks up key bindings for object to find one matching event, and if one was found, activate it.
fnbool cairoShouldDrawWindow(cairo.context.Context cr, gdk.window.Window window)This function is supposed to be called in #GtkWidget::draw implementations for widgets that support multiple windows. cr must be untransformed from invoking of the draw function. This function will...
fnvoid cairoTransformToWindow(cairo.context.Context cr, gtk.widget.Widget widget, gdk.window.Window window)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.
fnstring checkVersion(uint requiredMajor, uint requiredMinor, uint requiredMicro)Checks that the GTK+ library in use is compatible with the given version. Generally you would pass in the constants #GTKMAJORVERSION, #GTKMINORVERSION, #GTKMICROVERSION as the three arguments to th...
fnvoid deviceGrabAdd(gtk.widget.Widget widget, gdk.device.Device device, bool blockOthers)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 una...
fnvoid deviceGrabRemove(gtk.widget.Widget widget, gdk.device.Device device)Removes a device grab from the given widget.
fnvoid disableSetlocale()Prevents [gtk.global.init], [gtk.global.initCheck], [gtk.global.initWithArgs] and [gtk.global.parseArgs] from automatically calling `setlocale (LCALL, "")`. You would want to use this function if y...
fnint distributeNaturalAllocation(int extraSpace, uint nRequestedSizes, gtk.types.RequestedSize sizes)Distributes extra_space to child sizes by bringing smaller children up to natural size first.
fnvoid dragCancel(gdk.drag_context.DragContext context)Cancels an ongoing drag operation on the source side.
fnvoid dragFinish(gdk.drag_context.DragContext context, bool success, bool del, uint time)Informs the drag source that the drop is finished, and that the data of the drag will no longer be required.
fngtk.widget.Widget dragGetSourceWidget(gdk.drag_context.DragContext context)Determines the source widget for a drag.
fnvoid dragSetIconDefault(gdk.drag_context.DragContext context)Sets the icon for a particular drag to the default icon.
fnvoid dragSetIconGicon(gdk.drag_context.DragContext context, gio.icon.Icon icon, int hotX, int hotY)Sets the icon for a given drag from the given icon. See the documentation for [gtk.global.dragSetIconName] for more details about using icons in drag and drop.
fnvoid dragSetIconName(gdk.drag_context.DragContext context, string iconName, int hotX, int hotY)Sets the icon for a given drag from a named themed icon. See the docs for #GtkIconTheme for more details. Note that the size of the icon depends on the icon theme (the icon is loaded at the symboli...
fnvoid dragSetIconPixbuf(gdk.drag_context.DragContext context, gdkpixbuf.pixbuf.Pixbuf pixbuf, int hotX, int hotY)Sets pixbuf as the icon for a given drag.
fnvoid dragSetIconStock(gdk.drag_context.DragContext context, string stockId, int hotX, int hotY)Sets the icon for a given drag from a stock ID.
fnvoid dragSetIconSurface(gdk.drag_context.DragContext context, cairo.surface.Surface surface)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.
fnvoid dragSetIconWidget(gdk.drag_context.DragContext context, gtk.widget.Widget widget, int hotX, int hotY)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.
fnvoid drawInsertionCursor(gtk.widget.Widget widget, cairo.context.Context cr, gdk.rectangle.Rectangle location, bool isPrimary, gtk.types.TextDirection direction, bool drawArrow)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.
fnbool eventsPending()Checks if any events are pending.
fnbool false_()Analogical to [gtk.global.true_], this function does nothing but always returns false. Returns: false
fnuint getBinaryAge()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. Returns: the binary age of the ...
fngdk.event.Event getCurrentEvent()Obtains a copy of the event currently being processed by GTK+.
fngdk.device.Device getCurrentEventDevice()If there is a current event and it has a device, return that device, otherwise return null. Returns: a #GdkDevice, or null
fnbool getCurrentEventState(out gdk.types.ModifierType state)If there is a current event and it has a state field, place that state field in state and return true, otherwise return false.
fnuint getCurrentEventTime()If there is a current event and it has a timestamp, return that timestamp, otherwise return [gdk.types.CURRENTTIME]. Returns: the timestamp from the current event, or [gdk.types.CURRENTTIME].
fnuint getDebugFlags()Returns the GTK+ debug flags.
fnpango.language.Language getDefaultLanguage()Returns the #PangoLanguage for the default language currently in effect. (Note that this can change over the life of an application.) The default language is derived from the current locale. It det...
fngtk.widget.Widget getEventWidget(gdk.event.Event event)If event is null or the event was not associated with any widget, returns null, otherwise returns the widget that received the event originally.
fnuint getInterfaceAge()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. Returns: the interface age o...
fngtk.types.TextDirection getLocaleDirection()Get the direction of the current locale. This is the expected reading direction for text and UI.
fnuint getMajorVersion()Returns the major version number of the GTK+ library. (e.g. in GTK+ version 3.1.5 this is 3.)
fnuint getMicroVersion()Returns the micro version number of the GTK+ library. (e.g. in GTK+ version 3.1.5 this is 5.)
fnuint getMinorVersion()Returns the minor version number of the GTK+ library. (e.g. in GTK+ version 3.1.5 this is 1.)
fnglib.option_group.OptionGroup getOptionGroup(bool openDefaultDisplay)Returns a #GOptionGroup for the commandline arguments recognized by GTK+ and GDK.
fngtk.widget.Widget grabGetCurrent()Queries the current grab of the default window group. Returns: The widget which currently has the grab or null if no grab is active
fnvoid keySnooperRemove(uint snooperHandlerId)Removes the key snooper function with the given id.
fnvoid main_()Runs the main loop until [gtk.global.mainQuit] is called.
fnvoid mainDoEvent(gdk.event.Event event)Processes a single GDK event.
fnbool mainIteration()Runs a single iteration of the mainloop.
fnbool mainIterationDo(bool blocking)Runs a single iteration of the mainloop. If no events are available either return or block depending on the value of blocking.
fnuint mainLevel()Asks for the current nesting level of the main loop. Returns: the nesting level of the current invocation of the main loop
fnvoid mainQuit()Makes the innermost invocation of the main loop return when it regains control.
fnvoid paintArrow(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, gtk.types.ArrowType arrowType, bool fill, int x, int y, int width, int height)Draws an arrow in the given rectangle on cr using the given parameters. arrow_type determines the direction of the arrow.
fnvoid paintBox(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws a box on cr with the given parameters.
fnvoid paintBoxGap(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height, gtk.types.PositionType gapSide, int gapX, int gapWidth)Draws a box in cr using the given style and state and shadow type, leaving a gap in one side.
fnvoid paintCheck(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws a check button indicator in the given rectangle on cr with the given parameters.
fnvoid paintDiamond(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws a diamond in the given rectangle on window using the given parameters.
fnvoid paintExpander(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.widget.Widget widget, string detail, int x, int y, gtk.types.ExpanderStyle expanderStyle)Draws an expander as used in #GtkTreeView. `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 no...
fnvoid paintExtension(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height, gtk.types.PositionType gapSide)Draws an extension, i.e. a notebook tab.
fnvoid paintFlatBox(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws a flat box on cr with the given parameters.
fnvoid paintFocus(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws a focus indicator around the given rectangle on cr using the given style.
fnvoid paintHandle(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height, gtk.types.Orientation orientation)Draws a handle as used in #GtkHandleBox and #GtkPaned.
fnvoid paintHline(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.widget.Widget widget, string detail, int x1, int x2, int y)Draws a horizontal line from (x1, `y`) to (x2, `y`) in cr using the given style and state.
fnvoid paintLayout(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, bool useText, gtk.widget.Widget widget, string detail, int x, int y, pango.layout.Layout layout)Draws a layout on cr using the given parameters.
fnvoid paintOption(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws a radio button indicator in the given rectangle on cr with the given parameters.
fnvoid paintResizeGrip(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.widget.Widget widget, string detail, gdk.types.WindowEdge edge, int x, int y, int width, int height)Draws a resize grip in the given rectangle on cr using the given parameters.
fnvoid paintShadow(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws a shadow around the given rectangle in cr using the given style and state and shadow type.
fnvoid paintShadowGap(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height, gtk.types.PositionType gapSide, int gapX, int gapWidth)Draws a shadow around the given rectangle in cr using the given style and state and shadow type, leaving a gap in one side.
fnvoid paintSlider(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height, gtk.types.Orientation orientation)Draws a slider in the given rectangle on cr using the given style and orientation.
fnvoid paintSpinner(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.widget.Widget widget, string detail, uint step, int x, int y, int width, int height)Draws a spinner on window using the given parameters.
fnvoid paintTab(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.types.ShadowType shadowType, gtk.widget.Widget widget, string detail, int x, int y, int width, int height)Draws an option menu tab (i.e. the up and down pointing arrows) in the given rectangle on cr using the given parameters.
fnvoid paintVline(gtk.style.Style style, cairo.context.Context cr, gtk.types.StateType stateType, gtk.widget.Widget widget, string detail, int y1, int y2, int x)Draws a vertical line from (`x`, y1) to (`x`, y2) in cr using the given style and state.
fngtk.page_setup.PageSetup printRunPageSetupDialog(gtk.window.Window parent, gtk.page_setup.PageSetup pageSetup, gtk.print_settings.PrintSettings settings)Runs a page setup dialog, letting the user modify the values from pagesetup. If the user cancels the dialog, the returned #GtkPageSetup is identical to the passed in pagesetup, otherwise it contain...
fnvoid printRunPageSetupDialogAsync(gtk.window.Window parent, gtk.page_setup.PageSetup pageSetup, gtk.print_settings.PrintSettings settings, gtk.types.PageSetupDoneFunc doneCb)Runs a page setup dialog, letting the user modify the values from page_setup.
fnvoid propagateEvent(gtk.widget.Widget widget, gdk.event.Event event)Sends an event to a widget, propagating the event to parent widgets if the event remains unhandled.
fnvoid rcAddDefaultFile(string filename)Adds a file to the list of files to be parsed at the end of [gtk.global.init_].
fnstring rcFindModuleInPath(string moduleFile)Searches for a theme engine in the GTK+ search path. This function is not useful for applications and should not be used.
fnstring rcFindPixmapInPath(gtk.settings.Settings settings, glib.scanner.Scanner scanner, string pixmapFile)Looks up a file in pixmap path for the specified #GtkSettings. If the file is not found, it outputs a warning message using g_warning() and returns null.
fnstring[] rcGetDefaultFiles()Retrieves the current list of RC files that will be parsed at the end of [gtk.global.init_]. Returns: A null-terminated array of filenames. This memory is owned by GTK+ and must not be freed by th...
fnstring rcGetImModuleFile()Obtains the path to the IM modules file. See the documentation of the `GTKIMMODULE_FILE` environment variable for more details. Returns: a newly-allocated string containing the name of the file lis...
fnstring rcGetImModulePath()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 utilitie...
fnstring rcGetModuleDir()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][gtk-running]. Returns:...
fngtk.style.Style rcGetStyle(gtk.widget.Widget widget)Finds all matching RC styles for a given widget, composites them together, and then creates a #GtkStyle representing the composite appearance. (GTK+ actually keeps a cache of previously created sty...
fngtk.style.Style rcGetStyleByPaths(gtk.settings.Settings settings, string widgetPath, string classPath, gobject.types.GType type)Creates up a #GtkStyle 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...
fnstring rcGetThemeDir()Returns the standard directory in which themes should be installed. (GTK+ does not actually use this directory itself.) Returns: The directory (must be freed with [glib.global.gfree]).
fnvoid rcParse(string filename)Parses a given resource file.
fnuint rcParseColor(glib.scanner.Scanner scanner, out gdk.color.Color color)Parses a color in the format expected in a RC file.
fnuint rcParseColorFull(glib.scanner.Scanner scanner, gtk.rc_style.RcStyle style, out gdk.color.Color color)Parses a color in the format expected in a RC file. If style is not null, it will be consulted to resolve references to symbolic colors.
fnuint rcParsePriority(glib.scanner.Scanner scanner, out gtk.types.PathPriorityType priority)Parses a #GtkPathPriorityType variable from the format expected in a RC file.
fnuint rcParseState(glib.scanner.Scanner scanner, out gtk.types.StateType state)Parses a #GtkStateType variable from the format expected in a RC file.
fnvoid rcParseString(string rcString)Parses resource information directly from a string.
fnbool rcReparseAll()If the modification time on any previously read file for the default #GtkSettings has changed, discard all style information and then reread all previously read RC files. Returns: true if the files...
fnbool rcReparseAllForSettings(gtk.settings.Settings settings, bool forceLoad)If the modification time on any previously read file for the given #GtkSettings has changed, discard all style information and then reread all previously read RC files.
fnvoid rcResetStyles(gtk.settings.Settings settings)This function recomputes the styles for all widgets that use a particular #GtkSettings object. (There is one #GtkSettings object per #GdkScreen, see [gtk.settings.Settings.getForScreen]); It is use...
fnvoid rcSetDefaultFiles(string[] filenames)Sets the list of files that GTK+ will read at the end of [gtk.global.init_].
fnvoid renderActivity(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders an activity indicator (such as in #GtkSpinner). The state [gtk.types.StateFlags.Checked] determines whether there is activity going on.
fnvoid renderArrow(gtk.style_context.StyleContext context, cairo.context.Context cr, double angle, double x, double y, double size)Renders an arrow pointing to angle.
fnvoid renderBackground(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders the background of an element.
fnvoid renderBackgroundGetClip(gtk.style_context.StyleContext context, double x, double y, double width, double height, out gdk.rectangle.Rectangle outClip)Returns the area that will be affected (i.e. drawn to) when calling [gtk.global.renderBackground] for the given context and rectangle.
fnvoid renderCheck(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders a checkmark (as in a #GtkCheckButton).
fnvoid renderExpander(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders an expander (as used in #GtkTreeView and #GtkExpander) in the area defined by `x`, `y`, width, height. The state [gtk.types.StateFlags.Checked] determines whether the expander is collapsed ...
fnvoid renderExtension(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height, gtk.types.PositionType gapSide)Renders a extension (as in a #GtkNotebook tab) in the rectangle defined by `x`, `y`, width, height. The side where the extension connects to is defined by gap_side.
fnvoid renderFocus(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders a focus indicator on the rectangle determined by `x`, `y`, width, height.
fnvoid renderFrame(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders a frame around the rectangle defined by `x`, `y`, width, height.
fnvoid renderFrameGap(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height, gtk.types.PositionType gapSide, double xy0Gap, double xy1Gap)Renders a frame around the rectangle defined by (`x`, `y`, width, height), leaving a gap on one side. `x`y0gap and `x`y1gap will mean X coordinates for [gtk.types.PositionType.Top] and [gtk.types.P...
fnvoid renderHandle(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders a handle (as in #GtkHandleBox, #GtkPaned and #GtkWindow’s resize grip), in the rectangle determined by `x`, `y`, width, height.
fnvoid renderIcon(gtk.style_context.StyleContext context, cairo.context.Context cr, gdkpixbuf.pixbuf.Pixbuf pixbuf, double x, double y)Renders the icon in pixbuf at the specified `x` and `y` coordinates.
fngdkpixbuf.pixbuf.Pixbuf renderIconPixbuf(gtk.style_context.StyleContext context, gtk.icon_source.IconSource source, gtk.types.IconSize size)Renders the icon specified by source at the given size, returning the result in a pixbuf.
fnvoid renderIconSurface(gtk.style_context.StyleContext context, cairo.context.Context cr, cairo.surface.Surface surface, double x, double y)Renders the icon in surface at the specified `x` and `y` coordinates.
fnvoid renderInsertionCursor(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, pango.layout.Layout layout, int index, pango.types.Direction direction)Draws a text caret on cr at the specified index of layout.
fnvoid renderLayout(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, pango.layout.Layout layout)Renders layout on the coordinates `x`, `y`
fnvoid renderLine(gtk.style_context.StyleContext context, cairo.context.Context cr, double x0, double y0, double x1, double y1)Renders a line from (x0, y0) to (x1, y1).
fnvoid renderOption(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height)Renders an option mark (as in a #GtkRadioButton), the [gtk.types.StateFlags.Checked] state will determine whether the option is on or off, and [gtk.types.StateFlags.Inconsistent] whether it should ...
fnvoid renderSlider(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height, gtk.types.Orientation orientation)Renders a slider (as in #GtkScale) in the rectangle defined by `x`, `y`, width, height. orientation defines whether the slider is vertical or horizontal.
fnvoid rgbToHsv(double r, double g, double b, out double h, out double s, out double v)Converts a color from RGB space to HSV.
fnvoid selectionAddTarget(gtk.widget.Widget widget, gdk.atom.Atom selection, gdk.atom.Atom target, uint info)Appends a specified target to the list of supported targets for a given widget and selection.
fnvoid selectionAddTargets(gtk.widget.Widget widget, gdk.atom.Atom selection, gtk.target_entry.TargetEntry[] targets)Prepends a table of targets to the list of supported targets for a given widget and selection.
fnvoid selectionClearTargets(gtk.widget.Widget widget, gdk.atom.Atom selection)Remove all targets registered for the given selection for the widget.
fnbool selectionConvert(gtk.widget.Widget widget, gdk.atom.Atom selection, gdk.atom.Atom target, uint time)Requests the contents of a selection. When received, a “selection-received” signal will be generated.
fnbool selectionOwnerSet(gtk.widget.Widget widget, gdk.atom.Atom selection, uint time)Claims ownership of a given selection for a particular widget, or, if widget is null, release ownership of the selection.
fnbool selectionOwnerSetForDisplay(gdk.display.Display display, gtk.widget.Widget widget, gdk.atom.Atom selection, uint time)Claim ownership of a given selection for a particular widget, or, if widget is null, release ownership of the selection.
fnvoid selectionRemoveAll(gtk.widget.Widget widget)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.
fnvoid setDebugFlags(uint flags)Sets the GTK+ debug flags.
fnbool showUri(gdk.screen.Screen screen, string uri, uint timestamp)A convenience function for launching the default application to show the uri. Like [gtk.global.showUriOnWindow], but takes a screen as transient parent instead of a window.
fnbool showUriOnWindow(gtk.window.Window parent, string uri, uint timestamp)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 ...
fnstring[] stockListIds()Retrieves a list of all known stock IDs added to a #GtkIconFactory or registered with [gtk.global.stockAdd]. The list must be freed with [glib.slist.SList.free], and each string in the list must be...
fnbool stockLookup(string stockId, out gtk.stock_item.StockItem item)Fills item with the registered values for stockid, returning true if stockid was known.
fnvoid stockSetTranslateFunc(string domain, gtk.types.TranslateFunc func)Sets a function to be used for translating the label of a stock item.
fnvoid targetTableFree(gtk.target_entry.TargetEntry[] targets)This function frees a target table as returned by [gtk.global.targetTableNewFromList]
fngtk.target_entry.TargetEntry[] targetTableNewFromList(gtk.target_list.TargetList list)This function creates an #GtkTargetEntry array that contains the same targets as the passed `list`. The returned table is newly allocated and should be freed using [gtk.global.targetTableFree] when...
fngtk.widget.Widget testCreateSimpleWindow(string windowTitle, string dialogText)Create a simple window with window title windowtitle and text contents dialogtext. The window will quit any running [gtk.global.main_]-loop when destroyed, and it will automatically be destroyed up...
fngtk.widget.Widget testFindLabel(gtk.widget.Widget widget, string labelPattern)This function will search widget and all its descendants for a GtkLabel widget with a text string matching labelpattern. The labelpattern may contain asterisks “*” and question marks “?” as...
fngtk.widget.Widget testFindSibling(gtk.widget.Widget baseWidget, gobject.types.GType widgetType)This function will search siblings of basewidget and siblings of its ancestors for all widgets matching widgettype. Of the matching widgets, the one that is geometrically closest to base_widget wil...
fngtk.widget.Widget testFindWidget(gtk.widget.Widget widget, string labelPattern, gobject.types.GType widgetType)This function will search the descendants of widget for a widget of type widgettype that has a label matching labelpattern next to it. This is most useful for automated GUI testing, e.g. to find th...
fngobject.types.GType[] testListAllTypes()Return the type ids that have been registered after calling [gtk.global.testRegisterAllTypes]. Returns: 0-terminated array of type ids
fnvoid testRegisterAllTypes()Force registration of all core Gtk+ and Gdk object types. This allowes to refer to any of those object types via [gobject.global.typeFromName] after calling this function.
fndouble testSliderGetValue(gtk.widget.Widget widget)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 belo...
fnvoid testSliderSetPerc(gtk.widget.Widget widget, double percentage)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 ...
fnbool testSpinButtonClick(gtk.spin_button.SpinButton spinner, uint button, bool upwards)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.
fnstring testTextGet(gtk.widget.Widget widget)Retrive the text string of widget if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.
fnvoid testTextSet(gtk.widget.Widget widget, string string_)Set the text string of widget to string if it is a GtkLabel, GtkEditable (entry and text widgets) or GtkTextView.
fnbool testWidgetClick(gtk.widget.Widget widget, uint button, gdk.types.ModifierType modifiers)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 #GtkButton (which r...
fnbool testWidgetSendKey(gtk.widget.Widget widget, uint keyval, gdk.types.ModifierType modifiers)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 #GtkButton (which returns false from [gt...
fnvoid testWidgetWaitForDraw(gtk.widget.Widget widget)Enters the main loop and waits for widget to be “drawn”. In this context that means it waits for the frame clock of widget to have run a full styling, layout and drawing cycle.
fnbool treeGetRowDragData(gtk.selection_data.SelectionData selectionData, out gtk.tree_model.TreeModel treeModel, out gtk.tree_path.TreePath path)Obtains a treemodel and path from selection data of target type `GTKTREEMODELROW`. Normally called from a dragdatareceived handler. This function can only be used if selectiondata originates from t...
fnbool treeSetRowDragData(gtk.selection_data.SelectionData selectionData, gtk.tree_model.TreeModel treeModel, gtk.tree_path.TreePath path)Sets selection data of target type `GTKTREEMODELROW`. Normally used in a dragdata_get handler.
fnbool true_()All this function does it to return true.