Benjamin Otte
cb5c994cd9
rgba: Add a few macros
...
... and use them.
Those macros hopefully make code more readable.
2024-01-07 07:22:52 +01:00
Matthias Clasen
7cc5d5c7a5
Revert "Merge branch 'rgba-new-from-string' into 'main'"
...
This reverts commit 77f40d7508
, reversing
changes made to b969f4649d
.
It turns out we did not have agreement on this after all.
2023-12-02 10:55:35 +05:45
FeRD (Frank Dana)
f4f25e584c
Fix docs function reference
2023-11-27 21:16:44 -05:00
FeRD (Frank Dana)
b049a3501a
Additional review fixes
2023-11-27 19:44:24 -05:00
Emmanuele Bassi
0114fad8a5
Style/doc fixes from review
2023-11-28 00:42:19 +00:00
FeRD (Frank Dana)
114d0621aa
Fix coding style issues
2023-11-26 16:19:06 -05:00
FeRD (Frank Dana)
39db73dff1
Add gdk_rgba_new_from_string()
...
Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
2023-11-24 22:19:39 -05:00
FineFindus
2d8c112f08
docs: add HSL to Gdk.RGBA.parse
...
Update the Gdk.RGBA.parse docs to reflect the ability to parse HSL, which has been added in 4.5.0.
2023-05-25 17:16:55 +02:00
Matthias Clasen
98ff6c0d4d
gdk: Stop using g_slice
2023-03-14 14:56:42 -04:00
Matthias Clasen
46e0fde606
css: Avoid more allocations for tokens
...
Make short string tokens static.
2023-01-12 00:12:09 -05:00
Benjamin Otte
c11a43418e
docs: standard names are CSS names, not X11 names
...
We updated Pango a while ago to use these more common names, but apparently forgot the docs.
2021-10-27 22:12:58 +00:00
James Westman
0782c8a051
gdk_rgba_parse: Support HSL colors
2021-09-10 16:56:42 -05:00
Matthias Clasen
8ba16eb4f1
Documentation fixes
...
Mostly fixing up indentation of continuation lines,
and other small cleanups.
2021-05-20 19:17:49 -04:00
Matthias Clasen
9132f1831c
docs: Rework the gdk docs
...
Convert links, make things more concise.
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
6f93e63d21
docs: Move detached sections into their own content file
2021-03-11 16:37:30 +00:00
Matthias Clasen
9f71bdd045
docs: Cosmetics
...
Make the GdkRGBA heading less repetitive.
2020-10-29 14:23:46 -04:00
Matthias Clasen
1f3327d326
rgba: Use pango_color_parse_with_alpha
...
Use this newly exported pango function, so we
can support hex colors with alpha like #rrggbbaa.
Fixes : #2931
2020-08-02 23:30:33 -04:00
Benjamin Otte
3078b180fe
Replace "gdouble" with "double"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d375dce9f5
Replace "gchar" with "char"
2020-07-25 00:47:36 +02:00
Timm Bäder
11f07cb5ad
GdkRGBA: Fix typo in documentation
2020-07-17 05:49:11 +02:00
Christoph Reiter
2d5cf2b4c4
Drop fallback-c89.c
...
We require a C compiler supporting C99 now. The main purpose of
these fallbacks was for MSVC. From what I can see this is now all supported
by MSVC 2015+ anyway.
The only other change this includes is to replace isnanf() with the
(type infering) C99 isnan() macro, because MSVC doesn't provide isnanf().
2020-05-31 17:09:23 +02:00
Timm Bäder
095a378dbc
GdkRGBA: Use floats instead of doubles
2020-01-07 17:27:15 +01:00
Benjamin Otte
89fb752a8f
css: Use %f, not %.17f
...
The testusite failures explain why:
We don't want to print "1.00000000000000000", but "1".
2019-05-29 14:30:13 +02:00
Benjamin Otte
d71c196c5c
css: Don't print numbers with exponent
...
CSS does not do exponents, so printing numbers close to 0 as 1.234e-15
does not work.
Also up the accuracy to 17 digits because that's what everyone else
uses.
2019-05-29 07:14:31 +02:00
Benjamin Otte
98e076b51e
rgba: Add gdk_rgba_parser_parse()
...
This function is a (private) function to parse a GdkRGBA accoridng to
the CSS specs. We should probably use it for gdk_rgba_parse(), but that
would change the syntax we accept there...
This also introduces a dependency of libgdk on libgtkcss.
So far, no users for this function exist.
2019-04-12 19:34:28 +02:00
Daniel Boles
a8ac6f833c
RGBA: tiny grammar improvements in to_string doc
2018-12-17 20:49:34 +00:00
Daniel Boles
271acaff53
RGBA: Consistently use “” around inline arg names
...
instead of being inconsistent and not using them later, which leaves a
bunch of single letters floating among real words, not the prettiest.
2018-12-17 20:49:34 +00:00
Daniel Boles
c35e0cba39
RGBA: Fix example to_string output for reality/CSS
...
* We don't output spaces anywhere in the code, unlike the doc suggested.
* CSS explicitly forbids whitespace between function names and lparens:
https://stackoverflow.com/questions/13877198
2018-12-17 20:49:34 +00:00
Daniel Boles
a15080c640
gdkrgba: Add a missing apostrophe in a doc comment
2018-03-19 15:14:20 +00:00
Matthias Clasen
4c150d8eb5
The big versioning cleanup
...
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Daniel Boles
d04baeba37
GdkRGBA: Fix misspelt parameter names in docs
2017-07-06 14:03:08 +01:00
Daniel Boles
ede0f25d3b
GdkRGBA: Fix typo precentage => percentage
2017-07-06 14:00:35 +01:00
Benjamin Otte
071c9a8221
API: gdk: Add gdk_rgba_is_clear() and gdk_rgba_is_opaque()
...
I want to use these inside GSK, and I'm not a fan of putting GdkRGBA
APIs into it or duplicating it into GTK.
So public API it is.
2016-12-20 18:01:12 +01:00
Emmanuele Bassi
a85384135c
Revert "Add missing (out) annotation to gdk_rgba_parse"
...
This reverts commit 695860958a
.
The change introduced an introspection ABI break.
See also: https://bugzilla.gnome.org/show_bug.cgi?id=682125
If we want to move the parse() method to be a constructor or a class
method, we'll need to do more testing or add new API.
https://bugzilla.gnome.org/show_bug.cgi?id=754990
2016-02-02 15:08:10 +00:00
Phil Clayton
695860958a
Add missing (out) annotation to gdk_rgba_parse
...
https://bugzilla.gnome.org/show_bug.cgi?id=754990
2016-01-23 18:16:51 -05:00
Benjamin Otte
96a485d8b2
gdkrgba: Use %g instead of %.17g to print alpha
...
This way 0.3 isn't printed as 0.29999999999999
2015-11-02 20:32:12 +01:00
Pierre-Yves Luyten
dce69904d8
gdk_rgba_parse : do not segfault on null string
2014-09-28 21:18:10 +02:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47
Docs: Remove all entities and turn off sgml mode
...
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
13998c55e7
docs: use proper quotations instead of '*'
2014-02-07 14:22:39 -05:00
William Jon McCann
7a208fbbf3
docs: use proper apostrophe
...
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
a22358c0c0
docs: use ` instead of <literal>
2014-02-04 18:24:29 -05:00
Matthias Clasen
30cc1512e6
Docs: Use markdown for lists
...
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
William Jon McCann
4872ee75e6
docs: don't use structfield tags
2014-01-27 19:59:58 -05:00
William Jon McCann
22586ea7c2
docs: use #*-struct instead of <structname>
2014-01-27 19:59:55 -05:00
Bastien Nocera
314dcf7a9e
GdkRgba: Fix 'loose' typo
...
Should be "lose"
https://bugzilla.gnome.org/show_bug.cgi?id=700844
2013-05-23 20:53:30 +02:00
Emmanuele Bassi
11aac235bc
docs: Escape bare '#' in GdkRGBA string definitions
...
GTK-Doc does not like bare '#', so let's turn them into #.
2012-05-20 13:45:05 +01:00
Chun-wei Fan
a5626c489e
Bug 670499-gdk/gdkrgba.c: Include fallback-c89.c
...
Include (gdk/)fallback-c89.c as isnan() and isinf() is used.
2012-05-03 11:55:20 +08:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Matthias Clasen
e5e6d25a50
Tighten up GdkRGBA parsing
...
gdk_rgba_parse was accepting too much nonsense, as pointed out
in bug 667485.
2012-01-09 00:31:20 -05:00