summaryrefslogtreecommitdiff
path: root/gtk/gtkcsswidgetnode.c
Commit message (Collapse)AuthorAgeFilesLines
* stylecontext: Deprecate most apisMatthias Clasen2022-10-121-1/+1
| | | | | | | The notable exception here are the global provider apis, which are needed in some form and don't have a replacement yet. Move them to gtkstyleprovider.[hc], so we can wholly deprecated gtkstylecontext.[hc].
* csswidgetnode: Don't check for containerGeorges Basile Stavracas Neto2020-05-081-3/+1
| | | | | | | | | | | | | The conditions to queue and dequeue a CSS validation are different; while queueing checks if the widget is a root, dequeueing checks that AND if the widget is a container. GtkWindow is not a GtkContainer anymore, and that is causing validations to be queued, but never dequeued. Don't require the widget to be a GtkContainer for dequeuing.
* Move the idle sizer to the gtkroot.cMatthias Clasen2020-04-251-2/+2
| | | | | | This is needed since we already have a second GtkRoot implementation with GtkDragIcon, and DND is causing critical warnings due to this.
* Move the idle sizer to GtkWindowMatthias Clasen2020-04-201-5/+3
| | | | | | | | This was only living in gtkcontainer.c for historic reasons. Move it closer to where it belongs, and rename it from 'idle' to 'layout', since it is really about the layout phase of the frame clock, nowadays.
* stylecontext: Remove the "changed" signalBenjamin Otte2020-02-051-7/+1
| | | | Instead, always go directly to the GtkWidget::css_changed() call.
* widget: Replace style-updated signal with css_changed vfuncBenjamin Otte2020-02-051-1/+1
| | | | | | | | | 1. Rename the thing 2. Turn it from a signal to a vfunc 3. Pass the GtkCssStyleChange to it We don't export any public API about the GtkCssStyleChange yet, it's just a boring opaque struct.
* cssnode: Remove init_matcher() vfuncBenjamin Otte2020-01-281-13/+0
| | | | It's unused.
* cssnode: Remove unused widget path vfuncsBenjamin Otte2020-01-211-51/+0
|
* Stop using gtk_widget_is_toplevelMatthias Clasen2019-05-281-2/+4
|
* csswidgetnode: Avoid some unnecessary workTimm Bäder2018-01-191-0/+3
| | | | The later code would just ref both styles and not do anything else.
* css: Merge GtkStyleProviderPrivate into GtkStyleProviderBenjamin Otte2017-10-311-2/+2
| | | | | | | | 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.
* GtkStyleContext: Remove property cacheTimm Bäder2017-07-191-19/+0
| | | | It was only used for widget style properties which don't exist anymore.
* widgetnode: Remove unused defineTimm Bäder2017-03-021-4/+0
|
* csswidgetnode: Remove unused includeTimm Bäder2017-03-021-2/+0
|
* widgetnode: We never need widget paths anymoreBenjamin Otte2016-11-191-46/+1
| | | | Backwards compat is not necessary in GTK4.
* csswidgetnode: Fix container condition for GtkInvisibleTimm Bäder2016-10-281-2/+4
| | | | ... which is a toplevel, but not a container.
* gtk: Mark internal functions as staticEmmanuele Bassi2016-10-171-1/+1
| | | | These functions are only used within their compilation unit.
* container: Remove gtk_container_set_resize_mode()Benjamin Otte2016-10-161-6/+2
|
* Use g_set_object in one more placeMatthias Clasen2016-05-031-2/+1
|
* css: Use a getter for the enable-animations settingMatthias Clasen2016-04-301-5/+1
|
* widget: Pass a GtkCssStyleChange instead of a bitmaskBenjamin Otte2015-12-131-14/+20
|
* cssnode: Change style-changed signalBenjamin Otte2015-12-121-5/+6
| | | | | | | | Instead of having old and new style, now have a GtkCssStyleChange opaque object that will compute the changes you are interested in for you. This simplifies change signal handlers quite a bit and avoids lots of repeated computation in every signal handler.
* cssnode: Fix style updating when the CSS node ID changesColomban Wendling2015-11-011-1/+1
| | | | | | | | Since 4ebb5781eaf332da3f8ce5ffb5ecc8668a56f118 ID has a specific value, while it used to be the same as NAME. Thus, explicitly list ID as a radical change just like NAME. https://bugzilla.gnome.org/show_bug.cgi?id=757397
* css style: Accumulate changes in placeMatthias Clasen2015-09-281-5/+2
| | | | | This avoids allocating a temporary bitmask, and lets us avoid some value comparisons altogether.
* Revert "Avoid type checking overhead for resize-mode"Benjamin Otte2015-09-121-2/+2
| | | | | | | | | | | This reverts commit 3eacfa88f2d9c690a006de9cac1cd3c60901686c. Apart from the patch not being correct, we don't want to expose private structures in header files if we can avoid it. And this type-checking overhead is not an optimization that is even measurable. https://bugzilla.gnome.org/show_bug.cgi?id=754932
* Avoid type checking overhead for resize-modeMatthias Clasen2015-09-121-2/+2
|
* Move GtkWidgetPrivate to gtkwidgetprivate.hMatthias Clasen2015-09-071-2/+2
| | | | | This lets us use inlined getters for members in there, avoiding the type checks in the public getters.
* Plug a leakMatthias Clasen2015-09-061-2/+9
| | | | | A type class reference gotten with g_type_class_ref must be released with g_type_class_unref, or else we leak.
* stylecontext: Clear style property more frequentlyBenjamin Otte2015-04-271-0/+19
| | | | | | 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.
* cssnode: Clear widget path more aggressivelyBenjamin Otte2015-03-241-0/+3
| | | | | | | | | When recomputing CSS, we need a correct widget path in the fallback mode where we're still using widget paths. So we need to invalidate it everytime it actually changes, and not just when emitting the style-updated signal. Fixes css-match-regions reftest.
* csswidgetnode: Use style_changed signal instead of update_style vfuncBenjamin Otte2015-03-181-10/+6
|
* csswidgetnode: Avoid creating a stylecontextBenjamin Otte2015-03-181-4/+15
| | | | | If the widget doesn't have a style context, don't create one. Instead, call functions on the widget directly.
* cssnode: Merge the 2 places that compute stylesBenjamin Otte2015-03-181-94/+3
| | | | | | Now that the widget node recomputes styles on update_style() we can just call it during validate(). That way, we don't need the widget node to manually compute its style.
* cssnode: Always return correct style valuesBenjamin Otte2015-03-181-9/+33
| | | | | | | | If CSS values are queried from a widget, recompute them if necessary. Do not emit style-updated until the validation phase however. This way, we don't run into performance traps when style-update causes invalidations that cause new style-updated to be emitted.
* cssnode: Change the way we start animationsBenjamin Otte2015-03-181-16/+3
| | | | | We now have a flag for "invalidate animations", use that to restart animations and decide if we want to start transitions.
* cssnode: Return NULL as frame clock when animations are disabledBenjamin Otte2015-03-181-6/+8
| | | | | | | This is a crude hack, but it works. FIXME: Hook it up to the GtkSettings so that we properly update when the setting changes.
* cssnode: Move style context function to only userBenjamin Otte2015-03-181-1/+25
|
* cssnode: Add API to query the timestampBenjamin Otte2015-03-181-5/+31
| | | | | | | ... and pass it to the API that computes new styles. A special timestamp of 0 means "please don't animate" and is used when no frame clock is available for a node.
* cssnode: Make parent style change part of GtkCssNodeBenjamin Otte2015-03-181-8/+5
|
* cssnode: Change get_style_provider() vfuncBenjamin Otte2015-03-181-1/+1
| | | | | | Instead of always returning a provider, allow the vfunc to return NULL to mane "use same provider as parent". This allows a bunch of optimizations.
* cssnode: Change vfuncBenjamin Otte2015-03-181-10/+10
| | | | | | | | This is mainly an attempt to merge the update_style() and validte() vfuncs. Code is not there yet, but that's the idea. Also, gtk_css_node_set_style() should not be public. And this gets closer to that goal, too.
* cssnode: Only pass a boolean for parent changesBenjamin Otte2015-03-181-7/+11
| | | | Nobody cares what changed in the parent, so don't track it.
* cssstyle: Remove unused optimizationBenjamin Otte2015-03-181-7/+2
| | | | | | After measuring it, I realized the optimization never triggers for Adwaita and rarely ever triggers for simple themes. So it is not useful to keep it around.
* csswidgetnode: Always return a valid styleBenjamin Otte2015-03-181-0/+3
|
* cssnode: Add visibility conceptBenjamin Otte2015-03-181-0/+2
| | | | | This allows hiding nodes of invisible widgets. And that in turn makes sure :nth-child() works as expected.
* box: Use CSS nodes instead of widget pathsBenjamin Otte2015-03-181-1/+4
| | | | | This is a very simple patch that causes a bunch of overhead. But it works.
* cssnode: Add hackery to allow bypassing widget pathsBenjamin Otte2015-03-181-0/+35
| | | | | | | If we know the parent's get_path_for_child() implementation is safe to be used with GtkCssNode because it doesn't do anything special, we do that. Unfortunately that requires whitelisting vfuncs because the vfunc is public API so anyone can override it.
* cssnode: Remove now unused arg from vfuncBenjamin Otte2015-03-181-2/+1
|
* cssnode: Make widget node not copy the pathBenjamin Otte2015-03-181-3/+1
| | | | | | | Instead, use gtk_widget_get_path() which makes GtkWidget cache the path. This is a temporary solution until we can get rid of widget paths. This increases memory usage quite noticably.
* cssnode: Make widget node use new matcherBenjamin Otte2015-03-181-0/+18
|