[gtk+] drawingarea: Fix code snippet
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] drawingarea: Fix code snippet
- Date: Thu, 12 Oct 2017 14:06:35 +0000 (UTC)
commit 114f232a9982e3a418f5922b593467132d488681
Author: Timm Bäder <mail baedert org>
Date: Wed Oct 11 13:20:15 2017 +0200
drawingarea: Fix code snippet
Remove state parameter to gtk_style_context_get_color
gtk/gtkdrawingarea.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c
index c36c983..e3af7b5 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]