From fcbbdfbd18e15b4ee8322a0217cf03a689a5e033 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 16 Aug 2011 11:25:56 -0400 Subject: Coding style and whitespace cleanup. --- libgnomecanvas/gailcanvas.c | 20 +-- libgnomecanvas/gailcanvas.h | 2 +- libgnomecanvas/gailcanvasgroup.c | 6 +- libgnomecanvas/gailcanvasgroup.h | 2 +- libgnomecanvas/gailcanvasgroupfactory.c | 4 +- libgnomecanvas/gailcanvasitem.c | 34 ++--- libgnomecanvas/gailcanvasitem.h | 2 +- libgnomecanvas/gailcanvasitemfactory.c | 6 +- libgnomecanvas/gailcanvastext.c | 96 ++++++------- libgnomecanvas/gailcanvastext.h | 2 +- libgnomecanvas/gailcanvastextfactory.c | 4 +- libgnomecanvas/gailcanvaswidget.c | 4 +- libgnomecanvas/gailcanvaswidget.h | 2 +- libgnomecanvas/gailcanvaswidgetfactory.c | 4 +- libgnomecanvas/gnome-canvas-pixbuf.c | 24 ++-- libgnomecanvas/gnome-canvas-rect.c | 2 +- libgnomecanvas/gnome-canvas-rich-text.c | 141 +++++++++++-------- libgnomecanvas/gnome-canvas-text.c | 45 +++--- libgnomecanvas/gnome-canvas-text.h | 4 +- libgnomecanvas/gnome-canvas-util.c | 11 +- libgnomecanvas/gnome-canvas-widget.c | 34 +++-- libgnomecanvas/gnome-canvas.c | 232 ++++++++++++++++++++----------- 22 files changed, 402 insertions(+), 279 deletions(-) (limited to 'libgnomecanvas') diff --git a/libgnomecanvas/gailcanvas.c b/libgnomecanvas/gailcanvas.c index ca60f26b1a..47501c7d1c 100644 --- a/libgnomecanvas/gailcanvas.c +++ b/libgnomecanvas/gailcanvas.c @@ -38,13 +38,13 @@ static void gail_canvas_real_initialize (AtkObject *obj, gpointer data); static gint gail_canvas_get_n_children (AtkObject *obj); -static AtkObject* gail_canvas_ref_child (AtkObject *obj, +static AtkObject * gail_canvas_ref_child (AtkObject *obj, gint i); static void adjustment_changed (GtkAdjustment *adjustment, GnomeCanvas *canvas); -static AtkObject* gail_canvas_factory_create_accessible (GObject *obj); +static AtkObject * gail_canvas_factory_create_accessible (GObject *obj); static GType gail_canvas_factory_get_accessible_type (void); @@ -67,8 +67,8 @@ gail_canvas_factory_class_init (GailCanvasFactoryClass *klass) class->get_accessible_type = gail_canvas_factory_get_accessible_type; } -static AtkObject* -gail_canvas_factory_create_accessible (GObject *obj) +static AtkObject * +gail_canvas_factory_create_accessible (GObject *obj) { return gail_canvas_new (GTK_WIDGET (obj)); } @@ -156,7 +156,7 @@ gail_canvas_class_init (GailCanvasClass *klass) class->initialize = gail_canvas_real_initialize; } -AtkObject* +AtkObject * gail_canvas_new (GtkWidget *widget) { GObject *object; @@ -174,7 +174,7 @@ gail_canvas_new (GtkWidget *widget) static void gail_canvas_real_initialize (AtkObject *obj, - gpointer data) + gpointer data) { GnomeCanvas *canvas; GtkAdjustment *adj; @@ -199,7 +199,7 @@ gail_canvas_real_initialize (AtkObject *obj, } static gint -gail_canvas_get_n_children (AtkObject* obj) +gail_canvas_get_n_children (AtkObject *obj) { GtkAccessible *accessible; GtkWidget *widget; @@ -222,9 +222,9 @@ gail_canvas_get_n_children (AtkObject* obj) return 1; } -static AtkObject* +static AtkObject * gail_canvas_ref_child (AtkObject *obj, - gint i) + gint i) { GtkAccessible *accessible; GtkWidget *widget; @@ -255,7 +255,7 @@ gail_canvas_ref_child (AtkObject *obj, static void adjustment_changed (GtkAdjustment *adjustment, - GnomeCanvas *canvas) + GnomeCanvas *canvas) { AtkObject *atk_obj; diff --git a/libgnomecanvas/gailcanvas.h b/libgnomecanvas/gailcanvas.h index 707ddc3b63..3f0b7767bc 100644 --- a/libgnomecanvas/gailcanvas.h +++ b/libgnomecanvas/gailcanvas.h @@ -62,7 +62,7 @@ struct _GailCanvas; struct _GailCanvasClass; -AtkObject* gail_canvas_new (GtkWidget *widget); +AtkObject * gail_canvas_new (GtkWidget *widget); void gail_canvas_init (void); diff --git a/libgnomecanvas/gailcanvasgroup.c b/libgnomecanvas/gailcanvasgroup.c index 5de58370a2..7de8ed3eba 100644 --- a/libgnomecanvas/gailcanvasgroup.c +++ b/libgnomecanvas/gailcanvasgroup.c @@ -26,7 +26,7 @@ #include "gailcanvasgroup.h" static gint gail_canvas_group_get_n_children (AtkObject *obj); -static AtkObject* gail_canvas_group_ref_child (AtkObject *obj, +static AtkObject * gail_canvas_group_ref_child (AtkObject *obj, gint i); G_DEFINE_TYPE (GailCanvasGroup, @@ -39,7 +39,7 @@ gail_canvas_group_init (GailCanvasGroup *foo) ; } -AtkObject* +AtkObject * gail_canvas_group_new (GObject *obj) { gpointer object; @@ -79,7 +79,7 @@ gail_canvas_group_get_n_children (AtkObject *obj) static AtkObject * gail_canvas_group_ref_child (AtkObject *obj, - gint i) + gint i) { AtkGObjectAccessible *atk_gobject; GnomeCanvasGroup *group; diff --git a/libgnomecanvas/gailcanvasgroup.h b/libgnomecanvas/gailcanvasgroup.h index 4f50b9da26..a79631821b 100644 --- a/libgnomecanvas/gailcanvasgroup.h +++ b/libgnomecanvas/gailcanvasgroup.h @@ -48,7 +48,7 @@ struct _GailCanvasGroupClass GailCanvasItemClass parent_class; }; -AtkObject* gail_canvas_group_new (GObject *obj); +AtkObject * gail_canvas_group_new (GObject *obj); G_END_DECLS diff --git a/libgnomecanvas/gailcanvasgroupfactory.c b/libgnomecanvas/gailcanvasgroupfactory.c index 8c208f8c80..ed36c916e7 100644 --- a/libgnomecanvas/gailcanvasgroupfactory.c +++ b/libgnomecanvas/gailcanvasgroupfactory.c @@ -68,8 +68,8 @@ gail_canvas_group_factory_class_init (GailCanvasGroupFactoryClass *klass) class->get_accessible_type = gail_canvas_group_factory_get_accessible_type; } -static AtkObject* -gail_canvas_group_factory_create_accessible (GObject *obj) +static AtkObject * +gail_canvas_group_factory_create_accessible (GObject *obj) { return gail_canvas_group_new (obj); } diff --git a/libgnomecanvas/gailcanvasitem.c b/libgnomecanvas/gailcanvasitem.c index 377c6fe221..ce98ee0b40 100644 --- a/libgnomecanvas/gailcanvasitem.c +++ b/libgnomecanvas/gailcanvasitem.c @@ -30,9 +30,9 @@ static void gail_canvas_item_initialize (AtkObject *obj, gpointer data); -static AtkObject* gail_canvas_item_get_parent (AtkObject *obj); +static AtkObject * gail_canvas_item_get_parent (AtkObject *obj); static gint gail_canvas_item_get_index_in_parent (AtkObject *obj); -static AtkStateSet* gail_canvas_item_ref_state_set (AtkObject *obj); +static AtkStateSet * gail_canvas_item_ref_state_set (AtkObject *obj); static void gail_canvas_item_component_interface_init (AtkComponentIface *iface); static guint gail_canvas_item_add_focus_handler (AtkComponent *component, @@ -67,7 +67,7 @@ gail_canvas_item_init (GailCanvasItem *foo) ; } -AtkObject* +AtkObject * gail_canvas_item_new (GObject *obj) { gpointer object; @@ -82,8 +82,8 @@ gail_canvas_item_new (GObject *obj) } static void -gail_canvas_item_initialize (AtkObject *obj, - gpointer data) +gail_canvas_item_initialize (AtkObject *obj, + gpointer data) { ATK_OBJECT_CLASS (parent_class)->initialize (obj, data); @@ -174,8 +174,8 @@ gail_canvas_item_get_index_in_parent (AtkObject *obj) } } -static AtkStateSet* -gail_canvas_item_ref_state_set (AtkObject *obj) +static AtkStateSet * +gail_canvas_item_ref_state_set (AtkObject *obj) { AtkGObjectAccessible *atk_gobj; GObject *g_obj; @@ -232,7 +232,7 @@ gail_canvas_item_component_interface_init (AtkComponentIface *iface) } static guint -gail_canvas_item_add_focus_handler (AtkComponent *component, +gail_canvas_item_add_focus_handler (AtkComponent *component, AtkFocusHandler handler) { GSignalMatchType match_type; @@ -261,10 +261,10 @@ gail_canvas_item_add_focus_handler (AtkComponent *component, static void gail_canvas_item_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + gint *x, + gint *y, + gint *width, + gint *height, AtkCoordType coord_type) { AtkGObjectAccessible *atk_gobj; @@ -321,7 +321,7 @@ gail_canvas_item_get_mdi_zorder (AtkComponent *component) } static gboolean -gail_canvas_item_grab_focus (AtkComponent *component) +gail_canvas_item_grab_focus (AtkComponent *component) { AtkGObjectAccessible *atk_gobj; GObject *obj; @@ -348,7 +348,7 @@ gail_canvas_item_grab_focus (AtkComponent *component) static void gail_canvas_item_remove_focus_handler (AtkComponent *component, - guint handler_id) + guint handler_id) { g_signal_handler_disconnect (ATK_OBJECT (component), handler_id); } @@ -363,8 +363,8 @@ is_item_on_screen (GnomeCanvasItem *item) } static void -get_item_extents (GnomeCanvasItem *item, - GdkRectangle *extents) +get_item_extents (GnomeCanvasItem *item, + GdkRectangle *extents) { double x1, x2, y1, y2; cairo_matrix_t i2c; @@ -387,7 +387,7 @@ get_item_extents (GnomeCanvasItem *item, } static gboolean -is_item_in_window (GnomeCanvasItem *item, +is_item_in_window (GnomeCanvasItem *item, const GdkRectangle *extents) { GtkWidget *widget; diff --git a/libgnomecanvas/gailcanvasitem.h b/libgnomecanvas/gailcanvasitem.h index 9f89d7bbc3..526dd754fe 100644 --- a/libgnomecanvas/gailcanvasitem.h +++ b/libgnomecanvas/gailcanvasitem.h @@ -47,7 +47,7 @@ struct _GailCanvasItemClass AtkGObjectAccessibleClass parent_class; }; -AtkObject* gail_canvas_item_new (GObject *obj); +AtkObject * gail_canvas_item_new (GObject *obj); G_END_DECLS diff --git a/libgnomecanvas/gailcanvasitemfactory.c b/libgnomecanvas/gailcanvasitemfactory.c index 66435d2878..4a3030d2a9 100644 --- a/libgnomecanvas/gailcanvasitemfactory.c +++ b/libgnomecanvas/gailcanvasitemfactory.c @@ -25,7 +25,7 @@ #include "gailcanvasitemfactory.h" #include "gailcanvasitem.h" -static AtkObject* gail_canvas_item_factory_create_accessible (GObject *obj); +static AtkObject * gail_canvas_item_factory_create_accessible (GObject *obj); static GType gail_canvas_item_factory_get_accessible_type (void); @@ -48,8 +48,8 @@ gail_canvas_item_factory_class_init (GailCanvasItemFactoryClass *klass) class->get_accessible_type = gail_canvas_item_factory_get_accessible_type; } -static AtkObject* -gail_canvas_item_factory_create_accessible (GObject *obj) +static AtkObject * +gail_canvas_item_factory_create_accessible (GObject *obj) { return gail_canvas_item_new (obj); } diff --git a/libgnomecanvas/gailcanvastext.c b/libgnomecanvas/gailcanvastext.c index 6d070d5e97..cb2cd77846 100644 --- a/libgnomecanvas/gailcanvastext.c +++ b/libgnomecanvas/gailcanvastext.c @@ -72,12 +72,12 @@ static void gail_canvas_text_get_character_extents (AtkText gint *width, gint *height, AtkCoordType coords); -static AtkAttributeSet* +static AtkAttributeSet * gail_canvas_text_get_run_attributes (AtkText *text, gint offset, gint *start_offset, gint *end_offset); -static AtkAttributeSet* +static AtkAttributeSet * gail_canvas_text_get_default_attributes (AtkText *text); static gint gail_canvas_text_get_n_selections (AtkText *text); static gchar * gail_canvas_text_get_selection (AtkText *text, @@ -112,7 +112,7 @@ gail_canvas_text_init (GailCanvasText *foo) ; } -AtkObject* +AtkObject * gail_canvas_text_new (GObject *obj) { gpointer object; @@ -173,8 +173,8 @@ gail_canvas_text_text_interface_init (AtkTextIface *iface) static gchar * gail_canvas_text_get_text (AtkText *text, - gint start_offset, - gint end_offset) + gint start_offset, + gint end_offset) { GailCanvasText *gail_text; GtkTextBuffer *buffer; @@ -192,11 +192,11 @@ gail_canvas_text_get_text (AtkText *text, } static gchar * -gail_canvas_text_get_text_after_offset (AtkText *text, - gint offset, +gail_canvas_text_get_text_after_offset (AtkText *text, + gint offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + gint *start_offset, + gint *end_offset) { return get_text_near_offset (text, GAIL_AFTER_OFFSET, boundary_type, offset, @@ -204,11 +204,11 @@ gail_canvas_text_get_text_after_offset (AtkText *text, } static gchar * -gail_canvas_text_get_text_at_offset (AtkText *text, - gint offset, +gail_canvas_text_get_text_at_offset (AtkText *text, + gint offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + gint *start_offset, + gint *end_offset) { return get_text_near_offset (text, GAIL_AT_OFFSET, boundary_type, offset, @@ -216,11 +216,11 @@ gail_canvas_text_get_text_at_offset (AtkText *text, } static gchar * -gail_canvas_text_get_text_before_offset (AtkText *text, - gint offset, +gail_canvas_text_get_text_before_offset (AtkText *text, + gint offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + gint *start_offset, + gint *end_offset) { return get_text_near_offset (text, GAIL_BEFORE_OFFSET, boundary_type, offset, @@ -229,7 +229,7 @@ gail_canvas_text_get_text_before_offset (AtkText *text, static gunichar gail_canvas_text_get_character_at_offset (AtkText *text, - gint offset) + gint offset) { GailCanvasText *gail_item; GtkTextIter start, end; @@ -286,7 +286,7 @@ gail_canvas_text_get_caret_offset (AtkText *text) static gboolean gail_canvas_text_set_caret_offset (AtkText *text, - gint offset) + gint offset) { GailCanvasText *gail_text; GtkTextBuffer *buffer; @@ -302,31 +302,31 @@ gail_canvas_text_set_caret_offset (AtkText *text, } static gint -gail_canvas_text_get_offset_at_point (AtkText *text, - gint x, - gint y, +gail_canvas_text_get_offset_at_point (AtkText *text, + gint x, + gint y, AtkCoordType coords) { return -1; } static void -gail_canvas_text_get_character_extents (AtkText *text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, +gail_canvas_text_get_character_extents (AtkText *text, + gint offset, + gint *x, + gint *y, + gint *width, + gint *height, AtkCoordType coords) { return; } -static AtkAttributeSet* +static AtkAttributeSet * gail_canvas_text_get_run_attributes (AtkText *text, - gint offset, - gint *start_offset, - gint *end_offset) + gint offset, + gint *start_offset, + gint *end_offset) { GailCanvasText *gail_text; @@ -338,7 +338,7 @@ gail_canvas_text_get_run_attributes (AtkText *text, offset, start_offset, end_offset); } -static AtkAttributeSet* +static AtkAttributeSet * gail_canvas_text_get_default_attributes (AtkText *text) { return NULL; @@ -369,9 +369,9 @@ gail_canvas_text_get_n_selections (AtkText *text) static gchar * gail_canvas_text_get_selection (AtkText *text, - gint selection_num, - gint *start_pos, - gint *end_pos) + gint selection_num, + gint *start_pos, + gint *end_pos) { GailCanvasText *gail_text; GtkTextBuffer *buffer; @@ -400,8 +400,8 @@ gail_canvas_text_get_selection (AtkText *text, static gboolean gail_canvas_text_add_selection (AtkText *text, - gint start_pos, - gint end_pos) + gint start_pos, + gint end_pos) { GailCanvasText *gail_text; GtkTextBuffer *buffer; @@ -435,7 +435,7 @@ gail_canvas_text_add_selection (AtkText *text, static gboolean gail_canvas_text_remove_selection (AtkText *text, - gint selection_num) + gint selection_num) { GailCanvasText *gail_text; GtkTextBuffer *buffer; @@ -473,9 +473,9 @@ gail_canvas_text_remove_selection (AtkText *text, static gboolean gail_canvas_text_set_selection (AtkText *text, - gint selection_num, - gint start_pos, - gint end_pos) + gint selection_num, + gint start_pos, + gint end_pos) { GailCanvasText *gail_text; GtkTextBuffer *buffer; @@ -511,12 +511,12 @@ gail_canvas_text_set_selection (AtkText *text, } static gchar * -get_text_near_offset (AtkText *text, - GailOffsetType function, - AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset) +get_text_near_offset (AtkText *text, + GailOffsetType function, + AtkTextBoundary boundary_type, + gint offset, + gint *start_offset, + gint *end_offset) { return gail_text_util_get_text (GAIL_CANVAS_TEXT (text)->textutil, NULL, function, boundary_type, offset, diff --git a/libgnomecanvas/gailcanvastext.h b/libgnomecanvas/gailcanvastext.h index 54a0239cc2..bd6ff90e57 100644 --- a/libgnomecanvas/gailcanvastext.h +++ b/libgnomecanvas/gailcanvastext.h @@ -45,7 +45,7 @@ struct _GailCanvasTextClass GailCanvasItemClass parent_class; }; -AtkObject* gail_canvas_text_new (GObject *obj); +AtkObject * gail_canvas_text_new (GObject *obj); G_END_DECLS diff --git a/libgnomecanvas/gailcanvastextfactory.c b/libgnomecanvas/gailcanvastextfactory.c index 1fe39abfac..0b7195d7f1 100644 --- a/libgnomecanvas/gailcanvastextfactory.c +++ b/libgnomecanvas/gailcanvastextfactory.c @@ -48,8 +48,8 @@ gail_canvas_text_factory_class_init (GailCanvasTextFactoryClass *klass) class->get_accessible_type = gail_canvas_text_factory_get_accessible_type; } -static AtkObject* -gail_canvas_text_factory_create_accessible (GObject *obj) +static AtkObject * +gail_canvas_text_factory_create_accessible (GObject *obj) { return gail_canvas_text_new (obj); } diff --git a/libgnomecanvas/gailcanvaswidget.c b/libgnomecanvas/gailcanvaswidget.c index cc5e7faac2..19abbecb1c 100644 --- a/libgnomecanvas/gailcanvaswidget.c +++ b/libgnomecanvas/gailcanvaswidget.c @@ -42,7 +42,7 @@ gail_canvas_widget_init (GailCanvasWidget *foo) ; } -AtkObject* +AtkObject * gail_canvas_widget_new (GObject *obj) { gpointer object; @@ -89,7 +89,7 @@ gail_canvas_widget_get_n_children (AtkObject *obj) static AtkObject * gail_canvas_widget_ref_child (AtkObject *obj, - gint i) + gint i) { AtkGObjectAccessible *atk_gobj; GnomeCanvasWidget *canvas_widget; diff --git a/libgnomecanvas/gailcanvaswidget.h b/libgnomecanvas/gailcanvaswidget.h index 016c7a7313..43b56c44a9 100644 --- a/libgnomecanvas/gailcanvaswidget.h +++ b/libgnomecanvas/gailcanvaswidget.h @@ -48,7 +48,7 @@ struct _GailCanvasWidgetClass GailCanvasItemClass parent_class; }; -AtkObject* gail_canvas_widget_new (GObject *obj); +AtkObject * gail_canvas_widget_new (GObject *obj); G_END_DECLS diff --git a/libgnomecanvas/gailcanvaswidgetfactory.c b/libgnomecanvas/gailcanvaswidgetfactory.c index d636de9b0a..2460e69f8c 100644 --- a/libgnomecanvas/gailcanvaswidgetfactory.c +++ b/libgnomecanvas/gailcanvaswidgetfactory.c @@ -47,8 +47,8 @@ gail_canvas_widget_factory_class_init (GailCanvasWidgetFactoryClass *klass) class->get_accessible_type = gail_canvas_widget_factory_get_accessible_type; } -static AtkObject* -gail_canvas_widget_factory_create_accessible (GObject *obj) +static AtkObject * +gail_canvas_widget_factory_create_accessible (GObject *obj) { return gail_canvas_widget_new (obj); } diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c index 31f348c517..091db2a72a 100644 --- a/libgnomecanvas/gnome-canvas-pixbuf.c +++ b/libgnomecanvas/gnome-canvas-pixbuf.c @@ -132,10 +132,10 @@ gnome_canvas_pixbuf_dispose (GnomeCanvasItem *object) /* Set_property handler for the pixbuf canvas item */ static void -gnome_canvas_pixbuf_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) +gnome_canvas_pixbuf_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) { GnomeCanvasItem *item; GnomeCanvasPixbuf *gcp; @@ -170,10 +170,10 @@ gnome_canvas_pixbuf_set_property (GObject *object, /* Get_property handler for the pixbuf canvasi item */ static void -gnome_canvas_pixbuf_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) +gnome_canvas_pixbuf_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) { GnomeCanvasPixbuf *gcp; GnomeCanvasPixbufPrivate *priv; @@ -263,8 +263,12 @@ gnome_canvas_pixbuf_update (GnomeCanvasItem *item, /* Draw handler for the pixbuf canvas item */ static void -gnome_canvas_pixbuf_draw (GnomeCanvasItem *item, cairo_t *cr, - gint x, gint y, gint width, gint height) +gnome_canvas_pixbuf_draw (GnomeCanvasItem *item, + cairo_t *cr, + gint x, + gint y, + gint width, + gint height) { GnomeCanvasPixbuf *gcp; GnomeCanvasPixbufPrivate *priv; diff --git a/libgnomecanvas/gnome-canvas-rect.c b/libgnomecanvas/gnome-canvas-rect.c index 42fc617d5b..35453506b5 100644 --- a/libgnomecanvas/gnome-canvas-rect.c +++ b/libgnomecanvas/gnome-canvas-rect.c @@ -16,7 +16,7 @@ */ /* These includes are set up for standalone compile. If/when this codebase - is integrated into libgnomeui, the includes will need to change. */ + * is integrated into libgnomeui, the includes will need to change. */ #ifdef HAVE_CONFIG_H #include diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c index 036cce89ea..7cb39b28fd 100644 --- a/libgnomecanvas/gnome-canvas-rich-text.c +++ b/libgnomecanvas/gnome-canvas-rich-text.c @@ -409,8 +409,10 @@ gnome_canvas_rich_text_init (GnomeCanvasRichText *text) } /* gnome_canvas_rich_text_init */ static void -gnome_canvas_rich_text_set_property (GObject *object, guint property_id, - const GValue *value, GParamSpec *pspec) +gnome_canvas_rich_text_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (object); @@ -575,8 +577,10 @@ gnome_canvas_rich_text_set_property (GObject *object, guint property_id, } static void -gnome_canvas_rich_text_get_property (GObject *object, guint property_id, - GValue *value, GParamSpec *pspec) +gnome_canvas_rich_text_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (object); @@ -663,7 +667,8 @@ gnome_canvas_rich_text_unrealize (GnomeCanvasItem *item) static void gnome_canvas_rich_text_move_iter_by_lines (GnomeCanvasRichText *text, - GtkTextIter *newplace, gint count) + GtkTextIter *newplace, + gint count) { while (count < 0) { gtk_text_layout_move_iter_to_previous_line ( @@ -695,8 +700,9 @@ gnome_canvas_rich_text_get_cursor_x_position (GnomeCanvasRichText *text) static void gnome_canvas_rich_text_move_cursor (GnomeCanvasRichText *text, - GtkMovementStep step, - gint count, gboolean extend_selection) + GtkMovementStep step, + gint count, + gboolean extend_selection) { GtkTextIter insert, newplace; @@ -783,20 +789,23 @@ gnome_canvas_rich_text_move_cursor (GnomeCanvasRichText *text, } /* gnome_canvas_rich_text_move_cursor */ static gboolean -whitespace (gunichar ch, gpointer user_data) +whitespace (gunichar ch, + gpointer user_data) { return (ch == ' ' || ch == '\t'); } /* whitespace */ static gboolean -not_whitespace (gunichar ch, gpointer user_data) +not_whitespace (gunichar ch, + gpointer user_data) { return !whitespace (ch, user_data); } /* not_whitespace */ static gboolean find_whitespace_region (const GtkTextIter *center, - GtkTextIter *start, GtkTextIter *end) + GtkTextIter *start, + GtkTextIter *end) { *start = *center; *end = *center; @@ -811,13 +820,13 @@ find_whitespace_region (const GtkTextIter *center, static void gnome_canvas_rich_text_delete_from_cursor (GnomeCanvasRichText *text, - GtkDeleteType type, - gint count) + GtkDeleteType type, + gint count) { GtkTextIter insert, start, end; /* Special case: If the user wants to delete a character and there is - a selection, then delete the selection and return */ + * a selection, then delete the selection and return */ if (type == GTK_DELETE_CHARS) { if (gtk_text_buffer_delete_selection (get_buffer (text), TRUE, text->_priv->editable)) @@ -887,8 +896,9 @@ gnome_canvas_rich_text_delete_from_cursor (GnomeCanvasRichText *text, } /* gnome_canvas_rich_text_delete_from_cursor */ static gint -selection_motion_event_handler (GnomeCanvasRichText *text, GdkEvent *event, - gpointer data) +selection_motion_event_handler (GnomeCanvasRichText *text, + GdkEvent *event, + gpointer data) { GtkTextIter newplace; GtkTextMark *mark; @@ -910,8 +920,8 @@ selection_motion_event_handler (GnomeCanvasRichText *text, GdkEvent *event, static void gnome_canvas_rich_text_start_selection_drag (GnomeCanvasRichText *text, - const GtkTextIter *iter, - GdkEventButton *button) + const GtkTextIter *iter, + GdkEventButton *button) { GtkTextIter newplace; @@ -933,7 +943,7 @@ gnome_canvas_rich_text_start_selection_drag (GnomeCanvasRichText *text, static gboolean gnome_canvas_rich_text_end_selection_drag (GnomeCanvasRichText *text, - GdkEventButton *event) + GdkEventButton *event) { if (text->_priv->selection_drag_handler == 0) return FALSE; @@ -950,14 +960,14 @@ gnome_canvas_rich_text_end_selection_drag (GnomeCanvasRichText *text, static void gnome_canvas_rich_text_emit_tag_changed (GnomeCanvasRichText *text, - GtkTextTag *tag) + GtkTextTag *tag) { g_signal_emit (G_OBJECT (text), signals[TAG_CHANGED], 0, tag); } /* gnome_canvas_rich_text_emit_tag_changed */ static gint gnome_canvas_rich_text_key_press_event (GnomeCanvasItem *item, - GdkEventKey *event) + GdkEventKey *event) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); gboolean extend_selection = FALSE; @@ -1192,7 +1202,7 @@ gnome_canvas_rich_text_key_press_event (GnomeCanvasItem *item, static gint gnome_canvas_rich_text_key_release_event (GnomeCanvasItem *item, - GdkEventKey *event) + GdkEventKey *event) { return FALSE; } /* gnome_canvas_rich_text_key_release_event */ @@ -1210,7 +1220,7 @@ _click (gpointer data) static gint gnome_canvas_rich_text_button_press_event (GnomeCanvasItem *item, - GdkEventButton *event) + GdkEventButton *event) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); GtkTextIter iter; @@ -1223,7 +1233,7 @@ gnome_canvas_rich_text_button_press_event (GnomeCanvasItem *item, gtk_text_layout_get_iter_at_pixel (text->_priv->layout, &iter, newx, newy); /* The canvas doesn't give us double- or triple-click events, so - we have to synthesize them ourselves. Yay. */ + * we have to synthesize them ourselves. Yay. */ event_type = event->type; if (event_type == GDK_BUTTON_PRESS) { text->_priv->clicks++; @@ -1341,7 +1351,7 @@ gnome_canvas_rich_text_button_press_event (GnomeCanvasItem *item, static gint gnome_canvas_rich_text_button_release_event (GnomeCanvasItem *item, - GdkEventButton *event) + GdkEventButton *event) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); gdouble newx, newy; @@ -1378,7 +1388,7 @@ gnome_canvas_rich_text_button_release_event (GnomeCanvasItem *item, static gint gnome_canvas_rich_text_focus_in_event (GnomeCanvasItem *item, - GdkEventFocus *event) + GdkEventFocus *event) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); @@ -1392,7 +1402,7 @@ gnome_canvas_rich_text_focus_in_event (GnomeCanvasItem *item, static gint gnome_canvas_rich_text_focus_out_event (GnomeCanvasItem *item, - GdkEventFocus *event) + GdkEventFocus *event) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); @@ -1405,7 +1415,9 @@ gnome_canvas_rich_text_focus_out_event (GnomeCanvasItem *item, } /* gnome_canvas_rich_text_focus_out_event */ static gboolean -get_event_coordinates (GdkEvent *event, gint *x, gint *y) +get_event_coordinates (GdkEvent *event, + gint *x, + gint *y) { g_return_val_if_fail (event, FALSE); @@ -1428,8 +1440,9 @@ get_event_coordinates (GdkEvent *event, gint *x, gint *y) } /* get_event_coordinates */ static void -emit_event_on_tags (GnomeCanvasRichText *text, GdkEvent *event, - GtkTextIter *iter) +emit_event_on_tags (GnomeCanvasRichText *text, + GdkEvent *event, + GtkTextIter *iter) { GSList *tags; GSList *i; @@ -1443,7 +1456,7 @@ emit_event_on_tags (GnomeCanvasRichText *text, GdkEvent *event, gtk_text_tag_event (tag, G_OBJECT (text), event, iter); /* The cursor has been moved to within this tag. Emit the - tag_changed signal */ + * tag_changed signal */ if (event->type == GDK_BUTTON_RELEASE || event->type == GDK_KEY_PRESS || event->type == GDK_KEY_RELEASE) { @@ -1458,7 +1471,8 @@ emit_event_on_tags (GnomeCanvasRichText *text, GdkEvent *event, } /* emit_event_on_tags */ static gint -gnome_canvas_rich_text_event (GnomeCanvasItem *item, GdkEvent *event) +gnome_canvas_rich_text_event (GnomeCanvasItem *item, + GdkEvent *event) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); gint x, y; @@ -1610,7 +1624,7 @@ blink_cb (gpointer data) static void gnome_canvas_rich_text_start_cursor_blink (GnomeCanvasRichText *text, - gboolean with_delay) + gboolean with_delay) { if (!text->_priv->layout) return; @@ -1653,7 +1667,7 @@ gnome_canvas_rich_text_stop_cursor_blink (GnomeCanvasRichText *text) } /* gnome_canvas_rich_text_stop_cursor_blink */ /* We have to request updates this way because the update cycle is not - re-entrant. This will fire off a request in an idle loop. */ + * re-entrant. This will fire off a request in an idle loop. */ static gboolean request_update (gpointer data) { @@ -1665,7 +1679,8 @@ request_update (gpointer data) } /* request_update */ static void -invalidated_handler (GtkTextLayout *layout, gpointer data) +invalidated_handler (GtkTextLayout *layout, + gpointer data) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data); @@ -1676,12 +1691,13 @@ invalidated_handler (GtkTextLayout *layout, gpointer data) gtk_text_layout_validate (text->_priv->layout, 2000); /* We are called from the update cycle; gotta put this in an idle - loop. */ + * loop. */ g_idle_add (request_update, text); } /* invalidated_handler */ static void -scale_fonts (GtkTextTag *tag, gpointer data) +scale_fonts (GtkTextTag *tag, + gpointer data) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data); @@ -1699,8 +1715,11 @@ scale_fonts (GtkTextTag *tag, gpointer data) } /* scale_fonts */ static void -changed_handler (GtkTextLayout *layout, gint start_y, - gint old_height, gint new_height, gpointer data) +changed_handler (GtkTextLayout *layout, + gint start_y, + gint old_height, + gint new_height, + gpointer data) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (data); @@ -1729,7 +1748,7 @@ changed_handler (GtkTextLayout *layout, gint start_y, } /* We are called from the update cycle; gotta put this in an idle - loop. */ + * loop. */ g_idle_add (request_update, text); } /* changed_handler */ @@ -1742,7 +1761,7 @@ changed_handler (GtkTextLayout *layout, gint start_y, **/ void gnome_canvas_rich_text_set_buffer (GnomeCanvasRichText *text, - GtkTextBuffer *buffer) + GtkTextBuffer *buffer) { g_return_if_fail (GNOME_IS_CANVAS_RICH_TEXT (text)); g_return_if_fail (buffer == NULL || GTK_IS_TEXT_BUFFER (buffer)); @@ -1807,8 +1826,8 @@ gnome_canvas_rich_text_get_buffer (GnomeCanvasRichText *text) **/ void gnome_canvas_rich_text_get_iter_location (GnomeCanvasRichText *text, - const GtkTextIter *iter, - GdkRectangle *location) + const GtkTextIter *iter, + GdkRectangle *location) { g_return_if_fail (GNOME_IS_CANVAS_RICH_TEXT (text)); g_return_if_fail (gtk_text_iter_get_buffer (iter) == text->_priv->buffer); @@ -1827,9 +1846,9 @@ gnome_canvas_rich_text_get_iter_location (GnomeCanvasRichText *text, **/ void gnome_canvas_rich_text_get_iter_at_location (GnomeCanvasRichText *text, - GtkTextIter *iter, - gint x, - gint y) + GtkTextIter *iter, + gint x, + gint y) { g_return_if_fail (GNOME_IS_CANVAS_RICH_TEXT (text)); g_return_if_fail (iter != NULL); @@ -1843,8 +1862,8 @@ gnome_canvas_rich_text_get_iter_at_location (GnomeCanvasRichText *text, static void gnome_canvas_rich_text_set_attributes_from_style (GnomeCanvasRichText *text, - GtkTextAttributes *values, - GtkStyle *style) + GtkTextAttributes *values, + GtkStyle *style) { values->appearance.bg_color = style->base[GTK_STATE_NORMAL]; values->appearance.fg_color = style->fg[GTK_STATE_NORMAL]; @@ -1940,8 +1959,11 @@ gnome_canvas_rich_text_destroy_layout (GnomeCanvasRichText *text) } /* gnome_canvas_rich_text_destroy_layout */ static void -get_bounds (GnomeCanvasRichText *text, gdouble *px1, gdouble *py1, - gdouble *px2, gdouble *py2) +get_bounds (GnomeCanvasRichText *text, + gdouble *px1, + gdouble *py1, + gdouble *px2, + gdouble *py2) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (text); gdouble x, y; @@ -1979,8 +2001,9 @@ gnome_canvas_rich_text_get_bounds (GnomeCanvasItem *item, } static void -gnome_canvas_rich_text_update (GnomeCanvasItem *item, const cairo_matrix_t *matrix, - gint flags) +gnome_canvas_rich_text_update (GnomeCanvasItem *item, + const cairo_matrix_t *matrix, + gint flags) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); gdouble x1, y1, x2, y2; @@ -2000,8 +2023,11 @@ gnome_canvas_rich_text_update (GnomeCanvasItem *item, const cairo_matrix_t *matr } /* gnome_canvas_rich_text_update */ static GnomeCanvasItem * -gnome_canvas_rich_text_point (GnomeCanvasItem *item, gdouble x, gdouble y, - gint cx, gint cy) +gnome_canvas_rich_text_point (GnomeCanvasItem *item, + gdouble x, + gdouble y, + gint cx, + gint cy) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item); gdouble ax, ay; @@ -2060,9 +2086,12 @@ gnome_canvas_rich_text_draw (GnomeCanvasItem *item, #if 0 static GtkTextTag * -gnome_canvas_rich_text_add_tag (GnomeCanvasRichText *text, gchar *tag_name, - gint start_offset, gint end_offset, - const gchar *first_property_name, ...) +gnome_canvas_rich_text_add_tag (GnomeCanvasRichText *text, + gchar *tag_name, + gint start_offset, + gint end_offset, + const gchar *first_property_name, + ...) { GtkTextTag *tag; GtkTextIter start, end; diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c index adb01548fc..70b7142ac0 100644 --- a/libgnomecanvas/gnome-canvas-text.c +++ b/libgnomecanvas/gnome-canvas-text.c @@ -595,9 +595,9 @@ get_bounds (GnomeCanvasText *text, } static PangoFontMask -get_property_font_set_mask (guint prop_id) +get_property_font_set_mask (guint property_id) { - switch (prop_id) + switch (property_id) { case PROP_FAMILY_SET: return PANGO_FONT_MASK_FAMILY; @@ -625,10 +625,10 @@ ensure_font (GnomeCanvasText *text) /* Set_arg handler for the text item */ static void -gnome_canvas_text_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) +gnome_canvas_text_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) { GnomeCanvasItem *item; GnomeCanvasText *text; @@ -900,10 +900,10 @@ gnome_canvas_text_set_property (GObject *object, /* Get_arg handler for the text item */ static void -gnome_canvas_text_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) +gnome_canvas_text_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) { GnomeCanvasText *text; @@ -1115,8 +1115,8 @@ gnome_canvas_text_apply_font_desc (GnomeCanvasText *text) } static void -add_attr (PangoAttrList *attr_list, - PangoAttribute *attr) +add_attr (PangoAttrList *attr_list, + PangoAttribute *attr) { attr->start_index = 0; attr->end_index = G_MAXINT; @@ -1147,8 +1147,8 @@ gnome_canvas_text_apply_attributes (GnomeCanvasText *text) } static void -gnome_canvas_text_set_font_desc (GnomeCanvasText *text, - PangoFontDescription *font_desc) +gnome_canvas_text_set_font_desc (GnomeCanvasText *text, + PangoFontDescription *font_desc) { if (text->font_desc) pango_font_description_free (text->font_desc); @@ -1164,7 +1164,7 @@ gnome_canvas_text_set_font_desc (GnomeCanvasText *text, /* Setting the text from a Pango markup string */ static void gnome_canvas_text_set_markup (GnomeCanvasText *textitem, - const gchar *markup) + const gchar *markup) { PangoAttrList *attr_list = NULL; gchar *text = NULL; @@ -1217,8 +1217,12 @@ gnome_canvas_text_update (GnomeCanvasItem *item, /* Draw handler for the text item */ static void -gnome_canvas_text_draw (GnomeCanvasItem *item, cairo_t *cr, - gint x, gint y, gint width, gint height) +gnome_canvas_text_draw (GnomeCanvasItem *item, + cairo_t *cr, + gint x, + gint y, + gint width, + gint height) { GnomeCanvasText *text = GNOME_CANVAS_TEXT (item); @@ -1250,8 +1254,11 @@ gnome_canvas_text_draw (GnomeCanvasItem *item, cairo_t *cr, /* Point handler for the text item */ static GnomeCanvasItem * -gnome_canvas_text_point (GnomeCanvasItem *item, gdouble x, gdouble y, - gint cx, gint cy) +gnome_canvas_text_point (GnomeCanvasItem *item, + gdouble x, + gdouble y, + gint cx, + gint cy) { GnomeCanvasText *text; PangoLayoutIter *iter; diff --git a/libgnomecanvas/gnome-canvas-text.h b/libgnomecanvas/gnome-canvas-text.h index aebad84013..a706ce35eb 100644 --- a/libgnomecanvas/gnome-canvas-text.h +++ b/libgnomecanvas/gnome-canvas-text.h @@ -120,7 +120,7 @@ struct _GnomeCanvasText { gdouble xofs, yofs; /* Text offset distance from anchor position */ - gdouble affine[6]; /* The item -> canvas affine */ /*AA*/ + gdouble affine[6]; /* The item -> canvas affine */ /*AA */ GtkJustification justification; /* Justification for text */ @@ -130,7 +130,7 @@ struct _GnomeCanvasText { gint max_width; /* Maximum width of text lines */ gint height; /* Rendered text height in pixels */ - guint32 rgba; /* RGBA color for text */ /*AA*/ + guint32 rgba; /* RGBA color for text */ /*AA */ guint clip : 1; /* Use clip rectangle? */ diff --git a/libgnomecanvas/gnome-canvas-util.c b/libgnomecanvas/gnome-canvas-util.c index eb19baa6ec..00e76daae9 100644 --- a/libgnomecanvas/gnome-canvas-util.c +++ b/libgnomecanvas/gnome-canvas-util.c @@ -74,7 +74,11 @@ gnome_canvas_item_reset_bounds (GnomeCanvasItem *item) * Sets the bbox to the new value, requesting full repaint. **/ void -gnome_canvas_update_bbox (GnomeCanvasItem *item, gint x1, gint y1, gint x2, gint y2) +gnome_canvas_update_bbox (GnomeCanvasItem *item, + gint x1, + gint y1, + gint x2, + gint y2) { gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2); item->x1 = x1; @@ -118,7 +122,10 @@ gnome_canvas_cairo_create_scratch (void) **/ void gnome_canvas_matrix_transform_rect (const cairo_matrix_t *matrix, - double *x1, double *y1, double *x2, double *y2) + gdouble *x1, + gdouble *y1, + gdouble *x2, + gdouble *y2) { gdouble maxx, maxy, minx, miny; gdouble tmpx, tmpy; diff --git a/libgnomecanvas/gnome-canvas-widget.c b/libgnomecanvas/gnome-canvas-widget.c index fd5693cd98..ef516eb5b2 100644 --- a/libgnomecanvas/gnome-canvas-widget.c +++ b/libgnomecanvas/gnome-canvas-widget.c @@ -170,7 +170,8 @@ gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class) } static void -do_destroy (gpointer data, GObject *gone_object) +do_destroy (gpointer data, + GObject *gone_object) { GnomeCanvasWidget *witem; @@ -244,10 +245,10 @@ recalc_bounds (GnomeCanvasWidget *witem) } static void -gnome_canvas_widget_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) +gnome_canvas_widget_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) { GnomeCanvasItem *item; GnomeCanvasWidget *witem; @@ -336,10 +337,10 @@ gnome_canvas_widget_set_property (GObject *object, } static void -gnome_canvas_widget_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) +gnome_canvas_widget_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) { GnomeCanvasWidget *witem; @@ -406,9 +407,11 @@ gnome_canvas_widget_update (GnomeCanvasItem *item, static void gnome_canvas_widget_draw (GnomeCanvasItem *item, - cairo_t *cr, - gint x, gint y, - gint width, gint height) + cairo_t *cr, + gint x, + gint y, + gint width, + gint height) { #if 0 GnomeCanvasWidget *witem; @@ -421,8 +424,11 @@ gnome_canvas_widget_draw (GnomeCanvasItem *item, } static GnomeCanvasItem * -gnome_canvas_widget_point (GnomeCanvasItem *item, gdouble x, gdouble y, - gint cx, gint cy) +gnome_canvas_widget_point (GnomeCanvasItem *item, + gdouble x, + gdouble y, + gint cx, + gint cy) { GnomeCanvasWidget *witem; gdouble x1, y1, x2, y2; diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c index 8e0cd2d921..176c990561 100644 --- a/libgnomecanvas/gnome-canvas.c +++ b/libgnomecanvas/gnome-canvas.c @@ -233,8 +233,10 @@ item_post_create_setup (GnomeCanvasItem *item) /* Set_property handler for canvas items */ static void -gnome_canvas_item_set_property (GObject *gobject, guint param_id, - const GValue *value, GParamSpec *pspec) +gnome_canvas_item_set_property (GObject *gobject, + guint property_id, + const GValue *value, + GParamSpec *pspec) { GnomeCanvasItem *item; @@ -242,7 +244,7 @@ gnome_canvas_item_set_property (GObject *gobject, guint param_id, item = GNOME_CANVAS_ITEM (gobject); - switch (param_id) { + switch (property_id) { case ITEM_PROP_PARENT: if (item->parent != NULL) { g_warning ("Cannot set `parent' argument after item has " @@ -254,15 +256,17 @@ gnome_canvas_item_set_property (GObject *gobject, guint param_id, } break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, param_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec); break; } } /* Get_property handler for canvas items */ static void -gnome_canvas_item_get_property (GObject *gobject, guint param_id, - GValue *value, GParamSpec *pspec) +gnome_canvas_item_get_property (GObject *gobject, + guint property_id, + GValue *value, + GParamSpec *pspec) { GnomeCanvasItem *item; @@ -270,13 +274,13 @@ gnome_canvas_item_get_property (GObject *gobject, guint param_id, item = GNOME_CANVAS_ITEM (gobject); - switch (param_id) { + switch (property_id) { case ITEM_PROP_PARENT: g_value_set_object (value, item->parent); break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, param_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec); break; } } @@ -291,8 +295,10 @@ gnome_canvas_item_get_property (GObject *gobject, guint param_id, * Constructs a canvas item; meant for use only by item implementations. **/ void -gnome_canvas_item_construct (GnomeCanvasItem *item, GnomeCanvasGroup *parent, - const gchar *first_arg_name, va_list args) +gnome_canvas_item_construct (GnomeCanvasItem *item, + GnomeCanvasGroup *parent, + const gchar *first_arg_name, + va_list args) { g_return_if_fail (GNOME_IS_CANVAS_GROUP (parent)); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); @@ -364,7 +370,7 @@ gnome_canvas_item_dispose (GObject *object) G_OBJECT_CLASS (item_parent_class)->dispose (object); /* items should remove any reference to item->canvas after the - first ::dispose */ + * first ::dispose */ item->canvas = NULL; } @@ -501,7 +507,9 @@ gnome_canvas_item_invoke_point (GnomeCanvasItem *item, * specified values, and the item is repainted as appropriate. **/ void -gnome_canvas_item_set (GnomeCanvasItem *item, const gchar *first_arg_name, ...) +gnome_canvas_item_set (GnomeCanvasItem *item, + const gchar *first_arg_name, + ...) { va_list args; @@ -540,7 +548,8 @@ gnome_canvas_item_set_valist (GnomeCanvasItem *item, * transformation. **/ void -gnome_canvas_item_transform (GnomeCanvasItem *item, const cairo_matrix_t *matrix) +gnome_canvas_item_transform (GnomeCanvasItem *item, + const cairo_matrix_t *matrix) { cairo_matrix_t i2p; @@ -562,7 +571,8 @@ gnome_canvas_item_transform (GnomeCanvasItem *item, const cairo_matrix_t *matrix * matrix. NULL is treated as identity. **/ void -gnome_canvas_item_set_matrix (GnomeCanvasItem *item, const cairo_matrix_t *matrix) +gnome_canvas_item_set_matrix (GnomeCanvasItem *item, + const cairo_matrix_t *matrix) { g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); @@ -593,7 +603,9 @@ gnome_canvas_item_set_matrix (GnomeCanvasItem *item, const cairo_matrix_t *matri * most probably does not do, what you want. **/ void -gnome_canvas_item_move (GnomeCanvasItem *item, gdouble dx, gdouble dy) +gnome_canvas_item_move (GnomeCanvasItem *item, + gdouble dx, + gdouble dy) { cairo_matrix_t translate; @@ -608,7 +620,8 @@ gnome_canvas_item_move (GnomeCanvasItem *item, gdouble dx, gdouble dy) * specified link after the "before" link. Returns TRUE if the list was changed. */ static gboolean -put_item_after (GList *link, GList *before) +put_item_after (GList *link, + GList *before) { GnomeCanvasGroup *parent; GList *old_before, *old_after; @@ -666,7 +679,8 @@ put_item_after (GList *link, GList *before) * stack, then the item is put at the top. **/ void -gnome_canvas_item_raise (GnomeCanvasItem *item, gint positions) +gnome_canvas_item_raise (GnomeCanvasItem *item, + gint positions) { GList *link, *before; GnomeCanvasGroup *parent; @@ -703,7 +717,8 @@ gnome_canvas_item_raise (GnomeCanvasItem *item, gint positions) * stack, then the item is put at the bottom. **/ void -gnome_canvas_item_lower (GnomeCanvasItem *item, gint positions) +gnome_canvas_item_lower (GnomeCanvasItem *item, + gint positions) { GList *link, *before; GnomeCanvasGroup *parent; @@ -894,7 +909,8 @@ gnome_canvas_item_grab (GnomeCanvasItem *item, * mouse. **/ void -gnome_canvas_item_ungrab (GnomeCanvasItem *item, guint32 etime) +gnome_canvas_item_ungrab (GnomeCanvasItem *item, + guint32 etime) { g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); @@ -907,7 +923,8 @@ gnome_canvas_item_ungrab (GnomeCanvasItem *item, guint32 etime) } void -gnome_canvas_item_i2w_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) +gnome_canvas_item_i2w_matrix (GnomeCanvasItem *item, + cairo_matrix_t *matrix) { g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); g_return_if_fail (matrix != NULL); @@ -922,7 +939,8 @@ gnome_canvas_item_i2w_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) } void -gnome_canvas_item_w2i_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) +gnome_canvas_item_w2i_matrix (GnomeCanvasItem *item, + cairo_matrix_t *matrix) { cairo_status_t status; @@ -944,7 +962,9 @@ gnome_canvas_item_w2i_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) * coordinates. **/ void -gnome_canvas_item_w2i (GnomeCanvasItem *item, gdouble *x, gdouble *y) +gnome_canvas_item_w2i (GnomeCanvasItem *item, + gdouble *x, + gdouble *y) { cairo_matrix_t matrix; @@ -966,7 +986,9 @@ gnome_canvas_item_w2i (GnomeCanvasItem *item, gdouble *x, gdouble *y) * coordinates. **/ void -gnome_canvas_item_i2w (GnomeCanvasItem *item, gdouble *x, gdouble *y) +gnome_canvas_item_i2w (GnomeCanvasItem *item, + gdouble *x, + gdouble *y) { cairo_matrix_t matrix; @@ -987,7 +1009,8 @@ gnome_canvas_item_i2w (GnomeCanvasItem *item, gdouble *x, gdouble *y) * canvas pixel coordinates. **/ void -gnome_canvas_item_i2c_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) +gnome_canvas_item_i2c_matrix (GnomeCanvasItem *item, + cairo_matrix_t *matrix) { cairo_matrix_t i2w, w2c; @@ -998,7 +1021,8 @@ gnome_canvas_item_i2c_matrix (GnomeCanvasItem *item, cairo_matrix_t *matrix) /* Returns whether the item is an inferior of or is equal to the parent. */ static gint -is_descendant (GnomeCanvasItem *item, GnomeCanvasItem *parent) +is_descendant (GnomeCanvasItem *item, + GnomeCanvasItem *parent) { for (; item; item = item->parent) if (item == parent) @@ -1017,7 +1041,8 @@ is_descendant (GnomeCanvasItem *item, GnomeCanvasItem *parent) * its absolute position within the canvas. **/ void -gnome_canvas_item_reparent (GnomeCanvasItem *item, GnomeCanvasGroup *new_group) +gnome_canvas_item_reparent (GnomeCanvasItem *item, + GnomeCanvasGroup *new_group) { g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); g_return_if_fail (GNOME_IS_CANVAS_GROUP (new_group)); @@ -1184,11 +1209,11 @@ enum { static void gnome_canvas_group_class_init (GnomeCanvasGroupClass *class); static void gnome_canvas_group_init (GnomeCanvasGroup *group); static void gnome_canvas_group_set_property (GObject *object, - guint param_id, + guint property_id, const GValue *value, GParamSpec *pspec); static void gnome_canvas_group_get_property (GObject *object, - guint param_id, + guint property_id, GValue *value, GParamSpec *pspec); @@ -1298,8 +1323,10 @@ gnome_canvas_group_init (GnomeCanvasGroup *group) /* Set_property handler for canvas groups */ static void -gnome_canvas_group_set_property (GObject *gobject, guint param_id, - const GValue *value, GParamSpec *pspec) +gnome_canvas_group_set_property (GObject *gobject, + guint property_id, + const GValue *value, + GParamSpec *pspec) { GnomeCanvasItem *item; @@ -1307,7 +1334,7 @@ gnome_canvas_group_set_property (GObject *gobject, guint param_id, item = GNOME_CANVAS_ITEM (gobject); - switch (param_id) { + switch (property_id) { case GROUP_PROP_X: item->matrix.x0 = g_value_get_double (value); break; @@ -1317,15 +1344,17 @@ gnome_canvas_group_set_property (GObject *gobject, guint param_id, break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, param_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec); break; } } /* Get_property handler for canvas groups */ static void -gnome_canvas_group_get_property (GObject *gobject, guint param_id, - GValue *value, GParamSpec *pspec) +gnome_canvas_group_get_property (GObject *gobject, + guint property_id, + GValue *value, + GParamSpec *pspec) { GnomeCanvasItem *item; @@ -1333,7 +1362,7 @@ gnome_canvas_group_get_property (GObject *gobject, guint param_id, item = GNOME_CANVAS_ITEM (gobject); - switch (param_id) { + switch (property_id) { case GROUP_PROP_X: g_value_set_double (value, item->matrix.x0); break; @@ -1343,7 +1372,7 @@ gnome_canvas_group_get_property (GObject *gobject, guint param_id, break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, param_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec); break; } } @@ -1627,7 +1656,8 @@ gnome_canvas_group_bounds (GnomeCanvasItem *item, /* Adds an item to a group */ static void -group_add (GnomeCanvasGroup *group, GnomeCanvasItem *item) +group_add (GnomeCanvasGroup *group, + GnomeCanvasItem *item) { g_object_ref_sink (G_OBJECT (item)); @@ -1648,7 +1678,8 @@ group_add (GnomeCanvasGroup *group, GnomeCanvasItem *item) /* Removes an item from a group */ static void -group_remove (GnomeCanvasGroup *group, GnomeCanvasItem *item) +group_remove (GnomeCanvasGroup *group, + GnomeCanvasItem *item) { GList *children; @@ -1826,33 +1857,33 @@ gnome_canvas_get_type (void) } static void -gnome_canvas_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) +gnome_canvas_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) { - switch (prop_id) { + switch (property_id) { case PROP_FOCUSED_ITEM: g_value_set_object (value, GNOME_CANVAS (object)->focused_item); break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } static void -gnome_canvas_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +gnome_canvas_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) { - switch (prop_id) { + switch (property_id) { case PROP_FOCUSED_ITEM: GNOME_CANVAS (object)->focused_item = g_value_get_object (value); break; default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } @@ -1914,7 +1945,8 @@ gnome_canvas_class_init (GnomeCanvasClass *klass) * never ever do this, so we panic if this happens. */ G_GNUC_NORETURN static void -panic_root_finalized (gpointer data, GObject *gone_object) +panic_root_finalized (gpointer data, + GObject *gone_object) { g_error ("Eeeek, root item %p of canvas %p was destroyed!", gone_object, data); } @@ -2127,7 +2159,9 @@ gnome_canvas_unrealize (GtkWidget *widget) * keep as much as possible of the canvas scrolling region in view. */ static void -scroll_to (GnomeCanvas *canvas, gint cx, gint cy) +scroll_to (GnomeCanvas *canvas, + gint cx, + gint cy) { GtkWidget *widget; GtkAllocation allocation; @@ -2219,7 +2253,8 @@ scroll_to (GnomeCanvas *canvas, gint cx, gint cy) /* Size allocation handler for the canvas */ static void -gnome_canvas_size_allocate (GtkWidget *widget, GtkAllocation *allocation) +gnome_canvas_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) { GtkScrollable *scrollable; GtkAdjustment *hadjustment; @@ -2312,7 +2347,8 @@ gnome_canvas_draw (GtkWidget *widget, */ static gint -emit_event (GnomeCanvas *canvas, GdkEvent *event) +emit_event (GnomeCanvas *canvas, + GdkEvent *event) { GdkEvent *ev; gint finished; @@ -2443,7 +2479,8 @@ emit_event (GnomeCanvas *canvas, GdkEvent *event) * Also emits enter/leave events for items as appropriate. */ static gint -pick_current_item (GnomeCanvas *canvas, GdkEvent *event) +pick_current_item (GnomeCanvas *canvas, + GdkEvent *event) { gint button_down; gdouble x, y; @@ -2586,7 +2623,8 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event) /* Button event handler for the canvas */ static gint -gnome_canvas_button (GtkWidget *widget, GdkEventButton *event) +gnome_canvas_button (GtkWidget *widget, + GdkEventButton *event) { GnomeCanvas *canvas; GtkLayout *layout; @@ -2665,7 +2703,8 @@ gnome_canvas_button (GtkWidget *widget, GdkEventButton *event) /* Motion event handler for the canvas */ static gint -gnome_canvas_motion (GtkWidget *widget, GdkEventMotion *event) +gnome_canvas_motion (GtkWidget *widget, + GdkEventMotion *event) { GnomeCanvas *canvas; GtkLayout *layout; @@ -2689,7 +2728,8 @@ gnome_canvas_motion (GtkWidget *widget, GdkEventMotion *event) /* Key event handler for the canvas */ static gboolean -gnome_canvas_key (GtkWidget *widget, GdkEventKey *event) +gnome_canvas_key (GtkWidget *widget, + GdkEventKey *event) { GnomeCanvas *canvas; @@ -2719,7 +2759,8 @@ gnome_canvas_key (GtkWidget *widget, GdkEventKey *event) /* Crossing event handler for the canvas */ static gint -gnome_canvas_crossing (GtkWidget *widget, GdkEventCrossing *event) +gnome_canvas_crossing (GtkWidget *widget, + GdkEventCrossing *event) { GnomeCanvas *canvas; GtkLayout *layout; @@ -2749,7 +2790,8 @@ gnome_canvas_crossing (GtkWidget *widget, GdkEventCrossing *event) /* Focus in handler for the canvas */ static gint -gnome_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event) +gnome_canvas_focus_in (GtkWidget *widget, + GdkEventFocus *event) { GnomeCanvas *canvas; @@ -2769,7 +2811,8 @@ gnome_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event) /* Focus out handler for the canvas */ static gint -gnome_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event) +gnome_canvas_focus_out (GtkWidget *widget, + GdkEventFocus *event) { GnomeCanvas *canvas; @@ -2830,10 +2873,10 @@ update_again: } /* it is possible that during picking we emitted an event in which - the user then called some function which then requested update - of something. Without this we'd be left in a state where - need_update would have been left TRUE and the canvas would have - been left unpainted. */ + * the user then called some function which then requested update + * of something. Without this we'd be left in a state where + * need_update would have been left TRUE and the canvas would have + * been left unpainted. */ if (canvas->need_update) { goto update_again; } @@ -2999,7 +3042,9 @@ gnome_canvas_get_scroll_region (GnomeCanvas *canvas, * scrollbars to the canvas layout's scrolling adjusments. **/ void -gnome_canvas_scroll_to (GnomeCanvas *canvas, gint cx, gint cy) +gnome_canvas_scroll_to (GnomeCanvas *canvas, + gint cx, + gint cy) { g_return_if_fail (GNOME_IS_CANVAS (canvas)); @@ -3016,7 +3061,9 @@ gnome_canvas_scroll_to (GnomeCanvas *canvas, gint cx, gint cy) * pixel units. **/ void -gnome_canvas_get_scroll_offsets (GnomeCanvas *canvas, gint *cx, gint *cy) +gnome_canvas_get_scroll_offsets (GnomeCanvas *canvas, + gint *cx, + gint *cy) { GtkAdjustment *adjustment; GtkScrollable *scrollable; @@ -3049,7 +3096,9 @@ gnome_canvas_get_scroll_offsets (GnomeCanvas *canvas, gint *cx, gint *cy) * coordinates. **/ GnomeCanvasItem * -gnome_canvas_get_item_at (GnomeCanvas *canvas, gdouble x, gdouble y) +gnome_canvas_get_item_at (GnomeCanvas *canvas, + gdouble x, + gdouble y) { gint cx, cy; @@ -3079,7 +3128,8 @@ gnome_canvas_request_update_real (GnomeCanvas *canvas) } static inline void -get_visible_rect (GnomeCanvas *canvas, GdkRectangle *visible) +get_visible_rect (GnomeCanvas *canvas, + GdkRectangle *visible) { GtkAllocation allocation; GtkScrollable *scrollable; @@ -3116,7 +3166,11 @@ get_visible_rect (GnomeCanvas *canvas, GdkRectangle *visible) * be used only by item implementations. **/ void -gnome_canvas_request_redraw (GnomeCanvas *canvas, gint x1, gint y1, gint x2, gint y2) +gnome_canvas_request_redraw (GnomeCanvas *canvas, + gint x1, + gint y1, + gint x2, + gint y2) { GdkRectangle area, clip; @@ -3147,7 +3201,8 @@ gnome_canvas_request_redraw (GnomeCanvas *canvas, gint x1, gint y1, gint x2, gin * pixel coordinates. **/ void -gnome_canvas_w2c_matrix (GnomeCanvas *canvas, cairo_matrix_t *matrix) +gnome_canvas_w2c_matrix (GnomeCanvas *canvas, + cairo_matrix_t *matrix) { g_return_if_fail (GNOME_IS_CANVAS (canvas)); g_return_if_fail (matrix != NULL); @@ -3165,7 +3220,8 @@ gnome_canvas_w2c_matrix (GnomeCanvas *canvas, cairo_matrix_t *matrix) * world coordinates. **/ void -gnome_canvas_c2w_matrix (GnomeCanvas *canvas, cairo_matrix_t *matrix) +gnome_canvas_c2w_matrix (GnomeCanvas *canvas, + cairo_matrix_t *matrix) { g_return_if_fail (GNOME_IS_CANVAS (canvas)); g_return_if_fail (matrix != NULL); @@ -3185,7 +3241,11 @@ gnome_canvas_c2w_matrix (GnomeCanvas *canvas, cairo_matrix_t *matrix) * Converts world coordinates into canvas pixel coordinates. **/ void -gnome_canvas_w2c (GnomeCanvas *canvas, gdouble wx, gdouble wy, gint *cx, gint *cy) +gnome_canvas_w2c (GnomeCanvas *canvas, + gdouble wx, + gdouble wy, + gint *cx, + gint *cy) { cairo_matrix_t w2c; @@ -3243,7 +3303,11 @@ gnome_canvas_w2c_d (GnomeCanvas *canvas, * Converts canvas pixel coordinates to world coordinates. **/ void -gnome_canvas_c2w (GnomeCanvas *canvas, gint cx, gint cy, gdouble *wx, gdouble *wy) +gnome_canvas_c2w (GnomeCanvas *canvas, + gint cx, + gint cy, + gdouble *wx, + gdouble *wy) { cairo_matrix_t c2w; gdouble x, y; @@ -3274,8 +3338,11 @@ gnome_canvas_c2w (GnomeCanvas *canvas, gint cx, gint cy, gdouble *wx, gdouble *w * example. **/ void -gnome_canvas_window_to_world (GnomeCanvas *canvas, gdouble winx, gdouble winy, - gdouble *worldx, gdouble *worldy) +gnome_canvas_window_to_world (GnomeCanvas *canvas, + gdouble winx, + gdouble winy, + gdouble *worldx, + gdouble *worldy) { g_return_if_fail (GNOME_IS_CANVAS (canvas)); @@ -3297,8 +3364,11 @@ gnome_canvas_window_to_world (GnomeCanvas *canvas, gdouble winx, gdouble winy, * Converts world coordinates into window-relative coordinates. **/ void -gnome_canvas_world_to_window (GnomeCanvas *canvas, gdouble worldx, gdouble worldy, - gdouble *winx, gdouble *winy) +gnome_canvas_world_to_window (GnomeCanvas *canvas, + gdouble worldx, + gdouble worldy, + gdouble *winx, + gdouble *winy) { g_return_if_fail (GNOME_IS_CANVAS (canvas)); @@ -3311,9 +3381,9 @@ gnome_canvas_world_to_window (GnomeCanvas *canvas, gdouble worldx, gdouble world static gboolean boolean_handled_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy) + GValue *return_accu, + const GValue *handler_return, + gpointer dummy) { gboolean continue_emission; gboolean signal_handled; -- cgit