Benjamin Otte
d853a8f2f7
cssimage: Add GtkCssImageCrossFade
...
Supports the cross-fade() css notation the way the old CSS3 specs did.
The main reason for adding it is supporting image transitions though.
2012-04-17 08:59:16 +02:00
Benjamin Otte
8ad8a4febf
cssvalue: Add _gtk_css_value_to_string()
...
This is a tiny wrapper around _gtk_css_value_print().
It's intended for usage in gdb and printf debugging.
2012-04-17 08:59:16 +02:00
Benjamin Otte
41ce29767c
cssstyleproperty: Add transition properties
2012-04-17 08:59:16 +02:00
Benjamin Otte
7511109103
cssvalue: Add GtkCssEaseValue
...
This is supposed to hold the transition-easing-function and
animation-easing-function values.
2012-04-17 08:59:16 +02:00
Benjamin Otte
2ff47ed26d
cssvalue: Add a GtkCssValue for idents
2012-04-17 08:59:16 +02:00
Benjamin Otte
662d6787f3
css: Add <time> type to css number stuff
2012-04-17 08:59:16 +02:00
Benjamin Otte
68b7d3e410
computedvalues: Fix signage error
2012-04-17 08:59:16 +02:00
Benjamin Otte
a360e77a7b
css: Remove _gtk_css_computed_values_get_value_by_name()
...
Now that we use an enum for the IDs, we don't need that function
anymore.
2012-04-17 08:59:16 +02:00
Benjamin Otte
31565139ba
stylecontext: Convert _gtk_style_context_peek_property()
...
Take the property id instead of the name.
2012-04-17 08:59:15 +02:00
Benjamin Otte
5d8789680e
css: Add an enum for all the style properties
...
So instead of using
_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY
(_gtk_style_property_lookup ("name")))
one can now use
GTK_CSS_PROPERTY_NAME
Esaier, eh?
2012-04-17 08:59:15 +02:00
Benjamin Otte
1a9dfab825
cssvalue: Add _gtk_css_value_transition()
...
Returns a value that transitions between start and end or %NULL if the
values cannot be transitioned.
So far, all implementations but numbers and rgba return NULL.
2012-04-17 08:59:15 +02:00
Benjamin Otte
bf92f2f7ac
cssvalue: Do a hacky conversion of font-size to a number value
...
Just store the value as px for now.
The font-size property needs a complete makeover anyway.
2012-04-17 08:59:15 +02:00
Benjamin Otte
ad05604b3e
cssvalue: Convert 'font-family'
...
It's now a CssArrayValue filled with CssStringValue
2012-04-17 08:59:15 +02:00
Benjamin Otte
7c75611bc2
cssvalue: Add a custom value for strings
2012-04-17 08:59:15 +02:00
Benjamin Otte
0cce3520d3
cssprovider: Store widget style value as string
...
There's no need to turn it into a GtkCssValue, it's always a string.
2012-04-17 08:59:15 +02:00
Benjamin Otte
4ba9be5b97
cssvalue: Add GtkCssArea to the enum values
...
... and get rid of its GType.
This makes it non-queryable using gtk_style_context_get() but it used to
be a private struct anyway.
2012-04-17 08:59:15 +02:00
Benjamin Otte
8e17f9c233
switch: Set ACTIVE state flag with is_active property
2012-04-17 08:59:15 +02:00
Benjamin Otte
40982eabbb
stylecontext: Keep the main style data around until revalidation
2012-04-17 08:59:15 +02:00
Benjamin Otte
751187aa0c
stylecontext: Keep per-styleinfo data
...
Instead of having one global data structure, keep it per style info.
This means that we can do special tricks on the "global" style data.
2012-04-17 08:59:14 +02:00
Benjamin Otte
a737adadf8
stylecontext: Make style_data_lookup() not take a state anymore
...
Instead, use the current state of the style context.
2012-04-17 08:59:14 +02:00
Benjamin Otte
82b769ddde
widget-factory: Add spinners
...
Doesn't look very well, but if somebody cares about that, he can fix it
(hint hint)
2012-04-17 08:59:14 +02:00
Benjamin Otte
8c49cd97a7
cssvalue: Add a cssvalue for images
2012-04-17 08:59:14 +02:00
Benjamin Otte
d63b11e56b
cssvalue: Add enum values for the pango enums
...
And fix the parser to conform to the CSS spec while at it.
2012-04-17 08:59:14 +02:00
Benjamin Otte
b65d17dda8
cssvalue: Make border styles be their own value
...
... and add them via gtkcssenumvalue.[ch] which will be used for all
enums.
2012-04-17 08:59:14 +02:00
Benjamin Otte
58b6d492b8
cssvalue: Add a custom RGBA value
...
Note: custom CSS properties still use the default GtkCssValue and always
will.
So there is a difference in css values used between those, even though
they both carry a GdkRGBA payload.
2012-04-17 08:59:14 +02:00
Benjamin Otte
dcec7a5529
cssstyleproperty: Make assign_value a vfunc
2012-04-17 08:59:14 +02:00
Benjamin Otte
81dfc2776e
customproperty: Implement assign vfunc
...
I'm going to overwrite the GtkCssStyleProperty one, so better keep this
one.
2012-04-17 08:59:14 +02:00
Benjamin Otte
645309e98b
shadow: Also rename files
2012-04-17 08:59:14 +02:00
Benjamin Otte
ec5c77a552
shadow: Rename to GtkCssShadowValue
...
I don't want to confuse css values with other stuff, so there.
2012-04-17 08:59:13 +02:00
Benjamin Otte
da40ba431d
cssvalue: Remove unused function
2012-04-17 08:59:13 +02:00
Benjamin Otte
96948576bd
shadow: Move parse function into GtkShadow
...
This way, we have less public API.
And gtkcssstylepropertyimpl.c looks less scary (only 1624 lines now).
2012-04-17 08:59:13 +02:00
Benjamin Otte
ccd443796c
shadow: Make this a GtkCssValue
2012-04-17 08:59:13 +02:00
Benjamin Otte
38ac68790e
shadow: Remove _gtk_shadow_get_resolved()
...
It's unused
2012-04-17 08:59:13 +02:00
Benjamin Otte
ca4a080c8a
stylepropertyimpl: Make shadows unqueryable
...
Normal APIs couldn't use GtkShadow anyway as the type was private.
2012-04-17 08:59:13 +02:00
Benjamin Otte
281d094b42
theming: Use peek_property() calls to query shadows
2012-04-17 08:59:13 +02:00
Benjamin Otte
a33df2d1d6
cssvalue: Split number values into their own class
2012-04-17 08:59:13 +02:00
Benjamin Otte
f7c0c7677b
cssstyleproperty: Make query func a vfunc
...
This will be needed soon.
2012-04-17 08:59:13 +02:00
Benjamin Otte
6ef76f4a92
customproperty: Add our own query_value function
...
I'm about to change the CssStyleProperty one, so better copy things
here.
2012-04-17 08:59:13 +02:00
Benjamin Otte
c8e57d63ec
cssstyelproperty: Rempove specified-type and computed-type props
...
This removes the necessity to keep a GType associated with style
properties and code can now make use of GtkCssValue completely.
2012-04-17 08:59:13 +02:00
Benjamin Otte
75a5f04352
styleproperty: Remove default parse function
...
... and assert every style property brings its own.
2012-04-17 08:59:13 +02:00
Benjamin Otte
a5d001b2ba
stylepropertyimpl: Add remaining parse functions
2012-04-17 08:59:12 +02:00
Benjamin Otte
0fdc287339
styleproperty: Simplify compute_value function
...
The compute_value fallback path is only needed for custom properties,
the real style properties have custom compute functions if they need
them already.
2012-04-17 08:59:12 +02:00
Benjamin Otte
7fbc583b88
css: Move shadow parse/print/compute funcs
...
They don't belong in the style funcs, as those are for custom
properties, and the shadow type is private.
2012-04-17 08:59:12 +02:00
Benjamin Otte
dd144c2bad
stylepropertyimpl: Add parse funcs for enums
2012-04-17 08:59:12 +02:00
Benjamin Otte
86a387f571
stylepropertyimpl: Add color parsing function
...
This is in preparation for removing the specified type and computed type
properties from GtkCssStyleProperty, which is in preparation for really
using GtkCssValue classes and not GTypes.
2012-04-17 08:59:12 +02:00
Benjamin Otte
b5fc484c99
customproperty: Don't rely on querying style property
...
This way, we can remove type madness from GtkCssStyleProperty later.
2012-04-17 08:59:12 +02:00
Benjamin Otte
bc9060a591
styleproperty: Make gtk_style_property_register() not be valist
...
Instead, make the caller create a GtkCssValue in advance.
2012-04-17 08:59:12 +02:00
Benjamin Otte
ffe50c3b67
cssvalue: Add _gtk_css_value_equal()
...
For now, we return FALSE for all default css values, so this is not very
useful.
I also think of this as an optimization equal, not a guaranteed equal,
because we don't even have a notion of what "equal" means.
For example, for background-repeat, "repeat, repeat" and "repeat"
are functionally equivalent. But the cssvalue has no idea that it's used
for background-repeat.
As a more complicated example, "repeat, no-repeat" and "repeat" are
equal to what one sees as long as there's only one image listed
background-image-source. But once you start transition'ing to an image
with 2 sources, it's different...
2012-04-17 08:59:12 +02:00
Benjamin Otte
3e601691d9
tests: Change expected errors to conform with output
...
This change isn't strictly correct, but I can't be bothered until we get
a tokenizer that can really differentiate between allowed values and
invalid syntax.
2012-04-17 08:59:12 +02:00
Benjamin Otte
b0e764000f
cssparser: Use _gtk_css_parser_error_full()
2012-04-17 08:59:12 +02:00