aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-11 23:31:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-12 10:25:06 +0800
commiteb29179da623f9cf4abd663577395a085452ca18 (patch)
treea7eec4690f254d4cb9048ca87a5e7f401a2e74ae /libgnomecanvas
parentbeb8e74577f695d0d3c2efea52dc10c2136f0135 (diff)
downloadgsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.gz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.bz2
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.lz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.xz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.zst
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'libgnomecanvas')
-rw-r--r--libgnomecanvas/gailcanvasitem.c13
-rw-r--r--libgnomecanvas/gnome-canvas-util.c53
-rw-r--r--libgnomecanvas/gnome-canvas-widget.c51
3 files changed, 76 insertions, 41 deletions
diff --git a/libgnomecanvas/gailcanvasitem.c b/libgnomecanvas/gailcanvasitem.c
index 6fb5c7d316..2e4232d65d 100644
--- a/libgnomecanvas/gailcanvasitem.c
+++ b/libgnomecanvas/gailcanvasitem.c
@@ -31,17 +31,17 @@ static gint gail_canvas_item_get_index_in_parent (AtkObject *
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,
+static guint gail_canvas_item_add_focus_handler (AtkComponent *component,
AtkFocusHandler handler);
-static void gail_canvas_item_get_extents (AtkComponent *component,
+static void gail_canvas_item_get_extents (AtkComponent *component,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coord_type);
-static gint gail_canvas_item_get_mdi_zorder (AtkComponent *component);
-static gboolean gail_canvas_item_grab_focus (AtkComponent *component);
-static void gail_canvas_item_remove_focus_handler (AtkComponent *component,
+static gint gail_canvas_item_get_mdi_zorder (AtkComponent *component);
+static gboolean gail_canvas_item_grab_focus (AtkComponent *component);
+static void gail_canvas_item_remove_focus_handler (AtkComponent *component,
guint handler_id);
static gboolean is_item_on_screen (GnomeCanvasItem *item);
static void get_item_extents (GnomeCanvasItem *item,
@@ -383,7 +383,8 @@ get_item_extents (GnomeCanvasItem *item,
bx1 = by1 = bx2 = by2 = 0.0;
if (GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (item))->bounds)
- (* GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (item))->bounds) (item, &bx1, &by1, &bx2, &by2);
+ GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (item))->bounds (
+ item, &bx1, &by1, &bx2, &by2);
/* Get the item coordinates -> canvas pixel coordinates affine */
diff --git a/libgnomecanvas/gnome-canvas-util.c b/libgnomecanvas/gnome-canvas-util.c
index 3df31e0766..f685cf7846 100644
--- a/libgnomecanvas/gnome-canvas-util.c
+++ b/libgnomecanvas/gnome-canvas-util.c
@@ -24,8 +24,9 @@
*/
/* Miscellaneous utility functions for the GnomeCanvas widget
*
- * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
- * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
+ * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas
+ * widget. Tk is copyrighted by the Regents of the University of California,
+ * Sun Microsystems, and other parties.
*
*
* Author: Federico Mena <federico@nuclecu.unam.mx>
@@ -135,9 +136,17 @@ gnome_canvas_points_free (GnomeCanvasPoints *points)
* Otherwise, returns TRUE.
**/
gint
-gnome_canvas_get_miter_points (gdouble x1, gdouble y1, gdouble x2, gdouble y2, gdouble x3, gdouble y3,
- gdouble width,
- gdouble *mx1, gdouble *my1, gdouble *mx2, gdouble *my2)
+gnome_canvas_get_miter_points (gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2,
+ gdouble x3,
+ gdouble y3,
+ gdouble width,
+ gdouble *mx1,
+ gdouble *my1,
+ gdouble *mx2,
+ gdouble *my2)
{
gdouble theta1; /* angle of segment p2-p1 */
gdouble theta2; /* angle of segment p2-p3 */
@@ -262,12 +271,12 @@ gnome_canvas_polygon_to_point (gdouble *poly, gint num_points, gdouble x, gdoubl
gdouble *p;
gdouble dx, dy;
- /* Iterate through all the edges in the polygon, updating best and intersections.
- *
- * When computing intersections, include left X coordinate of line within its range, but not
- * Y coordinate. Otherwise if the point lies exactly below a vertex we'll count it as two
+ /* Iterate through all the edges in the polygon, updating best and
* intersections.
- */
+ *
+ * When computing intersections, include left X coordinate of line
+ * within its range, but not Y coordinate. Otherwise if the point
+ * lies exactly below a vertex we'll count it as two intersections. */
best = 1.0e36;
intersections = 0;
@@ -275,10 +284,10 @@ gnome_canvas_polygon_to_point (gdouble *poly, gint num_points, gdouble x, gdoubl
for (i = num_points, p = poly; i > 1; i--, p += 2) {
gdouble px, py, dist;
- /* Compute the point on the current edge closest to the point and update the
- * intersection count. This must be done separately for vertical edges, horizontal
- * edges, and others.
- */
+ /* Compute the point on the current edge closest to the
+ * point and update the intersection count. This must be
+ * done separately for vertical edges, horizontal edges,
+ * and others. */
if (p[2] == p[0]) {
/* Vertical edge */
@@ -361,9 +370,8 @@ gnome_canvas_polygon_to_point (gdouble *poly, gint num_points, gdouble x, gdoubl
best = dist;
}
- /* We've processed all the points. If the number of intersections is odd, the point is
- * inside the polygon.
- */
+ /* We've processed all the points. If the number of
+ * intersections is odd, the point is inside the polygon. */
if (intersections & 0x1)
return 0.0;
@@ -490,7 +498,10 @@ gnome_canvas_update_svp (GnomeCanvas *canvas, ArtSVP **p_svp, ArtSVP *new_svp)
* on what's changed. This function takes responsibility for freeing new_svp.
**/
void
-gnome_canvas_update_svp_clip (GnomeCanvas *canvas, ArtSVP **p_svp, ArtSVP *new_svp, ArtSVP *clip_svp)
+gnome_canvas_update_svp_clip (GnomeCanvas *canvas,
+ ArtSVP **p_svp,
+ ArtSVP *new_svp,
+ ArtSVP *clip_svp)
{
ArtSVP *clipped_svp;
@@ -558,8 +569,10 @@ gnome_canvas_item_update_svp (GnomeCanvasItem *item, ArtSVP **p_svp, ArtSVP *new
* on what's changed. This function takes responsibility for freeing new_svp.
**/
void
-gnome_canvas_item_update_svp_clip (GnomeCanvasItem *item, ArtSVP **p_svp, ArtSVP *new_svp,
- ArtSVP *clip_svp)
+gnome_canvas_item_update_svp_clip (GnomeCanvasItem *item,
+ ArtSVP **p_svp,
+ ArtSVP *new_svp,
+ ArtSVP *clip_svp)
{
ArtSVP *clipped_svp;
diff --git a/libgnomecanvas/gnome-canvas-widget.c b/libgnomecanvas/gnome-canvas-widget.c
index 5c59f50b58..23b687f899 100644
--- a/libgnomecanvas/gnome-canvas-widget.c
+++ b/libgnomecanvas/gnome-canvas-widget.c
@@ -24,8 +24,9 @@
*/
/* Widget item type for GnomeCanvas widget
*
- * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
- * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
+ * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas
+ * widget. Tk is copyrighted by the Regents of the University of California,
+ * Sun Microsystems, and other parties.
*
*
* Author: Federico Mena <federico@nuclecu.unam.mx>
@@ -58,17 +59,30 @@ static void gnome_canvas_widget_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
-static void gnome_canvas_widget_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags);
-static gdouble gnome_canvas_widget_point (GnomeCanvasItem *item, gdouble x, gdouble y,
- gint cx, gint cy, GnomeCanvasItem **actual_item);
-static void gnome_canvas_widget_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2);
-
-static void gnome_canvas_widget_render (GnomeCanvasItem *item,
- GnomeCanvasBuf *buf);
-static void gnome_canvas_widget_draw (GnomeCanvasItem *item,
- GdkDrawable *drawable,
- gint x, gint y,
- gint width, gint height);
+static void gnome_canvas_widget_update (GnomeCanvasItem *item,
+ gdouble *affine,
+ ArtSVP *clip_path,
+ gint flags);
+static gdouble gnome_canvas_widget_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy,
+ GnomeCanvasItem **actual_item);
+static void gnome_canvas_widget_bounds (GnomeCanvasItem *item,
+ gdouble *x1,
+ gdouble *y1,
+ gdouble *x2,
+ gdouble *y2);
+
+static void gnome_canvas_widget_render (GnomeCanvasItem *item,
+ GnomeCanvasBuf *buf);
+static void gnome_canvas_widget_draw (GnomeCanvasItem *item,
+ GdkDrawable *drawable,
+ gint x,
+ gint y,
+ gint width,
+ gint height);
static GnomeCanvasItemClass *parent_class;
@@ -438,7 +452,10 @@ gnome_canvas_widget_get_property (GObject *object,
}
static void
-gnome_canvas_widget_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
+gnome_canvas_widget_update (GnomeCanvasItem *item,
+ gdouble *affine,
+ ArtSVP *clip_path,
+ gint flags)
{
GnomeCanvasWidget *witem;
@@ -538,7 +555,11 @@ gnome_canvas_widget_point (GnomeCanvasItem *item, gdouble x, gdouble y,
}
static void
-gnome_canvas_widget_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2)
+gnome_canvas_widget_bounds (GnomeCanvasItem *item,
+ gdouble *x1,
+ gdouble *y1,
+ gdouble *x2,
+ gdouble *y2)
{
GnomeCanvasWidget *witem;