css: Make some color value functions static

These aren't used outside of gtkcsscolorvalue.c, so don't export
them.
This commit is contained in:
Matthias Clasen 2024-05-30 17:14:52 -04:00
parent f89dc9644c
commit 0c307f7563
2 changed files with 18 additions and 30 deletions

View File

@ -30,6 +30,15 @@
#include "gdk/gdkrgbaprivate.h"
#include "gtkcolorutilsprivate.h"
typedef enum {
GTK_CSS_COLOR_SPACE_SRGB,
GTK_CSS_COLOR_SPACE_SRGB_LINEAR,
} GtkCssColorSpace;
static GtkCssValue * gtk_css_color_value_new_mix (GtkCssValue *color1,
GtkCssValue *color2,
double factor);
typedef enum {
COLOR_TYPE_LITERAL,
COLOR_TYPE_COLOR,
@ -667,7 +676,7 @@ gtk_css_color_value_new_literal (const GdkRGBA *color)
return value;
}
GtkCssValue *
static GtkCssValue *
gtk_css_value_value_new_color (GtkCssColorSpace color_space,
float values[4])
{
@ -695,7 +704,7 @@ gtk_css_color_value_new_name (const char *name)
return value;
}
GtkCssValue *
static GtkCssValue *
gtk_css_color_value_new_shade (GtkCssValue *color,
double factor)
{
@ -720,7 +729,7 @@ gtk_css_color_value_new_shade (GtkCssValue *color,
return value;
}
GtkCssValue *
static GtkCssValue *
gtk_css_color_value_new_alpha (GtkCssValue *color,
double factor)
{
@ -745,7 +754,7 @@ gtk_css_color_value_new_alpha (GtkCssValue *color,
return value;
}
GtkCssValue *
static GtkCssValue *
gtk_css_color_value_new_mix (GtkCssValue *color1,
GtkCssValue *color2,
double factor)
@ -783,7 +792,7 @@ gtk_css_color_value_new_current_color (void)
return gtk_css_value_ref (&current_color);
}
GtkCssValue *
static GtkCssValue *
gtk_css_color_value_new_oklab (float L,
float a,
float b,
@ -801,7 +810,7 @@ gtk_css_color_value_new_oklab (float L,
return value;
}
GtkCssValue *
static GtkCssValue *
gtk_css_color_value_new_oklch (float L,
float C,
float H,

View File

@ -24,33 +24,12 @@
G_BEGIN_DECLS
typedef enum {
GTK_CSS_COLOR_SPACE_SRGB,
GTK_CSS_COLOR_SPACE_SRGB_LINEAR,
} GtkCssColorSpace;
GtkCssValue * gtk_css_color_value_new_transparent (void) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_white (void) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_literal (const GdkRGBA *color) G_GNUC_PURE;
GtkCssValue * gtk_css_value_value_new_color (GtkCssColorSpace color_space,
float values[4]) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_name (const char *name) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_shade (GtkCssValue *color,
double factor) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_alpha (GtkCssValue *color,
double factor) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_mix (GtkCssValue *color1,
GtkCssValue *color2,
double factor) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_current_color (void) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_oklab (float L,
float a,
float b,
float alpha) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_oklch (float L,
float C,
float H,
float alpha) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_name (const char *name) G_GNUC_PURE;
GtkCssValue * gtk_css_color_value_new_literal (const GdkRGBA *color) G_GNUC_PURE;
gboolean gtk_css_color_value_can_parse (GtkCssParser *parser);
GtkCssValue * gtk_css_color_value_parse (GtkCssParser *parser);