Cosimo Cecchi
ed12be7e81
styleproperty: make background-repeat an array property
2012-05-15 13:24:40 -04:00
Cosimo Cecchi
f8e6e272a7
styleproperty: make background-clip and background-area array properties
...
Right now just make them arrays, but don't consider values after the
first.
2012-05-15 13:24:40 -04:00
Benjamin Otte
6ee237ea59
cssstyleproperty: Remove base argument
...
from parse functions.
2012-05-11 16:42:12 +02:00
Benjamin Otte
c9f01ffb43
cssimage: No need to pass base file anymore
...
The file is now part of the GtkCssParser
2012-05-11 16:42:12 +02:00
Benjamin Otte
2fec112422
styleproperty: Remove equal_func vfunc
...
Equality tests are done with _gtk_css_value_equal(). There is no need to
do it per-property, equal values will still be equal.
This essentially reverts 24f5d54329e028347bd76af42e86ed190c1229a2 and
92c7a7171e1240b6d961ee5b6f9ab6b596e98904.
2012-04-17 08:59:20 +02:00
Benjamin Otte
0111b9d507
symboliccolor: Treat it as a CssValue
...
.. now that it is one.
2012-04-17 08:59:20 +02:00
Benjamin Otte
51da8cb263
symboliccolor: Parse 'currentColor' everywhere
2012-04-17 08:59:20 +02:00
Benjamin Otte
04c5fdaca6
css: Remove old animation code
...
Deprecate public API where appropriate and make it no-ops.
Remove all calls to it.
Get rid of the 'transition' css property.
For now, this means spinners don't animate anymore.
2012-04-17 08:59:19 +02:00
Benjamin Otte
1170ecfd2e
cssvalue: Convert border-image-width to border value
2012-04-17 08:59:19 +02:00
Benjamin Otte
56f79fecce
cssvalue: Add a border value
...
.. and parse border-image-slice with it.
2012-04-17 08:59:18 +02:00
Benjamin Otte
cfc6462730
cssvalue: Add a cssvalue for background-size
2012-04-17 08:59:18 +02:00
Benjamin Otte
f785f7177c
cssvalue: Add a custom value for repeats
...
In particular, that's background-repeat and border-image-repeat.
Also, fix up the border-image shorthand to allow any order.
2012-04-17 08:59:18 +02:00
Benjamin Otte
5377169ef3
cssvalue: Add a value for background-position
2012-04-17 08:59:18 +02:00
Benjamin Otte
aed7600425
cssvalue: Add a css value for engines
2012-04-17 08:59:18 +02:00
Benjamin Otte
4f63c1c7ca
cssstyleproperty: Convert binding sets
...
Instead of keeping a custom GPtrArray, keep it as a GtkCssArrayValue of
GtkCssStringValue. This way, we gain equality comparisons and print
functions for free.
2012-04-17 08:59:18 +02:00
Benjamin Otte
edbc8e4f57
cssvalue: Add a value for border-radius corner properties
...
... and convert those properties to this value.
2012-04-17 08:59:18 +02:00
Benjamin Otte
05f2249d08
css: Make outline-offset a number property
2012-04-17 08:59:18 +02:00
Benjamin Otte
c366b5b8b7
shadow: Add equal and transition support
...
... and enable transitions for the shadow properties.
2012-04-17 08:59:18 +02:00
Benjamin Otte
ac6d61f6bb
cssvalue: Add GtkCssShadowsValue
...
This is necessary because shadows get treated differently from other
lists when transitioning.
2012-04-17 08:59:18 +02:00
Benjamin Otte
ca17270187
cssvalue: Make GtkCssShadowValue only hold one shadow
...
All the properties now are a GtkCssArrayValue of GtkCssSadowValue.
GtkCssArrayValue already does everything we want, so no need to
duplicate its funtionality.
2012-04-17 08:59:17 +02:00
Benjamin Otte
b9ebe8c226
cssarrayvalue: Redo parsing arrays
...
Does 3 things:
1) Introduce a "none" array signleton
2) Get rid of memleaks in error paths
3) Reduce code in parse funcs
2012-04-17 08:59:17 +02:00
Benjamin Otte
a8efb784d7
cssstyleproperty: Mark all animatable properties
...
Only the ones that can be animated are marked of course. So more work is
needed.
This is important for
transition-property: all;
because it'll just animate all the properties that can be.
2012-04-17 08:59:17 +02:00
Benjamin Otte
ed45a3c2f0
cssstyleproperty: Add _gtk_css_style_property_is_animated()
2012-04-17 08:59:17 +02:00
Benjamin Otte
9e4341f730
css: Move enum to the only source file using it
2012-04-17 08:59:17 +02:00
Benjamin Otte
41ce29767c
cssstyleproperty: Add transition properties
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
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
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
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
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
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
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
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
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
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
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
9b7640b898
styleproperty: Make _gtk_style_property_parse_value() return a CssValue
...
Also split out initial/inherit handling into a custom GtkCssValue class.
2012-04-17 08:59:11 +02:00