Merge branch 'master' into treeview-refactor
Conflicts: tests/testtreeedit.c
This commit is contained in:
@ -45,8 +45,7 @@ INCLUDES = \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = $(top_builddir)/gdk/$(gdktargetlib)
|
||||
|
||||
GTKDOC_LIBS = $(top_builddir)/gdk/$(gdktargetlib) $(GDK_DEP_LIBS)
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=gdk
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
<xi:include href="xml/gdkdisplaymanager.xml" />
|
||||
<xi:include href="xml/gdkscreen.xml" />
|
||||
<xi:include href="xml/regions.xml" />
|
||||
<xi:include href="xml/pixbufs.xml" />
|
||||
<xi:include href="xml/colors.xml" />
|
||||
<xi:include href="xml/rgba_colors.xml" />
|
||||
<xi:include href="xml/visuals.xml" />
|
||||
|
||||
@ -478,6 +478,8 @@ gdk_window_get_device_cursor
|
||||
gdk_window_set_device_cursor
|
||||
gdk_window_get_device_events
|
||||
gdk_window_set_device_events
|
||||
gdk_window_get_source_events
|
||||
gdk_window_set_source_events
|
||||
|
||||
<SUBSECTION>
|
||||
GdkPointerHooks
|
||||
@ -701,7 +703,7 @@ GdkDeviceKey
|
||||
GdkDeviceAxis
|
||||
GdkAxisUse
|
||||
GdkGrabOwnership
|
||||
gdk_enable_multidevice
|
||||
gdk_disable_multidevice
|
||||
gdk_device_manager_get_display
|
||||
gdk_device_manager_list_devices
|
||||
gdk_device_manager_get_client_pointer
|
||||
|
||||
@ -108,7 +108,8 @@ CPPFLAGS += \
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
|
||||
@ -4987,7 +4987,6 @@ gtk_widget_pop_composite_child
|
||||
gtk_widget_push_composite_child
|
||||
gtk_widget_queue_draw_area
|
||||
gtk_widget_queue_draw_region
|
||||
gtk_widget_reset_shapes
|
||||
gtk_widget_set_app_paintable
|
||||
gtk_widget_set_double_buffered
|
||||
gtk_widget_set_redraw_on_allocate
|
||||
@ -5534,6 +5533,7 @@ gtk_style_context_get_border_color
|
||||
gtk_style_context_get_border
|
||||
gtk_style_context_get_padding
|
||||
gtk_style_context_get_margin
|
||||
gtk_style_context_get_font
|
||||
gtk_style_context_invalidate
|
||||
gtk_style_context_state_is_running
|
||||
gtk_style_context_lookup_color
|
||||
@ -5644,6 +5644,7 @@ gtk_theming_engine_get_border_color
|
||||
gtk_theming_engine_get_border
|
||||
gtk_theming_engine_get_padding
|
||||
gtk_theming_engine_get_margin
|
||||
gtk_theming_engine_get_font
|
||||
gtk_theming_engine_has_class
|
||||
gtk_theming_engine_has_region
|
||||
gtk_theming_engine_lookup_color
|
||||
|
||||
@ -35,8 +35,8 @@ the application may want to connect to:
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The "expose_event" signal to handle redrawing the
|
||||
contents of the widget.
|
||||
The "draw" signal to handle redrawing the contents of the
|
||||
widget.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
@ -53,40 +53,47 @@ that drawing is implicitly clipped to the exposed area.
|
||||
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
|
||||
<programlisting>
|
||||
gboolean
|
||||
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
guint width, height;
|
||||
GdkRGBA color;
|
||||
|
||||
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
|
||||
cairo_paint (cr);
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
cairo_arc (cr,
|
||||
width / 2.0, height / 2.0,
|
||||
MIN (width, height) / 2.0,
|
||||
0, 2 * G_PI);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
gtk_style_context_get_color (gtk_widget_get_style_context (widget),
|
||||
0,
|
||||
&color);
|
||||
gdk_cairo_set_source_rgba (cr, &color);
|
||||
|
||||
cairo_fill (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
[...]
|
||||
GtkWidget *drawing_area = gtk_drawing_area_new (<!-- -->);
|
||||
gtk_widget_set_size_request (drawing_area, 100, 100);
|
||||
g_signal_connect (G_OBJECT (drawing_area), "expose_event",
|
||||
G_CALLBACK (expose_event_callback), NULL);
|
||||
g_signal_connect (G_OBJECT (drawing_area), "draw",
|
||||
G_CALLBACK (draw_callback), NULL);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
Expose events are normally delivered when a drawing area first comes
|
||||
onscreen, or when it's covered by another window and then uncovered
|
||||
(exposed). You can also force an expose event by adding to the "damage
|
||||
region" of the drawing area's window; gtk_widget_queue_draw_area() and
|
||||
gdk_window_invalidate_rect() are equally good ways to do this. You'll
|
||||
then get an expose event for the invalid region.
|
||||
Draw signals are normally delivered when a drawing area first comes
|
||||
onscreen, or when it's covered by another window and then uncovered.
|
||||
You can also force a redraw by adding to the "damage region" of the
|
||||
drawing area's window; use gtk_widget_queue_draw_area() to do this.
|
||||
You'll then get a draw event for the invalid region.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The available routines for drawing are documented on the <link
|
||||
linkend="gdk-Drawing-Primitives">GDK Drawing Primitives</link> page.
|
||||
See also gdk_draw_pixbuf() for drawing a #GdkPixbuf.
|
||||
linkend="gdk3-Cairo-Interaction">GDK Drawing Primitives</link> page
|
||||
and the cairo documentation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
||||
Reference in New Issue
Block a user