From b03abea402cc3df58e8e9d0761542fe3b1aa8b46 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 9 Aug 2023 20:03:29 +0200 Subject: [PATCH] gsk: Don't change the GskRenderNodeType order As we use their values to check that a node can be downcasted to a node type in the Rust bindings such change would break existing code --- gsk/gskenums.h | 14 +++++++------- gsk/gskrendernodeprivate.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gsk/gskenums.h b/gsk/gskenums.h index e7cf119d28..f2336fe40e 100644 --- a/gsk/gskenums.h +++ b/gsk/gskenums.h @@ -1,5 +1,5 @@ /* GSK - The GTK Scene Kit - * Copyright 2016 Endless + * Copyright 2016 Endless * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -42,8 +42,6 @@ * @GSK_REPEAT_NODE: A node that repeats the child's contents * @GSK_CLIP_NODE: A node that clips its child to a rectangular area * @GSK_ROUNDED_CLIP_NODE: A node that clips its child to a rounded rectangle - * @GSK_FILL_NODE: A node that fills a path - * @GSK_STROKE_NODE: A node that strokes a path * @GSK_SHADOW_NODE: A node that draws a shadow below its child * @GSK_BLEND_NODE: A node that blends two children together * @GSK_CROSS_FADE_NODE: A node that cross-fades between two children @@ -53,7 +51,9 @@ * @GSK_GL_SHADER_NODE: A node that uses OpenGL fragment shaders to render * @GSK_TEXTURE_SCALE_NODE: A node drawing a `GdkTexture` scaled and filtered (Since: 4.10) * @GSK_MASK_NODE: A node that masks one child with another (Since: 4.10) - + * @GSK_FILL_NODE: A node that fills a path + * @GSK_STROKE_NODE: A node that strokes a path + * The type of a node determines what the node is rendering. */ typedef enum { @@ -76,8 +76,6 @@ typedef enum { GSK_REPEAT_NODE, GSK_CLIP_NODE, GSK_ROUNDED_CLIP_NODE, - GSK_FILL_NODE, - GSK_STROKE_NODE, GSK_SHADOW_NODE, GSK_BLEND_NODE, GSK_CROSS_FADE_NODE, @@ -86,7 +84,9 @@ typedef enum { GSK_DEBUG_NODE, GSK_GL_SHADER_NODE, GSK_TEXTURE_SCALE_NODE, - GSK_MASK_NODE + GSK_MASK_NODE, + GSK_FILL_NODE, + GSK_STROKE_NODE } GskRenderNodeType; /** diff --git a/gsk/gskrendernodeprivate.h b/gsk/gskrendernodeprivate.h index 4ad79bd593..36104b01e4 100644 --- a/gsk/gskrendernodeprivate.h +++ b/gsk/gskrendernodeprivate.h @@ -14,7 +14,7 @@ typedef struct _GskRenderNodeClass GskRenderNodeClass; * We don't add an "n-types" value to avoid having to handle * it in every single switch. */ -#define GSK_RENDER_NODE_TYPE_N_TYPES (GSK_MASK_NODE + 1) +#define GSK_RENDER_NODE_TYPE_N_TYPES (GSK_STROKE_NODE + 1) extern GType gsk_render_node_types[];