By default, a background image is stretched. Instead, it is worth to
have a tiled background.
This patch allows background surfaces to be repeated or not, and should
be compatible with future extensions and CSS.
https://bugzilla.gnome.org/show_bug.cgi?id=663522
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h
- add gtkprivate.c and move stuff there from gtkmain.c
- add gtkwin32.c and move stuff there from gtkmain.c
- don't redefine GTK_DATADIR and friends in gtkprivate.h
- have _gtk_get_datadir() and friends on all platforms
- remove the horrid hacks where gtkprivate.h can't be included,
or must be included later due to redefinition of the compile-time
directories
Also create a separate section for values to associate the values with.
Finally, use this section information when delayed-parsing a widget
style property.
This struct keeps track of an area of text in a CSS file and uses it
when specifying information. Also, the cssprovider keeps track of
sections when parsing a file.
... and implement the CSS font properties:
- font-size
- font-style
- font-family
- font-weight
- font-variant
This is the second try at this. The first was backed out previously due
to bugginess. Let's hope this one survives a bit longer.
Also makes the font-family CSS test work again.
It's useful to set a slice size != border-width, as backgrounds are
clipped to border-width too.
As slices can be half-transparent and overlap the background,
this would not fill the border box properly if we only use a single
property for specifying the width.
Also, this brings us even closer to CSS3.
The hack in gtk_style_context_get_font() was causing segfaults in
combobox code. This is not acceptable and I'm not awake enough to fix
it, so just reverting until it's fixed sanely is easiest.
This reverts commit cf6bfbdb17.
... and take an optional style property as argument. This way, we can
allow custom parse functions for properties. The style property needs to
be optional so that we can use it for widget style properties, too.
Name it _gtk_style_property_print_value() and actually pass it the style
property. This way, we can later change it to use custom print functions
for different style properties.
The call to gtk_border_free() within unpack_border() felt completely
in the wrong place, as the border actually pertains to the GValue
being unpacked. Plus, the GValue itself was also being leaked.
In finalize(), clear all rulesets.
In parse_declaration(), Free the GValue under unhandled error situations.
In gtk_css_provider_load_internal(), Do not leak the file contents.
GValues stored in GtkCssRulesets are gslice managed, so don't
g_memdup() GValues from shorthand properties. This fixes
memory corruptions when reloading contents in a GtkCssProvider.
Shorthand properties are basically the same a in CSS. For storage in
style properties or the CSS provider, they are unpacked into the real
values, so it is possible to partially override them.
No properties are yet converted to the new world yet, this is just the
code for supporting them.