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 vulkanRenderer. Only if GTK is compiled with Vulkan support | 
| broadway | Enable broadwayRenderer. Only if GTK is compiled with Broadway support | 
| 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
- Builder pattern types.
- Traits intended for blanket imports.
Structs
- A render node applying a blending function between its two child nodes.
- A render node applying a blur effect to its single child.
- A render node for a border.
- BroadwayRendererbroadwayImplements
- A render node for a Cairo surface.
- A GSK renderer that is using cairo.
- A render node applying a rectangular clip to its single child node.
- A render node controlling the color matrix of its single child node.
- A render node for a solid color.
- A color stop in a gradient node.
- A render node for a conic gradient.
- A render node that can contain other render nodes.
- A render node cross fading between two child nodes.
- A render node that emits a debugging message when drawing its child node.
- FillNodev4_14
- Implements
- AGLShaderis a snippet of GLSL that is meant to run in the fragment shader of the rendering pipeline.
- A render node using a GL shader when drawing its children nodes.
- A render node for an inset shadow.
- A render node for a linear gradient.
- MaskNodev4_10A render node masking one child node with another.
- NglRendererv4_2Implements
- A render node controlling the opacity of its single child node.
- A render node for an outset shadow.
- A location in a parse buffer.
- Pathv4_14APathdescribes lines and curves that are more complex than simple rectangles.
- PathBuilderv4_14PathBuilderis an auxiliary object for constructingPathobjects.
- PathForeachFlagsv4_14Flags that can be passed to gsk_path_foreach() to influence what kinds of operations the path is decomposed into.
- PathMeasurev4_14PathMeasureis an object that allows measurements onPaths such as determining the length of the path.
- PathPointv4_14PathPointis an opaque type representing a point on a path.
- A render node for a radial gradient.
- RenderNodeis the basic block in a scene graph to be rendered using- Renderer.
- Rendereris a class that renders a scene graph defined via a tree of- RenderNodeinstances.
- A render node repeating its single child node.
- A render node for a repeating linear gradient.
- A render node for a repeating radial gradient.
- A render node applying a rounded rectangle clip to its single child.
- A rectangular region with rounded corners.
- An object to build the uniforms data for aGLShader.
- The shadow parameters in a shadow node.
- A render node drawing one or more shadows behind its single child node.
- Strokev4_14AStrokestruct collects the parameters that influence the operation of stroking a path.
- StrokeNodev4_14
- A render node drawing a set of glyphs.
- A render node for agdk::Texture.
- TextureScaleNodev4_10A render node for agdk::Texture.
- Transformis an object to describe transform matrices.
- A render node applying aTransformto its single child node.
- VulkanRenderervulkanA GSK renderer that is using Vulkan.
Enums
- The blend modes available for render nodes.
- The corner indices used byRoundedRect.
- FillRulev4_14FillRuleis used to select how paths are filled.
- This defines the types of the uniforms thatGskGLShadersdeclare.
- LineCapv4_14Specifies how to render the start and end points of contours or dashes when stroking.
- LineJoinv4_14Specifies how to render the junction of two lines when stroking.
- MaskModev4_10The mask modes available for mask nodes.
- PathDirectionv4_14The values of thePathDirectionenum are used to pick one of the four tangents at a given point on the path.
- PathOperationv4_14Path operations are used to describe the segments of aPath.
- The type of a node determines what the node is rendering.
- The filters used when scaling texture data.
- Errors that can happen during (de)serialization.
- The categories of matrices relevant for GSK and GTK.