Commit Graph

12133 Commits

Author SHA1 Message Date
Carlos Garnacho
8a1b6e8224 GtkWidgetPath: Add methods to include class info in paths. 2010-12-04 15:37:36 +01:00
Carlos Garnacho
a3637ec60d s/child class/region/ everywhere.
"Child class" is an invented term anyway, and it conceptually defines
identifiable regions in widgets.
2010-12-04 15:37:35 +01:00
Carlos Garnacho
198d75bea5 GtkStyleContext: Rename internal struct.
GtkStyleRegion has been renamed to GtkStyleInfo, as it doesn't really
have much to do with regions itself, the information it contains does.
This struct is used in save/restore.
2010-12-04 15:37:35 +01:00
Carlos Garnacho
e04dfd4d6d GtkThemingEngine: Add gtk_theming_engine_register_property().
This function may be used for custom property registration from
theming engines. The property names will have the
-${engine-type-name}-${prop-name} format, the parser has been
modified to allow properties with '-' as the first char.
2010-12-04 15:37:35 +01:00
Carlos Garnacho
d9e3782391 GtkStyleSet: Fix compiler warning. 2010-12-04 15:37:35 +01:00
Carlos Garnacho
355f0d69ab GtkStyleSet: Allow custom parsers on registered properties. 2010-12-04 15:37:35 +01:00
Carlos Garnacho
99224c9eec GtkCssProvider: Parse correctly widget types with a name.
There's now a distinction between:

GtkLabel#label-name: Label with name "label-name"
GtkWindow #label-name: Window containing a widget named "label-name"
2010-12-04 15:37:34 +01:00
Carlos Garnacho
56e4ffabea Compare widget names as GQuarks in style matching. 2010-12-04 15:37:34 +01:00
Carlos Garnacho
09d8592b5b GtkWidgetPath: Make API more consistent. 2010-12-04 15:37:34 +01:00
Carlos Garnacho
ad08330fae Compare region names as quarks in style matching. 2010-12-04 15:37:34 +01:00
Carlos Garnacho
d47d3d0200 GtkCssProvider: Set child combinators in default CSS. 2010-12-04 15:37:34 +01:00
Carlos Garnacho
5f77ead9c6 GtkCssProvider: Parse and compare widget names. 2010-12-04 15:37:33 +01:00
Carlos Garnacho
52878c45b5 GtkCssProvider: Don't jump too eagerly to the next element when comparing selectors. 2010-12-04 15:37:33 +01:00
Carlos Garnacho
85dbc71921 GtkCssProvider: Immediately bail out if GType couldn't be resolved. 2010-12-04 15:37:33 +01:00
Carlos Garnacho
9ebbc7b5c5 GtkCssProvider: Small optimization. 2010-12-04 15:37:33 +01:00
Sven Herzberg
c001833ed1 GtkCssProvider: don't ignore custom attributes
* gtk/gtkcssprovider.c: don't ignore custom attribites (which can be
  added by theme engines)
2010-12-04 15:37:33 +01:00
Sven Herzberg
27bc581dca GtkWidgetPath: properly use const
* gtk/gtkwidgetpath.c,
* gtk/gtkwidgetpath.h: use const where possible
2010-12-04 15:37:32 +01:00
Carlos Garnacho
b6226cb7b9 GtkThemingEngine: Render correctly spinbutton buttons. 2010-12-04 15:37:32 +01:00
Carlos Garnacho
dd8da82d1e GtkStyle: set junction details in spinbutton buttons. 2010-12-04 15:37:32 +01:00
Carlos Garnacho
8c117b1638 GtkThemingEngine: Add gtk_theming_engine_get_junction_sides(). 2010-12-04 15:37:31 +01:00
Carlos Garnacho
9108739c9b GtkStyleContext: Add gtk_style_context_[gs]et_junction_sides().
These functions will help widgets specify how does one element being painted
relate to other contiguous elements.
2010-12-04 15:37:31 +01:00
Carlos Garnacho
d9b42ce50f Add GtkJunctionSides flags. 2010-12-04 15:37:30 +01:00
Carlos Garnacho
143c4b3b60 GtkStyleContext: Add gtk_style_context_lookup_color().
gtk_style_lookup_color() now uses this function internally.
2010-12-04 15:37:30 +01:00
Carlos Garnacho
b4a24d6457 GtkStyleSet: Register the "border" property. 2010-12-04 15:37:29 +01:00
Carlos Garnacho
78cc97f7b3 GtkThemingEngine: fix typo in function declaration. 2010-12-04 15:37:28 +01:00
Carlos Garnacho
fcf12ff9b9 GtkThemingEngine: Add gtk_theming_engine_get_direction(). 2010-12-04 15:37:28 +01:00
Carlos Garnacho
978d97ea6f GtkWidget: Set style context direction. 2010-12-04 15:37:27 +01:00
Carlos Garnacho
dc216ffb00 GtkStyleContext: Add gtk_style_context_[gs]et_direction(). 2010-12-04 15:37:27 +01:00
Carlos Garnacho
e15dc89f89 GtkWidget: Add the default CSS provider to all style contexts. 2010-12-04 15:37:27 +01:00
Carlos Garnacho
85398fc05f GtkCssProvider: Add gtk_css_provider_get_default().
This method returns a GtkCssProvider with the default style information
loaded.
2010-12-04 15:37:26 +01:00
Carlos Garnacho
bd6751230a GtkStyle: Move gtk_render_* calls to default vmethod implementations. 2010-12-04 15:37:26 +01:00
Carlos Garnacho
9255e20bf8 GtkWidget: Create GtkStyle on top of GtkStyleContext. 2010-12-04 15:37:26 +01:00
Carlos Garnacho
6c549fecd3 GtkWidget: Construct style for partial widget hierarchies.
Some unparented widgets like to ask style details, so now the style is
constructed regardless of the parent being present or not, and then
reconstructed if the parent changes.
2010-12-04 15:37:25 +01:00
Carlos Garnacho
09d6c4ea52 GtkStyle: Optionally construct above a GtkStyleContext. 2010-12-04 15:37:25 +01:00
Carlos Garnacho
1e83e52b3d GtkThemingEngine: Add code to render GtkFrame frame with gap. 2010-12-04 15:37:24 +01:00
Carlos Garnacho
d858801ec3 GtkThemingEngine: Obey active/selected when rendering text. 2010-12-04 15:37:24 +01:00
Carlos Garnacho
5510f24cc1 GtkThemingEngine: Rip out focus rendering from old code. 2010-12-04 15:37:24 +01:00
Carlos Garnacho
eadaded374 GtkThemingEngine: Rip out expander rendering from old code. 2010-12-04 15:37:24 +01:00
Carlos Garnacho
d22f393be3 GtkThemingEngine: Render frames and spinbutton boxes properly. 2010-12-04 15:37:24 +01:00
Carlos Garnacho
7482b636e6 GtkThemingEngine: Improve background rendering.
Now active and selected states are taken into account, and GtkSpinButton
buttons are special cased.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
911431c0b2 GtkThemingEngine: Improve pixel alignment in arrows. 2010-12-04 15:37:23 +01:00
Carlos Garnacho
c18ee462e3 GtkThemingEngine: Add methods to retrieve widget style properties. 2010-12-04 15:37:23 +01:00
Carlos Garnacho
0dc81b9a35 GtkStyleSet: Allow setting default value when registering properties.
This is now used for the "engine" keyword, where the default engine is used
if none is specified.
2010-12-04 15:37:23 +01:00
Carlos Garnacho
c712480912 GtkStyleContext: Add varargs functions for getting widget style properties. 2010-12-04 15:37:23 +01:00
Carlos Garnacho
5f2e8bc0d1 GtkStyleContext: Ensure style rebuilds after adding/removing classes. 2010-12-04 15:37:23 +01:00
Carlos Garnacho
7748b1d2de GtkStyleContext: ensure class lookup return the correct insertion position if not found. 2010-12-04 15:37:22 +01:00
Carlos Garnacho
0813a2283e GtkCssProvider: Allow '_' in the middle of symbolic color names. 2010-12-04 15:37:22 +01:00
Carlos Garnacho
227c500dce GtkThemingEngine: Improve slider rendering. 2010-12-04 15:37:22 +01:00
Carlos Garnacho
44373ec551 GtkThemingEngine: Cairo-ify frame rendering from GtkStyle. 2010-12-04 15:37:22 +01:00
Carlos Garnacho
8771f46dae GtkThemingEngine: Cairo-ify frame_gap rendering from GtkStyle. 2010-12-04 15:37:22 +01:00
Carlos Garnacho
7d2b51f147 GtkThemingEngine: Cairo-ify extension rendering from GtkStyle. 2010-12-04 15:37:21 +01:00
Carlos Garnacho
4772b67563 GtkThemingEngine: Make render_background use drawing primitives. 2010-12-04 15:37:21 +01:00
Carlos Garnacho
1b556aa4d1 GtkThemingEngine: Unify code to render lines. 2010-12-04 15:37:21 +01:00
Carlos Garnacho
75b059a3f2 GtkThemingEngine: Add cairo-ified rendering primitives.
Functions to add paths for lines, rectangle sides, and the gap side in notebooks
have been added.
2010-12-04 15:37:20 +01:00
Carlos Garnacho
5cdb3f0e90 GtkThemingEngine: Cairo-ify handle rendering from GtkStyle. 2010-12-04 15:37:20 +01:00
Carlos Garnacho
9261c2a9d7 GtkThemingEngine: Take option rendering from GtkStyle. 2010-12-04 15:37:20 +01:00
Carlos Garnacho
4e45e9099e GtkThemingEngine: Take checkbox rendering from GtkStyle. 2010-12-04 15:37:19 +01:00
Carlos Garnacho
27f5257d49 GtkStyleContext: Don crash on empty class sets. 2010-12-04 15:37:19 +01:00
Carlos Garnacho
038bcdcdb6 GtkThemingEngine: Use GdkPangoRenderer when painting layouts. 2010-12-04 15:37:19 +01:00
Carlos Garnacho
475f0fc266 GtkStyleContext: Add gtk_style_context_save/restore().
This API will be used to have savepoints when adding and removing
style classes information.
2010-12-04 15:37:18 +01:00
Carlos Garnacho
4a465d279d GtkThemingEngine: Add gtk_theming_engine_get_screen(). 2010-12-04 15:37:18 +01:00
Carlos Garnacho
5db7197c27 GtkWidget: Set screen info in GtkStyleContext. 2010-12-04 15:37:18 +01:00
Carlos Garnacho
758c3e18cc GtkStyleContext: Add gtk_style_context_[gs]et_screen() 2010-12-04 15:37:17 +01:00
Carlos Garnacho
41650933fd GtkStyleContext: Add priv pointer to object struct. 2010-12-04 15:37:17 +01:00
Carlos Garnacho
10f6c04f33 GtkStyleSet: Add priv pointer to object struct. 2010-12-04 15:37:17 +01:00
Carlos Garnacho
875237187c GtkCssProvider: Add priv pointer to object struct. 2010-12-04 15:37:17 +01:00
Carlos Garnacho
51a8f642da Fix include. 2010-12-04 15:37:16 +01:00
Carlos Garnacho
a256171d34 GtkStyleContext: Add gtk_style_context_lookup_icon_set(). 2010-12-04 15:37:16 +01:00
Carlos Garnacho
318e0f28ee GtkStyleProvider: Add gtk_style_provider_get_icon_factory().
With this, style providers have a way to override default icon theme.
2010-12-04 15:37:16 +01:00
Carlos Garnacho
be5d4adf6b GtkCssProvider: Allow symbolic colors when parsing style rules. 2010-12-04 15:37:15 +01:00
Carlos Garnacho
1de8f75517 GtkCssProvider: Parse color mappings.
These are of the form:

@color-a: #fff;
@color-b: mix (@color-a, #000, 0.5)
@color-c: shade (@color-b, 0.7)

In the stylesheet, arbitrary nesting of these commands is handled.
2010-12-04 15:37:15 +01:00
Carlos Garnacho
4ed96df96a GtkStyleSet: Optionally take GtkSymbolicColors.
gtk_style_set_set_property() now takes both GdkColor and GtkSymbolicColor
GValues, All accessors still return GdkColors, so any symbolic color will
be resolved and replaced in the styleset at that time.
2010-12-04 15:37:15 +01:00
Carlos Garnacho
b8fb2d1a36 GtkSymbolicColor: Add method to resolve to a GdkColor. 2010-12-04 15:37:15 +01:00
Carlos Garnacho
e2b8efcbec GtkStyleSet: Add API to map symbolic colors. 2010-12-04 15:37:15 +01:00
Carlos Garnacho
7094213df9 Add GtkSymbolicColor.
This is a small boxed struct used to store symbolic colors so they
can be resolved at a later point.
2010-12-04 15:37:14 +01:00
Carlos Garnacho
d748ea983d GtkWidgetPath: Add to gtkalias. 2010-12-04 15:37:14 +01:00
Carlos Garnacho
b50c88d170 GtkCssProvider: Plug memory leak. 2010-12-04 15:37:14 +01:00
Carlos Garnacho
2cd4ff4215 GtkCssProvider: Fix compile warning. 2010-12-04 15:37:14 +01:00
Carlos Garnacho
1d4687675f GtkCssProvider: set scanner->input_name. 2010-12-04 15:37:13 +01:00
Carlos Garnacho
6c91ba1cc2 GtkWidget: Do not reset GtkStyleContext per get_style_context(). 2010-12-04 15:37:13 +01:00
Carlos Garnacho
22bae20ce8 GtkWidget: Hook up widget style property querying to style context. 2010-12-04 15:37:13 +01:00
Carlos Garnacho
03370c6e0c GtkStyleContext: Add methods to get style property values. 2010-12-04 15:37:13 +01:00
Carlos Garnacho
bf12227435 GtkCssProvider: Implement GtkStyleProvider->get_style_property
Style properties in the resource files are something like:

-GtkComboBox-appears-as-string
-GtkEntry-icon-prelight

Following the usual naming spec for extensions to CSS.
2010-12-04 15:37:13 +01:00
Carlos Garnacho
37335fbb6f GtkWidgetPath: Add methods to check topmost widget type. 2010-12-04 15:37:12 +01:00
Carlos Garnacho
6990a01299 GtkStyleProvider: Add method to get widget style properties. 2010-12-04 15:37:12 +01:00
Carlos Garnacho
eaddc9f254 GtkCssProvider: refactor out selector matching. 2010-12-04 15:37:12 +01:00
Carlos Garnacho
eec75f1f59 GtkCssProvider: Ensure each scope has its parser config. 2010-12-04 15:37:12 +01:00
Carlos Garnacho
ff05cc4849 GtkCssProvider: Parse boolean values. 2010-12-04 15:37:12 +01:00
Carlos Garnacho
aa5ec97cac GtkCssProvider: Make additions to parse_value() less error prone. 2010-12-04 15:37:11 +01:00
Carlos Garnacho
814957021f Fix compile warning. 2010-12-04 15:37:11 +01:00
Carlos Garnacho
66d1cb8054 GtkStyleSet: Register GtkThemingEngine type.
This has been also hooked up to the CSS provider, which parses the "engine"
value to load the corresponding module.
2010-12-04 15:37:11 +01:00
Carlos Garnacho
327a9fc66a GtkWidget: Generate GtkWidgetPath on set_parent.
There's no need to wait for realize() to have the right widget style.
2010-12-04 15:37:11 +01:00
Carlos Garnacho
6906138e45 GtkStyleSet: Remove default value for registered properties.
This should be handled at a higher level, a single default value for all
states isn't that useful...
2010-12-04 15:37:10 +01:00
Carlos Garnacho
80e01becbe Fix compilation. 2010-12-04 15:37:10 +01:00
Carlos Garnacho
a323310c19 GtkNotebook: Set GtkChildClassFlags for tabs. 2010-12-04 15:37:10 +01:00
Carlos Garnacho
e899fdd973 GtkCssProvider: Set default value if no state pseudo-class is specified. 2010-12-04 15:37:10 +01:00
Carlos Garnacho
66accc4184 GtkStyleSet: Add gtk_style_set_set_default().
This will set the default value to a given property for all possible states,
such default value will only be used if the queried state doesn't have a
value itself.
2010-12-04 15:37:10 +01:00
Carlos Garnacho
bd9bd1310b GtkStyleContext: Fix compiler warning. 2010-12-04 15:37:09 +01:00
Carlos Garnacho
17908880b5 GtkStyle: Use new render methods underneath.
This commit should probably be squashed in the future, when GtkStyleContext
is on par with it, and GtkStyle is just a shallow object on top of
GtkStyleContext and calling it in the default implementation methods, so
all gtk_paint_* and gtk_draw_* would work.
2010-12-04 15:37:09 +01:00
Carlos Garnacho
f5adc2a1c3 Add region details in gtk_widget_get_path(). 2010-12-04 15:37:09 +01:00
Carlos Garnacho
cf27f6f1cf GtkStyleContext: fix typos in code.
The wrong list was being modified in gtk_style_context_set_child_class(),
and gtk_style_context_has_child_class() was checking for *flags != 0, not
flags != NULL.
2010-12-04 15:37:09 +01:00
Carlos Garnacho
104caa74f0 GtkStyleContext: Add gtk_style_context_list_child_classes(). 2010-12-04 15:37:09 +01:00
Carlos Garnacho
67c4f8d02e GtkCssProvider: Compare GtkWidgetPath regions with css. 2010-12-04 15:37:08 +01:00
Carlos Garnacho
977a972358 GtkCssProvider: fix parsing of consecutive pseudo-classes.
Now either of foo{}, foo:first-child{}, foo:nth-child(even):insensitive or
foo:active{} will be correctly parsed.
2010-12-04 15:37:08 +01:00
Carlos Garnacho
0be4659c5d GtkCssProvider: move to next selector element on match or child combinator. 2010-12-04 15:37:08 +01:00
Carlos Garnacho
bc0af3208d GtkCssProvider: free selector path on parse_rule(). 2010-12-04 15:37:08 +01:00
Carlos Garnacho
07171d5f68 GtkCssProvider: Add named regions to selector path. 2010-12-04 15:37:08 +01:00
Carlos Garnacho
707d5ae99c GtkCssProvider: Parse named regions. 2010-12-04 15:37:07 +01:00
Carlos Garnacho
11c874619b GtkWidgetPath: Add API for named regions. 2010-12-04 15:37:07 +01:00
Carlos Garnacho
71949e05c4 Refurbish GtkWidgetPath API.
The foreach() function is now gone, there's now API to get
GTypes and names from the position in the path.
2010-12-04 15:37:07 +01:00
Carlos Garnacho
f60e3f3a8a Move GtkChildClassFlags to gtkenums.h. 2010-12-04 15:37:06 +01:00
Carlos Garnacho
8c03503d16 GtkCssProvider: Add support for child/descendant combinators.
Now, selectors like:

  GtkWindow > GtkButton {}
  GtkNotebook > GtkLabel {}

will represent a direct parent/child relation between both elements, while

  GtkWindow GtkButton {}
  GtkNotebook GtkLabel {}

will allow intermediate children between these.
2010-12-04 15:37:06 +01:00
Carlos Garnacho
d691e79cbf GtkCssProvider: Fix typo freeing SelectorElements. 2010-12-04 15:37:05 +01:00
Carlos Garnacho
abbeb89b7c GtkCssProvider: Allow empty selector.
universal selector is implied, so things like this work:

:active {}
:insensitive{}
2010-12-04 15:37:05 +01:00
Carlos Garnacho
4c8353bcbf GtkCssProvider: Allow '*' selectors.
These would match a single widget of any type.
2010-12-04 15:37:04 +01:00
Carlos Garnacho
468f216b1c GtkCssProvider: Add state parsing.
Now state is now defined as a pseudoclass in the CSS format, selectors like:

GtkWidget:active { }
GtkButton:insensitive { }
GtkCalendar:prelight { } (also :hover is accepted)
...

define the style for the given state.
2010-12-04 15:37:03 +01:00
Carlos Garnacho
7dada9949d GtkWidget: Create GtkCssProvider for user modifications.
~/.gtk-X.0.css is checked, and added as a style resource if available.
2010-12-04 15:37:03 +01:00
Carlos Garnacho
82f485afd9 GtkStyleProvider: Add defines for most common priorities. 2010-12-04 15:37:02 +01:00
Carlos Garnacho
bccad0c65c Added GtkCssProvider.
GtkCssProvider is a GtkStyleProvider implementation which is able to read
CSS-like input to style widgets.

At the moment, only the basic parser features are available.
2010-12-04 15:37:02 +01:00
Carlos Garnacho
7c5c4d86ae Add GtkWidgetPath parameter to gtk_style_provider_get_style(). 2010-12-04 15:37:02 +01:00
Carlos Garnacho
9971f386b0 GtkStyleSet: Add method to lookup property default settings. 2010-12-04 15:37:01 +01:00
Carlos Garnacho
7647deb417 GtkStyleSet: Make property registration take const GValues. 2010-12-04 15:37:01 +01:00
Carlos Garnacho
fdcda4b356 GtkStyleContext: allow late set_path() calls.
Now the properties will only be regenerated whenever there's a GtkWidgetPath
to query about.
2010-12-04 15:37:00 +01:00
Carlos Garnacho
bdadcb568c GtkStyleContext: Fix compiler warning. 2010-12-04 15:37:00 +01:00
Carlos Garnacho
f984c39e93 GtkStyleContext: Fix typo. 2010-12-04 15:37:00 +01:00
Carlos Garnacho
f8c74ae54b GtkStyleContext: Add gtk_render_handle(). 2010-12-04 15:36:59 +01:00
Carlos Garnacho
9e5d9ff28d GtkThemingEngine: Add vmethod to render a handle area. 2010-12-04 15:36:59 +01:00
Carlos Garnacho
160821042c GtkStyleContext: Add gtk_render_extension(). 2010-12-04 15:36:59 +01:00
Carlos Garnacho
aa1d492fe9 GtkThemingEngine: Add vmethod to render an extension. 2010-12-04 15:36:58 +01:00
Carlos Garnacho
88492a50d6 GtkStyleContext: Add gtk_render_frame_gap(). 2010-12-04 15:36:58 +01:00
Carlos Garnacho
af1edc3d88 GtkThemingEngine: Add vmethod to render frames with a gap. 2010-12-04 15:36:58 +01:00
Carlos Garnacho
6a1b54f8bf GtkStyleContext: Add gtk_render_slider(). 2010-12-04 15:36:57 +01:00
Carlos Garnacho
2ebdf80adc GtkThemingEngine: Add vmethod to render sliders. 2010-12-04 15:36:57 +01:00
Carlos Garnacho
86727adc4d GtkStyleContext: Add gtk_render_line(). 2010-12-04 15:36:57 +01:00
Carlos Garnacho
b8f6617d99 GtkThemingEngine: Add vmethod to render lines. 2010-12-04 15:36:56 +01:00
Carlos Garnacho
f80fbbd829 GtkStyleContext: Add gtk_render_layout(). 2010-12-04 15:36:56 +01:00
Carlos Garnacho
92994a0129 GtkThemingEngine: Add vmethod to render layouts. 2010-12-04 15:36:56 +01:00
Carlos Garnacho
0486f5bbc0 GtkStyleContext: Add gtk_render_focus(). 2010-12-04 15:36:56 +01:00
Carlos Garnacho
8439537e2f GtkThemingEngine: Add vmethod to render focus indicator. 2010-12-04 15:36:55 +01:00
Carlos Garnacho
9c3b079c1c GtkStyleContext: Add gtk_render_expander(). 2010-12-04 15:36:55 +01:00
Carlos Garnacho
19fdaabf4c GtkThemingEngine: Add vmethod to render expanders. 2010-12-04 15:36:55 +01:00
Carlos Garnacho
b4c8eba480 GtkStyleContext: Add gtk_render_frame(). 2010-12-04 15:36:55 +01:00
Carlos Garnacho
48990bc71c GtkThemingEngine: Add vmethod to render frames. 2010-12-04 15:36:54 +01:00
Carlos Garnacho
25488633ec GtkStyleContext: Add gtk_render_background(). 2010-12-04 15:36:54 +01:00
Carlos Garnacho
13812de971 GtkThemingEngine: Add vmethod to render backgrounds. 2010-12-04 15:36:54 +01:00
Carlos Garnacho
01a8e06842 GtkStyleContext: Add gtk_render_arrow(). 2010-12-04 15:36:54 +01:00
Carlos Garnacho
b7ca7d19ee GtkThemingEngine: Add vmethod to render arrows. 2010-12-04 15:36:54 +01:00
Carlos Garnacho
1c15b140a9 GtkStyleContext: Add gtk_render_option(). 2010-12-04 15:36:53 +01:00
Carlos Garnacho
263f6de0e5 GtkThemingEngine: Add vmethod to render radio buttons. 2010-12-04 15:36:53 +01:00
Carlos Garnacho
401625b8b3 GtkStyleContext: Add gtk_render_check(). 2010-12-04 15:36:53 +01:00
Carlos Garnacho
acf4306bcd GtkThemingEngine: Add vmethod to render checkboxes. 2010-12-04 15:36:53 +01:00
Carlos Garnacho
bf7a9914dd GtkThemingEngine: Add accessors to style classes. 2010-12-04 15:36:53 +01:00
Carlos Garnacho
fe4a6cea73 GtkWidget: Add widget path to style context. 2010-12-04 15:36:53 +01:00
Carlos Garnacho
1d2aa61407 GtkStyleContext: Add child style classes.
Child style classes are like style classes, but with additional positional
information. This would be usually set by the parent container.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
9a76d1a332 GtkStyleContext: Add style classes.
Style classes are the replacement of detail strings.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
bd3b97d82b GtkStyleContext: Relate to a GtkThemingEngine. 2010-12-04 15:36:52 +01:00
Carlos Garnacho
0171c76871 GtkThemingEngine: Add module loading capabilities. 2010-12-04 15:36:52 +01:00
Carlos Garnacho
57be029b15 Add GtkThemingEngine.
GtkThemingEngine will be the theming engines base class, with default
implementations for all paint functions, and readonly access to the
related GtkStyleContext data.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
b7e6ae3983 GtkStyleContext: Add gtk_style_context_[gs]et_path()
This relates a GtkStyleContext with a widget path, so
all style querying would happen based on it.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
9794b6adf9 GtkWidget: Add gtk_widget_get_path().
This function composes and returns a GtkWidgetPath representing
the passed widget.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
61360dfddf Add GtkWidgetPath.
GtkWidgetPath represents a widget path. It will mainly used by theming
engines to know detail about the widget hierarchy without actually
accessing the widget.
2010-12-04 15:36:51 +01:00
Carlos Garnacho
835cc7049c GtkStyleContext: Add getters and setter for state. 2010-12-04 15:36:51 +01:00
Carlos Garnacho
3f93c714ae GtkWidget: Add gtk_widget_get_style_context().
There will be one GtkStyleContext per widget, at the moment its
lifetime is tied to the widget's, but it could be narrowed down
to GTK_WIDGET_REALIZED.
2010-12-04 15:36:51 +01:00
Carlos Garnacho
2e96770e0b Add GtkStateFlags.
It basically represents GtkStateType as a flag set.
2010-12-04 15:36:50 +01:00
Carlos Garnacho
8a7e035ac7 GtkStateType: Add inconsistent and focused state. 2010-12-04 15:36:50 +01:00
Carlos Garnacho
b82355c76e GtkStyleContext: Fix typo. 2010-12-04 15:36:50 +01:00
Carlos Garnacho
28b7782d78 GtkStyleSet: Add method to register border property. 2010-12-04 15:36:50 +01:00
Carlos Garnacho
16484f8459 GtkStyleSet: Add method to register font properties. 2010-12-04 15:36:49 +01:00
Carlos Garnacho
1a3d964615 GtkStyleContext: Add methods to query composed style. 2010-12-04 15:36:49 +01:00
Carlos Garnacho
2da033b18c GtkStyleSet: Return default value if value is not set. 2010-12-04 15:36:49 +01:00
Carlos Garnacho
9fdcbd7a84 GtkStyleSet: Add valist and varargs getters/setters. 2010-12-04 15:36:48 +01:00
Carlos Garnacho
2bf7483e74 GtkStyleSet: Use property GQuark as store keys. 2010-12-04 15:36:48 +01:00
Carlos Garnacho
4c60de4783 GtkStyleSet: Add style property registration funcs.
Also some properties have been added as a default set.
2010-12-04 15:36:48 +01:00
Carlos Garnacho
2b425d89c8 Add GtkStyleContext.
GtkStyleContext will conglomerate the information of several
GtkStyleProviders for widgets and theme engines to query it.
2010-12-04 15:36:48 +01:00
Carlos Garnacho
530ae15f96 gtkstyleset.h: Add declaration for gtk_style_set_merge(). 2010-12-04 15:36:48 +01:00
Carlos Garnacho
f969470ad8 GtkStyleSet: Implement GtkStyleProvider.
As simple as it can get.
2010-12-04 15:36:47 +01:00
Carlos Garnacho
019fa73308 Add GtkStyleProvider, an interface to provide style details.
The get_style() function isn't final yet, further parameters
should be added to query details based on the widget hierarchy,
name, etc.
2010-12-04 15:36:47 +01:00
Carlos Garnacho
f601abd25f Add GtkStyleSet, a store of style properties.
At the moment there's only basic API for adding,
removing and clearing a property. There's also
API to merge 2 GtkStyleSets.
2010-12-04 15:36:47 +01:00
Carlos Garnacho
06288b5ae8 Add GTK_STATE_LAST to mark the end of GtkState enum. 2010-12-04 15:36:47 +01:00
Michael Natterer
e4cbe47a11 gtk: properly indent calls to gdk_threads_add_timeout() 2010-12-02 23:01:12 +01:00
Benjamin Otte
0b6c184eaa label: Clarify docs for gtk_label_get_layout() 2010-12-02 20:21:05 +01:00
Benjamin Otte
b3e8504111 x11: Don't include gdkprivate.h in gdkx.h
It's private, mkay?
And include it directly where we need it anyway.
2010-12-02 20:21:05 +01:00
Benjamin Otte
a6b407cf4a gtk: Fix typos in comment 2010-12-02 20:21:05 +01:00
Benjamin Otte
f5be938840 gtk: Don't include private GDK headers
Use the function that exists for this purpose instead.
2010-12-02 20:21:05 +01:00
Benjamin Otte
3494f87a10 API: Remove GdkNoExposeEvent
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01:00
Benjamin Otte
804c2c8350 cellrenderer: Fix docs to say cairo_t instead of GdkDrawable 2010-12-02 20:21:04 +01:00
Benjamin Otte
771fa78257 textbuffer: Remove check for GdkDrawable
This should only have been used for stipple patterns, and those are gone
now.
2010-12-02 20:21:02 +01:00
Benjamin Otte
a7e6d6c4b4 gtk: Avoid GdkDrawable usage, including needless casts 2010-12-02 20:21:02 +01:00
Benjamin Otte
e724054d19 API: Remove GDK_WINDOW_XWINDOW() macro
Use GDK_WINDOW_XID() instead.

THis was done using sed, so there might be issues resulting to that.
Feel free to fix.
2010-12-02 20:20:56 +01:00
Bastien Nocera
66122b369e gtk: Centre the text under the icon in GtkIconView
No point in setting the alignment to centre if we don't center it
within the cell itself.
2010-12-02 15:04:32 +00:00
Matthias Clasen
dd678ac323 Avoid a warning when finalizing toolbars
Recent changes cause disposing menus to emit ::deactivate. So better
disconnect the deactivate handler first.
2010-12-01 23:32:35 -05:00
Cosimo Cecchi
6587652433 app-chooser-button: don't insert empty rows in the combobox 2010-12-01 20:18:12 +01:00
Cosimo Cecchi
b17f033857 app-chooser-button: add a note in the docs 2010-12-01 17:04:22 +01:00
Cosimo Cecchi
6e6379c633 app-chooser: add docs and symbols coverage for new API 2010-12-01 17:04:22 +01:00
Cosimo Cecchi
510d65ba08 app-chooser-button: add gtk_app_chooser_button_set_active_custom_item()
This allows to pre-select a custom item.
2010-12-01 17:04:22 +01:00
Cosimo Cecchi
9ffd1f7adb app-chooser-button: make sure to always get a valid iter
Even in case there are no installed applications for our content type.
2010-12-01 17:03:51 +01:00
Bastien Nocera
959fc60c47 gtk: Allow hiding the trough/slider in GtkScale
When setting a GtkRange's upper and lower values to the same
value, the slider will not be drawn any more.

https://bugzilla.gnome.org/show_bug.cgi?id=549720
2010-12-01 15:39:50 +00:00
Emmanuele Bassi
b9859de917 switch: Fix the attribution line
Thomas Wood pointed out that the original MxGtkLightSwitch widget upon
which I based the behaviour of GtkSwitch was not written by him; the
original authors are:

  Joshua Lock
  Robert Staudinger
  Jussi Kukkonen

My apologies to all of them.
2010-11-30 21:54:48 +00:00
Cosimo Cecchi
117e88646f Merge branch 'open-with-dialog' 2010-11-30 17:31:59 +01:00
Cosimo Cecchi
4fe23cae78 app-chooser: other misc doc fixes 2010-11-30 17:27:53 +01:00