Commit Graph

17 Commits

Author SHA1 Message Date
Matthias Clasen
04daa236ad Revert "gizmo: Add a css_changed function"
This reverts commit 39f72b3834.
2021-02-16 23:51:14 -05:00
Matthias Clasen
31ceb4ddfb Revert "gizmo: Chain up in css_changed"
This reverts commit bb0a1b0cfe.
2021-02-16 23:51:14 -05:00
Matthias Clasen
bb0a1b0cfe gizmo: Chain up in css_changed
css_changed is a vfunc that *must* chain up.
Failure to do so broke the resizing of overlay scrollbars,
amongst other things.

This bug was introduced in 39f72b3834.
2021-02-15 14:26:52 -05:00
Matthias Clasen
39f72b3834 gizmo: Add a css_changed function
In a break from the current gizmo api, add a separate
setter, since the calls with long argument lists full
of NULL are getting out of hand.
2021-02-14 10:12:10 -05:00
Matthias Clasen
984e8ac5e3 gizmo: Add a way to set accessible role
This will be used for some of the gizmo used
inside GtkNotebook.
2020-10-14 21:04:25 -04:00
Matthias Clasen
46ff9f891a gizmo: Allow passing changing focus behavior
We need this in popovers. Maybe it could be done better
by defining one-off custom widgets.
2020-04-09 17:50:29 -04:00
Matthias Clasen
18788c2a86 Remove gtk_widget_get/set_has_surface
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
5b78a3048f gizmo: Add a contains_func
Let GtkGizmo override the contains() implementation.
Update all callers to pass NULL for the contains_func.
2019-04-07 15:47:24 +00:00
Timm Bäder
ade171a2ed widget: Don't pass a position to ->size_allocate
The values have been 0/0 for a long time now, so just drop the
GtkAllocation argument and replace it with width and height.
2018-11-13 16:28:54 +01:00
Benjamin Otte
169203951b widget: Remove clip from size-allocate vfunc
As the clip is no longer needed, get rid of it.
2018-04-05 14:56:38 +02:00
Alexander Larsson
63e060a21d GtkWidget: Start renaming widget->window
This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*
2018-03-20 15:21:12 +01:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
11207505e3 gizmo: Unparent all child widgets in finalize 2017-07-19 21:27:12 -04:00
Timm Bäder
017dfc132d gizmo: Chain up in snapshot if no snapshot func given
I.e. when gizmo users just want to draw child widgets anyway and don't
do any custom drawing, they can simply pass NULL.
2017-07-19 21:27:12 -04:00
Timm Bäder
d274387e39 gizmo: Remove gadget 2017-07-19 21:27:11 -04:00
Timm Bäder
f73616ba47 gizmo: Remove css box drawing 2017-07-19 21:27:10 -04:00
Timm Bäder
2be675b538 Add GtkGizmo
GtkGizmo is the easiest possible widget to implement. It does nothing
except give its creator a way to control measure/size-allocate/snapshot,
so it can be used in a variety of use cases.
2017-04-25 20:29:02 +02:00