[164:7] extends: object
The type of callback used by a dynamic GdkCursor to generate a texture for
the cursor image at the given @cursor_size and @scale. The actual cursor size
in application pixels may be different from @cursor_size x @cursor_size, and
will be returned in @width, @height. The returned texture should have a size
that corresponds to the actual cursor size, in device pixels (i.e.
application pixels, multiplied by @scale). This function may fail and return
NULL, in which case the fallback cursor will be used.
GdkCursorGetTextureCallbackCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (cursor, cursor_size, scale, width, height, hotspot_x, hotspot_y, data)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[88:7] extends: object
The type of a function that can be registered with gdk_content_register_serializer(). When the function gets called to operate on content, it can call functions on the @serializer object to obtain the mime type, output stream, user data, etc. for its operation.
GdkContentSerializeFuncCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (serializer)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[264:14] static extends: object
Generated low-level function wrappers for namespace Gdk.
getLib ()
cairo_draw_from_gl (object cr, object surface, int source, int source_type, int buffer_scale, int x, int y, int width, int height)
Draws GL content onto a cairo context. It takes a render buffer ID (@source_type == GL_RENDERBUFFER) or a texture id (@source_type == GL_TEXTURE) and draws it onto @cr with an OVER operation, respecting the current clip. The top left corner of the rectangle specified by @x, @y,
and @height will be drawn at the current (0,0) position of the cairo_t. This will work for all cairo_t, as long as @surface is realized, but the fallback implementation that reads back the pixels from the buffer may be used in the general case. In the case of direct drawing to a surface with no special effects applied to @cr it will however use a more efficient approach. For GL_RENDERBUFFER the code will always fall back to software for buffers with alpha components, so make sure you use GL_TEXTURE if using alpha. Calling this may change the current GL context.cr is a cairo context.surface is The surface we're rendering for (not necessarily into).source is The GL ID of the source buffer.source_type is The type of the @source.buffer_scale is The scale-factor that the @source buffer is allocated for.x is The source x position in @source to start copying from in GL coordinates.y is The source y position in @source to start copying from in GL coordinates.width is The width of the region to draw.height is The height of the region to draw.None.cairo_rectangle (object cr, object rectangle)
Adds the given rectangle to the current path of @cr.
cr is a cairo context.rectangle is a GdkRectangle.None.cairo_region (object cr, object region)
Adds the given region to the current path of @cr.
cr is a cairo context.region is a cairo_region_t.None.cairo_region_create_from_surface (object surface)
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().
surface is a cairo surface.A cairo_region_t.cairo_set_source_pixbuf (object cr, object pixbuf, double pixbuf_x, double pixbuf_y)
Sets the given pixbuf as the source pattern for @cr. The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned so that the origin of
is @pixbuf_x, @pixbuf_y.cr is a cairo context.pixbuf is a GdkPixbuf.pixbuf_x is X coordinate of location to place upper left corner ofpixbuf_y is Y coordinate of location to place upper left corner ofNone.cairo_set_source_rgba (object cr, object rgba)
Sets the specified
GdkRGBAas the source color of @cr.
cr is a cairo context.rgba is a GdkRGBA.None.color_state_get_oklab ()
Returns the color state object representing the oklab color space. This is a perceptually uniform color state.
the color state object for oklab.color_state_get_oklch ()
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.
the color state object for oklch.color_state_get_rec2100_linear ()
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.
the color state object for linearized rec2100.color_state_get_rec2100_pq ()
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.
the color state object for rec2100-pq.color_state_get_srgb ()
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.
the color state object for sRGB.color_state_get_srgb_linear ()
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.
the color state object for linearized sRGB.content_deserialize_async (object stream, string mime_type, int type, int io_priority, object cancellable, object arg5Callback)
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.
stream is a GInputStream to read the serialized content from.mime_type is the mime type to deserialize from.type is the GType to deserialize from.io_priority is the I/O priority of the operation.cancellable is optional GCancellable object.callback is callback to call when the operation is done.user_data is data to pass to the callback function.None.content_formats_parse (string arg0String)
Parses the given @string into
GdkContentFormatsand returns the formats. Strings printed via [method@Gdk.ContentFormats.to_string] can be read in again successfully using this function. If @string does not describe valid content formats, %NULL is returned.
string is the string to parse.the content formats if @string is valid.content_register_deserializer (string mime_type, int type, object deserialize)
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.
mime_type is the mime type which the function can deserialize from.type is the type of objects that the function creates.deserialize is the callback.data is data that @deserialize can access.notify is destroy notify for @data.None.content_register_serializer (int type, string mime_type, object serialize)
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.
type is the type of objects that the function can serialize.mime_type is the mime type to serialize to.serialize is the callback.data is data that @serialize can access.notify is destroy notify for @data.None.content_serialize_async (object stream, string mime_type, object value, int io_priority, object cancellable, object arg5Callback)
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.
stream is a GOutputStream to write the serialized content to.mime_type is the mime type to serialize to.value is the content to serialize.io_priority is the I/O priority of the operation.cancellable is optional GCancellable object.callback is callback to call when the operation is done.user_data is data to pass to the callback function.None.content_serialize_finish (object result)
Finishes a content serialization operation.
result is the GAsyncResult.%TRUE if the operation was successful, %FALSE if an error occurred. In this case, @error is set.drag_action_is_unique (string action)
Checks if @action represents a single action or includes multiple actions. When @action is
GDK_ACTION_NONE- ie no action was given,TRUEis returned.
action is a GdkDragAction.%TRUE if exactly one action was given.events_get_angle (object event1, object event2)
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 %FALSE.
event1 is first GdkEvent.event2 is second GdkEvent.angle is return location for the relative angle between both events.%TRUE if the angle could be calculated..events_get_center (object event1, object event2)
Returns the point halfway between the events' positions. This assumes that both events have X/Y information. If not, this function returns %FALSE.
event1 is first GdkEvent.event2 is second GdkEvent.x is return location for the X coordinate of the center.y is return location for the Y coordinate of the center.%TRUE if the center could be calculated..events_get_distance (object event1, object event2)
Returns the distance between the event locations. This assumes that both events have X/Y information. If not, this function returns %FALSE.
event1 is first GdkEvent.event2 is second GdkEvent.distance is return location for the distance.%TRUE if the distance could be calculated..intern_mime_type (string arg0String)
Canonicalizes the given mime type and interns the result. If @string is not a valid mime type, %NULL is returned instead. See RFC 2048 for the syntax if mime types.
string is string of a potential mime type.An interned string for the canonicalized mime type or %NULL if the string wasn't a valid mime type.keyval_convert_case (int symbol)
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.
symbol is a keyval.lower is return location for lowercase version of @symbol.upper is return location for uppercase version of @symbol.None.keyval_from_name (string keyval_name)
Converts a key name to a key value. The names are the same as those in the
gdk/gdkkeysyms.hheader file but without the leading “GDK_KEY_”.
keyval_name is a key name.the corresponding key value, or GDK_KEY_VoidSymbol if the key name is not a valid key.keyval_is_lower (int keyval)
Returns true if the given key value is in lower case.
keyval is a key value..true if @keyval is in lower case, or if @keyval is not subject to case conversion..keyval_is_upper (int keyval)
Returns true if the given key value is in upper case.
keyval is a key value..true if @keyval is in upper case, or if @keyval is not subject to case conversion..keyval_name (int keyval)
Converts a key value into a symbolic name. The names are the same as those in the
gdk/gdkkeysyms.hheader file but without the leading “GDK_KEY_”.
keyval is a key value.a string containing the name of the key.keyval_to_lower (int keyval)
Converts a key value to lower case, if applicable.
keyval is a key value..the lower case form of @keyval, or @keyval itself if it is already in lower case or it is not subject to case conversion..keyval_to_unicode (int keyval)
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.
keyval is a GDK key symbol.the corresponding unicode character, or 0 if there is no corresponding character..keyval_to_upper (int keyval)
Converts a key value to upper case, if applicable.
keyval is a key value..the upper case form of @keyval, or @keyval itself if it is already in upper case or it is not subject to case conversion..paintable_new_empty (int intrinsic_width, int intrinsic_height)
Returns a paintable that has the given intrinsic size and draws nothing. This is often useful for implementing the [vfunc@Gdk.Paintable.get_current_image] virtual function when the paintable is in an incomplete state (like a GtkMediaStream before receiving the first frame).
intrinsic_width is The intrinsic width to report. Can be 0 for no width..intrinsic_height is The intrinsic height to report. Can be 0 for no height..a GdkPaintable.pango_layout_get_clip_region (object layout, int x_origin, int y_origin, int index_ranges, int n_ranges)
Obtains a clip region which contains the areas where the given ranges of text would be drawn. @x_origin and @y_origin are the top left point to center the layout. @index_ranges should contain ranges of bytes in the layout’s text. Note that the regions returned correspond to logical extents of the text ranges, not ink extents. So the drawn layout may in fact touch areas out of the clip region. The clip region is mainly useful for highlightling parts of text, such as when text is selected.
layout is a PangoLayout.x_origin is X pixel where you intend to draw the layout with this clip.y_origin is Y pixel where you intend to draw the layout with this clip.index_ranges is array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes.n_ranges is number of ranges in @index_ranges, i.e. half the size ofa clip region containing the given ranges.pango_layout_line_get_clip_region (object line, int x_origin, int y_origin, list index_ranges, int n_ranges)
Obtains a clip region which contains the areas where the given ranges of text would be drawn. @x_origin and @y_origin are the top left position of the layout. @index_ranges should contain ranges of bytes in the layout’s text. The clip region will include space to the left or right of the line (to the layout bounding box) if you have indexes above or below the indexes contained inside the line. This is to draw the selection all the way to the side of the layout. However, the clip region is in line coordinates, not layout coordinates. Note that the regions returned correspond to logical extents of the text ranges, not ink extents. So the drawn line may in fact touch areas out of the clip region. The clip region is mainly useful for highlightling parts of text, such as when text is selected.
line is a PangoLayoutLine.x_origin is X pixel where you intend to draw the layout line with this clip.y_origin is baseline pixel where you intend to draw the layout line with this clip.index_ranges is array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes.n_ranges is number of ranges in @index_ranges, i.e. half the size ofa clip region containing the given ranges.pixbuf_get_from_surface (object surface, int src_x, int src_y, int width, int height)
Transfers image data from a
cairo_surface_tand converts it to aGdkPixbuf. This allows you to efficiently read individual pixels from cairo surfaces. This function will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the @surface contains one.
surface is surface to copy from.src_x is Source X coordinate within @surface.src_y is Source Y coordinate within @surface.width is Width in pixels of region to get.height is Height in pixels of region to get.A newly-created pixbuf with a reference count of 1.pixbuf_get_from_texture (object texture)
Creates a new pixbuf from @texture. This should generally not be used in newly written code as later stages will almost certainly convert the pixbuf back into a texture to draw it on screen.
texture is a GdkTexture.a new GdkPixbuf.set_allowed_backends (string backends)
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:
c gdk_set_allowed_backends ("wayland,macos,*");instructs GDK to try the Wayland backend first, followed by the MacOs backend, and then all others. If theGDK_BACKENDenvironment 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-x11You 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 [func@Gdk.Display.open],gtk_init(), orgtk_init_check()in order to take effect.
backends is a comma-separated list of backends.None.unicode_to_keyval (int wc)
Converts from a Unicode character to a key symbol.
wc is a Unicode character.the corresponding GDK key symbol, if one exists, or, if there is no corresponding symbol, wc | 0x01000000.[15:7] extends: object
The type of a function that can be registered with gdk_content_register_deserializer(). When the function gets called to operate on content, it can call functions on the @deserializer object to obtain the mime type, input stream, user data, etc. for its operation.
GdkContentDeserializeFuncCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (deserializer)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.