Benjamin Otte
73b4a62f51
snapshot: Redo debug messages
...
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
2018-04-24 04:06:58 +02:00
Christoph Reiter
f440c48dea
gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places
...
When the widget gets finalized it clears the widgetnode and gtk_css_widget_node_get_widget
returns NULL. Guard against gtk_css_widget_node_get_widget() returning NULL like in other
places.
See https://gitlab.gnome.org/GNOME/pygobject/issues/28#note_82862
2018-03-20 16:02:51 +01:00
Matthias Clasen
4c150d8eb5
The big versioning cleanup
...
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Matthias Clasen
e92c0e85ec
Replace gdk_keymap_get_for_display by gdk_display_get_keymap
...
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Benjamin Otte
5b94fe6342
stylecontext: Make first property name explicit
...
Insist that a first non-NULL property is passed to
gtk_style_context_get().
This is in particular relevant because of dropping the state argument
since GTK3, and code like
gtk_style_context_get (context, state, "font", &font);
would keep compiling without warnings without this change.
2017-11-10 14:56:42 +01:00
Matthias Clasen
e41936c19c
Fix a typo
...
A display is not of type GDK_TYPE_SCREEN.
2017-11-01 19:44:28 -04:00
Benjamin Otte
3967072c66
docs: Fix up some places that still said screen instead of display
2017-10-31 08:25:37 +01:00
Benjamin Otte
83fb7a649f
css: Merge GtkStyleProviderPrivate into GtkStyleProvider
...
This is just lots of renaming.
The interface remains private, so the public API does not change, apart
from removing the definition of the Interface object to avoid
subclassing.
2017-10-31 04:33:54 +01:00
Benjamin Otte
9151e0b9f5
stylecontext: Port to use display instead of screen
2017-10-31 03:05:54 +01:00
Daniel Boles
3354ad080b
StyleContext: Add CSS snippet language comments
...
The language is useful for parsing tools, such as that of gtkmm, which
otherwise assumes these are C snippets and elides them from its
generated documentation.
2017-10-12 19:40:45 +01:00
Timm Bäder
c1af127c28
stylecontext: Fix doc comment
...
There is no @cr here anymore.
2017-10-10 09:49:35 +02:00
Timm Bäder
0f6574dd05
stylecontext: Drop priv pointer
2017-10-01 09:19:09 +02:00
Timm Bäder
f537d36d0a
GtkStyleContext: Create path node in _new
...
So we can avoid creating a GtkCssPathNode in _init and then throwing it
away right after when using the _new_with_node constructor, which is the
one we use for all widgets.
2017-07-19 21:27:16 -04:00
Timm Bäder
fc47be9339
GtkStyleContext: Remove property cache
...
It was only used for widget style properties which don't exist anymore.
2017-07-19 21:27:16 -04:00
Timm Bäder
e36ddfec17
Remove all widget style property code
2017-07-19 21:27:14 -04:00
Benjamin Otte
87497ca2e1
snapshot: Rename gtk_snapshot_translate_2d()
...
It's now called gtk_snapshot_offset().
2017-01-13 14:37:48 +01:00
Benjamin Otte
6055028c96
snapshot: Rename append APIs
...
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Benjamin Otte
95a2a5c54c
gtk: Remove GtkJunctionSides
2016-12-20 18:01:12 +01:00
Benjamin Otte
0d68b22479
stylecontext: Remove a bunch of unneeded headers
2016-12-03 18:15:49 +01:00
Matthias Clasen
39e3b3a483
style context: Don't leak a widget path
...
Found by valgrind.
2016-11-17 20:22:42 -05:00
Benjamin Otte
349f55f2fe
snapshot: Convert GtkLabel and GtkAccelLabel
...
Also adds gtk_snapshot_render_insertion_cursor().
2016-11-15 17:48:45 +01:00
Matthias Clasen
1410031e57
Drop support for symbolic colors
...
-gtk-gradient was the last internal user of this code, so
we can drop it now.
2016-11-07 14:46:41 -05:00
Matthias Clasen
d674e9c8fa
Drop support for -gtk-gradient
...
The standard CSS radial-gradient can be used instead, and Adwaita
and HighContrast have been ported over.
2016-11-07 14:46:41 -05:00
Philip Withnall
1dbdbecd39
gtkstylecontext: Clarify memory allocation behaviour of getters
...
It wasn’t clear that gtk_style_context_get[_valist]() behave like
g_object_get() — i.e. pointer-based types are returned newly-allocated.
Clarify that.
https://bugzilla.gnome.org/show_bug.cgi?id=773954
2016-11-05 00:25:25 +00:00
Rico Tzschichholz
8abf05e194
gtk: Update path references from gtk-3.0 to gtk-4.0
2016-10-23 20:22:38 +02:00
Rico Tzschichholz
502e63eddc
stylecontext: Remove deprecated API
2016-10-23 18:23:59 +02:00
Timm Bäder
145387add5
css: Stop parsing GdkColor values
2016-10-22 16:59:47 +02:00
Garrett Regier
7173df1dd1
gtk+: Fix GI warnings about missing parameters
...
These were removed for GTK+ 4.
2016-10-17 07:07:20 -07:00
Emmanuele Bassi
a87bdc47c7
stylecontext: Remove gtk_gradient_resolve_for_context()
...
Just like we remove gtk_gradient_resolve().
2016-10-17 11:10:13 +01:00
Benjamin Otte
1518fe0a8f
API: stylecontext: Remove state argument from getters
...
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Benjamin Otte
9b9b475f0a
API: stylecontext: Remove regions
2016-10-16 18:17:21 +02:00
Benjamin Otte
66dd954290
API: stylecontext: Remove old unused animation functions
2016-10-16 18:17:21 +02:00
Timm Bäder
ed184b3935
Remove GtkIconFactory
...
Move the icon size lookup API into gtkicontheme.c
2016-10-16 18:17:21 +02:00
Timm Bäder
9fd1a1bbe3
widget: Remove cursor-aspect-ratio/window-dragging style properties
...
And replaces its usages in GtkTextView/GtkStyleContext with a hard-coded
0.04 which was the default value for cursor-aspect-ratio. Also remove
the public gtk_draw_insertion_cursor which used draw_insertion_cursor
which in turn looked up cursor-aspect-ratio
2016-10-16 18:17:21 +02:00
Benjamin Otte
eace2cf421
API: Remove gdk_window_set_background()
...
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Rico Tzschichholz
a3f1596069
Add some missing (nullable) annotations
...
https://bugzilla.gnome.org/show_bug.cgi?id=771826
2016-09-22 14:02:07 +02:00
Sébastien Wilmet
af5ef152b1
docs: GtkWidget::style-updated vs GtkStyleContext::changed
...
Explain the difference between those two signals.
Add "Since: 3.0" for GtkStyleContext::changed, since that signal has
been added in commit 9f84e101bf
, present
since 2.91.6.
https://bugzilla.gnome.org/show_bug.cgi?id=769047
2016-07-25 09:26:41 -04:00
Matthias Clasen
7b0929ad38
Add a function to turn a css style into pango attributes
...
This is _gtk_style_context_get_pango_attributes, decoupled
from the GtkStyleContext. This will be used to drive css-styled
text rendering from css subnodes of widgets, e.g. for the value
in GtkScale.
2016-06-03 00:26:55 -04:00
Matthias Clasen
5c63ab26da
style context: Don't use g_warning for API misuse
...
We've changed our API here; what these applications are doing
used to be fine. Don't make users suffer for this by spamming their
logs in a stable release. We'll keep the warning in master.
https://bugzilla.gnome.org/show_bug.cgi?id=763796
2016-03-20 20:53:34 -04:00
Benjamin Otte
71a9fd9d83
stylecontext: Move background_is_opaque() function
...
The new way, it no longer depends on the style context, but on the
CssStyle. This will become relevant in the next commit.
2016-02-25 16:52:58 +01:00
Timm Bäder
c5369356e8
Various documentation fixes
...
Always have Since: annotations at the very bottom, use the correct
ClassName::signal-name/ClassName:property-name syntax, fix a few typos
in type names, wrong function names, non-existing type names, etc.
2016-02-08 22:56:52 +01:00
Matthias Clasen
bbe48d0624
Throw an error when a display is missing
...
Creating style context won't work without a display, so
give a clear error message and abort instead of segfaulting
later on.
https://bugzilla.gnome.org/show_bug.cgi?id=761332
2016-01-30 16:06:59 -05:00
Matthias Clasen
a7387e2641
Document restrictions on gtk_style_context_get
...
This makes it official that passing a different state
is not generally supported in the getters for CSS properties.
2016-01-17 15:31:37 -05:00
Krzesimir Nowak
67c6d24bb2
Fix a small mistake in stylecontext docs
...
Fix the "will be also be" to become "will also be".
2016-01-11 12:05:27 +01:00
Matthias Clasen
cffe2e2c93
Improve GtkStyleContext docs
...
Refer to the foreign drawing example in gtk3-demo, refer to
the widget documentation for style properties, remove
no-longer-used treeview regions.
2016-01-10 17:05:53 -05:00
Matthias Clasen
9b86d6da2c
Use the caret-color properties for drawing carets
...
Replace the cursor-color and secondary-cursor-color style
properties with the caret-color and -gtk-secondary-caret-color
CSS properties.
For the 'auto' value of these properties, we keep the same
behavior that we used to have when the style properties are
not explicitly set.
2016-01-08 07:33:20 -05:00
Alberto Ruiz
496f0892fc
introspection: This patch fixes nullable return values fixes for the following symbols in gtk
...
gtk_accel_group_query
gtk_accel_group_from_accel_closure
gtk_accel_label_get_accel_widget
gtk_accessible_get_widget
gtk_actionable_get_action_name
gtk_app_chooser_get_app_info
gtk_app_chooser_button_get_heading
gtk_app_chooser_dialog_get_heading
gtk_application_get_window_by_id
gtk_assistant_get_nth_page
gtk_binding_set_find
gtk_builder_get_object
gtk_builder_lookup_callback_symbol
gtk_builder_get_application
gtk_button_get_image
gtk_cell_area_get_focus_from_sibling
gtk_cell_renderer_start_editing
gtk_cell_view_get_model
gtk_cell_view_get_displayed_row
gtk_clipboard_get_owner
gtk_container_get_focus_child
gtk_container_get_focus_vadjustment
gtk_container_get_focus_hadjustment
gtk_dialog_get_widget_for_response
gtk_drag_get_source_widget
gtk_drag_dest_get_target_list
gtk_drag_source_get_target_list
gtk_entry_completion_get_model
gtk_entry_completion_compute_prefix
gtk_expander_get_label_widget
gtk_file_chooser_get_filename
gtk_file_chooser_get_current_folder
gtk_file_chooser_get_uri
gtk_file_chooser_get_current_folder_uri
gtk_file_chooser_get_preview_widget
gtk_file_chooser_get_preview_file
gtk_file_chooser_get_preview_filename
gtk_file_chooser_get_preview_uri
gtk_file_chooser_get_extra_widget
gtk_file_chooser_get_filter
gtk_file_chooser_native_get_accept_label
gtk_file_chooser_native_get_cancel_label
gtk_file_filter_get_name
gtk_font_chooser_get_font_family
gtk_font_chooser_get_font_face
gtk_font_chooser_get_font
gtk_font_chooser_get_font_desc
gtk_font_chooser_get_font_map
gtk_frame_get_label
gtk_gesture_get_device
gtk_gesture_get_window
gtk_gl_area_get_error
gtk_header_bar_get_title
gtk_header_bar_get_subtitle
gtk_header_bar_get_custom_title
gtk_icon_info_get_filename
gtk_icon_view_get_path_at_pos
gtk_icon_view_get_model
gtk_image_get_pixbuf
gtk_image_get_animation
gtk_label_get_mnemonic_widget
gtk_label_get_attributes
gtk_check_version
gtk_menu_button_get_popup
gtk_menu_button_get_menu_model
gtk_menu_button_get_align_widget
gtk_menu_button_get_popover
gtk_menu_item_get_submenu
gtk_menu_item_get_accel_path
gtk_native_dialog_get_title
gtk_native_dialog_get_transient_for
gtk_notebook_get_nth_page
gtk_notebook_get_tab_label_text
gtk_notebook_get_menu_label
gtk_notebook_get_menu_label_text
gtk_notebook_get_group_name
gtk_notebook_get_action_widget
gtk_offscreen_window_get_surface
gtk_offscreen_window_get_pixbuf
gtk_paned_get_child1
gtk_paned_get_child2
gtk_places_sidebar_get_location
gtk_places_sidebar_get_nth_bookmark
gtk_plug_get_socket_window
gtk_popover_get_default_widget
gtk_progress_bar_get_text
gtk_recent_filter_get_name
gtk_recent_manager_lookup_item
gtk_settings_get_default
gtk_socket_get_plug_window
gtk_stack_sidebar_get_stack
gtk_stack_switcher_get_stack
gtk_style_context_get_section
gtk_style_context_get_parent
gtk_style_context_get_frame_clock
gtk_test_find_widget
gtk_text_buffer_get_mark
gtk_text_tag_table_lookup
gtk_text_view_get_tabs
gtk_text_view_toggle_cursor_visible
gtk_text_view_get_window
gtk_toolbar_get_nth_item
gtk_tool_button_get_label
gtk_tool_button_get_icon_name
gtk_tool_button_get_label_widget
gtk_tool_button_get_icon_widget
gtk_tool_palette_get_drop_item
gtk_tool_palette_get_drop_group
gtk_tree_model_filter_convert_child_path_to_path
gtk_tree_model_filter_convert_path_to_child_path
gtk_tree_model_sort_convert_child_path_to_path
gtk_tree_model_sort_convert_path_to_child_path
gtk_tree_view_get_column
gtk_tree_view_get_bin_window
gtk_tree_view_column_get_widget
gtk_tree_view_column_get_tree_view
gtk_widget_get_frame_clock
gtk_window_group_get_current_device_grab
GtkTextBufferSerializeFunc
2016-01-08 12:18:23 +00:00
Paolo Borelli
c4996873dc
docs: try to clarify widget_get_state_flags vs context_get_state
2016-01-05 18:46:56 +01:00
Matthias Clasen
2e921691d9
Redo CSS style printing
...
Drop the custom style printing implementation in gtkcssnode.c and
instead reuse the existing gtk_css_style_print function, extending
it a bit to suit our needs.
Instead of computing values, just recognize initial values by
having no CSS section. Also do away with the show-initial flag, and
just always filter out initial values. The flag can come back when
it is needed.
2016-01-03 15:36:48 -05:00
Matthias Clasen
68edc47f6a
Add a function to dump CSS nodes and styles
...
Add a gtk_style_context_to_string function that can serialize
a CSS node or tree of nodes, optionally including CSS properties
as well.
This will be useful in writing tests.
2016-01-03 09:19:30 -05:00
Benjamin Otte
d3cf3fd267
rendericon: Move a function
...
The function is identical if used for builtin icons and regular icons
(as per iconhelper). So split it out in a way that doesn't assume
either.
2015-12-16 04:46:22 +01:00
Benjamin Otte
a11de0da6b
stylecontext: Builtin images can be (and are) transformed
...
So don't special-case them out.
2015-12-16 01:50:00 +01:00
Benjamin Otte
ad22612ab2
iconhelper: Require passing a cssnode to the constructor
...
Note that we don't use it yet.
2015-12-15 08:41:16 -05:00
Benjamin Otte
5cbbc62026
widget: Pass a GtkCssStyleChange instead of a bitmask
2015-12-13 04:11:58 +01:00
Benjamin Otte
b8dd24b4fb
iconfactory: Drop caching infrastructure
...
- icon sets are essentially unused
- the icon theme does caching
- this code complicates the restructuring I'm about to do
=> Delete it!
2015-12-04 17:44:51 +01:00
Benjamin Otte
8355ee3053
stylecontext: Don't emit state warning for transient nodes
...
It's fine to call set_state() on those.
https://bugzilla.gnome.org/show_bug.cgi?id=758930
2015-12-02 00:29:36 +01:00
Benjamin Otte
4b2ea59dd1
stylecontext: Treat empty path like no path
...
This way, we don't do weird stuff when an empty path is set.
2015-11-21 02:22:22 +01:00
Benjamin Otte
6eb89fb6a3
stylecontext: Copy name when setting widget path
...
Imitate what we do for the type. This way we don't lose the name on
save/restore.
https://bugzilla.gnome.org/show_bug.cgi?id=758442
2015-11-21 02:21:12 +01:00
Benjamin Otte
a9814fea7d
stylecontext: Always warn on style mismatch
...
For now, always warn when
gtk_style_context_get()/get_padding()/get_margin()/get_border()
get called with the wrong state.
We used to hide this behind an env var because the warnings were
too frequent, but with the recent refactorings, this warning has become
rather important for detecting bugs.
If it's still problematic, we might want to revert this patch before
3.20.
2015-11-06 18:59:15 +01:00
Benjamin Otte
c075c14bf4
stylecontext: Add gtk_style_context_save_to_node()
...
To be used instead of gtk_style_context_save() with persistent nodes.
2015-10-22 16:35:14 +02:00
Benjamin Otte
72615a1b16
stylecontext: Add gtk_style_context_add_named()
...
This is an intermediate step for cssnode introduction. It gives a name
for the node created by saving the style context.
2015-10-22 16:35:14 +02:00
Benjamin Otte
bddc524cd8
stylecontext: Make sure style is valid when looking up style properties
...
Otherwise, the validation may happen vey automatically some time during
the style property and that will most likely cause a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=756338
2015-10-10 23:23:34 +02:00
Matthias Clasen
d930ea7c1f
style context: Avoid a compiler warning
2015-10-03 22:42:12 -04:00
Matthias Clasen
598e17018c
style context: Formatting fixes
2015-10-03 21:38:20 -04:00
Matthias Clasen
506fe61938
Fix gtk_style_context_list_classes
...
The function was always returning NULL.
2015-10-03 17:37:34 -04:00
Matthias Clasen
3c54fbd3ac
Use stupid quotes instead of dumb quotes
...
Following a similar change in GLib a while ago.
'bla' may by stupid, but it looks less dumb than `bla'.
2015-09-23 07:01:16 -04:00
Matthias Clasen
5dcbbc6736
style context: Trivial refactor
...
Use g_set_object for setting the frame clock.
2015-09-23 07:01:14 -04:00
Christian Hergert
c1691a4964
stylecontext: add opaque background helper
...
This new private API, _gtk_style_context_is_background_opaque(), is meant to
be used by internal Gtk+ wigets to optimize fast paths for cases where
applicable. One such use would be to use a CAIRO_CONTENT_COLOR surface
instead of CAIRO_CONTENT_COLOR_ALPHA.
https://bugzilla.gnome.org/show_bug.cgi?id=754658
2015-09-13 13:41:19 -07:00
Garrett Regier
6118893a4e
stylecontext: Fix list_classes() after optimization
...
Otherwise a junk value is returned.
2015-09-11 09:48:38 -07:00
Garrett Regier
41b386cd6a
cssnode: Optimize listing of classes
...
Avoid creating the GList of strings when the GQuarks
will just be determined again. Instead have
gtk_style_context_list_classes() do it specifically.
2015-09-11 18:26:11 +02:00
Benjamin Otte
9020b5bd17
stylecontext: Remove line that is a no-op
...
Creating the transient node will already copy the widget type. So
copying again will not do anything.
2015-09-07 14:33:35 +02:00
Matthias Clasen
4c376d1a9c
style context: Convert to g_object_notify_by_pspec
...
This avoids pspec lookup overhead in g_object_notify.
2015-09-06 17:11:36 -04:00
Paolo Borelli
1eb1481bdf
css: support text-decoration-style
...
The support is limited to underline single, double and wavy, which
is what pango has today.
2015-07-06 20:06:20 +02:00
Paolo Borelli
a57e6731c4
css: support text-decoration-color
2015-07-06 00:04:06 +02:00
Paolo Borelli
384df61c90
css: add support for text-decoration-line
2015-07-06 00:04:06 +02:00
Paolo Borelli
a19331f231
label: add support for CSS letter-spacing property
...
Support letter-spacing CSS property on GtkLabel.
Reftest is included.
2015-07-06 00:04:05 +02:00
Cosimo Cecchi
a1e80d99d2
stylecontext: deprecate gtk_style_context_set_background()
...
Nothing in GTK calls it anymore.
2015-07-01 16:09:23 -07:00
Benjamin Otte
fe51ac273c
stylecontext: Change fallback behavior on state mismatch
...
For functions that take state flags as an argument we need to special
case the situation where the passed in flags don't match the current
state.
Previously we would create a copy of the style info, change its state
and do the lookup from there.
Now that GtkCssNode has replaced style infos, this doesn't work as well
anymore as copying a GtkCssNode is not possible.
However, unike style infos, GtkCssNodes are instant-apply, so we don't
need to copy anymore, we can just change the state of the node.
This causes some invalidations to be queued, but we can take that
performance hit as this is fallback code.
https://bugzilla.redhat.com/show_bug.cgi?id=1228852
2015-06-15 04:36:47 +02:00
Benjamin Otte
3e5280ae4d
stylecontext: Clear style property more frequently
...
We want to clear the style property cache whenever things change in the
tree, not as we previously did only when those changes actually lead to
a different CSS style.
2015-04-27 19:17:03 +02:00
Benjamin Otte
ec57c6c10b
csspathnode: Handle context going away
...
Sometimes path nodes can survive longer than the style context that
created them. Don't crash in those cases.
Fixes startup of mutter.
Testcase included.
https://bugzilla.gnome.org/show_bug.cgi?id=746407
2015-03-18 18:24:45 +01:00
Benjamin Otte
776d99ac51
stylecontext: Call get_style(), not create_style()
...
We want to ensure that the style is created properly.
This also allows making the create_Style() function private.
2015-03-18 15:23:32 +01:00
Benjamin Otte
399df06d19
stylecontext: Refactor gtk_style_context_invalidate()
...
There's no need anymore to recreate styles, nodes do that automagically
now.
This allows making gtk_css_node_set_style() private.
2015-03-18 15:23:32 +01:00
Benjamin Otte
2ec26cd9b5
cssnode: Move style context function to only user
2015-03-18 15:23:32 +01:00
Benjamin Otte
cadf6a9d3c
cssnode: Add gtk_css_node_invalidate_style_provider()
...
This function not just invalidates the current node, but also all
children.
2015-03-18 15:23:32 +01:00
Benjamin Otte
da25771e58
cssvalue: Remove GtkCssDependencies
...
They are not used anymore.
2015-03-18 15:23:31 +01:00
Benjamin Otte
b92fe2fa85
widget: Add gtk_widget_get_css_node()
...
and replace gtk_style_context_get_root() with it.
2015-03-18 15:23:31 +01:00
Benjamin Otte
ffb410f11e
widget: Create the CssNode
...
... and pass it to the style context instead of having the style context
create it for us.
2015-03-18 15:23:30 +01:00
Benjamin Otte
efda30c495
stylecontext: Don't queue animate tick callbacks anymore
...
Instead, just mark nodes permanently as invalid.
2015-03-18 15:23:30 +01:00
Benjamin Otte
219e52f7e1
cssnode: Automatically recreate style on get_style() call
...
When the style is invalid, redo it.
Make this a vfunc, so the widget nodes can opt out.
2015-03-18 15:23:30 +01:00
Benjamin Otte
c550cf122a
stylecontext: Move gtk_style_context_validate() to GtkCssWidgetNode
2015-03-18 15:23:30 +01:00
Benjamin Otte
649edbe2fc
stylecontext: Move style creation functions to CssNode code
2015-03-18 15:23:30 +01:00
Benjamin Otte
c4b88e05fd
stylecontext: Redo handling of differing state
...
Instead of passing an "override_state" flag, create a new CssNode just
for this simple lookup.
2015-03-18 15:23:30 +01:00
Benjamin Otte
637a4bda5c
stylecontext: Get rid of stylecontext argument
...
... to a bunch of functions.
This requires a tiny change to the heuristics for the style cache - we
now cache styles when they have the same style provider as their parent
instead of when they have the default provider - but that change doesn't
have any effect in practice.
2015-03-18 15:23:29 +01:00
Benjamin Otte
03ac5f310b
cssnode: Add gtk_style_context_get_style_provider()
...
... and use it when looking up properties.
2015-03-18 15:23:29 +01:00
Benjamin Otte
6dc6af674c
stylecontext: Remove children list
...
It's not needed.
2015-03-18 15:23:29 +01:00
Benjamin Otte
4cc2af2db1
stylecontext: Move validation into GtkCssNode
2015-03-18 15:23:29 +01:00
Benjamin Otte
8e1017db35
stylecontext: Export gtk_style_context_get_root()
...
.. in the private header. This avoids tiny wrapper functions.
2015-03-18 15:23:29 +01:00
Benjamin Otte
55e68bc2ea
cssnode: Track invalid flag
...
Remove it from GtkStyleContext.
2015-03-18 15:23:29 +01:00
Benjamin Otte
a589f98821
cssnode: Implement refcounting
...
The parent refs the child, so gtk_css_node_set_parent() adds/removes a
reference.
We should probably refactor this so that we name the function
parent.add(node) instead of node.set_parent(parent) - makes the
refcounting more clear.
2015-03-18 15:23:29 +01:00
Benjamin Otte
721dce73e0
stylecontext: Handle parent in CssNode code
...
Make CssNode a real tree with a DOM-like API.
2015-03-18 15:23:29 +01:00