7 Functions

Procedure: accelerator-get-accessible-label accelerator-key accelerator-mods ⇒ %return

Generates an accessible description of an accelerator.

This function is similar to accelerator-get-label but it is meant for accessibility layers labels rather than user-facing labels. The output of this function is fit for Gtk.AccessibleProperty.KEY_SHORTCUTS.

For more information, see the WAI-ARIA reference.

accelerator-key

Passed: an unsigned 32-bit integer.

accelerator keyval

accelerator-mods

Passed: a <GdkModifierType>, or a list of its symbols, or one of them.

accelerator modifier mask

%return

Returned: a string.

a newly-allocated string representing the accelerator

Procedure: accelerator-get-default-mod-mask ⇒ %return

Gets the modifier mask.

The modifier mask determines which modifiers are considered significant for keyboard accelerators. This includes all keyboard modifiers except for lock-mask.

%return

Returned: a <GdkModifierType>.

the modifier mask for accelerators

Procedure: accelerator-get-label accelerator-key accelerator-mods ⇒ %return

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

accelerator-key

Passed: an unsigned 32-bit integer.

accelerator keyval

accelerator-mods

Passed: a <GdkModifierType>, or a list of its symbols, or one of them.

accelerator modifier mask

%return

Returned: a string.

a newly-allocated string representing the accelerator

Procedure: accelerator-get-label-with-keycode display accelerator-key keycode accelerator-mods ⇒ %return

Converts an accelerator keyval and modifier mask into a string that can be displayed to the user.

The string may be translated.

This function is similar to accelerator-get-label, but handling keycodes. This is only useful for system-level components, applications should use accelerator-get-label instead.

display

Passed: a <GdkDisplay>, or #f.

a <GdkDisplay>

accelerator-key

Passed: an unsigned 32-bit integer.

accelerator keyval

keycode

Passed: an unsigned 32-bit integer.

accelerator keycode

accelerator-mods

Passed: a <GdkModifierType>, or a list of its symbols, or one of them.

accelerator modifier mask

%return

Returned: a string.

a newly-allocated string representing the accelerator

Procedure: accelerator-name accelerator-key accelerator-mods ⇒ %return

Converts an accelerator keyval and modifier mask into a string that can be parsed by accelerator-parse.

For example, if you pass in GDK_KEY_q and control-mask, this function returns <Control>q.

If you need to display accelerators in the user interface, see accelerator-get-label.

accelerator-key

Passed: an unsigned 32-bit integer.

accelerator keyval

accelerator-mods

Passed: a <GdkModifierType>, or a list of its symbols, or one of them.

accelerator modifier mask

%return

Returned: a string.

a newly-allocated accelerator name

Procedure: accelerator-name-with-keycode display accelerator-key keycode accelerator-mods ⇒ %return

Converts an accelerator keyval and modifier mask into a string that can be parsed by accelerator-parse-with-keycode.

This is similar to accelerator-name but handling keycodes. This is only useful for system-level components, applications should use accelerator-name instead.

display

Passed: a <GdkDisplay>, or #f.

a <GdkDisplay>

accelerator-key

Passed: an unsigned 32-bit integer.

accelerator keyval

keycode

Passed: an unsigned 32-bit integer.

accelerator keycode

accelerator-mods

Passed: a <GdkModifierType>, or a list of its symbols, or one of them.

accelerator modifier mask

%return

Returned: a string.

a newly allocated accelerator name.

Procedure: accelerator-parse accelerator ⇒ %return accelerator-key accelerator-mods

Parses a string representing an accelerator.

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

The parser is fairly liberal and allows lower or upper case, and also abbreviations such as “‘<Ctl>” and “<Ctrl>”. Key names are parsed using [func@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>-”. Modifiers are enclosed in angular brackets <>, and match the [flags@Gdk.ModifierType] mask: - <Shift> for GDK_SHIFT_MASK‘

If the parse operation fails, accelerator-key and accelerator-mods will be set to 0 (zero).

accelerator

Passed: a string.

string representing an accelerator

%return

Returned: a boolean.

whether parsing succeeded

accelerator-key

Returned: an unsigned 32-bit integer.

return location for accelerator keyval

accelerator-mods

Returned: a <GdkModifierType>.

return location for accelerator modifier mask

Procedure: accelerator-parse-with-keycode accelerator [display] ⇒ %return accelerator-key accelerator-codes accelerator-mods

Parses a string representing an accelerator.

This is similar to accelerator-parse but handles keycodes as well. This is only useful for system-level components, applications should use accelerator-parse instead.

If accelerator-codes is given and the result stored in it is non-#f, the result must be freed with byte-array: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

Passed: a string.

string representing an accelerator

display

Passed, or left out: a <GdkDisplay>, or #f.

the <GdkDisplay> to look up accelerator-codes in

%return

Returned: a boolean.

true if parsing succeeded

accelerator-key

Returned: an unsigned 32-bit integer.

return location for accelerator keyval

accelerator-codes

Returned: an u32vector.

return location for accelerator keycodes

accelerator-mods

Returned: a <GdkModifierType>.

return location for accelerator modifier mask

Procedure: accelerator-valid? keyval modifiers ⇒ %return

Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.

For example, the GDK_KEY_a keyval plus control-mask mask is valid, and matches the “Ctrl+a” accelerator. But, you can’t, for instance, use the GDK_KEY_Control_L keyval as an accelerator.

keyval

Passed: an unsigned 32-bit integer.

a GDK keyval

modifiers

Passed: a <GdkModifierType>, or a list of its symbols, or one of them.

modifier mask

%return

Returned: a boolean.

true if the accelerator is valid

Procedure: accessible-property-init-value property value

Initializes value with the appropriate type for the property.

This function is mostly meant for language bindings, in conjunction with gtk_accessible_update_property_value().

property

Passed: a <GtkAccessibleProperty>, or one of its symbols.

a <GtkAccessibleProperty>

value

Passed: a <GValue>.

an uninitialized <GValue>

Procedure: accessible-relation-init-value relation value

Initializes value with the appropriate type for the relation.

This function is mostly meant for language bindings, in conjunction with gtk_accessible_update_relation_value().

relation

Passed: a <GtkAccessibleRelation>, or one of its symbols.

a <GtkAccessibleRelation>

value

Passed: a <GValue>.

an uninitialized <GValue>

Procedure: accessible-state-init-value state value

Initializes value with the appropriate type for the state.

This function is mostly meant for language bindings, in conjunction with gtk_accessible_update_relation_state().

state

Passed: a <GtkAccessibleState>, or one of its symbols.

a <GtkAccessibleState>

value

Passed: a <GValue>.

an uninitialized <GValue>

Procedure: bitset-iter-init-at! iter set target ⇒ %return iter value

Initializes iter to point to target.

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

iter

Passed, filled in, and returned: a <GtkBitsetIter>.

a pointer to an uninitialized <GtkBitsetIter>

set

Passed: a <GtkBitset>.

a <GtkBitset>

target

Passed: an unsigned 32-bit integer.

target value to start iterating at

%return

Returned: a boolean.

#t if a value was found.

value

Returned: an unsigned 32-bit integer.

Set to the found value in set

Procedure: bitset-iter-init-first! iter set ⇒ %return iter value

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

If set is empty, #f is returned and value is set to G_MAXUINT.

iter

Passed, filled in, and returned: a <GtkBitsetIter>.

a pointer to an uninitialized <GtkBitsetIter>

set

Passed: a <GtkBitset>.

a <GtkBitset>

%return

Returned: a boolean.

#t if set isn’t empty.

value

Returned: an unsigned 32-bit integer.

Set to the first value in set

Procedure: bitset-iter-init-last! iter set ⇒ %return iter value

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

If set is empty, #f is returned.

iter

Passed, filled in, and returned: a <GtkBitsetIter>.

a pointer to an uninitialized <GtkBitsetIter>

set

Passed: a <GtkBitset>.

a <GtkBitset>

%return

Returned: a boolean.

#t if set isn’t empty.

value

Returned: an unsigned 32-bit integer.

Set to the last value in set

Procedure: builder-error-quark ⇒ %return

Registers an error quark for <GtkBuilder> errors.

%return

Returned: an unsigned 32-bit integer.

the error quark

Procedure: check-version required-major required-minor required-micro ⇒ %return

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 check-version, but still get loaded into an application using a newer version of GTK.

required-major

Passed: an unsigned 32-bit integer.

the required major version

required-minor

Passed: an unsigned 32-bit integer.

the required minor version

required-micro

Passed: an unsigned 32-bit integer.

the required micro version

%return

Returned: a string, or #f.

#f if the GTK library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by GTK and should not be modified or freed.

Procedure: constraint-vfl-parser-error-quark ⇒ %return

Registers an error quark for VFL error parsing.

%return

Returned: an unsigned 32-bit integer.

the error quark

Procedure: css-parser-error-quark ⇒ %return

Registers an error quark for CSS parsing errors.

%return

Returned: an unsigned 32-bit integer.

the error quark

Procedure: css-parser-warning-quark ⇒ %return

Registers an error quark for CSS parsing warnings.

%return

Returned: an unsigned 32-bit integer.

the warning quark

Procedure: dialog-error-quark ⇒ %return

Registers an error quark for an operation that requires a dialog if necessary.

%return

Returned: an unsigned 32-bit integer.

the error quark

Procedure: disable-portal-interfaces portal-interfaces

Prevents GTK from using the specified portals.

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

portal-interfaces

Passed: a list or vector, each a string.

a #f-terminated array of portal interface names to disable

Procedure: disable-portals

Prevents GTK from using portals.

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

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

Procedure: disable-setlocale

Prevents init and init-check? from calling setlocale().

You would want to use this function if you wanted to set the locale for your program to something other than the user’s locale, or if you wanted to set different values for different locale categories.

Most programs should not need to call this function.

Procedure: distribute-natural-allocation extra-space sizes ⇒ %return

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.

extra-space

Passed: a 32-bit integer.

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

sizes

Passed: a list or vector, each a <GtkRequestedSize>.

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

%return

Returned: a 32-bit integer.

The remainder of extra-space after redistributing space to sizes.

n-requested-sizes

Not passed: guile-gi gives the length of sizes.

Number of requests to fit into the allocation

Procedure: editable-delegate-get-property? object prop-id value pspec ⇒ %return

Gets a property of the <GtkEditable> delegate for object.

This is helper function that should be called in the get_property function of your <GtkEditable> implementation, before handling your own properties.

object

Passed: a <GObject>.

a <GObject>

prop-id

Passed: an unsigned 32-bit integer.

a property ID

value

Passed: a <GValue>.

value to set

pspec

Passed: a <GParam>.

the <GParam> for the property

%return

Returned: a boolean.

#t if the property was found

Procedure: editable-delegate-set-property? object prop-id value pspec ⇒ %return

Sets a property on the <GtkEditable> delegate for object.

This is a helper function that should be called in the set_property function of your <GtkEditable> implementation, before handling your own properties.

object

Passed: a <GObject>.

a <GObject>

prop-id

Passed: an unsigned 32-bit integer.

a property ID

value

Passed: a <GValue>.

value to set

pspec

Passed: a <GParam>.

the <GParam> for the property

%return

Returned: a boolean.

#t if the property was found

Procedure: enumerate-printers func wait

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

If func returns true, the enumeration is stopped.

func

Passed: a procedure.

a function to call for each printer

See GtkPrinterFunc for how it is called.

wait

Passed: a boolean.

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

data

Not passed: guile-gi supplies it.

user data to pass to func

destroy

Not passed: guile-gi supplies it.

function to call if data is no longer needed

See GDestroyNotify for how it is called.

Procedure: file-chooser-error-quark ⇒ %return

Registers an error quark for GtkFileChooser errors.

%return

Returned: an unsigned 32-bit integer.

The error quark used for GtkFileChooser errors.

Procedure: get-binary-age ⇒ %return

Returns the binary age as passed to libtool.

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

%return

Returned: an unsigned 32-bit integer.

the binary age of the GTK library

Procedure: get-debug-flags ⇒ %return

Returns the GTK debug flags that are currently active.

This function is intended for GTK modules that want to adjust their debug output based on GTK debug flags.

%return

Returned: a <GtkDebugFlags>.

the GTK debug flags.

Procedure: get-default-language ⇒ %return

Returns the <PangoLanguage> for the default language currently in effect.

Note that this can change over the life of an application.

The default language is derived from the current locale. It determines, for example, whether GTK uses the right-to-left or left-to-right text direction.

This function is equivalent to language:get-default. See that function for details.

%return

Returned: a <PangoLanguage>.

the default language

Procedure: get-interface-age ⇒ %return

Returns the interface age as passed to libtool.

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

%return

Returned: an unsigned 32-bit integer.

the interface age of the GTK library

Procedure: get-locale-direction ⇒ %return

Gets the direction of the current locale.

This is the expected reading direction for text and UI.

This function depends on the current locale being set with setlocale() and will default to setting the ltr direction otherwise. none will never be returned.

GTK sets the default text direction according to the locale during init, and you should normally use widget:get-direction or widget:get-default-direction to obtain the current direction.

This function is only needed rare cases when the locale is changed after GTK has already been initialized. In this case, you can use it to update the default text direction as follows:

#include <locale.h>

static void
update_locale (const char *new_locale)
{
  setlocale (LC_ALL, new_locale);
  gtk_widget_set_default_direction (gtk_get_locale_direction ());
}
%return

Returned: a <GtkTextDirection>.

the direction of the current locale

Procedure: get-major-version ⇒ %return

Returns the major version number of the GTK library.

For example, in GTK version 3.1.5 this is 3.

This function is in the library, so it represents the GTK library your code is running against. Contrast with the GTK_MAJOR_VERSION macro, which represents the major version of the GTK headers you have included when compiling your code.

%return

Returned: an unsigned 32-bit integer.

the major version number of the GTK library

Procedure: get-micro-version ⇒ %return

Returns the micro version number of the GTK library.

For example, in GTK version 3.1.5 this is 5.

This function is in the library, so it represents the GTK library your code is are running against. Contrast with the GTK_MICRO_VERSION macro, which represents the micro version of the GTK headers you have included when compiling your code.

%return

Returned: an unsigned 32-bit integer.

the micro version number of the GTK library

Procedure: get-minor-version ⇒ %return

Returns the minor version number of the GTK library.

For example, in GTK version 3.1.5 this is 1.

This function is in the library, so it represents the GTK library your code is are running against. Contrast with the GTK_MINOR_VERSION macro, which represents the minor version of the GTK headers you have included when compiling your code.

%return

Returned: an unsigned 32-bit integer.

the minor version number of the GTK library

Procedure: hsv-to-rgb h s v ⇒ r g b

Converts a color from HSV space to RGB.

Input values must be in the [0.0, 1.0] range; output values will be in the same range.

h

Passed: a real number.

Hue

s

Passed: a real number.

Saturation

v

Passed: a real number.

Value

r

Returned: a real number.

Return value for the red component

g

Returned: a real number.

Return value for the green component

b

Returned: a real number.

Return value for the blue component

Procedure: icon-theme-error-quark ⇒ %return

Registers an error quark for <GtkIconTheme> errors.

%return

Returned: an unsigned 32-bit integer.

the error quark

Procedure: init

Initializes GTK.

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

It will initialize everything needed to operate the toolkit. In particular, it will open the default display (see display:get-default).

If you are using <GtkApplication>, you usually don’t have to call this function; the application:do-startup handler does it for you. Though, if you are using <GApplication> methods that will be invoked before startup, such as local_command_line, you may need to initialize GTK explicitly.

This function will terminate your program if it was unable to initialize the windowing system for some reason. If you want your program to fall back to a textual interface, call init-check? instead.

GTK calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore SIGPIPE signals, since these are almost never wanted in graphical applications. If you do need to handle SIGPIPE for some reason, reset the handler after init, but notice that other libraries (e.g. libdbus or gvfs) might do similar things.

Procedure: init-check? ⇒ %return

Initializes GTK.

This function does the same work as init with only a single change: It does not terminate the program if the windowing system can’t be initialized. Instead it returns false on failure.

This way the application can fall back to some other means of communication with the user - for example a curses or command line interface.

%return

Returned: a boolean.

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

Procedure: is-initialized? ⇒ %return

Returns whether GTK has been initialized.

See init.

%return

Returned: a boolean.

the initialization status

Procedure: native-get-for-surface surface ⇒ %return

Finds the <GtkNative> associated with the surface.

surface

Passed: a <GdkSurface>.

a <GdkSurface>

%return

Returned: a <GtkNative>, or #f.

the <GtkNative> that is associated with surface

Procedure: paper-size-get-default ⇒ %return

Returns the name of the default paper size, which depends on the current locale.

%return

Returned: a string.

the name of the default paper size. The string is owned by GTK and should not be modified.

Procedure: paper-size-get-paper-sizes include-custom ⇒ %return

Creates a list of known paper sizes.

include-custom

Passed: a boolean.

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

%return

Returned: a list, each a <GtkPaperSize>.

a newly allocated list of newly allocated <GtkPaperSize> objects

Procedure: param-spec-expression name nick blurb flags ⇒ %return

Creates a new <GParam> instance for a property holding a <GtkExpression>.

See g_param_spec_internal() for details on the property strings.

name

Passed: a string.

canonical name of the property

nick

Passed: a string.

a user-readable name for the property

blurb

Passed: a string.

a user-readable description of the property

flags

Passed: a <%GParamFlags>, or a list of its symbols, or one of them.

flags for the property

%return

Returned: a <GParam>.

a newly created property specification

Procedure: print-error-quark ⇒ %return

Registers an error quark for <GtkPrintOperation> if necessary.

%return

Returned: an unsigned 32-bit integer.

The error quark used for <GtkPrintOperation> errors.

Procedure: print-run-page-setup-dialog parent page-setup settings ⇒ %return

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

If the user cancels the dialog, the returned <GtkPageSetup> is identical to the passed in page-setup, otherwise it contains the modifications done in the dialog.

Note that this function may use a recursive mainloop to show the page setup dialog. See print-run-page-setup-dialog-async if this is a problem.

parent

Passed: a <GtkWindow>, or #f.

transient parent

page-setup

Passed: a <GtkPageSetup>, or #f.

an existing <GtkPageSetup>

settings

Passed: a <GtkPrintSettings>.

a <GtkPrintSettings>

%return

Returned: a <GtkPageSetup>.

a new <GtkPageSetup>

Procedure: print-run-page-setup-dialog-async parent page-setup settings done-cb

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

In contrast to 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.

parent

Passed: a <GtkWindow>, or #f.

transient parent

page-setup

Passed: a <GtkPageSetup>, or #f.

an existing <GtkPageSetup>

settings

Passed: a <GtkPrintSettings>.

a <GtkPrintSettings>

done-cb

Passed: a procedure.

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

See GtkPageSetupDoneFunc for how it is called.

data

Not passed: guile-gi supplies it.

user data to pass to done-cb

Procedure: recent-manager-error-quark ⇒ %return

Registers an error quark for RecentManager errors.

%return

Returned: an unsigned 32-bit integer.

the error quark

Procedure: rgb-to-hsv r g b ⇒ h s v

Converts a color from RGB space to HSV.

Input values must be in the [0.0, 1.0] range; output values will be in the same range.

r

Passed: a real number.

Red

g

Passed: a real number.

Green

b

Passed: a real number.

Blue

h

Returned: a real number.

Return value for the hue component

s

Returned: a real number.

Return value for the saturation component

v

Returned: a real number.

Return value for the value component

Procedure: set-debug-flags flags

Sets the GTK debug flags.

flags

Passed: a <GtkDebugFlags>, or a list of its symbols, or one of them.

the debug flags to set

Procedure: svg-error-get-attribute error ⇒ %return

Returns context information about what XML attribute the parsing error occurred in.

error

Passed: a <GError>.

an error in the <GtkSvgError> domain

%return

Returned: a string, or #f.

the attribute name

Procedure: svg-error-get-element error ⇒ %return

Returns context information about what XML element the parsing error occurred in.

error

Passed: a <GError>.

an error in the <GtkSvgError> domain

%return

Returned: a string, or #f.

the element name

Procedure: svg-error-quark ⇒ %return
%return

Returned: an unsigned 32-bit integer.

Procedure: test-accessible-assertion-message-role domain file line func expr accessible expected-role actual-role

Prints an assertion message for gtk_test_accessible_assert_role().

domain

Passed: a string.

a domain

file

Passed: a string.

a file name

line

Passed: a 32-bit integer.

the line in file

func

Passed: a string.

a function name in file

expr

Passed: a string.

the expression being tested

accessible

Passed: a <GtkAccessible>.

a <GtkAccessible>

expected-role

Passed: a <GtkAccessibleRole>, or one of its symbols.

the expected <GtkAccessibleRole>

actual-role

Passed: a <GtkAccessibleRole>, or one of its symbols.

the actual <GtkAccessibleRole>

Procedure: test-accessible-has-property? accessible property ⇒ %return

Checks whether the <GtkAccessible> has property set.

accessible

Passed: a <GtkAccessible>.

a <GtkAccessible>

property

Passed: a <GtkAccessibleProperty>, or one of its symbols.

a <GtkAccessibleProperty>

%return

Returned: a boolean.

#t if the property is set in the accessible

Procedure: test-accessible-has-relation? accessible relation ⇒ %return

Checks whether the <GtkAccessible> has relation set.

accessible

Passed: a <GtkAccessible>.

a <GtkAccessible>

relation

Passed: a <GtkAccessibleRelation>, or one of its symbols.

a <GtkAccessibleRelation>

%return

Returned: a boolean.

#t if the relation is set in the accessible

Procedure: test-accessible-has-role? accessible role ⇒ %return

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

accessible

Passed: a <GtkAccessible>.

a <GtkAccessible>

role

Passed: a <GtkAccessibleRole>, or one of its symbols.

a <GtkAccessibleRole>

%return

Returned: a boolean.

#t if the role matches

Procedure: test-accessible-has-state? accessible state ⇒ %return

Checks whether the <GtkAccessible> has state set.

accessible

Passed: a <GtkAccessible>.

a <GtkAccessible>

state

Passed: a <GtkAccessibleState>, or one of its symbols.

a <GtkAccessibleState>

%return

Returned: a boolean.

#t if the state is set in the accessible

Procedure: test-list-all-types ⇒ %return

Return the type ids that have been registered after calling test-register-all-types.

%return

Returned: a vector, each a class, or a GType number.

0-terminated array of type ids

n-types

Not returned: it is the length of %return.

location to store number of types

Procedure: test-register-all-types

Force registration of all core GTK object types.

This allows to refer to any of those object types via type-from-name after calling this function.

Procedure: test-widget-wait-for-draw widget

Enters the main loop and waits for widget to be “drawn”.

In this context that means it waits for the frame clock of widget to have run a full styling, layout and drawing cycle.

This function is intended to be used for syncing with actions that depend on widget relayouting or on interaction with the display server.

widget

Passed: a <GtkWidget>.

the widget to wait for

Procedure: value-dup-expression value ⇒ %return

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

value

Passed: a <GValue>.

a <GValue> initialized with type GTK_TYPE_EXPRESSION

%return

Returned: a <GtkExpression>, or #f.

a <GtkExpression>

Procedure: value-get-expression value ⇒ %return

Retrieves the <GtkExpression> stored inside the given value.

value

Passed: a <GValue>.

a <GValue> initialized with type GTK_TYPE_EXPRESSION

%return

Returned: a <GtkExpression>, or #f.

a <GtkExpression>

Procedure: value-set-expression value expression

Stores the given <GtkExpression> inside value.

The <GValue> will acquire a reference to the expression.

value

Passed: a <GValue>.

a <GValue> initialized with type GTK_TYPE_EXPRESSION

expression

Passed: a <GtkExpression>.

a <GtkExpression>

Procedure: value-take-expression value [expression]

Stores the given <GtkExpression> inside value.

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

value

Passed: a <GValue>.

a <GValue> initialized with type GTK_TYPE_EXPRESSION

expression

Passed, or left out: a <GtkExpression>, or #f.

a <GtkExpression>