summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-03-28 04:01:21 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-03-28 04:01:21 +0000
commita7f29c4efc91ef0cc2c585af1d6fbf529bbb0074 (patch)
treeb311b522b77ae8ea3578a101e97a6c179ccd9b04 /gtk
parent6e7b8a6722a743c14d3300a29bf8ba438ed8bd55 (diff)
downloadgtk+-a7f29c4efc91ef0cc2c585af1d6fbf529bbb0074.tar.gz
Apply patch from Nils Barth fixing event return values. (#51041)
Tue Mar 27 22:36:07 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkrange.h: Apply patch from Nils Barth fixing event return values. (#51041) * gtk/gtkwidget.c: Fix some return values for default functions. * gtk/gtk[vh]scrollbar.c gtk/gtk[vh]range.c: Fix return values for trough_keys functions. * gtk/gtkwidget.h (struct _GtkWidgetClass): Fix return value for add_accelerator (shoudl have been a void return.) * gtk/gtkcellrenderer.[ch]: gtkcellrenderertoggle.h: Fix return type of EVENT. * gtk/gtkmarshal.list gtk/gtktexttag.c: Make EVENT signal return a boolean.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcellrenderer.c2
-rw-r--r--gtk/gtkcellrenderer.h90
-rw-r--r--gtk/gtkcellrenderertoggle.c2
-rw-r--r--gtk/gtkhscale.c63
-rw-r--r--gtk/gtkhscrollbar.c40
-rw-r--r--gtk/gtkmarshal.list2
-rw-r--r--gtk/gtkmarshalers.list2
-rw-r--r--gtk/gtkrange.c6
-rw-r--r--gtk/gtkrange.h40
-rw-r--r--gtk/gtktexttag.c4
-rw-r--r--gtk/gtktexttag.h15
-rw-r--r--gtk/gtkvscale.c62
-rw-r--r--gtk/gtkvscrollbar.c48
-rw-r--r--gtk/gtkwidget.c25
-rw-r--r--gtk/gtkwidget.h110
15 files changed, 257 insertions, 254 deletions
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index b1c9abe236..474275fda7 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -326,7 +326,7 @@ gtk_cell_renderer_render (GtkCellRenderer *cell,
*
* Return value: %TRUE if the event was consumed/handled
**/
-gint
+gboolean
gtk_cell_renderer_event (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h
index 079794a5f7..7084ba0c54 100644
--- a/gtk/gtkcellrenderer.h
+++ b/gtk/gtkcellrenderer.h
@@ -66,53 +66,53 @@ struct _GtkCellRendererClass
GtkObjectClass parent_class;
/* vtable - not signals */
- void (* get_size) (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
-
- void (* render) (GtkCellRenderer *cell,
- GdkWindow *window,
- GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
- GtkCellRendererState flags);
-
- gint (* event) (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags);
+ void (* get_size) (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
+
+ void (* render) (GtkCellRenderer *cell,
+ GdkWindow *window,
+ GtkWidget *widget,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GdkRectangle *expose_area,
+ GtkCellRendererState flags);
+
+ gboolean (* event) (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags);
};
-GtkType gtk_cell_renderer_get_type (void);
-void gtk_cell_renderer_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
-void gtk_cell_renderer_render (GtkCellRenderer *cell,
- GdkWindow *window,
- GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
- GtkCellRendererState flags);
-gint gtk_cell_renderer_event (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags);
+GtkType gtk_cell_renderer_get_type (void);
+void gtk_cell_renderer_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
+void gtk_cell_renderer_render (GtkCellRenderer *cell,
+ GdkWindow *window,
+ GtkWidget *widget,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GdkRectangle *expose_area,
+ GtkCellRendererState flags);
+gboolean gtk_cell_renderer_event (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ gchar *path,
+ GdkRectangle *background_area,
+ GdkRectangle *cell_area,
+ GtkCellRendererState flags);
#ifdef __cplusplus
}
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index 91199be0ea..3970f3246b 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -46,7 +46,7 @@ static void gtk_cell_renderer_toggle_render (GtkCellRenderer *cel
GdkRectangle *cell_area,
GdkRectangle *expose_area,
guint flags);
-static gint gtk_cell_renderer_toggle_event (GtkCellRenderer *cell,
+static gboolean gtk_cell_renderer_toggle_event (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
gchar *path,
diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c
index 1976acd52f..c09182051b 100644
--- a/gtk/gtkhscale.c
+++ b/gtk/gtkhscale.c
@@ -37,36 +37,37 @@ enum {
ARG_ADJUSTMENT
};
-static void gtk_hscale_class_init (GtkHScaleClass *klass);
-static void gtk_hscale_init (GtkHScale *hscale);
-static void gtk_hscale_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_hscale_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_hscale_realize (GtkWidget *widget);
-static void gtk_hscale_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gtk_hscale_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-static void gtk_hscale_pos_trough (GtkHScale *hscale,
- gint *x,
- gint *y,
- gint *w,
- gint *h);
-static void gtk_hscale_pos_background (GtkHScale *hscale,
- gint *x,
- gint *y,
- gint *w,
- gint *h);
-static void gtk_hscale_draw_slider (GtkRange *range);
-static void gtk_hscale_draw_value (GtkScale *scale);
-static gint gtk_hscale_trough_keys (GtkRange *range,
- GdkEventKey *key,
- GtkScrollType *scroll,
- GtkTroughType *pos);
-static void gtk_hscale_clear_background (GtkRange *range);
+static void gtk_hscale_class_init (GtkHScaleClass *klass);
+static void gtk_hscale_init (GtkHScale *hscale);
+static void gtk_hscale_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_hscale_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_hscale_realize (GtkWidget *widget);
+static void gtk_hscale_size_request (GtkWidget *widget,
+ GtkRequisition *requisition);
+static void gtk_hscale_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
+static void gtk_hscale_pos_trough (GtkHScale *hscale,
+ gint *x,
+ gint *y,
+ gint *w,
+ gint *h);
+static void gtk_hscale_pos_background (GtkHScale *hscale,
+ gint *x,
+ gint *y,
+ gint *w,
+ gint *h);
+static void gtk_hscale_draw_slider (GtkRange *range);
+static void gtk_hscale_draw_value (GtkScale *scale);
+static gboolean gtk_hscale_trough_keys (GtkRange *range,
+ GdkEventKey *key,
+ GtkScrollType *scroll,
+ GtkTroughType *pos);
+static void gtk_hscale_clear_background (GtkRange *range);
+
GtkType
gtk_hscale_get_type (void)
@@ -540,7 +541,7 @@ gtk_hscale_draw_value (GtkScale *scale)
}
}
-static gint
+static gboolean
gtk_hscale_trough_keys (GtkRange *range,
GdkEventKey *key,
GtkScrollType *scroll,
diff --git a/gtk/gtkhscrollbar.c b/gtk/gtkhscrollbar.c
index af806cd0d8..b66a688362 100644
--- a/gtk/gtkhscrollbar.c
+++ b/gtk/gtkhscrollbar.c
@@ -38,25 +38,25 @@ enum {
ARG_ADJUSTMENT
};
-static void gtk_hscrollbar_class_init (GtkHScrollbarClass *klass);
-static void gtk_hscrollbar_init (GtkHScrollbar *hscrollbar);
-static void gtk_hscrollbar_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_hscrollbar_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_hscrollbar_realize (GtkWidget *widget);
-static void gtk_hscrollbar_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-static void gtk_hscrollbar_draw_step_forw (GtkRange *range);
-static void gtk_hscrollbar_draw_step_back (GtkRange *range);
-static void gtk_hscrollbar_slider_update (GtkRange *range);
-static void gtk_hscrollbar_calc_slider_size (GtkHScrollbar *hscrollbar);
-static gint gtk_hscrollbar_trough_keys (GtkRange *range,
- GdkEventKey *key,
- GtkScrollType *scroll,
- GtkTroughType *pos);
+static void gtk_hscrollbar_class_init (GtkHScrollbarClass *klass);
+static void gtk_hscrollbar_init (GtkHScrollbar *hscrollbar);
+static void gtk_hscrollbar_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_hscrollbar_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_hscrollbar_realize (GtkWidget *widget);
+static void gtk_hscrollbar_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
+static void gtk_hscrollbar_draw_step_forw (GtkRange *range);
+static void gtk_hscrollbar_draw_step_back (GtkRange *range);
+static void gtk_hscrollbar_slider_update (GtkRange *range);
+static void gtk_hscrollbar_calc_slider_size (GtkHScrollbar *hscrollbar);
+static gboolean gtk_hscrollbar_trough_keys (GtkRange *range,
+ GdkEventKey *key,
+ GtkScrollType *scroll,
+ GtkTroughType *pos);
GtkType
@@ -425,7 +425,7 @@ gtk_hscrollbar_calc_slider_size (GtkHScrollbar *hscrollbar)
}
}
-static gint
+static gboolean
gtk_hscrollbar_trough_keys(GtkRange *range,
GdkEventKey *key,
GtkScrollType *scroll,
diff --git a/gtk/gtkmarshal.list b/gtk/gtkmarshal.list
index 43aabf179d..1c7b472402 100644
--- a/gtk/gtkmarshal.list
+++ b/gtk/gtkmarshal.list
@@ -24,10 +24,10 @@
BOOLEAN:BOXED
BOOLEAN:OBJECT,INT,INT,UINT
BOOLEAN:OBJECT,STRING,STRING,BOXED
+BOOLEAN:OBJECT,BOXED,BOXED
BOOLEAN:VOID
BOOLEAN:BOOLEAN
ENUM:ENUM
-INT:OBJECT,BOXED,BOXED
INT:POINTER
NONE:BOOL
NONE:INT
diff --git a/gtk/gtkmarshalers.list b/gtk/gtkmarshalers.list
index 43aabf179d..1c7b472402 100644
--- a/gtk/gtkmarshalers.list
+++ b/gtk/gtkmarshalers.list
@@ -24,10 +24,10 @@
BOOLEAN:BOXED
BOOLEAN:OBJECT,INT,INT,UINT
BOOLEAN:OBJECT,STRING,STRING,BOXED
+BOOLEAN:OBJECT,BOXED,BOXED
BOOLEAN:VOID
BOOLEAN:BOOLEAN
ENUM:ENUM
-INT:OBJECT,BOXED,BOXED
INT:POINTER
NONE:BOOL
NONE:INT
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 766d1ffae9..e868031e93 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -391,7 +391,7 @@ _gtk_range_slider_update (GtkRange *range)
(* RANGE_CLASS (range)->slider_update) (range);
}
-gint
+gboolean
_gtk_range_trough_click (GtkRange *range,
gint x,
gint y,
@@ -533,7 +533,7 @@ _gtk_range_default_vslider_update (GtkRange *range)
}
}
-gint
+gboolean
_gtk_range_default_htrough_click (GtkRange *range,
gint x,
gint y,
@@ -582,7 +582,7 @@ _gtk_range_default_htrough_click (GtkRange *range,
return GTK_TROUGH_NONE;
}
-gint
+gboolean
_gtk_range_default_vtrough_click (GtkRange *range,
gint x,
gint y,
diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h
index 925715b688..4b6127abba 100644
--- a/gtk/gtkrange.h
+++ b/gtk/gtkrange.h
@@ -97,23 +97,23 @@ struct _GtkRangeClass
void (* draw_background) (GtkRange *range);
void (* clear_background) (GtkRange *range);
- void (* draw_trough) (GtkRange *range);
- void (* draw_slider) (GtkRange *range);
- void (* draw_step_forw) (GtkRange *range);
- void (* draw_step_back) (GtkRange *range);
- void (* slider_update) (GtkRange *range);
- gint (* trough_click) (GtkRange *range,
- gint x,
- gint y,
- gdouble *jump_perc);
- gint (* trough_keys) (GtkRange *range,
- GdkEventKey *key,
- GtkScrollType *scroll,
- GtkTroughType *trough);
- void (* motion) (GtkRange *range,
- gint xdelta,
- gint ydelta);
- gint (* timer) (GtkRange *range);
+ void (* draw_trough) (GtkRange *range);
+ void (* draw_slider) (GtkRange *range);
+ void (* draw_step_forw) (GtkRange *range);
+ void (* draw_step_back) (GtkRange *range);
+ void (* slider_update) (GtkRange *range);
+ gboolean (* trough_click) (GtkRange *range,
+ gint x,
+ gint y,
+ gdouble *jump_perc);
+ gboolean (* trough_keys) (GtkRange *range,
+ GdkEventKey *key,
+ GtkScrollType *scroll,
+ GtkTroughType *trough);
+ void (* motion) (GtkRange *range,
+ gint xdelta,
+ gint ydelta);
+ gboolean (* timer) (GtkRange *range);
};
@@ -135,18 +135,18 @@ void _gtk_range_draw_slider (GtkRange *range);
void _gtk_range_draw_step_forw (GtkRange *range);
void _gtk_range_draw_step_back (GtkRange *range);
void _gtk_range_slider_update (GtkRange *range);
-gint _gtk_range_trough_click (GtkRange *range,
+gboolean _gtk_range_trough_click (GtkRange *range,
gint x,
gint y,
gdouble *jump_perc);
void _gtk_range_default_hslider_update (GtkRange *range);
void _gtk_range_default_vslider_update (GtkRange *range);
-gint _gtk_range_default_htrough_click (GtkRange *range,
+gboolean _gtk_range_default_htrough_click (GtkRange *range,
gint x,
gint y,
gdouble *jump_perc);
-gint _gtk_range_default_vtrough_click (GtkRange *range,
+gboolean _gtk_range_default_vtrough_click (GtkRange *range,
gint x,
gint y,
gdouble *jump_perc);
diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c
index 938e442f6f..58ba7c2b44 100644
--- a/gtk/gtktexttag.c
+++ b/gtk/gtktexttag.c
@@ -605,7 +605,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
G_SIGNAL_RUN_LAST,
GTK_SIGNAL_OFFSET (GtkTextTagClass, event),
NULL, NULL,
- gtk_marshal_INT__OBJECT_BOXED_BOXED,
+ gtk_marshal_BOOLEAN__OBJECT_BOXED_BOXED,
GTK_TYPE_INT,
3,
G_TYPE_OBJECT,
@@ -1616,7 +1616,7 @@ gtk_text_tag_set_priority (GtkTextTag *tag,
*
* Return value: result of signal emission (whether the event was handled)
**/
-gint
+gboolean
gtk_text_tag_event (GtkTextTag *tag,
GObject *event_object,
GdkEvent *event,
diff --git a/gtk/gtktexttag.h b/gtk/gtktexttag.h
index 1511b5452a..5d56783597 100644
--- a/gtk/gtktexttag.h
+++ b/gtk/gtktexttag.h
@@ -89,21 +89,22 @@ struct _GtkTextTag
guint pad3 : 1;
};
-struct _GtkTextTagClass {
+struct _GtkTextTagClass
+{
GObjectClass parent_class;
- gint (* event) (GtkTextTag *tag,
- GObject *event_object, /* widget, canvas item, whatever */
- GdkEvent *event, /* the event itself */
- const GtkTextIter *iter); /* location of event in buffer */
+ gboolean (* event) (GtkTextTag *tag,
+ GObject *event_object, /* widget, canvas item, whatever */
+ GdkEvent *event, /* the event itself */
+ const GtkTextIter *iter); /* location of event in buffer */
};
-GType gtk_text_tag_get_type (void) G_GNUC_CONST;
+GType gtk_text_tag_get_type (void) G_GNUC_CONST;
GtkTextTag *gtk_text_tag_new (const gchar *name);
gint gtk_text_tag_get_priority (GtkTextTag *tag);
void gtk_text_tag_set_priority (GtkTextTag *tag,
gint priority);
-gint gtk_text_tag_event (GtkTextTag *tag,
+gboolean gtk_text_tag_event (GtkTextTag *tag,
GObject *event_object,
GdkEvent *event,
const GtkTextIter *iter);
diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c
index 75dd23d796..8747455093 100644
--- a/gtk/gtkvscale.c
+++ b/gtk/gtkvscale.c
@@ -38,36 +38,36 @@ enum {
ARG_ADJUSTMENT
};
-static void gtk_vscale_class_init (GtkVScaleClass *klass);
-static void gtk_vscale_init (GtkVScale *vscale);
-static void gtk_vscale_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_vscale_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_vscale_realize (GtkWidget *widget);
-static void gtk_vscale_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gtk_vscale_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-static void gtk_vscale_pos_trough (GtkVScale *vscale,
- gint *x,
- gint *y,
- gint *w,
- gint *h);
-static void gtk_vscale_pos_background (GtkVScale *vscale,
- gint *x,
- gint *y,
- gint *w,
- gint *h);
-static void gtk_vscale_draw_slider (GtkRange *range);
-static void gtk_vscale_draw_value (GtkScale *scale);
-static gint gtk_vscale_trough_keys (GtkRange *range,
- GdkEventKey *key,
- GtkScrollType *scroll,
- GtkTroughType *pos);
-static void gtk_vscale_clear_background (GtkRange *range);
+static void gtk_vscale_class_init (GtkVScaleClass *klass);
+static void gtk_vscale_init (GtkVScale *vscale);
+static void gtk_vscale_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_vscale_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_vscale_realize (GtkWidget *widget);
+static void gtk_vscale_size_request (GtkWidget *widget,
+ GtkRequisition *requisition);
+static void gtk_vscale_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
+static void gtk_vscale_pos_trough (GtkVScale *vscale,
+ gint *x,
+ gint *y,
+ gint *w,
+ gint *h);
+static void gtk_vscale_pos_background (GtkVScale *vscale,
+ gint *x,
+ gint *y,
+ gint *w,
+ gint *h);
+static void gtk_vscale_draw_slider (GtkRange *range);
+static void gtk_vscale_draw_value (GtkScale *scale);
+static gboolean gtk_vscale_trough_keys (GtkRange *range,
+ GdkEventKey *key,
+ GtkScrollType *scroll,
+ GtkTroughType *pos);
+static void gtk_vscale_clear_background (GtkRange *range);
GtkType
gtk_vscale_get_type (void)
@@ -543,7 +543,7 @@ gtk_vscale_draw_value (GtkScale *scale)
}
}
-static gint
+static gboolean
gtk_vscale_trough_keys (GtkRange *range,
GdkEventKey *key,
GtkScrollType *scroll,
diff --git a/gtk/gtkvscrollbar.c b/gtk/gtkvscrollbar.c
index 41d0d8630a..9e5e240efd 100644
--- a/gtk/gtkvscrollbar.c
+++ b/gtk/gtkvscrollbar.c
@@ -38,25 +38,25 @@ enum {
ARG_ADJUSTMENT
};
-static void gtk_vscrollbar_class_init (GtkVScrollbarClass *klass);
-static void gtk_vscrollbar_init (GtkVScrollbar *vscrollbar);
-static void gtk_vscrollbar_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_vscrollbar_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void gtk_vscrollbar_realize (GtkWidget *widget);
-static void gtk_vscrollbar_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-static void gtk_vscrollbar_draw_step_forw (GtkRange *range);
-static void gtk_vscrollbar_draw_step_back (GtkRange *range);
-static void gtk_vscrollbar_slider_update (GtkRange *range);
-static void gtk_vscrollbar_calc_slider_size (GtkVScrollbar *vscrollbar);
-static gint gtk_vscrollbar_trough_keys (GtkRange *range,
- GdkEventKey *key,
- GtkScrollType *scroll,
- GtkTroughType *pos);
+static void gtk_vscrollbar_class_init (GtkVScrollbarClass *klass);
+static void gtk_vscrollbar_init (GtkVScrollbar *vscrollbar);
+static void gtk_vscrollbar_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_vscrollbar_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_vscrollbar_realize (GtkWidget *widget);
+static void gtk_vscrollbar_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
+static void gtk_vscrollbar_draw_step_forw (GtkRange *range);
+static void gtk_vscrollbar_draw_step_back (GtkRange *range);
+static void gtk_vscrollbar_slider_update (GtkRange *range);
+static void gtk_vscrollbar_calc_slider_size (GtkVScrollbar *vscrollbar);
+static gboolean gtk_vscrollbar_trough_keys (GtkRange *range,
+ GdkEventKey *key,
+ GtkScrollType *scroll,
+ GtkTroughType *pos);
GtkType
@@ -425,11 +425,11 @@ gtk_vscrollbar_calc_slider_size (GtkVScrollbar *vscrollbar)
}
}
-static gint
-gtk_vscrollbar_trough_keys(GtkRange *range,
- GdkEventKey *key,
- GtkScrollType *scroll,
- GtkTroughType *pos)
+static gboolean
+gtk_vscrollbar_trough_keys (GtkRange *range,
+ GdkEventKey *key,
+ GtkScrollType *scroll,
+ GtkTroughType *pos)
{
gint return_val = FALSE;
switch (key->keyval)
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 7b95943ec7..831e089dc2 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -157,14 +157,15 @@ static void gtk_widget_real_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_widget_real_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static gint gtk_widget_real_key_press_event (GtkWidget *widget,
- GdkEventKey *event);
-static gint gtk_widget_real_key_release_event (GtkWidget *widget,
- GdkEventKey *event);
-static gint gtk_widget_real_focus_in_event (GtkWidget *widget,
- GdkEventFocus *event);
-static gint gtk_widget_real_focus_out_event (GtkWidget *widget,
- GdkEventFocus *event);
+static gboolean gtk_widget_real_key_press_event (GtkWidget *widget,
+ GdkEventKey *event);
+static gboolean gtk_widget_real_key_release_event (GtkWidget *widget,
+ GdkEventKey *event);
+static gboolean gtk_widget_real_focus_in_event (GtkWidget *widget,
+ GdkEventFocus *event);
+static gboolean gtk_widget_real_focus_out_event (GtkWidget *widget,
+ GdkEventFocus *event);
+
static void gtk_widget_style_set (GtkWidget *widget,
GtkStyle *previous_style);
static void gtk_widget_direction_changed (GtkWidget *widget,
@@ -2240,7 +2241,7 @@ gtk_widget_real_activate_mnemonic (GtkWidget *widget,
return TRUE;
}
-static gint
+static gboolean
gtk_widget_real_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
@@ -2258,7 +2259,7 @@ gtk_widget_real_key_press_event (GtkWidget *widget,
return handled;
}
-static gint
+static gboolean
gtk_widget_real_key_release_event (GtkWidget *widget,
GdkEventKey *event)
{
@@ -2276,7 +2277,7 @@ gtk_widget_real_key_release_event (GtkWidget *widget,
return handled;
}
-static gint
+static gboolean
gtk_widget_real_focus_in_event (GtkWidget *widget,
GdkEventFocus *event)
{
@@ -2286,7 +2287,7 @@ gtk_widget_real_focus_in_event (GtkWidget *widget,
return FALSE;
}
-static gint
+static gboolean
gtk_widget_real_focus_out_event (GtkWidget *widget,
GdkEventFocus *event)
{
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 1d5d4bee85..b6a8032ff6 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -260,7 +260,7 @@ struct _GtkWidgetClass
GtkTextDirection previous_direction);
/* accelerators */
- gint (* add_accelerator) (GtkWidget *widget,
+ void (* add_accelerator) (GtkWidget *widget,
guint accel_signal_id,
GtkAccelGroup *accel_group,
guint accel_key,
@@ -279,60 +279,60 @@ struct _GtkWidgetClass
void (* grab_focus) (GtkWidget *widget);
/* events */
- gint (* event) (GtkWidget *widget,
- GdkEvent *event);
- gint (* button_press_event) (GtkWidget *widget,
- GdkEventButton *event);
- gint (* button_release_event) (GtkWidget *widget,
- GdkEventButton *event);
- gint (* scroll_event) (GtkWidget *widget,
- GdkEventScroll *event);
- gint (* motion_notify_event) (GtkWidget *widget,
- GdkEventMotion *event);
- gint (* delete_event) (GtkWidget *widget,
- GdkEventAny *event);
- gint (* destroy_event) (GtkWidget *widget,
- GdkEventAny *event);
- gint (* expose_event) (GtkWidget *widget,
- GdkEventExpose *event);
- gint (* key_press_event) (GtkWidget *widget,
- GdkEventKey *event);
- gint (* key_release_event) (GtkWidget *widget,
- GdkEventKey *event);
- gint (* enter_notify_event) (GtkWidget *widget,
- GdkEventCrossing *event);
- gint (* leave_notify_event) (GtkWidget *widget,
- GdkEventCrossing *event);
- gint (* configure_event) (GtkWidget *widget,
- GdkEventConfigure *event);
- gint (* focus_in_event) (GtkWidget *widget,
- GdkEventFocus *event);
- gint (* focus_out_event) (GtkWidget *widget,
- GdkEventFocus *event);
- gint (* map_event) (GtkWidget *widget,
- GdkEventAny *event);
- gint (* unmap_event) (GtkWidget *widget,
- GdkEventAny *event);
- gint (* property_notify_event) (GtkWidget *widget,
- GdkEventProperty *event);
- gint (* selection_clear_event) (GtkWidget *widget,
- GdkEventSelection *event);
- gint (* selection_request_event) (GtkWidget *widget,
- GdkEventSelection *event);
- gint (* selection_notify_event) (GtkWidget *widget,
- GdkEventSelection *event);
- gint (* proximity_in_event) (GtkWidget *widget,
- GdkEventProximity *event);
- gint (* proximity_out_event) (GtkWidget *widget,
- GdkEventProximity *event);
- gint (* visibility_notify_event) (GtkWidget *widget,
- GdkEventVisibility *event);
- gint (* client_event) (GtkWidget *widget,
- GdkEventClient *event);
- gint (* no_expose_event) (GtkWidget *widget,
- GdkEventAny *event);
- gint (* window_state_event) (GtkWidget *widget,
- GdkEventWindowState *event);
+ gboolean (* event) (GtkWidget *widget,
+ GdkEvent *event);
+ gboolean (* button_press_event) (GtkWidget *widget,
+ GdkEventButton *event);
+ gboolean (* button_release_event) (GtkWidget *widget,
+ GdkEventButton *event);
+ gboolean (* scroll_event) (GtkWidget *widget,
+ GdkEventScroll *event);
+ gboolean (* motion_notify_event) (GtkWidget *widget,
+ GdkEventMotion *event);
+ gboolean (* delete_event) (GtkWidget *widget,
+ GdkEventAny *event);
+ gboolean (* destroy_event) (GtkWidget *widget,
+ GdkEventAny *event);
+ gboolean (* expose_event) (GtkWidget *widget,
+ GdkEventExpose *event);
+ gboolean (* key_press_event) (GtkWidget *widget,
+ GdkEventKey *event);
+ gboolean (* key_release_event) (GtkWidget *widget,
+ GdkEventKey *event);
+ gboolean (* enter_notify_event) (GtkWidget *widget,
+ GdkEventCrossing *event);
+ gboolean (* leave_notify_event) (GtkWidget *widget,
+ GdkEventCrossing *event);
+ gboolean (* configure_event) (GtkWidget *widget,
+ GdkEventConfigure *event);
+ gboolean (* focus_in_event) (GtkWidget *widget,
+ GdkEventFocus *event);
+ gboolean (* focus_out_event) (GtkWidget *widget,
+ GdkEventFocus *event);
+ gboolean (* map_event) (GtkWidget *widget,
+ GdkEventAny *event);
+ gboolean (* unmap_event) (GtkWidget *widget,
+ GdkEventAny *event);
+ gboolean (* property_notify_event) (GtkWidget *widget,
+ GdkEventProperty *event);
+ gboolean (* selection_clear_event) (GtkWidget *widget,
+ GdkEventSelection *event);
+ gboolean (* selection_request_event) (GtkWidget *widget,
+ GdkEventSelection *event);
+ gboolean (* selection_notify_event) (GtkWidget *widget,
+ GdkEventSelection *event);
+ gboolean (* proximity_in_event) (GtkWidget *widget,
+ GdkEventProximity *event);
+ gboolean (* proximity_out_event) (GtkWidget *widget,
+ GdkEventProximity *event);
+ gboolean (* visibility_notify_event) (GtkWidget *widget,
+ GdkEventVisibility *event);
+ gboolean (* client_event) (GtkWidget *widget,
+ GdkEventClient *event);
+ gboolean (* no_expose_event) (GtkWidget *widget,
+ GdkEventAny *event);
+ gboolean (* window_state_event) (GtkWidget *widget,
+ GdkEventWindowState *event);
/* selection */
void (* selection_get) (GtkWidget *widget,