summaryrefslogtreecommitdiff
path: root/gtk/gtkdrawingarea.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-10-11 13:20:15 +0200
committerTimm Bäder <mail@baedert.org>2017-10-12 15:42:03 +0200
commit114f232a9982e3a418f5922b593467132d488681 (patch)
tree57ccf058cd26509cf5f71e7ab1f8e80314c8ec7b /gtk/gtkdrawingarea.c
parentf2ca2e12420e5678dfe3bc544d3181c0fcbc81a9 (diff)
downloadgtk+-114f232a9982e3a418f5922b593467132d488681.tar.gz
drawingarea: Fix code snippet
Remove state parameter to gtk_style_context_get_color
Diffstat (limited to 'gtk/gtkdrawingarea.c')
-rw-r--r--gtk/gtkdrawingarea.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c
index c36c983834..e3af7b5037 100644
--- a/gtk/gtkdrawingarea.c
+++ b/gtk/gtkdrawingarea.c
@@ -100,19 +100,24 @@ static GParamSpec *props[LAST_PROP] = { NULL, };
* 0, 2 * G_PI);
*
* gtk_style_context_get_color (context,
- * gtk_style_context_get_state (context),
* &color);
* gdk_cairo_set_source_rgba (cr, &color);
*
* cairo_fill (cr);
* }
- * [...]
+ *
+ * void main (int argc, char **argv)
+ * {
+ * gtk_init ();
+ *
* GtkWidget *area = gtk_drawing_area_new ();
* gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (area), 100);
* gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (area), 100);
* gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (area),
* draw_function,
* NULL, NULL);
+ *
+ * }
* ]|
*
* The draw function is normally called when a drawing area first comes