### Namespace

# Gsk – 4.0

The GTK toolkit

Version | 4.23.2
Authors | GTK Development Team
License | LGPL-2.1-or-later
Website | https://www.gtk.org
Source | https://gitlab.gnome.org/GNOME/gtk/

#### Build

C headers | `gsk/gsk.h`
pkg-config files | `gtk4`

#### Dependencies

Gdk—4.0 | The GTK windowing system abstraction
| Browse documentation
Graphene—1.0 | A thin layer of mathematical types for 3D libraries
| Browse documentation

#### Additional documentation

- Paths
- The Node file format
- Classes Hierarchy

#### Classes

BlendNode | A render node applying a blending function between its two child nodes.
BlurNode | A render node applying a blur effect to its single child.
BorderNode | A render node for a border.
BroadwayRenderer | A Broadway based renderer.
CairoNode | A render node for a Cairo surface.
CairoRenderer | Renders a GSK rendernode tree with cairo.
ClipNode | A render node applying a rectangular clip to its single child node.
ColorMatrixNode | A render node controlling the color matrix of its single child node.
ColorNode | A render node for a solid color.
ComponentTransferNode | A render node for applying a `GskComponentTransfer` for each color component of the child node. since: 4.20
CompositeNode | A render node that uses Porter/Duff compositing operators to combine its child with the background. since: 4.22
ConicGradientNode | A render node for a conic gradient.
ContainerNode | A render node that can contain other render nodes.
CopyNode | A render node that copies the current state of the rendering canvas so a `GskPasteNode` can draw it. since: 4.22
CrossFadeNode | A render node cross fading between two child nodes.
DebugNode | A render node that emits a debugging message when drawing its child node.
FillNode | A render node filling the area given by `GskPath` and `GskFillRule` with the child node. since: 4.14
GLRenderer | Renders a GSK rendernode tree with OpenGL. since: 4.2
GLShader | Implements a fragment shader using GLSL. deprecated: 4.16
GLShaderNode | A render node using a GL shader when drawing its children nodes.
InsetShadowNode | A render node for an inset shadow.
IsolationNode | A render node that isolates its child from surrounding rendernodes. since: 4.22
LinearGradientNode | A render node for a linear gradient.
MaskNode | A render node masking one child node with another. since: 4.10
NglRenderer | A GL based renderer.
OpacityNode | A render node controlling the opacity of its single child node.
OutsetShadowNode | A render node for an outset shadow.
PasteNode | A render node for a paste. since: 4.22
RadialGradientNode | A render node for a radial gradient.
Renderer | Renders a scene graph defined via a tree of `GskRenderNode` instances.
RenderNode | The basic block in a scene graph to be rendered using `GskRenderer`.
RepeatingLinearGradientNode | A render node for a repeating linear gradient.
RepeatingRadialGradientNode | A render node for a repeating radial gradient.
RepeatNode | A render node repeating its single child node.
RoundedClipNode | A render node applying a rounded rectangle clip to its single child.
ShadowNode | A render node drawing one or more shadows behind its single child node.
StrokeNode | A render node that will fill the area determined by stroking the the given `GskPath` using the `GskStroke` attributes. since: 4.14
SubsurfaceNode | A render node that potentially diverts a part of the scene graph to a subsurface. since: 4.14
TextNode | A render node drawing a set of glyphs.
TextureNode | A render node for a `GdkTexture`.
TextureScaleNode | A render node for a `GdkTexture`, with control over scaling. since: 4.10
TransformNode | A render node applying a `GskTransform` to its single child node.
VulkanRenderer | Renders a GSK rendernode tree with Vulkan.

#### Structs

ColorStop | A color stop in a gradient node.
ComponentTransfer | Specifies a transfer function for a color component to be applied while rendering. since: 4.20
ParseLocation | A location in a parse buffer.
Path | Describes lines and curves that are more complex than simple rectangles. since: 4.14
PathBuilder | Constructs `GskPath` objects. since: 4.14
PathMeasure | Performs measurements on paths such as determining the length of the path. since: 4.14
PathPoint | Represents a point on a path. since: 4.14
RenderReplay | A facility to replay a `GskRenderNode` and its children, potentially modifying them. since: 4.22
RoundedRect | A rectangular region with rounded corners.
ShaderArgsBuilder | Builds the uniforms data for a `GskGLShader`. deprecated: 4.16
Shadow | The shadow parameters in a shadow node.
Stroke | Collects the parameters that are needed when stroking a path. since: 4.14
Transform | Describes a 3D transform.

#### Aliases

RectSnap | The ways a rectangle can be snapped to a grid.

#### Enumerations

BlendMode | The blend modes available for render nodes.
Corner | The corner indices used by `GskRoundedRect`.
FillRule | Specifies how paths are filled. since: 4.14
GLUniformType | Defines the types of the uniforms that `GskGLShaders` declare. deprecated: 4.16
LineCap | Specifies how to render the start and end points of contours or dashes when stroking. since: 4.14
LineJoin | Specifies how to render the junction of two lines when stroking. since: 4.14
MaskMode | The mask modes available for mask nodes. since: 4.10
PathDirection | Used to pick one of the four tangents at a given point on the path. since: 4.14
PathIntersection | The values of this enumeration classify intersections between paths. since: 4.20
PathOperation | Describes the segments of a `GskPath`. since: 4.14
PorterDuff | The 12 compositing modes defined by the seminal paper by Thomas Porter and Tom Duff. since: 4.22
RenderNodeType | The type of a node determines what the node is rendering.
ScalingFilter | The filters used when scaling texture data.
Side | The sides of a rectangle as used by `GskRectSnap` or `GskBorderNode`. unstable since: 4.24
SnapDirection | Specifies how a coordinate should be snapped to the pixel grid. unstable since: 4.24
TransformCategory | The categories of matrices relevant for GSK and GTK.

#### Bitfields

Isolation | These flags describe the types of isolations possible with a `GskIsolationNode`. since: 4.22
PathForeachFlags | Flags that can be passed to `gsk_path_foreach()` to influence what kinds of operations the path is decomposed into. since: 4.14

#### Error Domains

SerializationError | Errors that can happen during (de)serialization.

#### Callbacks

ParseErrorFunc | Type of callback that is called when an error occurs during node deserialization.
PathForeachFunc | Type of the callback to iterate through the operations of a path.
PathIntersectionFunc | Prototype of the callback to iterate through the intersections of two paths. since: 4.20
RenderReplayFontFilter | A function that filters fonts. since: 4.22
RenderReplayNodeFilter | A function to replay a node. since: 4.22
RenderReplayTextureFilter | A function that filters textures. since: 4.22

#### Functions

rect_snap_get_direction | Queries the way a given border is snapped. unstable since: 4.24
rect_snap_new | Creates a new way to snap rectangles for the 4 given sides. unstable since: 4.24
value_dup_render_node | Retrieves the render node stored inside a `GValue`, and acquires a reference to it. since: 4.6
value_get_render_node | Retrieves the render node stored inside a `GValue`. since: 4.6
value_set_render_node | Stores the given render node inside a `GValue`. since: 4.6
value_take_render_node | Stores the given render node inside a `GValue`. since: 4.6

#### Function Macros

RECT_SNAP_INIT | A macro that initializes a snap value. Equivalent to calling gsk_rect_snap_new(). unstable since: 4.24
ROUNDED_RECT_INIT | Initializes a `GskRoundedRect` when declaring it.
VALUE_HOLDS_RENDER_NODE | Evaluates to true if `value` was initialized with `GSK_TYPE_RENDER_NODE`.

#### Constants

RECT_SNAP_GROW | Makes the rectangle grow in every direction.
RECT_SNAP_NONE | Makes the rectangle not snap at all.
RECT_SNAP_ROUND | Makes the rectangle round to the closest pixel edge on all sides.
RECT_SNAP_SHRINK | Makes the rectangle shrink in every direction.