Expand description
§Rust GSK 4 bindings
The project website is here.
Rust bindings of GSK 4, part of gtk4-rs.
GSK is an intermediate layer that isolates GTK from the details of the OpenGL or Vulkan implementation.
§Minimum supported Rust version
Currently, the minimum supported Rust version is 1.70.
§Documentation
- The Rust API Stable/Development
- The C API
- GTK Installation instructions
§Using
We recommend using crates from crates.io, as demonstrated here.
If you want to track the bleeding edge, use the git dependency instead:
[dependencies]
gsk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gsk4" }Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
gdk = {version = "0.1", package = "gdk4"}
gsk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gsk4" }§Features
| Feature | Description |
|---|---|
vulkan | Enable vulkan Renderer. Only if GTK is compiled with Vulkan support |
broadway | Enable broadway Renderer. Only if GTK is compiled with Broadway support |
v4_18 | Enable the new APIs part of GTK 4.18 |
v4_16 | Enable the new APIs part of GTK 4.16 |
v4_14 | Enable the new APIs part of GTK 4.14 |
v4_10 | Enable the new APIs part of GTK 4.10 |
v4_6 | Enable the new APIs part of GTK 4.6 |
v4_4 | Enable the new APIs part of GTK 4.4 |
v4_2 | Enable the new APIs part of GTK 4.2 |
§See Also
§License
The Rust bindings of gsk4 are available under the MIT License, please refer to it.
Re-exports§
Modules§
Structs§
- Blend
Node - A render node applying a blending function between its two child nodes.
- Blur
Node - A render node applying a blur effect to its single child.
- Border
Node - A render node for a border.
- Broadway
Renderer broadway - A Broadway based renderer.
- Cairo
Node - A render node for a Cairo surface.
- Cairo
Renderer - A GSK renderer that is using cairo.
- Clip
Node - A render node applying a rectangular clip to its single child node.
- Color
Matrix Node - A render node controlling the color matrix of its single child node.
- Color
Node - A render node for a solid color.
- Color
Stop - A color stop in a gradient node.
- Conic
Gradient Node - A render node for a conic gradient.
- Container
Node - A render node that can contain other render nodes.
- Cross
Fade Node - A render node cross fading between two child nodes.
- Debug
Node - A render node that emits a debugging message when drawing its child node.
- Fill
Node v4_14 - A render node filling the area given by
PathandFillRulewith the child node. - GLRenderer
v4_2 - A GL based renderer.
- GLShader
- A
GLShaderis a snippet of GLSL that is meant to run in the fragment shader of the rendering pipeline. - GLShader
Node - A render node using a GL shader when drawing its children nodes.
- Inset
Shadow Node - A render node for an inset shadow.
- Linear
Gradient Node - A render node for a linear gradient.
- Mask
Node v4_10 - A render node masking one child node with another.
- NglRenderer
v4_2 - Implements
- Opacity
Node - A render node controlling the opacity of its single child node.
- Outset
Shadow Node - A render node for an outset shadow.
- Parse
Location - A location in a parse buffer.
- Path
v4_14 - Describes lines and curves that are more complex than simple rectangles.
- Path
Builder v4_14 - An auxiliary object for constructing
Pathobjects. - Path
Foreach Flags v4_14 - Flags that can be passed to gsk_path_foreach() to influence what kinds of operations the path is decomposed into.
- Path
Measure v4_14 - An object that allows measurements on paths such as determining the length of the path.
- Path
Point v4_14 - An opaque type representing a point on a path.
- Radial
Gradient Node - A render node for a radial gradient.
- Render
Node RenderNodeis the basic block in a scene graph to be rendered usingRenderer.- Renderer
- A class that renders a scene graph defined via a tree of
RenderNodeinstances. - Repeat
Node - A render node repeating its single child node.
- Repeating
Linear Gradient Node - A render node for a repeating linear gradient.
- Repeating
Radial Gradient Node - A render node for a repeating radial gradient.
- Rounded
Clip Node - A render node applying a rounded rectangle clip to its single child.
- Rounded
Rect - A rectangular region with rounded corners.
- Shader
Args Builder - An object to build the uniforms data for a
GLShader. - Shadow
- The shadow parameters in a shadow node.
- Shadow
Node - A render node drawing one or more shadows behind its single child node.
- Stroke
v4_14 - Collects the parameters that influence the operation of stroking a path.
- Stroke
Node v4_14 - A render node that will fill the area determined by stroking the the given
Pathusing theStrokeattributes. - Text
Node - A render node drawing a set of glyphs.
- Texture
Node - A render node for a
gdk::Texture. - Texture
Scale Node v4_10 - A render node for a
gdk::Texture. - Transform
- An object to describe transform matrices.
- Transform
Node - A render node applying a
Transformto its single child node. - Vulkan
Renderer vulkan - A GSK renderer that is using Vulkan.
Enums§
- Blend
Mode - The blend modes available for render nodes.
- Corner
- The corner indices used by
RoundedRect. - Fill
Rule v4_14 FillRuleis used to select how paths are filled.- GLUniform
Type - This defines the types of the uniforms that
GskGLShadersdeclare. - LineCap
v4_14 - Specifies how to render the start and end points of contours or dashes when stroking.
- Line
Join v4_14 - Specifies how to render the junction of two lines when stroking.
- Mask
Mode v4_10 - The mask modes available for mask nodes.
- Path
Direction v4_14 - The values of the
PathDirectionenum are used to pick one of the four tangents at a given point on the path. - Path
Operation v4_14 - Path operations are used to describe the segments of a
Path. - Render
Node Type - The type of a node determines what the node is rendering.
- Scaling
Filter - The filters used when scaling texture data.
- Serialization
Error - Errors that can happen during (de)serialization.
- Transform
Category - The categories of matrices relevant for GSK and GTK.