[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.
ContentSerializeFuncCallback (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.
[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.
ContentDeserializeFuncCallback (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.
[158: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, 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.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, 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.
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.
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.
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.
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.
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.
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.content_serialize_finish (object result)
Finishes a content serialization operation.
result is the GAsyncResult.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.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.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.keyval_is_lower (int keyval)
Returns true if the given key value is in lower case.
keyval is a key value..keyval_is_upper (int keyval)
Returns true if the given key value is in upper case.
keyval is a key value..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.keyval_to_lower (int keyval)
Converts a key value to lower case, if applicable.
keyval is a key value..keyval_to_upper (int keyval)
Converts a key value to upper case, if applicable.
keyval is a key value..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..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 ofpango_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 ofpixbuf_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.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.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.