summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/gtk/tmpl/gtkdrawingarea.sgml12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml
index ae46d2bc54..0986d02d1b 100644
--- a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml
+++ b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml
@@ -60,24 +60,26 @@ draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data)
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
- cairo_arc (cr,
+ cairo_arc (cr,
width / 2.0, height / 2.0,
MIN (width, height) / 2.0,
0, 2 * G_PI);
gtk_style_context_get_color (gtk_widget_get_style_context (widget),
0,
- &color);
- gdk_cairo_set_source_rgba (cr, &color);
+ &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), "draw",
+ g_signal_connect (G_OBJECT (drawing_area), "draw",
G_CALLBACK (draw_callback), NULL);
</programlisting>
</example>