Commit Graph

22 Commits

Author SHA1 Message Date
Benjamin Otte
a81ac3d5cd css: Add a check function for specified types
... and use it.

It seems kinda necessary for the refactoring I'm about to do...
2012-02-02 03:14:00 +01:00
Benjamin Otte
5e5e8367ce css: Initialize value before calling compute function 2012-02-02 03:13:38 +01:00
Benjamin Otte
f7e0ce3b28 css: Initialize values to their specified type
.. when parsing.
2012-02-02 03:13:38 +01:00
Benjamin Otte
9fa764abec styleproperty: Introduce "specified type" and "computed type"
Make the types explicit. This way, we can actually do useful stuff with
them (like sanity checks, d'oh).
2012-02-02 03:13:34 +01:00
Benjamin Otte
5939baa556 styleproperty: Make query function take a vfunc
This way we can use different methods to query properties and aren't
bound to a GtkStyleProperties object.
2012-01-11 15:48:54 +01:00
Benjamin Otte
c4566da282 styleproperty: Call style properties init function in more places
In particular, call it when querying properties by id. This is necessary
for make check to not die.
2012-01-09 22:08:48 +01:00
Benjamin Otte
fd3afa3606 styleproperty: Simplify code
Merge 1-line function into only caller
2012-01-09 18:37:59 +01:00
Benjamin Otte
0bc170cd84 styleproperty: Convert background-image from pattern to GtkCssImage 2012-01-09 18:37:56 +01:00
Benjamin Otte
32c8bbb575 styleproperty: Remove context arg from _gtk_style_context_query() 2012-01-09 18:37:56 +01:00
Benjamin Otte
c3d337312a styleproperty: Move parse/print vfuncs to GtkCssStyleProperty 2012-01-09 18:37:55 +01:00
Benjamin Otte
22a65bcd82 styleproperty: Add a compute vfunc 2012-01-09 18:37:55 +01:00
Benjamin Otte
e87cf5d789 css: Redo value resolving
Instead of on-demand resolvage, we now resolve during lookup. The step
is done via
  _gtk_css_style_property_compute_value()
which currently calls into
  _gtk_css_style_compute_value()
That function has all the old resolving machinery.

The only part missing for now is the handling of win32 code. It will be
added back later.
2012-01-09 18:37:55 +01:00
Benjamin Otte
61042d155c styleproperty: Add custom parser for custom properties
In particular, move the property_parse_func handling to
GtkCssCustomProperty exclusively.
2012-01-09 18:37:55 +01:00
Benjamin Otte
2d46618e08 styleproperty: Let parse_value() initialize the value
... and document that behavior.
2012-01-09 18:37:54 +01:00
Benjamin Otte
70af2cb2e3 styleproperty: Move parse func
It's specific to GtKCssStyleProperty after all.
2012-01-09 18:37:54 +01:00
Benjamin Otte
5ae00c3755 css: Use _gtk_style_property_get_value_type() where appropriate 2012-01-09 18:37:53 +01:00
Benjamin Otte
79a171de0a styleproperty: Make query() and assign() vfuncs
... and implement them in the 2 known subclasses.
2012-01-09 18:37:53 +01:00
Benjamin Otte
b904679a11 styleproperty: Move value printing to real properties
We can't print shorthands, so don't try.
In particular, I want to get away from shorthands being representable
using GValue, and this function kinda requires that.
2012-01-09 18:37:53 +01:00
Benjamin Otte
341a738dc6 styleproperty: Move member variables
These variables are only relevant for style properties, but not for
shorthands, so put them there.
2012-01-09 18:37:53 +01:00
Benjamin Otte
544d210a61 css: Move a bunch of functions
... from GtkStyleProperty to GtkCssStyleProperty.
2012-01-09 18:37:52 +01:00
Benjamin Otte
0a3ac5efbc styleproperty: Move id handling
only real style properties can have an id, so let
GtkCssStylePropertyClass handle it.
2012-01-09 18:37:52 +01:00
Benjamin Otte
f9485241b1 styleproperty: Split into shorthand and real style properties 2012-01-09 18:37:51 +01:00