mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
css: Export some color value api for tests
Export enough api to test color conversion and interpolation.
This commit is contained in:
parent
48e707aceb
commit
8ecb00be66
@ -608,7 +608,7 @@ gtk_css_color_value_new_literal (const GdkRGBA *color)
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkCssValue *
|
GtkCssValue *
|
||||||
gtk_css_color_value_new_color (GtkCssColorSpace color_space,
|
gtk_css_color_value_new_color (GtkCssColorSpace color_space,
|
||||||
gboolean serialize_as_rgb,
|
gboolean serialize_as_rgb,
|
||||||
float values[4],
|
float values[4],
|
||||||
@ -1633,3 +1633,12 @@ gtk_css_color_value_get_rgba (const GtkCssValue *color)
|
|||||||
|
|
||||||
return &color->rgba;
|
return &color->rgba;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GtkCssColor *
|
||||||
|
gtk_css_color_value_get_color (const GtkCssValue *color)
|
||||||
|
{
|
||||||
|
g_assert (color->class == >K_CSS_VALUE_COLOR);
|
||||||
|
g_assert (color->type == COLOR_TYPE_COLOR);
|
||||||
|
|
||||||
|
return &color->color;
|
||||||
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "gtk/css/gtkcsstokenizerprivate.h"
|
#include "gtk/css/gtkcsstokenizerprivate.h"
|
||||||
#include "gtk/css/gtkcssparserprivate.h"
|
#include "gtk/css/gtkcssparserprivate.h"
|
||||||
#include "gtkcssvalueprivate.h"
|
#include "gtkcssvalueprivate.h"
|
||||||
|
#include "gtkcsscolorprivate.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -37,6 +38,14 @@ GtkCssValue * gtk_css_color_value_resolve (GtkCssValue *color
|
|||||||
GtkCssValue *current);
|
GtkCssValue *current);
|
||||||
const GdkRGBA * gtk_css_color_value_get_rgba (const GtkCssValue *color) G_GNUC_CONST;
|
const GdkRGBA * gtk_css_color_value_get_rgba (const GtkCssValue *color) G_GNUC_CONST;
|
||||||
|
|
||||||
|
GtkCssValue * gtk_css_color_value_new_color (GtkCssColorSpace color_space,
|
||||||
|
gboolean serialize_as_rgb,
|
||||||
|
float values[4],
|
||||||
|
gboolean missing[4]) G_GNUC_PURE;
|
||||||
|
|
||||||
|
const GtkCssColor *
|
||||||
|
gtk_css_color_value_get_color (const GtkCssValue *color) G_GNUC_CONST;
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user