Adds the given rectangle to the current path of cr.
Passed: a <CairoContext>.
a cairo context
Passed: a <GdkRectangle>.
Adds the given region to the current path of cr.
Passed: a <CairoContext>.
a cairo context
Passed: a <CairoRegion>.
Creates region that covers the area where the given surface is more than 50% opaque.
This function takes into account device offsets that might be set with
cairo_surface_set_device_offset().
Passed: a <CairoSurface>.
a cairo surface
Returned: a <CairoRegion>.
Sets the specified <GdkRGBA> as the source color of
cr.
Passed: a <CairoContext>.
a cairo context
Passed: a <GdkRGBA>.
Returns the color state object representing the oklab color space.
This is a perceptually uniform color state.
Returned: a <GdkColorState>.
the color state object for oklab
Returns the color state object representing the oklch color space.
This is the polar variant of oklab, in which the hue is encoded as a polar coordinate.
Returned: a <GdkColorState>.
the color state object for oklch
Returns the color state object representing the linear rec2100 color space.
This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and a linear transfer function.
It is equivalent to the Cicp tuple 9/8/0/1.
See e.g. the CSS HDR Module for details about this colorstate.
Returned: a <GdkColorState>.
the color state object for linearized rec2100
Returns the color state object representing the rec2100-pq color space.
This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and the transfer function defined by SMPTE ST 2084 and BT.2100-2.
It is equivalent to the Cicp tuple 9/16/0/1.
See e.g. the CSS HDR Module for details about this colorstate.
Returned: a <GdkColorState>.
the color state object for rec2100-pq
Returns the color state object representing the sRGB color space.
This color state uses the primaries defined by BT.709-6 and the transfer function defined by IEC 61966-2-1.
It is equivalent to the Cicp tuple 1/13/0/1.
See e.g. the CSS Color Module for details about this colorstate.
Returned: a <GdkColorState>.
the color state object for sRGB
Returns the color state object representing the linearized sRGB color space.
This color state uses the primaries defined by BT.709-6 and a linear transfer function.
It is equivalent to the Cicp tuple 1/8/0/1.
See e.g. the CSS Color Module for details about this colorstate.
Returned: a <GdkColorState>.
the color state object for linearized sRGB
Reads content from the given input stream and deserialize it, asynchronously.
The default I/O priority is G_PRIORITY_DEFAULT (i.e. 0), and
lower numbers indicate a higher priority.
Passed: a <GInputStream>.
a <GInputStream> to read the serialized
content from
Passed: a string.
the mime type to deserialize from
Passed: a class, or a GType number.
the GType to deserialize from
Passed: a 32-bit integer.
the I/O priority of the operation
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object
Passed, or left out: a procedure, or #f.
callback to call when the operation is done
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to the callback function
Finishes a content deserialization operation.
Passed: a <GAsyncResult>.
the <GAsyncResult>
Passed, filled in, and returned: a <GValue>.
return location for the result of the operation
Returned: a boolean.
#t if the operation was successful. In this case, value is
set. #f if an error occurred. In this case, error is set
Parses the given string into
<GdkContentFormats> and returns the
formats.
Strings printed via content-formats:to-string can be read in again successfully
using this function.
If string does not describe valid content formats, #f is
returned.
Passed: a string.
the string to parse
Returned: a <GdkContentFormats>, or
#f.
the content formats if string is valid
Registers a function to deserialize object of a given type.
Since 4.20, when looking up a deserializer to use, GTK will use the last registered deserializer for a given mime type, so applications can override the built-in deserializers.
Passed: a string.
the mime type which the function can deserialize from
Passed: a class, or a GType number.
the type of objects that the function creates
Passed: a procedure.
the callback
See GdkContentDeserializeFunc for
how it is called.
Not passed: guile-gi supplies it.
data that deserialize can access
Not passed: guile-gi supplies it.
destroy notify for data
See GDestroyNotify for how it is
called.
Registers a function to serialize objects of a given type.
Since 4.20, when looking up a serializer to use, GTK will use the last registered serializer for a given mime type, so applications can override the built-in serializers.
Passed: a class, or a GType number.
the type of objects that the function can serialize
Passed: a string.
the mime type to serialize to
Passed: a procedure.
the callback
See GdkContentSerializeFunc for how
it is called.
Not passed: guile-gi supplies it.
data that serialize can access
Not passed: guile-gi supplies it.
destroy notify for data
See GDestroyNotify for how it is
called.
Serialize content and write it to the given output stream, asynchronously.
The default I/O priority is G_PRIORITY_DEFAULT (i.e. 0), and
lower numbers indicate a higher priority.
Passed: a <GOutputStream>.
a <GOutputStream> to write the serialized
content to
Passed: a string.
the mime type to serialize to
Passed: a <GValue>.
the content to serialize
Passed: a 32-bit integer.
the I/O priority of the operation
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object
Passed, or left out: a procedure, or #f.
callback to call when the operation is done
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to the callback function
Finishes a content serialization operation.
Passed: a <GAsyncResult>.
the <GAsyncResult>
Returned: a boolean.
#t if the operation was successful, #f if an error
occurred. In this case, error is set
Registers an error quark for
<GdkDmabufTexture> errors.
Returned: an unsigned 32-bit integer.
the error quark
Checks if action represents a single action or includes multiple actions.
When action is none - ie no action was
given, TRUE is returned.
Passed: a <GdkDragAction>, or a list of its
symbols, or one of them.
Returned: a boolean.
#t if exactly one action was given
Returns the relative angle from event1 to event2.
The relative angle is the angle between the X axis and the line through both events’ positions. The rotation direction for positive angles is from the positive X axis towards the positive Y axis.
This assumes that both events have X/Y information. If not, this
function returns #f.
Passed: a <GdkEvent>.
first <GdkEvent>
Passed: a <GdkEvent>.
second <GdkEvent>
Returned: a boolean.
#t if the angle could be calculated.
Returned: a real number.
return location for the relative angle between both events
Returns the point halfway between the events’ positions.
This assumes that both events have X/Y information. If not, this
function returns #f.
Passed: a <GdkEvent>.
first <GdkEvent>
Passed: a <GdkEvent>.
second <GdkEvent>
Returned: a boolean.
#t if the center could be calculated.
Returned: a real number.
return location for the X coordinate of the center
Returned: a real number.
return location for the Y coordinate of the center
Returns the distance between the event locations.
This assumes that both events have X/Y information. If not, this
function returns #f.
Passed: a <GdkEvent>.
first <GdkEvent>
Passed: a <GdkEvent>.
second <GdkEvent>
Returned: a boolean.
#t if the distance could be calculated.
Returned: a real number.
return location for the distance
Registers an error quark for <GdkGLContext>
errors.
Returned: an unsigned 32-bit integer.
the error quark
Canonicalizes the given mime type and interns the result.
If string is not a valid mime type, #f is returned instead.
See RFC 2048 for the syntax if mime types.
Passed: a string.
string of a potential mime type
Returned: a string, or #f.
An interned string for the canonicalized mime type or #f if the
string wasn’t a valid mime type
Obtains the upper- and lower-case versions of the keyval symbol.
Examples of keyvals are GDK_KEY_a, GDK_KEY_Enter,
GDK_KEY_F1, etc.
Passed: an unsigned 32-bit integer.
a keyval
Returned: an unsigned 32-bit integer.
return location for lowercase version of symbol
Returned: an unsigned 32-bit integer.
return location for uppercase version of symbol
Converts a key name to a key value.
The names are the same as those in the gdk/gdkkeysyms.h header
file but without the leading “GDK_KEY_”.
Passed: a string.
a key name
Returned: an unsigned 32-bit integer.
the corresponding key value, or GDK_KEY_VoidSymbol if the key
name is not a valid key
Returns true if the given key value is in lower case.
Passed: an unsigned 32-bit integer.
a key value.
Returned: a boolean.
true if keyval is in lower case, or if keyval is not subject to case conversion.
Returns true if the given key value is in upper case.
Passed: an unsigned 32-bit integer.
a key value.
Returned: a boolean.
true if keyval is in upper case, or if keyval is not subject to case conversion.
Converts a key value into a symbolic name.
The names are the same as those in the gdk/gdkkeysyms.h header
file but without the leading “GDK_KEY_”.
Passed: an unsigned 32-bit integer.
a key value
Returned: a string, or #f.
a string containing the name of the key
Converts a key value to lower case, if applicable.
Passed: an unsigned 32-bit integer.
a key value.
Returned: an unsigned 32-bit integer.
the lower case form of keyval, or keyval itself if it is already in lower case or it is not subject to case conversion.
Converts from a GDK key symbol to the corresponding Unicode character.
Note that the conversion does not take the current locale into
consideration, which might be expected for particular keyvals, such as
GDK_KEY_KP_Decimal.
Passed: an unsigned 32-bit integer.
a GDK key symbol
Returned: an unsigned 32-bit integer.
the corresponding unicode character, or 0 if there is no corresponding character.
Converts a key value to upper case, if applicable.
Passed: an unsigned 32-bit integer.
a key value.
Returned: an unsigned 32-bit integer.
the upper case form of keyval, or keyval itself if it is already in upper case or it is not subject to case conversion.
Returns a paintable that has the given intrinsic size and draws nothing.
This is often useful for implementing the paintable:do-get-current-image virtual function
when the paintable is in an incomplete state (like a GtkMediaStream
before receiving the first frame).
Passed: a 32-bit integer.
The intrinsic width to report. Can be 0 for no width.
Passed: a 32-bit integer.
The intrinsic height to report. Can be 0 for no height.
Returned: a <GdkPaintable>.
Sets a list of backends that GDK should try to use.
This can be useful if your application does not work with certain GDK backends.
By default, GDK tries all included backends.
For example:
gdk_set_allowed_backends ("wayland,macos,*");
instructs GDK to try the Wayland backend first, followed by the MacOs backend, and then all others.
If the GDK_BACKEND environment variable is set, it determines
what backends are tried in what order, while still respecting the set of
allowed backends that are specified by this function.
The possible backend names are:
broadway
macos
wayland.
win32
x11
You can also include a * in the list to try all remaining
backends.
This call must happen prior to functions that open a display, such as
display:open, init, or
init-check? in order to take effect.
Passed: a string.
a comma-separated list of backends
Registers an error quark for <GdkTexture> errors.
Returned: an unsigned 32-bit integer.
the error quark
Converts from a Unicode character to a key symbol.
Passed: an unsigned 32-bit integer.
a Unicode character
Returned: an unsigned 32-bit integer.
the corresponding GDK key symbol, if one exists, or, if there is no
corresponding symbol, wc | 0x01000000
Registers an error quark for <GdkVulkanContext> errors.
Returned: an unsigned 32-bit integer.
the error quark