Enums

Details

class Gsk.BlendMode(value)

Bases: GObject.GEnum

The blend modes available for render nodes.

The implementation of each blend mode is deferred to the rendering pipeline.

See <https://www.w3.org/TR/compositing-1/#blending> for more information on blending and blend modes.

DEFAULT = 0

The default blend mode, which specifies no blending

MULTIPLY = 1

The source color is multiplied by the destination and replaces the destination

DIFFERENCE = 10

Subtracts the darker of the two constituent colors from the lighter color

EXCLUSION = 11

Produces an effect similar to that of the difference mode but lower in contrast

COLOR = 12

Creates a color with the hue and saturation of the source color and the luminosity of the destination color

HUE = 13

Creates a color with the hue of the source color and the saturation and luminosity of the destination color

SATURATION = 14

Creates a color with the saturation of the source color and the hue and luminosity of the destination color

LUMINOSITY = 15

Creates a color with the luminosity of the source color and the hue and saturation of the destination color

SCREEN = 2

Multiplies the complements of the destination and source color values, then complements the result.

OVERLAY = 3

Multiplies or screens the colors, depending on the destination color value. This is the inverse of hard-list

DARKEN = 4

Selects the darker of the destination and source colors

LIGHTEN = 5

Selects the lighter of the destination and source colors

COLOR_DODGE = 6

Brightens the destination color to reflect the source color

COLOR_BURN = 7

Darkens the destination color to reflect the source color

HARD_LIGHT = 8

Multiplies or screens the colors, depending on the source color value

SOFT_LIGHT = 9

Darkens or lightens the colors, depending on the source color value

class Gsk.Corner(value)

Bases: GObject.GEnum

The corner indices used by GskRoundedRect.

TOP_LEFT = 0

The top left corner

TOP_RIGHT = 1

The top right corner

BOTTOM_RIGHT = 2

The bottom right corner

BOTTOM_LEFT = 3

The bottom left corner

class Gsk.FillRule(value)

Bases: GObject.GEnum

GskFillRule is used to select how paths are filled.

Whether or not a point is included in the fill is determined by taking a ray from that point to infinity and looking at intersections with the path. The ray can be in any direction, as long as it doesn’t pass through the end point of a segment or have a tricky intersection such as intersecting tangent to the path.

(Note that filling is not actually implemented in this way. This is just a description of the rule that is applied.)

New entries may be added in future versions.

New in version 4.14.

WINDING = 0

If the path crosses the ray from left-to-right, counts +1. If the path crosses the ray from right to left, counts -1. (Left and right are determined from the perspective of looking along the ray from the starting point.) If the total count is non-zero, the point will be filled.

EVEN_ODD = 1

Counts the total number of intersections, without regard to the orientation of the contour. If the total number of intersections is odd, the point will be filled.

class Gsk.GLUniformType(value)

Bases: GObject.GEnum

This defines the types of the uniforms that GskGLShaders declare.

It defines both what the type is called in the GLSL shader code, and what the corresponding C type is on the Gtk side.

NONE = 0

No type, used for uninitialized or unspecified values.

FLOAT = 1

A float uniform

INT = 2

A GLSL int / gint32 uniform

UINT = 3

A GLSL uint / guint32 uniform

BOOL = 4

A GLSL bool / bool uniform

VEC2 = 5

A GLSL vec2 / Graphene.Vec2 uniform

VEC3 = 6

A GLSL vec3 / Graphene.Vec3 uniform

VEC4 = 7

A GLSL vec4 / Graphene.Vec4 uniform

class Gsk.LineCap(value)

Bases: GObject.GEnum

Specifies how to render the start and end points of contours or dashes when stroking.

The default line cap style is GSK_LINE_CAP_BUTT.

New entries may be added in future versions.

<figure> <picture> <source srcset=”caps-dark.png” media=”(prefers-color-scheme: dark)”> <img alt=”Line Cap Styles” src=”caps-light.png”> </picture> <figcaption>:obj:Gsk.LineCap.BUTT, Gsk.LineCap.ROUND, Gsk.LineCap.SQUARE</figcaption> </figure>

New in version 4.14.

BUTT = 0

Start and stop the line exactly at the start and end point

ROUND = 1

Use a round ending, the center of the circle is the start or end point

SQUARE = 2

use squared ending, the center of the square is the start or end point

class Gsk.LineJoin(value)

Bases: GObject.GEnum

Specifies how to render the junction of two lines when stroking.

The default line join style is GSK_LINE_JOIN_MITER.

New entries may be added in future versions.

<figure> <picture> <source srcset=”join-dark.png” media=”(prefers-color-scheme: dark)”> <img alt=”Line Join Styles” src=”join-light.png”> </picture> <figcaption>GSK_LINE_JOINT_MITER, GSK_LINE_JOINT_ROUND, Gsk.LineJoin.BEVEL</figcaption> </figure>

New in version 4.14.

MITER = 0

Use a sharp angled corner

ROUND = 1

Use a round join, the center of the circle is the join point

BEVEL = 2

use a cut-off join, the join is cut off at half the line width from the joint point

class Gsk.MaskMode(value)

Bases: GObject.GEnum

The mask modes available for mask nodes.

New in version 4.10.

ALPHA = 0

Use the alpha channel of the mask

INVERTED_ALPHA = 1

Use the inverted alpha channel of the mask

LUMINANCE = 2

Use the luminance of the mask, multiplied by mask alpha

INVERTED_LUMINANCE = 3

Use the inverted luminance of the mask, multiplied by mask alpha

class Gsk.PathDirection(value)

Bases: GObject.GEnum

The values of the GskPathDirection enum are used to pick one of the four tangents at a given point on the path.

Note that the directions for Gsk.PathDirection.FROM_START/Gsk.PathDirection.TO_END and Gsk.PathDirection.TO_START/Gsk.PathDirection.FROM_END will coincide for smooth points. Only sharp turns will exhibit four different directions.

<picture> <source srcset=”directions-dark.png” media=”(prefers-color-scheme: dark)”> <img alt=”Path Tangents” src=”directions-light.png”> </picture>

New in version 4.14.

FROM_START = 0

The tangent in path direction of the incoming side of the path

TO_START = 1

The tangent against path direction of the incoming side of the path

TO_END = 2

The tangent in path direction of the outgoing side of the path

FROM_END = 3

The tangent against path direction of the outgoing side of the path

class Gsk.PathOperation(value)

Bases: GObject.GEnum

Path operations are used to describe the segments of a GskPath.

More values may be added in the future.

New in version 4.14.

MOVE = 0

A move-to operation, with 1 point describing the target point.

CLOSE = 1

A close operation ending the current contour with a line back to the starting point. Two points describe the start and end of the line.

LINE = 2

A line-to operation, with 2 points describing the start and end point of a straight line.

QUAD = 3

A curve-to operation describing a quadratic Bézier curve with 3 points describing the start point, the control point and the end point of the curve.

CUBIC = 4

A curve-to operation describing a cubic Bézier curve with 4 points describing the start point, the two control points and the end point of the curve.

CONIC = 5

A rational quadratic Bézier curve with 3 points describing the start point, control point and end point of the curve. A weight for the curve will be passed, too.

class Gsk.RenderNodeType(value)

Bases: GObject.GEnum

The type of a node determines what the node is rendering.

NOT_A_RENDER_NODE = 0

Error type. No node will ever have this type.

CONTAINER_NODE = 1

A node containing a stack of children

TEXTURE_NODE = 10

A node drawing a GdkTexture

INSET_SHADOW_NODE = 11

A node drawing an inset shadow

OUTSET_SHADOW_NODE = 12

A node drawing an outset shadow

TRANSFORM_NODE = 13

A node that renders its child after applying a matrix transform

OPACITY_NODE = 14

A node that changes the opacity of its child

COLOR_MATRIX_NODE = 15

A node that applies a color matrix to every pixel

REPEAT_NODE = 16

A node that repeats the child’s contents

CLIP_NODE = 17

A node that clips its child to a rectangular area

ROUNDED_CLIP_NODE = 18

A node that clips its child to a rounded rectangle

SHADOW_NODE = 19

A node that draws a shadow below its child

CAIRO_NODE = 2

A node drawing a cairo_surface_t

BLEND_NODE = 20

A node that blends two children together

CROSS_FADE_NODE = 21

A node that cross-fades between two children

TEXT_NODE = 22

A node containing a glyph string

BLUR_NODE = 23

A node that applies a blur

DEBUG_NODE = 24

Debug information that does not affect the rendering

GL_SHADER_NODE = 25

A node that uses OpenGL fragment shaders to render

TEXTURE_SCALE_NODE = 26

A node drawing a GdkTexture scaled and filtered.

New in version 4.10.

MASK_NODE = 27

A node that masks one child with another.

New in version 4.10.

FILL_NODE = 28

A node that fills a path.

New in version 4.14.

STROKE_NODE = 29

A node that strokes a path.

New in version 4.14.

COLOR_NODE = 3

A node drawing a single color rectangle

SUBSURFACE_NODE = 30

A node that possibly redirects part of the scene graph to a subsurface.

New in version 4.14.

LINEAR_GRADIENT_NODE = 4

A node drawing a linear gradient

REPEATING_LINEAR_GRADIENT_NODE = 5

A node drawing a repeating linear gradient

RADIAL_GRADIENT_NODE = 6

A node drawing a radial gradient

REPEATING_RADIAL_GRADIENT_NODE = 7

A node drawing a repeating radial gradient

CONIC_GRADIENT_NODE = 8

A node drawing a conic gradient

BORDER_NODE = 9

A node stroking a border around an area

class Gsk.ScalingFilter(value)

Bases: GObject.GEnum

The filters used when scaling texture data.

The actual implementation of each filter is deferred to the rendering pipeline.

LINEAR = 0

linear interpolation filter

NEAREST = 1

nearest neighbor interpolation filter

TRILINEAR = 2

linear interpolation along each axis, plus mipmap generation, with linear interpolation along the mipmap levels

class Gsk.SerializationError(value)

Bases: GObject.GEnum

Errors that can happen during (de)serialization.

classmethod quark()
Returns:

the error quark

Return type:

int

Registers an error quark for [class`Gsk`.RenderNode] errors.

UNSUPPORTED_FORMAT = 0

The format can not be identified

UNSUPPORTED_VERSION = 1

The version of the data is not understood

INVALID_DATA = 2

The given data may not exist in a proper serialization

class Gsk.TransformCategory(value)

Bases: GObject.GEnum

The categories of matrices relevant for GSK and GTK.

Note that any category includes matrices of all later categories. So if you want to for example check if a matrix is a 2D matrix, category >= GSK_TRANSFORM_CATEGORY_2D is the way to do this.

Also keep in mind that rounding errors may cause matrices to not conform to their categories. Otherwise, matrix operations done via multiplication will not worsen categories. So for the matrix multiplication C = A * B, category(C) = MIN (category(A), category(B)).

UNKNOWN = 0

The category of the matrix has not been determined.

ANY = 1

Analyzing the matrix concluded that it does not fit in any other category.

3D = 2
_3D = 2

The matrix is a 3D matrix. This means that the w column (the last column) has the values (0, 0, 0, 1).

2D = 3
_2D = 3

The matrix is a 2D matrix. This is equivalent to Graphene.Matrix.is_2d() returning True. In particular, this means that Cairo can deal with the matrix.

2D_AFFINE = 4
_2D_AFFINE = 4

The matrix is a combination of 2D scale and 2D translation operations. In particular, this means that any rectangle can be transformed exactly using this matrix.

2D_TRANSLATE = 5
_2D_TRANSLATE = 5

The matrix is a 2D translation.

IDENTITY = 6

The matrix is the identity matrix.