diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-01-03 19:26:36 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-01-03 19:26:36 +0000 |
commit | 44ec61dd97f1e159457b24458cf86ec39660efd7 (patch) | |
tree | 036b478f431462c22a8e0464d58854b2e86f4233 /examples/scribble-simple | |
parent | 6803d93d38eb7f1cf09b89eeaf0cb414ab001d15 (diff) | |
download | gdk-pixbuf-44ec61dd97f1e159457b24458cf86ec39660efd7.tar.gz |
Re-extract.
2005-01-03 Matthias Clasen <mclasen@redhat.com>
* examples/*: Re-extract.
* docs/tutorial/gtk-tut.sgml: Small corrections.
Diffstat (limited to 'examples/scribble-simple')
-rw-r--r-- | examples/scribble-simple/scribble-simple.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/examples/scribble-simple/scribble-simple.c b/examples/scribble-simple/scribble-simple.c index 69920269d..92e54da91 100644 --- a/examples/scribble-simple/scribble-simple.c +++ b/examples/scribble-simple/scribble-simple.c @@ -18,7 +18,6 @@ * Boston, MA 02111-1307, USA. */ -#include <config.h> #include <stdlib.h> #include <gtk/gtk.h> @@ -26,8 +25,8 @@ static GdkPixmap *pixmap = NULL; /* Create a new backing pixmap of the appropriate size */ -static gint configure_event( GtkWidget *widget, - GdkEventConfigure *event ) +static gboolean configure_event( GtkWidget *widget, + GdkEventConfigure *event ) { if (pixmap) g_object_unref (pixmap); @@ -47,8 +46,8 @@ static gint configure_event( GtkWidget *widget, } /* Redraw the screen from the backing pixmap */ -static gint expose_event( GtkWidget *widget, - GdkEventExpose *event ) +static gboolean expose_event( GtkWidget *widget, + GdkEventExpose *event ) { gdk_draw_drawable (widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], @@ -77,12 +76,12 @@ static void draw_brush( GtkWidget *widget, update_rect.x, update_rect.y, update_rect.width, update_rect.height); gtk_widget_queue_draw_area (widget, - update_rect.x, update_rect.y, - update_rect.width, update_rect.height); + update_rect.x, update_rect.y, + update_rect.width, update_rect.height); } -static gint button_press_event( GtkWidget *widget, - GdkEventButton *event ) +static gboolean button_press_event( GtkWidget *widget, + GdkEventButton *event ) { if (event->button == 1 && pixmap != NULL) draw_brush (widget, event->x, event->y); @@ -90,8 +89,8 @@ static gint button_press_event( GtkWidget *widget, return TRUE; } -static gint motion_notify_event( GtkWidget *widget, - GdkEventMotion *event ) +static gboolean motion_notify_event( GtkWidget *widget, + GdkEventMotion *event ) { int x, y; GdkModifierType state; |