diff options
author | James Westman <james@jwestman.net> | 2021-08-28 21:08:47 -0500 |
---|---|---|
committer | James Westman <james@jwestman.net> | 2021-09-10 16:56:42 -0500 |
commit | 0782c8a051831889cdfe0f85239d41c101d42234 (patch) | |
tree | aba4e0d890079c45dd2319661a12f98e5d10779b /gdk/gdkhslaprivate.h | |
parent | 3d27ff11774aec17d352a2113703d7e0af695cbe (diff) | |
download | gtk+-0782c8a051831889cdfe0f85239d41c101d42234.tar.gz |
gdk_rgba_parse: Support HSL colors
Diffstat (limited to 'gdk/gdkhslaprivate.h')
-rw-r--r-- | gdk/gdkhslaprivate.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gdk/gdkhslaprivate.h b/gdk/gdkhslaprivate.h new file mode 100644 index 0000000000..751ea28c67 --- /dev/null +++ b/gdk/gdkhslaprivate.h @@ -0,0 +1,46 @@ +/* GTK - The GIMP Toolkit + * Copyright (C) 2012 Benjamin Otte <otte@gnome.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __GTK_HSLA_PRIVATE_H__ +#define __GTK_HSLA_PRIVATE_H__ + +#include <gdk/gdk.h> + +G_BEGIN_DECLS + +typedef struct _GdkHSLA GdkHSLA; + +struct _GdkHSLA { + float hue; + float saturation; + float lightness; + float alpha; +}; + +void _gdk_hsla_init_from_rgba (GdkHSLA *hsla, + const GdkRGBA *rgba); +/* Yes, I can name that function like this! */ +void _gdk_rgba_init_from_hsla (GdkRGBA *rgba, + const GdkHSLA *hsla); + +void _gdk_hsla_shade (GdkHSLA *dest, + const GdkHSLA *src, + float factor); + +G_END_DECLS + +#endif /* __GTK_HSLA_PRIVATE_H__ */ |