Matthias Clasen
ef8e8ba14d
css: Give none singletons unique names
...
This makes for a less confusing experience in gdb.
2020-04-18 15:24:13 -04:00
Matthias Clasen
f5182f1c35
css: Mark transform value as computed
...
This is not very useful, since transitions generate
a ton of transforms anyway.
2020-01-18 08:49:52 +01:00
Timm Bäder
31aa5a0e53
cssvalue: Add is_computed flag
...
When a css value has "child" css values (e.g. a linear gradient has
several color stop css values) which are all computed (won't change when
compute() is called on them), we want to skip computing the entire
subtree.
Since css values are immutable, we can set the is_computed flag at
construct time.
Since GtkCssValue instances are 0-initialized in _gtk_css_value_alloc,
the default for is_computed it FALSE. This commit only sets it to TRUE
in a few cases, such as various "none" singleton values which will never
change. Later commits will refine this and set it for more values.
2020-01-18 08:49:51 +01:00
Timm Bäder
1200fe2daf
cssvalue: Add type names for all classes
...
This is important to have for debugging and e.g. to print statistics for
the individual css value types
2020-01-18 08:49:51 +01:00
Benjamin Otte
1cd9396154
css: Review error messages
...
... and move them from _gtk_css_parser_error() to the proper new error
message.
2019-04-12 19:34:28 +02:00
Benjamin Otte
aa50e92c65
csstransformvalue: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
684b6459f1
cssparser: Get rid of _gtk_css_parser_begins_with()
...
Replace it with calls to gtk_css_parser_has_token().
2019-04-12 19:34:28 +02:00
Benjamin Otte
3a3b325f8e
transform: Add perspective()
...
This commit adds gsk_transform_perspective(), gtk_snapshot_perspective()
and support for perspective() in the CSS syntax.
2019-03-05 20:46:00 +01:00
Benjamin Otte
0e1a50366a
transform: Move to GSK
...
The renaming of the prefix makes this a large patch.
2019-03-04 23:09:02 +01:00
Benjamin Otte
ad58dd5cf5
csstransform: Create a GtkTransform
...
Stop creating graphene_matrix_t's.
2019-02-21 19:47:28 +01:00
Timm Bäder
16481734c1
csstransformvalue: Convert skew values to radians
2019-01-29 05:03:26 +01:00
Benjamin Otte
3322599e99
css: Introduce the idea of dynamic values
...
Dynamic values are values that change their contents with the current
(monotonic) time.
This just introduces the GtkCssValue API for it.
2018-03-16 06:04:43 +01:00
Benjamin Otte
83fb7a649f
css: Merge GtkStyleProviderPrivate into GtkStyleProvider
...
This is just lots of renaming.
The interface remains private, so the public API does not change, apart
from removing the definition of the Interface object to avoid
subclassing.
2017-10-31 04:33:54 +01:00
Emmanuele Bassi
4cbe079767
Use Graphene init macros for compound literals
...
The Graphene init macros can now be used for compound literals, which
means we need to update our mixed uses.
2016-11-21 16:21:38 +00:00
Benjamin Otte
dbfc1d72fc
csstransform: Handle matrix3d()
2016-11-18 21:44:25 +01:00
Benjamin Otte
ff4b8512be
csstransform: Implement 3D scale and transform matrices
2016-11-18 21:44:25 +01:00
Benjamin Otte
ef6d95879f
csstransforms: Parse 3D rotations
2016-11-18 21:44:25 +01:00
Benjamin Otte
d52fcd914c
csstransform: Convert to use graphene_matrix_t
...
Pre-work to use 3D-transforms.
2016-11-18 21:44:25 +01:00
Benjamin Otte
da25771e58
cssvalue: Remove GtkCssDependencies
...
They are not used anymore.
2015-03-18 15:23:31 +01:00
Benjamin Otte
1116914ea0
css: Move scale to GtkStyleProviderPrivate
...
This way, we can remove it as a separate argument from
gtk_css_value_compute() and allow computation to only depend on one
thing: the style provider.
2015-02-06 11:26:31 +01:00
Benjamin Otte
572f46067f
cssstyle: Rename GtkCssComputedValues => GtkCssStyle
...
This is literally just renaming of the object (and the associated source
files). No other changes are in there.
2015-01-07 14:26:46 +01:00
Benjamin Otte
631688cf64
csstransform: Fix comparisons crashing
...
Transforms of different type are not equal.
2014-12-19 19:20:56 +01:00
Matthias Clasen
d55e3b25a7
Fix various compiler warnings
...
Mostly missing declarations and missing statics.
2014-09-05 21:21:49 -04:00
Benjamin Otte
cb0b4b5410
css: Change CssTransformValue API
...
Provide API to query the matrix instead of API that applies the matrix
directly. This makes the API more flexible.
See the commits implementing shadows.
2014-05-14 04:28:35 +02:00
Benjamin Otte
965cd4a9c0
css: Add GtkCssTransformValue
...
The value implements the 2D parts of CSS transforms. See
http://www.w3.org/TR/css3-transforms/
For the specification.
All it does is give us an expressive way to define Cairo matrices (and
their transforms)
2014-05-14 04:28:33 +02:00