gsk4 0.9.4

Rust bindings of the GSK 4 library
Documentation
[options]
girs_directories = ["../gir-files"]
library = "Gsk"
version = "4.0"
min_cfg_version = "4.0.0"
target_path = "."
work_mode = "normal"
use_gi_docgen = true
generate_safety_asserts = true
single_version_file = true
deprecate_by_min_version = true
trust_return_value_nullability = true

generate = [
    "Gsk.BlendMode",
    "Gsk.BlendNode",
    "Gsk.BlurNode",
    "Gsk.CairoNode",
    "Gsk.CairoRenderer",
    "Gsk.ClipNode",
    "Gsk.ColorMatrixNode",
    "Gsk.ColorNode",
    "Gsk.ConicGradientNode",
    "Gsk.Corner",
    "Gsk.CrossFadeNode",
    "Gsk.DebugNode",
    "Gsk.FillNode",
    "Gsk.FillRule",
    "Gsk.GLRenderer",
    "Gsk.GLUniformType",
    "Gsk.InsetShadowNode",
    "Gsk.LinearGradientNode",
    "Gsk.LineCap",
    "Gsk.LineJoin",
    "Gsk.MaskMode",
    "Gsk.MaskNode",
    "Gsk.OpacityNode",
    "Gsk.OutsetShadowNode",
    "Gsk.PathDirection",
    "Gsk.PathForeachFlags",
    "Gsk.PathMeasure",
    "Gsk.PathOperation",
    "Gsk.RadialGradientNode",
    "Gsk.RenderNodeType",
    "Gsk.RepeatingLinearGradientNode",
    "Gsk.RepeatingRadialGradientNode",
    "Gsk.RepeatNode",
    "Gsk.RoundedClipNode",
    "Gsk.ScalingFilter",
    "Gsk.SerializationError",
    "Gsk.StrokeNode",
    "Gsk.TextureNode",
    "Gsk.TextureScaleNode",
    "Gsk.TransformCategory",
    "Gsk.TransformNode",
]

manual = [
    "cairo.Context",
    "cairo.Path",
    "cairo.Region",
    "cairo.Surface",
    "Gdk.Display",
    "Gdk.RGBA",
    "Gdk.Surface",
    "Gdk.Texture",
    "Gio.File", # docs specific
    "GLib.Bytes",
    "GLib.Error",
    "GLib.Quark",
    "GLib.String",
    "Graphene.Matrix",
    "Graphene.Point",
    "Graphene.Point3D",
    "Graphene.Rect",
    "Graphene.Size",
    "Graphene.Vec2",
    "Graphene.Vec3",
    "Graphene.Vec4",
    "Gsk.NglRenderer",
    "Gsk.ParseLocation",
    "Gsk.Shadow",
    "Gtk.Snapshot", # docs specific
    "Pango.Font",
    "Pango.GlyphString",
    "Pango.Layout",
]

[[object]]
name = "Gsk.*"
status = "generate"
    [[object.function]]
    pattern = "value_(dup|get|set|take)_render_node"
    ignore = true # used to implement Value traits manually

[[object]]
name = "Gsk.BorderNode"
status = "generate"
    [[object.function]]
    name = "new"
    manual = true
    [[object.function]]
    name = "get_widths"
    manual = true
    [[object.function]]
    name = "get_colors"
    manual = true

[[object]]
name = "Gsk.BroadwayRenderer"
status = "generate"
cfg_condition = "feature = \"broadway\""

[[object]]
name = "Gsk.ColorStop"
status = "manual"
boxed_inline = true

[[object]]
name = "Gsk.ContainerNode"
status = "generate"
    [[object.function]]
    name = "get_child"
    manual = true # assert that idx < n_children

[[object]]
name = "Gsk.GLShader"
status = "generate"
generate_builder = true
    [[object.function]]
    name = "get_arg_bool"
    # Retrieves the boolean value of an arg
    rename = "arg_bool"
    [[object.function]]
    name = "format_args_va"
    ignore = true # not useful for bindings
    [[object.function]]
    name = "format_args"
    ignore = true # TODO: fix me once varargs are supported
    [[object.function]]
    name = "get_arg_vec2"
    manual = true # TODO: fix me once (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3744) is merged
    [[object.function]]
    name = "get_arg_vec3"
    manual = true # TODO: fix me once (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3744) is merged
    [[object.function]]
    name = "get_arg_vec4"
    manual = true # TODO: fix me once (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3744) is merged

[[object]]
name = "Gsk.GLShaderNode"
status = "generate"
    [[object.function]]
    name = "get_child"
    manual = true # assert that idx < n_children

[[object]]
name = "Gsk.Path"
status = "generate"
    [[object.function]]
    name = "to_cairo"
        [[object.function.parameter]]
        name = "cr"
        const = true
    [[object.function]]
    name = "parse"
        [object.function.return]
        nullable_return_is_error = "Can't parse Path"
    [[object.function]]
    name = "print"
    ignore = true # to_str exists
    [[object.function]]
    name = "foreach"
    manual = true # tries to call from_glib_borrow on an enum

[[object]]
name = "Gsk.PathBuilder"
status = "generate"
    [[object.function]]
    name = "free_to_path"
    ignore = true # not useful for bindings
    [[object.function]]
    name = "add_cairo_path"
    manual = true # use as_ptr for cairo::Path

[[object]]
name = "Gsk.PathPoint"
status = "generate"
boxed_inline = true
    [[object.function]]
    name = "get_curvature"
    manual = true # handle nullable point return value

[[object]]
name = "Gsk.Renderer"
status = "generate"
trait_name = "GskRendererExt"

[[object]]
name = "Gsk.RenderNode"
status = "generate"
    [[object.function]]
    name = "deserialize"
    manual = true # split between two variants
    [[object.function]]
    name = "draw"
        [[object.function.parameter]]
        name = "cr"
        const = true

[[object]]
name = "Gsk.RoundedRect"
status = "manual"
    [[object.function]]
    name = "init"
    rename = "new"
    [[object.function]]
    name = "init_from_rect"
    rename = "from_rect"

[[object]]
name = "Gsk.ShaderArgsBuilder"
status = "generate"
    [[object.function]]
    name = "free_to_args"
    ignore = true # C convenience functions
    [[object.function]]
    name = "to_args"
        [[object.function.parameter]]
        name = "builder"
        move = true

[[object]]
name = "Gsk.ShadowNode"
status = "generate"
    [[object.function]]
    name = "get_shadow"
    manual = true # assert that i < n_shadows

[[object]]
name = "Gsk.Stroke"
status = "generate"
    [[object.function]]
    name = "to_cairo"
        [[object.function.parameter]]
        name = "cr"
        const = true
    [[object.function]]
    pattern = "set_(dash|dash_offset|line_cap|line_join|line_width|miter_limit)"
        [[object.function.parameter]]
        name = "self"
        const = true
    [[object.function]]
    name = "equal"
        [[object.function.parameter]]
        name = "stroke2"
        nullable = false

[[object]]
name = "Gsk.TextNode"
status = "generate"
    [[object.function]]
    name = "new"
        [[object.function.parameter]]
        name = "glyphs"
        const = true

[[object]]
name = "Gsk.Transform"
status = "generate"
    [[object.function]]
    name = "equal"
        [[object.function.parameter]]
            name = "second"
            nullable = false
    [[object.function]]
    pattern = "(translate_3d|translate|transform|skew|scale_3d|scale|rotate_3d|rotate|invert)"
    manual = true # those functions return NULL in C which represents an identity transform
    [[object.function]]
    name = "print"
    ignore = true # Same as Transform::to_string
    [[object.function]]
    name = "parse"
    manual = true # bool_return_is_error doesn't seem to work for it

[[object]]
name = "Gsk.VulkanRenderer"
status = "generate"
cfg_condition = "feature = \"vulkan\""

[[object]]
name = "Pango.GlyphInfo"
status = "manual"
boxed_inline = true