Merge branch 'matthiasc/for-master' into 'master'

docs: Add more detail to the drawing overview

See merge request GNOME/gtk!1811
This commit is contained in:
Matthias Clasen 2020-05-01 21:09:38 +00:00
commit fd1fe0eed5
4 changed files with 10 additions and 4 deletions

View File

@ -1877,7 +1877,7 @@ activate (GApplication *app)
window);
controller = gtk_shortcut_controller_new ();
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_BUBBLE);
for (i = 0; i < G_N_ELEMENTS (late_accels); i++)
{

View File

@ -206,11 +206,17 @@
During the Paint phase GTK receives a single #GdkSurface::render signal on
the toplevel surface. The signal handler will create a snapshot object
(which is a helper for creating a scene graph) and call the
#GtkWidget::snapshot() vfunc, which will propagate down the widget hierarchy.
#GtkWidget::snapshot() vfunc, which will propagate down the widget hierarchy.
This lets each widget snapshot its content at the right place and time,
correctly handling things like partial transparencies and overlapping widgets.
</para>
<para>
During the snapshotting of each widget, GTK automatically handles the CSS
rendering according to the CSS box model. It snapshots first the background,
then the border, then the widget content itself, and finally the outline.
</para>
<para>
To avoid excessive work when generating scene graphs, GTK caches render nodes.
Each widget keeps a reference to its render node (which in turn, will refer to

View File

@ -78,7 +78,7 @@ static GParamSpec *properties[LAST_ARG] = { NULL, };
static void gtk_drag_icon_root_init (GtkRootInterface *iface);
static void gtk_drag_icon_native_init (GtkNativeInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkDragIcon, gtk_drag_icon, GTK_TYPE_CONTAINER,
G_DEFINE_TYPE_WITH_CODE (GtkDragIcon, gtk_drag_icon, GTK_TYPE_WIDGET,
G_IMPLEMENT_INTERFACE (GTK_TYPE_NATIVE,
gtk_drag_icon_native_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ROOT,

View File

@ -35,7 +35,7 @@ G_BEGIN_DECLS
#define GTK_TYPE_DRAG_ICON (gtk_drag_icon_get_type ())
GDK_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (GtkDragIcon, gtk_drag_icon, GTK, DRAG_ICON, GtkContainer)
G_DECLARE_FINAL_TYPE (GtkDragIcon, gtk_drag_icon, GTK, DRAG_ICON, GtkWidget)
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_drag_icon_get_for_drag (GdkDrag *drag);