gtk.global
Global functions for gtk4 library
fn acceleratorGetDefaultModMask acceleratorGetLabel acceleratorGetLabelWithKeycode acceleratorName acceleratorNameWithKeycode acceleratorParse acceleratorParseWithKeycode acceleratorValid checkVersion cssParserErrorQuark cssParserWarningQuark disableSetlocale distributeNaturalAllocation enumeratePrinters getBinaryAge getDebugFlags getDefaultLanguage getInterfaceAge getLocaleDirection getMajorVersion getMicroVersion getMinorVersion hsvToRgb init_ initCheck isInitialized paramSpecExpression printRunPageSetupDialog printRunPageSetupDialogAsync renderActivity renderArrow renderBackground renderCheck renderExpander renderFocus renderFrame renderHandle renderIcon renderLayout renderLine renderOption rgbToHsv setDebugFlags showUri showUriFull showUriFullFinish testAccessibleAssertionMessageRole testAccessibleHasProperty testAccessibleHasRelation testAccessibleHasRole testAccessibleHasState testListAllTypes testRegisterAllTypes testWidgetWaitForDraw treeCreateRowDragContent treeGetRowDragData valueDupExpression valueGetExpression valueSetExpression valueTakeExpression
Functions 60
fn
string acceleratorGetLabel(uint acceleratorKey, gdk.types.ModifierType acceleratorMods) nothrowConverts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.fn
string acceleratorGetLabelWithKeycode(gdk.display.Display display, uint acceleratorKey, uint keycode, gdk.types.ModifierType acceleratorMods) nothrowConverts an accelerator keyval and modifier mask into a string that can be displayed to the user.fn
string acceleratorName(uint acceleratorKey, gdk.types.ModifierType acceleratorMods) nothrowConverts an accelerator keyval and modifier mask into a string parseable by [gtk.global.acceleratorParse].fn
string acceleratorNameWithKeycode(gdk.display.Display display, uint acceleratorKey, uint keycode, gdk.types.ModifierType acceleratorMods) nothrowConverts an accelerator keyval and modifier mask into a string parseable by [gtk.global.acceleratorParseWithKeycode].fn
bool acceleratorParse(string accelerator, out uint acceleratorKey, out gdk.types.ModifierType acceleratorMods) nothrowParses a string representing an accelerator.fn
bool acceleratorParseWithKeycode(string accelerator, gdk.display.Display display, out uint acceleratorKey, out uint[] acceleratorCodes, out gdk.types.ModifierType acceleratorMods) nothrowParses a string representing an accelerator.fn
bool acceleratorValid(uint keyval, gdk.types.ModifierType modifiers) nothrowDetermines whether a given keyval and modifier mask constitute a valid keyboard accelerator.fn
string checkVersion(uint requiredMajor, uint requiredMinor, uint requiredMicro) nothrowChecks that the GTK library in use is compatible with the given version.fn
void disableSetlocale() nothrowPrevents `funcGtk.init` and `funcGtk.init_check` from automatically calling `setlocale (LC_ALL, "")`.fn
int distributeNaturalAllocation(int extraSpace, gtk.types.RequestedSize[] sizes) nothrowDistributes extra_space to child sizes by bringing smaller children up to natural size first.fn
void enumeratePrinters(gtk.types.PrinterFunc func, bool wait) nothrowCalls a function for all [gtk.printer.Printer]s.fn
gtk.types.DebugFlags getDebugFlags() nothrowReturns the GTK debug flags that are currently active.fn
pango.language.Language getDefaultLanguage() nothrowReturns the [pango.language.Language] for the default language currently in effect.fn
gtk.types.TextDirection getLocaleDirection() nothrowGet the direction of the current locale. This is the expected reading direction for text and UI.fn
void hsvToRgb(float h, float s, float v, out float r, out float g, out float b) nothrowConverts a color from HSV space to RGB.fn
void init_() nothrowCall this function before using any other GTK functions in your GUI applications. It will initialize everything needed to operate the toolkit.fn
bool initCheck() nothrowThis function does the same work as [gtk.global.init_] with only a single change: It does not terminate the program if the windowing system can’t be initialized. Instead it returns false on failure.fn
gobject.param_spec.ParamSpec paramSpecExpression(string name, string nick, string blurb, gobject.types.ParamFlags flags) nothrowCreates a new [gobject.param_spec.ParamSpec] instance for a property holding a [gtk.expression.Expression].fn
gtk.page_setup.PageSetup printRunPageSetupDialog(gtk.window.Window parent, gtk.page_setup.PageSetup pageSetup, gtk.print_settings.PrintSettings settings) nothrowRuns a page setup dialog, letting the user modify the values from page_setup. If the user cancels the dialog, the returned [gtk.page_setup.PageSetup] is identical to the passed in page_setup, other...fn
void printRunPageSetupDialogAsync(gtk.window.Window parent, gtk.page_setup.PageSetup pageSetup, gtk.print_settings.PrintSettings settings, gtk.types.PageSetupDoneFunc doneCb) nothrowRuns a page setup dialog, letting the user modify the values from page_setup.fn
void renderActivity(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders an activity indicator (such as in [gtk.spinner.Spinner]). The state [gtk.types.StateFlags.Checked] determines whether there is activity going on.fn
void renderArrow(gtk.style_context.StyleContext context, cairo.context.Context cr, double angle, double x, double y, double size) nothrowRenders an arrow pointing to angle.fn
void renderBackground(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders the background of an element.fn
void renderCheck(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders a checkmark (as in a [gtk.check_button.CheckButton]).fn
void renderExpander(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders an expander (as used in [gtk.tree_view.TreeView] and [gtk.expander.Expander]) in the area defined by `x`, `y`, width, height. The state [gtk.types.StateFlags.Checked] determines whether the...fn
void renderFocus(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders a focus indicator on the rectangle determined by `x`, `y`, width, height.fn
void renderFrame(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders a frame around the rectangle defined by `x`, `y`, width, height.fn
void renderHandle(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders a handle (as in [gtk.paned.Paned] and [gtk.window.Window]’s resize grip), in the rectangle determined by `x`, `y`, width, height.fn
void renderIcon(gtk.style_context.StyleContext context, cairo.context.Context cr, gdk.texture.Texture texture, double x, double y) nothrowRenders the icon in texture at the specified `x` and `y` coordinates.fn
void renderLayout(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, pango.layout.Layout layout) nothrowRenders layout on the coordinates `x`, `y`fn
void renderLine(gtk.style_context.StyleContext context, cairo.context.Context cr, double x0, double y0, double x1, double y1) nothrowRenders a line from (x0, y0) to (x1, y1).fn
void renderOption(gtk.style_context.StyleContext context, cairo.context.Context cr, double x, double y, double width, double height) nothrowRenders an option mark (as in a radio button), the [gtk.types.StateFlags.Checked] state will determine whether the option is on or off, and [gtk.types.StateFlags.Inconsistent] whether it should be ...fn
void rgbToHsv(float r, float g, float b, out float h, out float s, out float v) nothrowConverts a color from RGB space to HSV.fn
void showUri(gtk.window.Window parent, string uri, uint timestamp) nothrowThis function launches the default application for showing a given uri, or shows an error dialog if that fails.fn
void showUriFull(gtk.window.Window parent, string uri, uint timestamp, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null) nothrowThis function launches the default application for showing a given uri.fn
bool showUriFullFinish(gtk.window.Window parent, gio.async_result.AsyncResult result)Finishes the [gtk.global.showUri] call and returns the result of the operation.fn
void testAccessibleAssertionMessageRole(string domain, string file, int line, string func, string expr, gtk.accessible.Accessible accessible, gtk.types.AccessibleRole expectedRole, gtk.types.AccessibleRole actualRole) nothrowfn
bool testAccessibleHasProperty(gtk.accessible.Accessible accessible, gtk.types.AccessibleProperty property) nothrowChecks whether the [gtk.accessible.Accessible] has property set.fn
bool testAccessibleHasRelation(gtk.accessible.Accessible accessible, gtk.types.AccessibleRelation relation) nothrowChecks whether the [gtk.accessible.Accessible] has relation set.fn
bool testAccessibleHasRole(gtk.accessible.Accessible accessible, gtk.types.AccessibleRole role) nothrowChecks whether the `GtkAccessible:accessible-role` of the accessible is role.fn
bool testAccessibleHasState(gtk.accessible.Accessible accessible, gtk.types.AccessibleState state) nothrowChecks whether the [gtk.accessible.Accessible] has state set.fn
gobject.types.GType[] testListAllTypes() nothrowReturn the type ids that have been registered after calling [gtk.global.testRegisterAllTypes]. Returns: 0-terminated array of type idsfn
void testWidgetWaitForDraw(gtk.widget.Widget widget) nothrowEnters the main loop and waits for widget to be “drawn”.fn
gdk.content_provider.ContentProvider treeCreateRowDragContent(gtk.tree_model.TreeModel treeModel, gtk.tree_path.TreePath path) nothrowCreates a content provider for dragging path from tree_model.fn
bool treeGetRowDragData(gobject.value.Value value, out gtk.tree_model.TreeModel treeModel, out gtk.tree_path.TreePath path) nothrowObtains a tree_model and path from value of target type `GTK_TYPE_TREE_ROW_DATA`.fn
gtk.expression.Expression valueDupExpression(gobject.value.Value value) nothrowRetrieves the [gtk.expression.Expression] stored inside the given `value`, and acquires a reference to it.fn
gtk.expression.Expression valueGetExpression(gobject.value.Value value) nothrowRetrieves the [gtk.expression.Expression] stored inside the given `value`.fn
void valueSetExpression(gobject.value.Value value, gtk.expression.Expression expression) nothrowStores the given [gtk.expression.Expression] inside `value`.fn
void valueTakeExpression(gobject.value.Value value, gtk.expression.Expression expression = null) nothrowStores the given [gtk.expression.Expression] inside `value`.