summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstyleproperty.c
Commit message (Collapse)AuthorAgeFilesLines
* cssstyleproperty: remove unused variableCosimo Cecchi2012-12-131-2/+0
|
* css: Avoid looking up the GtkCssStyleProperty class a lotAlexander Larsson2012-12-101-12/+12
| | | | | Instead of constantly looking up the class we just stash it away in class_init.
* css: Add _gtk_css_style_property_affects_fontAlexander Larsson2012-12-061-0/+44
| | | | This checks if a style_update affects the font.
* styleproperty: Add _gtk_css_style_property_changes_affect_size()Benjamin Otte2012-11-301-0/+13
| | | | | This gives fast access to the question of wether a style update requires a resize.
* styleproperty: Add an affects-size propertyBenjamin Otte2012-11-301-0/+31
| | | | | This property will be used to avoid gtk_widget_queue_resize() calls in favor of gtk_widget_queue_draw().
* css: Move special case code for border widthsBenjamin Otte2012-10-021-0/+62
| | | | | | | | | | | | | We need to store the border widths independant of them being set to 0 by border styles, because otherwise we'd need to track that dependency and recompute on changes, and I don't want to add more entries to GtkCssDependencies just for this special case. By moving the code that does the setting to 0 from the compute stage to the query stage, we can achieve this. Now we need to just be aware that the actual value stored is not set to 0 when we use gtk_css_computed_values_get_value().
* cssstyleproperty: Get rid of unused APIBenjamin Otte2012-08-281-67/+0
| | | | | | | Both _gtk_css_style_property_print_value() and _gtk_css_style_property_compute_value() aren't necessary anymore and are replaced by _gtk_css_value_print() and _gtk_css_value_comptue() respectively.
* cssstyleproperty: Call _compute() in the compute functionBenjamin Otte2012-08-281-1/+1
| | | | ... instead pof just reffing the value.
* styleproperty: Remove base argumentBenjamin Otte2012-05-111-2/+1
| | | | | from _gtk_style_property_parse_value(). The GtkCssParser takes care of that now.
* cssstyleproperty: Remove base argumentBenjamin Otte2012-05-111-3/+2
| | | | from parse functions.
* styleproperty: Remove equal_func vfuncBenjamin Otte2012-04-171-32/+0
| | | | | | | | 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.
* cssstyleproperty: Add _gtk_css_style_property_is_animated()Benjamin Otte2012-04-171-1/+33
|
* cssstyleproperty: Make assign_value a vfuncBenjamin Otte2012-04-171-2/+7
|
* cssstyleproperty: Make query func a vfuncBenjamin Otte2012-04-171-48/+5
| | | | This will be needed soon.
* cssstyelproperty: Rempove specified-type and computed-type propsBenjamin Otte2012-04-171-65/+0
| | | | | This removes the necessity to keep a GType associated with style properties and code can now make use of GtkCssValue completely.
* styleproperty: Remove default parse functionBenjamin Otte2012-04-171-14/+2
| | | | ... and assert every style property brings its own.
* styleproperty: Simplify compute_value functionBenjamin Otte2012-04-171-1/+1
| | | | | | The compute_value fallback path is only needed for custom properties, the real style properties have custom compute functions if they need them already.
* cssvalue: Add _gtk_css_value_equal()Benjamin Otte2012-04-171-1/+1
| | | | | | | | | | | | | | | | 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...
* styleproperty: Make _gtk_style_property_parse_value() return a CssValueBenjamin Otte2012-04-171-36/+27
| | | | Also split out initial/inherit handling into a custom GtkCssValue class.
* css: Remove _gtk_css_style_property_is_specified_type()Benjamin Otte2012-04-171-26/+0
| | | | That check is going to be refactored away.
* styleproperty: Make _gtk_style_property_query() take a GValueBenjamin Otte2012-04-171-11/+17
| | | | | ... and don't make it return a GtkCssValue. We want to use this for compat with the old GValue APIs after all...
* styleproperty: Make print_func take a GtkCssValueBenjamin Otte2012-04-171-6/+3
| | | | | Also, constify GtkCssValue getters, so we can pass a const GtkCssValue to the print_func.
* styleproperty: Add a function to compare values for equalityBenjamin Otte2012-04-171-0/+31
| | | | and default to never compare them as equal.
* styleproperty: 3rd hotfix for a 3-line patchBenjamin Otte2012-04-101-1/+1
| | | | | | I really should not write code sometimes... Copy/paste error this time.
* csscustomproperty: Redo RGBA/Color parsingBenjamin Otte2012-04-091-0/+4
| | | | | This fixes custom parse functions returning RGBA values where we expected symbolic colors.
* css: Use GtkCssValues instead of GValue in the css machineryAlexander Larsson2012-03-081-46/+44
| | | | | | Also, in places where we're computing a new CssValue based on an old one, make sure that if nothing changes we're returning a reference to the old one, rather than creating a new identical instance.
* Change FSF AddressJavier Jardón2012-02-271-2/+1
|
* css: Implement padding as numbersBenjamin Otte2012-02-021-0/+10
| | | | Also remove the now unused border parsing function for shorthands.
* css: Add a check function for specified typesBenjamin Otte2012-02-021-0/+23
| | | | | | ... and use it. It seems kinda necessary for the refactoring I'm about to do...
* css: Initialize value before calling compute functionBenjamin Otte2012-02-021-1/+2
|
* css: Initialize values to their specified typeBenjamin Otte2012-02-021-1/+1
| | | | .. when parsing.
* styleproperty: Introduce "specified type" and "computed type"Benjamin Otte2012-02-021-0/+65
| | | | | Make the types explicit. This way, we can actually do useful stuff with them (like sanity checks, d'oh).
* styleproperty: Make query function take a vfuncBenjamin Otte2012-01-111-4/+4
| | | | | This way we can use different methods to query properties and aren't bound to a GtkStyleProperties object.
* styleproperty: Call style properties init function in more placesBenjamin Otte2012-01-091-0/+13
| | | | | In particular, call it when querying properties by id. This is necessary for make check to not die.
* styleproperty: Simplify codeBenjamin Otte2012-01-091-10/+1
| | | | Merge 1-line function into only caller
* styleproperty: Convert background-image from pattern to GtkCssImageBenjamin Otte2012-01-091-1/+33
|
* styleproperty: Remove context arg from _gtk_style_context_query()Benjamin Otte2012-01-091-1/+0
|
* styleproperty: Move parse/print vfuncs to GtkCssStylePropertyBenjamin Otte2012-01-091-12/+27
|
* styleproperty: Add a compute vfuncBenjamin Otte2012-01-091-3/+12
|
* css: Redo value resolvingBenjamin Otte2012-01-091-182/+28
| | | | | | | | | | | | 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.
* styleproperty: Add custom parser for custom propertiesBenjamin Otte2012-01-091-18/+0
| | | | | In particular, move the property_parse_func handling to GtkCssCustomProperty exclusively.
* styleproperty: Let parse_value() initialize the valueBenjamin Otte2012-01-091-6/+15
| | | | ... and document that behavior.
* styleproperty: Move parse funcBenjamin Otte2012-01-091-0/+52
| | | | It's specific to GtKCssStyleProperty after all.
* css: Use _gtk_style_property_get_value_type() where appropriateBenjamin Otte2012-01-091-5/+5
|
* styleproperty: Make query() and assign() vfuncsBenjamin Otte2012-01-091-0/+223
| | | | ... and implement them in the 2 known subclasses.
* styleproperty: Move value printing to real propertiesBenjamin Otte2012-01-091-0/+40
| | | | | | 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.
* styleproperty: Move member variablesBenjamin Otte2012-01-091-10/+79
| | | | | These variables are only relevant for style properties, but not for shorthands, so put them there.
* css: Move a bunch of functionsBenjamin Otte2012-01-091-0/+16
| | | | ... from GtkStyleProperty to GtkCssStyleProperty.
* styleproperty: Move id handlingBenjamin Otte2012-01-091-0/+108
| | | | | only real style properties can have an id, so let GtkCssStylePropertyClass handle it.
* styleproperty: Split into shorthand and real style propertiesBenjamin Otte2012-01-091-0/+36