From 3c77cbba3cb8456d4b54242c9b204159204e2ddf Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Tue, 17 Sep 2002 02:46:25 +0000 Subject: [PATCH] Code cleanup. Mostly formatting. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@121 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/label-barcode.c | 38 +++++++++---------- glabels2/src/label-barcode.h | 37 +++++++++--------- glabels2/src/label-box.c | 18 ++++----- glabels2/src/label-box.h | 28 +++++++------- glabels2/src/label-ellipse.c | 18 ++++----- glabels2/src/label-ellipse.h | 30 +++++++-------- glabels2/src/label-image.c | 12 +++--- glabels2/src/label-image.h | 18 ++++----- glabels2/src/label-line.c | 12 +++--- glabels2/src/label-line.h | 22 +++++------ glabels2/src/label-object.c | 32 ++++++++-------- glabels2/src/label-object.h | 72 +++++++++++++++++++----------------- glabels2/src/label-text.c | 62 +++++++++++++++---------------- glabels2/src/label-text.h | 52 +++++++++++++------------- 14 files changed, 227 insertions(+), 224 deletions(-) diff --git a/glabels2/src/label-barcode.c b/glabels2/src/label-barcode.c index aaa9920a..b00e2dd8 100644 --- a/glabels2/src/label-barcode.c +++ b/glabels2/src/label-barcode.c @@ -57,11 +57,11 @@ static guint instance = 0; /* Private function prototypes. */ /*========================================================*/ -static void gl_label_barcode_class_init (glLabelBarcodeClass *klass); -static void gl_label_barcode_instance_init (glLabelBarcode *lbc); -static void gl_label_barcode_finalize (GObject *object); +static void gl_label_barcode_class_init (glLabelBarcodeClass *klass); +static void gl_label_barcode_instance_init (glLabelBarcode *lbc); +static void gl_label_barcode_finalize (GObject *object); -static void update_size (glLabelBarcode *lbc); +static void update_size (glLabelBarcode *lbc); /*****************************************************************************/ @@ -143,15 +143,15 @@ gl_label_barcode_new (glLabel *label) /*****************************************************************************/ glLabelBarcode * gl_label_barcode_dup (glLabelBarcode *lbc, - glLabel *label) + glLabel *label) { glLabelBarcode *new_lbc; glTextNode *text_node; - gdouble x, y, w, h; - glBarcodeStyle style; - gboolean text_flag; - guint color; - gdouble scale; + gdouble x, y, w, h; + glBarcodeStyle style; + gboolean text_flag; + guint color; + gdouble scale; gl_debug (DEBUG_LABEL, "START"); @@ -185,7 +185,7 @@ gl_label_barcode_dup (glLabelBarcode *lbc, /*****************************************************************************/ void gl_label_barcode_set_data (glLabelBarcode *lbc, - glTextNode *text_node) + glTextNode *text_node) { gl_debug (DEBUG_LABEL, "START"); @@ -203,13 +203,11 @@ gl_label_barcode_set_data (glLabelBarcode *lbc, void gl_label_barcode_set_props (glLabelBarcode *lbc, - glBarcodeStyle style, - gboolean text_flag, - guint color, - gdouble scale) + glBarcodeStyle style, + gboolean text_flag, + guint color, + gdouble scale) { - GdkPixbuf *pixbuf; - gl_debug (DEBUG_LABEL, "START"); g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); @@ -241,9 +239,9 @@ gl_label_barcode_get_data (glLabelBarcode *lbc) void gl_label_barcode_get_props (glLabelBarcode *lbc, glBarcodeStyle *style, - gboolean *text_flag, - guint *color, - gdouble *scale) + gboolean *text_flag, + guint *color, + gdouble *scale) { g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); diff --git a/glabels2/src/label-barcode.h b/glabels2/src/label-barcode.h index d1c0e09b..a0b87830 100644 --- a/glabels2/src/label-barcode.h +++ b/glabels2/src/label-barcode.h @@ -46,34 +46,35 @@ typedef struct _glLabelBarcodePrivate glLabelBarcodePrivate; struct _glLabelBarcode { glLabelObject object; - glLabelBarcodePrivate *private; + glLabelBarcodePrivate *private; }; struct _glLabelBarcodeClass { glLabelObjectClass parent_class; }; -extern GType gl_label_barcode_get_type (void); -extern GObject *gl_label_barcode_new (glLabel *label); +GType gl_label_barcode_get_type (void); -extern glLabelBarcode *gl_label_barcode_dup (glLabelBarcode *lbc, - glLabel *label); +GObject *gl_label_barcode_new (glLabel *label); -extern void gl_label_barcode_set_data (glLabelBarcode *lbc, - glTextNode *text_node); -extern void gl_label_barcode_set_props (glLabelBarcode *lbc, - glBarcodeStyle style, - gboolean text_flag, - guint color, - gdouble scale); +glLabelBarcode *gl_label_barcode_dup (glLabelBarcode *lbc, + glLabel *label); -extern glTextNode *gl_label_barcode_get_data (glLabelBarcode *lbc); -extern void gl_label_barcode_get_props (glLabelBarcode *lbc, - glBarcodeStyle *style, - gboolean *text_flag, - guint *color, - gdouble *scale); +void gl_label_barcode_set_data (glLabelBarcode *lbc, + glTextNode *text_node); +void gl_label_barcode_set_props (glLabelBarcode *lbc, + glBarcodeStyle style, + gboolean text_flag, + guint color, + gdouble scale); + +glTextNode *gl_label_barcode_get_data (glLabelBarcode *lbc); +void gl_label_barcode_get_props (glLabelBarcode *lbc, + glBarcodeStyle *style, + gboolean *text_flag, + guint *color, + gdouble *scale); G_END_DECLS diff --git a/glabels2/src/label-box.c b/glabels2/src/label-box.c index a7e816ae..6abc2312 100644 --- a/glabels2/src/label-box.c +++ b/glabels2/src/label-box.c @@ -48,9 +48,9 @@ static guint instance = 0; /* Private function prototypes. */ /*========================================================*/ -static void gl_label_box_class_init (glLabelBoxClass *klass); -static void gl_label_box_instance_init (glLabelBox *lbox); -static void gl_label_box_finalize (GObject *object); +static void gl_label_box_class_init (glLabelBoxClass *klass); +static void gl_label_box_instance_init (glLabelBox *lbox); +static void gl_label_box_finalize (GObject *object); /*****************************************************************************/ @@ -131,11 +131,11 @@ gl_label_box_new (glLabel *label) /*****************************************************************************/ glLabelBox * gl_label_box_dup (glLabelBox *lbox, - glLabel *label) + glLabel *label) { glLabelBox *new_lbox; - gdouble x, y, w, h, line_width; - guint line_color, fill_color; + gdouble x, y, w, h, line_width; + guint line_color, fill_color; gl_debug (DEBUG_LABEL, "START"); @@ -170,7 +170,7 @@ gl_label_box_dup (glLabelBox *lbox, /*****************************************************************************/ void gl_label_box_set_line_width (glLabelBox *lbox, - gdouble line_width) + gdouble line_width) { g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); @@ -182,7 +182,7 @@ gl_label_box_set_line_width (glLabelBox *lbox, void gl_label_box_set_line_color (glLabelBox *lbox, - guint line_color) + guint line_color) { g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); @@ -194,7 +194,7 @@ gl_label_box_set_line_color (glLabelBox *lbox, void gl_label_box_set_fill_color (glLabelBox *lbox, - guint fill_color) + guint fill_color) { g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); diff --git a/glabels2/src/label-box.h b/glabels2/src/label-box.h index fc5b6f9e..cfd93df6 100644 --- a/glabels2/src/label-box.h +++ b/glabels2/src/label-box.h @@ -43,32 +43,32 @@ typedef struct _glLabelBoxPrivate glLabelBoxPrivate; struct _glLabelBox { glLabelObject object; - glLabelBoxPrivate *private; + glLabelBoxPrivate *private; }; struct _glLabelBoxClass { glLabelObjectClass parent_class; }; -extern GType gl_label_box_get_type (void); +GType gl_label_box_get_type (void); -extern GObject *gl_label_box_new (glLabel *label); +GObject *gl_label_box_new (glLabel *label); -extern glLabelBox *gl_label_box_dup (glLabelBox *lbox, - glLabel *label); +glLabelBox *gl_label_box_dup (glLabelBox *lbox, + glLabel *label); -extern void gl_label_box_set_line_width (glLabelBox *lbox, - gdouble line_width); +void gl_label_box_set_line_width (glLabelBox *lbox, + gdouble line_width); -extern void gl_label_box_set_line_color (glLabelBox *lbox, - guint line_color); +void gl_label_box_set_line_color (glLabelBox *lbox, + guint line_color); -extern void gl_label_box_set_fill_color (glLabelBox *lbox, - guint fill_color); +void gl_label_box_set_fill_color (glLabelBox *lbox, + guint fill_color); -extern gdouble gl_label_box_get_line_width (glLabelBox *lbox); -extern guint gl_label_box_get_line_color (glLabelBox *lbox); -extern guint gl_label_box_get_fill_color (glLabelBox *lbox); +gdouble gl_label_box_get_line_width (glLabelBox *lbox); +guint gl_label_box_get_line_color (glLabelBox *lbox); +guint gl_label_box_get_fill_color (glLabelBox *lbox); G_END_DECLS diff --git a/glabels2/src/label-ellipse.c b/glabels2/src/label-ellipse.c index e071f5d4..9a7ac46c 100644 --- a/glabels2/src/label-ellipse.c +++ b/glabels2/src/label-ellipse.c @@ -48,9 +48,9 @@ static guint instance = 0; /* Private function prototypes. */ /*========================================================*/ -static void gl_label_ellipse_class_init (glLabelEllipseClass *klass); -static void gl_label_ellipse_instance_init (glLabelEllipse *lellipse); -static void gl_label_ellipse_finalize (GObject *object); +static void gl_label_ellipse_class_init (glLabelEllipseClass *klass); +static void gl_label_ellipse_instance_init (glLabelEllipse *lellipse); +static void gl_label_ellipse_finalize (GObject *object); /*****************************************************************************/ @@ -131,11 +131,11 @@ gl_label_ellipse_new (glLabel *label) /*****************************************************************************/ glLabelEllipse * gl_label_ellipse_dup (glLabelEllipse *lellipse, - glLabel *label) + glLabel *label) { glLabelEllipse *new_lellipse; - gdouble x, y, w, h, line_width; - guint line_color, fill_color; + gdouble x, y, w, h, line_width; + guint line_color, fill_color; gl_debug (DEBUG_LABEL, "START"); @@ -169,7 +169,7 @@ gl_label_ellipse_dup (glLabelEllipse *lellipse, /*****************************************************************************/ void gl_label_ellipse_set_line_width (glLabelEllipse *lellipse, - gdouble line_width) + gdouble line_width) { g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); @@ -181,7 +181,7 @@ gl_label_ellipse_set_line_width (glLabelEllipse *lellipse, void gl_label_ellipse_set_line_color (glLabelEllipse *lellipse, - guint line_color) + guint line_color) { g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); @@ -193,7 +193,7 @@ gl_label_ellipse_set_line_color (glLabelEllipse *lellipse, void gl_label_ellipse_set_fill_color (glLabelEllipse *lellipse, - guint fill_color) + guint fill_color) { g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); diff --git a/glabels2/src/label-ellipse.h b/glabels2/src/label-ellipse.h index 8704e698..b7b0cf72 100644 --- a/glabels2/src/label-ellipse.h +++ b/glabels2/src/label-ellipse.h @@ -41,34 +41,34 @@ typedef struct _glLabelEllipseClass glLabelEllipseClass; typedef struct _glLabelEllipsePrivate glLabelEllipsePrivate; struct _glLabelEllipse { - glLabelObject object; + glLabelObject object; glLabelEllipsePrivate *private; }; struct _glLabelEllipseClass { - glLabelObjectClass parent_class; + glLabelObjectClass parent_class; }; -extern GType gl_label_ellipse_get_type (void); +GType gl_label_ellipse_get_type (void); -extern GObject *gl_label_ellipse_new (glLabel *label); +GObject *gl_label_ellipse_new (glLabel *label); -extern glLabelEllipse *gl_label_ellipse_dup (glLabelEllipse *lellipse, - glLabel *label); +glLabelEllipse *gl_label_ellipse_dup (glLabelEllipse *lellipse, + glLabel *label); -extern void gl_label_ellipse_set_line_width (glLabelEllipse *lellipse, - gdouble line_width); +void gl_label_ellipse_set_line_width (glLabelEllipse *lellipse, + gdouble line_width); -extern void gl_label_ellipse_set_line_color (glLabelEllipse *lellipse, - guint line_color); +void gl_label_ellipse_set_line_color (glLabelEllipse *lellipse, + guint line_color); -extern void gl_label_ellipse_set_fill_color (glLabelEllipse *lellipse, - guint fill_color); +void gl_label_ellipse_set_fill_color (glLabelEllipse *lellipse, + guint fill_color); -extern gdouble gl_label_ellipse_get_line_width (glLabelEllipse *lellipse); -extern guint gl_label_ellipse_get_line_color (glLabelEllipse *lellipse); -extern guint gl_label_ellipse_get_fill_color (glLabelEllipse *lellipse); +gdouble gl_label_ellipse_get_line_width (glLabelEllipse *lellipse); +guint gl_label_ellipse_get_line_color (glLabelEllipse *lellipse); +guint gl_label_ellipse_get_fill_color (glLabelEllipse *lellipse); G_END_DECLS diff --git a/glabels2/src/label-image.c b/glabels2/src/label-image.c index 9ca6c30b..552603f4 100644 --- a/glabels2/src/label-image.c +++ b/glabels2/src/label-image.c @@ -49,9 +49,9 @@ static guint instance = 0; /* Private function prototypes. */ /*========================================================*/ -static void gl_label_image_class_init (glLabelImageClass *klass); -static void gl_label_image_instance_init (glLabelImage *limage); -static void gl_label_image_finalize (GObject *object); +static void gl_label_image_class_init (glLabelImageClass *klass); +static void gl_label_image_instance_init (glLabelImage *limage); +static void gl_label_image_finalize (GObject *object); /*****************************************************************************/ @@ -136,10 +136,10 @@ gl_label_image_new (glLabel *label) /*****************************************************************************/ glLabelImage * gl_label_image_dup (glLabelImage *limage, - glLabel *label) + glLabel *label) { glLabelImage *new_limage; - gdouble x, y, w, h; + gdouble x, y, w, h; gchar *filename; gl_debug (DEBUG_LABEL, "START"); @@ -172,7 +172,7 @@ gl_label_image_dup (glLabelImage *limage, /*****************************************************************************/ void gl_label_image_set_filename (glLabelImage *limage, - const gchar *filename) + const gchar *filename) { GdkPixbuf *pixbuf; diff --git a/glabels2/src/label-image.h b/glabels2/src/label-image.h index 34af171a..143f0d19 100644 --- a/glabels2/src/label-image.h +++ b/glabels2/src/label-image.h @@ -43,26 +43,26 @@ typedef struct _glLabelImagePrivate glLabelImagePrivate; struct _glLabelImage { glLabelObject object; - glLabelImagePrivate *private; + glLabelImagePrivate *private; }; struct _glLabelImageClass { glLabelObjectClass parent_class; }; -extern GType gl_label_image_get_type (void); +GType gl_label_image_get_type (void); -extern GObject *gl_label_image_new (glLabel *label); +GObject *gl_label_image_new (glLabel *label); -extern glLabelImage *gl_label_image_dup (glLabelImage *limage, - glLabel *label); +glLabelImage *gl_label_image_dup (glLabelImage *limage, + glLabel *label); -extern void gl_label_image_set_filename (glLabelImage *limage, - const gchar *filename); +void gl_label_image_set_filename (glLabelImage *limage, + const gchar *filename); -extern gchar *gl_label_image_get_filename (glLabelImage *limage); +gchar *gl_label_image_get_filename (glLabelImage *limage); -extern const GdkPixbuf *gl_label_image_get_pixbuf (glLabelImage *limage); +const GdkPixbuf *gl_label_image_get_pixbuf (glLabelImage *limage); G_END_DECLS diff --git a/glabels2/src/label-line.c b/glabels2/src/label-line.c index 990a2b96..9730b438 100644 --- a/glabels2/src/label-line.c +++ b/glabels2/src/label-line.c @@ -47,9 +47,9 @@ static guint instance = 0; /* Private function prototypes. */ /*========================================================*/ -static void gl_label_line_class_init (glLabelLineClass *klass); -static void gl_label_line_instance_init (glLabelLine *lline); -static void gl_label_line_finalize (GObject *object); +static void gl_label_line_class_init (glLabelLineClass *klass); +static void gl_label_line_instance_init (glLabelLine *lline); +static void gl_label_line_finalize (GObject *object); /*****************************************************************************/ @@ -130,7 +130,7 @@ gl_label_line_new (glLabel *label) /*****************************************************************************/ glLabelLine * gl_label_line_dup (glLabelLine *lline, - glLabel *label) + glLabel *label) { glLabelLine *new_lline; gdouble x, y, w, h, line_width; @@ -166,7 +166,7 @@ gl_label_line_dup (glLabelLine *lline, /*****************************************************************************/ void gl_label_line_set_line_width (glLabelLine *lline, - gdouble line_width) + gdouble line_width) { g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); @@ -178,7 +178,7 @@ gl_label_line_set_line_width (glLabelLine *lline, void gl_label_line_set_line_color (glLabelLine *lline, - guint line_color) + guint line_color) { g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); diff --git a/glabels2/src/label-line.h b/glabels2/src/label-line.h index b418b890..5b1f175d 100644 --- a/glabels2/src/label-line.h +++ b/glabels2/src/label-line.h @@ -43,28 +43,28 @@ typedef struct _glLabelLinePrivate glLabelLinePrivate; struct _glLabelLine { glLabelObject object; - glLabelLinePrivate *private; + glLabelLinePrivate *private; }; struct _glLabelLineClass { glLabelObjectClass parent_class; }; -extern GType gl_label_line_get_type (void); +GType gl_label_line_get_type (void); -extern GObject *gl_label_line_new (glLabel *label); +GObject *gl_label_line_new (glLabel *label); -extern glLabelLine *gl_label_line_dup (glLabelLine *lline, - glLabel *label); +glLabelLine *gl_label_line_dup (glLabelLine *lline, + glLabel *label); -extern void gl_label_line_set_line_width (glLabelLine *lline, - gdouble line_width); +void gl_label_line_set_line_width (glLabelLine *lline, + gdouble line_width); -extern void gl_label_line_set_line_color (glLabelLine *lline, - guint line_color); +void gl_label_line_set_line_color (glLabelLine *lline, + guint line_color); -extern gdouble gl_label_line_get_line_width (glLabelLine *lline); -extern guint gl_label_line_get_line_color (glLabelLine *lline); +gdouble gl_label_line_get_line_width (glLabelLine *lline); +guint gl_label_line_get_line_color (glLabelLine *lline); G_END_DECLS diff --git a/glabels2/src/label-object.c b/glabels2/src/label-object.c index badbd339..76eaa670 100644 --- a/glabels2/src/label-object.c +++ b/glabels2/src/label-object.c @@ -32,7 +32,7 @@ /*========================================================*/ struct _glLabelObjectPrivate { - gchar *name; + gchar *name; gdouble x, y; gdouble w, h; }; @@ -59,9 +59,9 @@ static guint instance = 0; /* Private function prototypes. */ /*========================================================*/ -static void gl_label_object_class_init (glLabelObjectClass *klass); -static void gl_label_object_instance_init (glLabelObject *object); -static void gl_label_object_finalize (GObject *object); +static void gl_label_object_class_init (glLabelObjectClass *klass); +static void gl_label_object_instance_init (glLabelObject *object); +static void gl_label_object_finalize (GObject *object); /*****************************************************************************/ @@ -212,7 +212,7 @@ gl_label_object_emit_changed (glLabelObject *object) /*****************************************************************************/ void gl_label_object_set_parent (glLabelObject *object, - glLabel *label) + glLabel *label) { glLabel *old_parent; @@ -252,7 +252,7 @@ gl_label_object_get_parent (glLabelObject *object) /*****************************************************************************/ void gl_label_object_set_name (glLabelObject *object, - gchar *name) + gchar *name) { gl_debug (DEBUG_LABEL, "START"); @@ -286,8 +286,8 @@ gl_label_object_get_name (glLabelObject *object) /*****************************************************************************/ void gl_label_object_set_position (glLabelObject *object, - gdouble x, - gdouble y) + gdouble x, + gdouble y) { gdouble dx, dy; @@ -311,8 +311,8 @@ gl_label_object_set_position (glLabelObject *object, /*****************************************************************************/ void gl_label_object_set_position_relative (glLabelObject *object, - gdouble dx, - gdouble dy) + gdouble dx, + gdouble dy) { gl_debug (DEBUG_LABEL, "START"); @@ -335,8 +335,8 @@ gl_label_object_set_position_relative (glLabelObject *object, /*****************************************************************************/ void gl_label_object_get_position (glLabelObject *object, - gdouble *x, - gdouble *y) + gdouble *x, + gdouble *y) { gl_debug (DEBUG_LABEL, "START"); @@ -353,8 +353,8 @@ gl_label_object_get_position (glLabelObject *object, /*****************************************************************************/ void gl_label_object_set_size (glLabelObject *object, - gdouble w, - gdouble h) + gdouble w, + gdouble h) { gl_debug (DEBUG_LABEL, "START"); @@ -373,8 +373,8 @@ gl_label_object_set_size (glLabelObject *object, /*****************************************************************************/ void gl_label_object_get_size (glLabelObject *object, - gdouble *w, - gdouble *h) + gdouble *w, + gdouble *h) { gl_debug (DEBUG_LABEL, "START"); diff --git a/glabels2/src/label-object.h b/glabels2/src/label-object.h index 878f711d..1a24cf68 100644 --- a/glabels2/src/label-object.h +++ b/glabels2/src/label-object.h @@ -53,7 +53,7 @@ typedef struct _glLabelObjectPrivate glLabelObjectPrivate; #include "label.h" struct _glLabelObject { - GObject object; + GObject object; glLabel *parent; @@ -61,45 +61,49 @@ struct _glLabelObject { }; struct _glLabelObjectClass { - GObjectClass parent_class; + GObjectClass parent_class; void (*changed) (glLabelObject *object, gpointer user_data); - void (*moved) (glLabelObject *object, - gdouble dx, gdouble dy, gpointer user_data); + void (*moved) (glLabelObject *object, + gdouble dx, gdouble dy, gpointer user_data); - void (*top) (glLabelObject *object, gpointer user_data); - void (*bottom) (glLabelObject *object, gpointer user_data); + void (*top) (glLabelObject *object, gpointer user_data); + void (*bottom) (glLabelObject *object, gpointer user_data); }; -extern GType gl_label_object_get_type (void); - -extern GObject *gl_label_object_new (glLabel *label); - -extern void gl_label_object_emit_changed (glLabelObject *object); - -extern void gl_label_object_set_parent (glLabelObject *object, - glLabel *label); -extern glLabel *gl_label_object_get_parent (glLabelObject *object); - -extern void gl_label_object_set_name (glLabelObject *object, - gchar *name); -extern gchar *gl_label_object_get_name (glLabelObject *object); - -extern void gl_label_object_set_position (glLabelObject *object, - gdouble x, gdouble y); -extern void gl_label_object_set_position_relative (glLabelObject *object, - gdouble dx, - gdouble dy); -extern void gl_label_object_get_position (glLabelObject *object, - gdouble *x, gdouble *y); -extern void gl_label_object_set_size (glLabelObject *object, - gdouble w, gdouble h); -extern void gl_label_object_get_size (glLabelObject *object, - gdouble *w, gdouble *h); - -extern void gl_label_object_raise_to_top (glLabelObject * object); -extern void gl_label_object_lower_to_bottom (glLabelObject * object); +GType gl_label_object_get_type (void); + +GObject *gl_label_object_new (glLabel *label); + +void gl_label_object_emit_changed (glLabelObject *object); + +void gl_label_object_set_parent (glLabelObject *object, + glLabel *label); +glLabel *gl_label_object_get_parent (glLabelObject *object); + +void gl_label_object_set_name (glLabelObject *object, + gchar *name); +gchar *gl_label_object_get_name (glLabelObject *object); + +void gl_label_object_set_position (glLabelObject *object, + gdouble x, + gdouble y); +void gl_label_object_set_position_relative (glLabelObject *object, + gdouble dx, + gdouble dy); +void gl_label_object_get_position (glLabelObject *object, + gdouble *x, + gdouble *y); +void gl_label_object_set_size (glLabelObject *object, + gdouble w, + gdouble h); +void gl_label_object_get_size (glLabelObject *object, + gdouble *w, + gdouble *h); + +void gl_label_object_raise_to_top (glLabelObject *object); +void gl_label_object_lower_to_bottom (glLabelObject *object); G_END_DECLS diff --git a/glabels2/src/label-text.c b/glabels2/src/label-text.c index 8e30f995..ded111da 100644 --- a/glabels2/src/label-text.c +++ b/glabels2/src/label-text.c @@ -66,11 +66,11 @@ static guint instance = 0; /* Private function prototypes. */ /*========================================================*/ -static void gl_label_text_class_init (glLabelTextClass *klass); -static void gl_label_text_instance_init (glLabelText *ltext); -static void gl_label_text_finalize (GObject *object); +static void gl_label_text_class_init (glLabelTextClass *klass); +static void gl_label_text_instance_init (glLabelText *ltext); +static void gl_label_text_finalize (GObject *object); -static void update_size (glLabelText *ltext); +static void update_size (glLabelText *ltext); /*****************************************************************************/ @@ -158,17 +158,17 @@ gl_label_text_new (glLabel *label) /*****************************************************************************/ glLabelText * gl_label_text_dup (glLabelText *ltext, - glLabel *label) + glLabel *label) { glLabelText *new_ltext; - gdouble x, y, w, h; + gdouble x, y, w, h; GList *lines; gchar *font_family; - gdouble font_size; - GnomeFontWeight font_weight; - gboolean font_italic_flag; - guint color; - GtkJustification just; + gdouble font_size; + GnomeFontWeight font_weight; + gboolean font_italic_flag; + guint color; + GtkJustification just; gl_debug (DEBUG_LABEL, "START"); @@ -209,7 +209,7 @@ gl_label_text_dup (glLabelText *ltext, /*****************************************************************************/ void gl_label_text_set_lines (glLabelText *ltext, - GList *lines) + GList *lines) { gl_debug (DEBUG_LABEL, "START"); @@ -226,12 +226,12 @@ gl_label_text_set_lines (glLabelText *ltext, } void -gl_label_text_set_props (glLabelText *ltext, - gchar *font_family, - gdouble font_size, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - guint color, +gl_label_text_set_props (glLabelText *ltext, + gchar *font_family, + gdouble font_size, + GnomeFontWeight font_weight, + gboolean font_italic_flag, + guint color, GtkJustification just) { GdkPixbuf *pixbuf; @@ -271,12 +271,12 @@ gl_label_text_get_lines (glLabelText *ltext) } void -gl_label_text_get_props (glLabelText *ltext, - gchar **font_family, - gdouble *font_size, - GnomeFontWeight *font_weight, - gboolean *font_italic_flag, - guint *color, +gl_label_text_get_props (glLabelText *ltext, + gchar **font_family, + gdouble *font_size, + GnomeFontWeight *font_weight, + gboolean *font_italic_flag, + guint *color, GtkJustification *just) { g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); @@ -297,14 +297,14 @@ gl_label_text_get_props (glLabelText *ltext, static void update_size (glLabelText *ltext) { - gdouble w, h; - GnomeFont *font; - gchar *text; - gchar **line; - gint i; + gdouble w, h; + GnomeFont *font; + gchar *text; + gchar **line; + gint i; GnomeGlyphList *glyphlist; - ArtDRect bbox; - gdouble affine[6]; + ArtDRect bbox; + gdouble affine[6]; gl_debug (DEBUG_LABEL, "START"); diff --git a/glabels2/src/label-text.h b/glabels2/src/label-text.h index cb7fd31f..83c64982 100644 --- a/glabels2/src/label-text.h +++ b/glabels2/src/label-text.h @@ -45,38 +45,38 @@ typedef struct _glLabelTextPrivate glLabelTextPrivate; struct _glLabelText { glLabelObject object; - glLabelTextPrivate *private; + glLabelTextPrivate *private; }; struct _glLabelTextClass { glLabelObjectClass parent_class; }; -extern GType gl_label_text_get_type (void); - -extern GObject *gl_label_text_new (glLabel *label); - -extern glLabelText *gl_label_text_dup (glLabelText *ltext, - glLabel *label); - -extern void gl_label_text_set_lines (glLabelText *ltext, - GList *lines); -extern void gl_label_text_set_props (glLabelText *ltext, - gchar *font_family, - gdouble font_size, - GnomeFontWeight font_weight, - gboolean font_italic_flag, - guint color, - GtkJustification just); - -extern GList *gl_label_text_get_lines (glLabelText *ltext); -extern void gl_label_text_get_props (glLabelText *ltext, - gchar **font_family, - gdouble *font_size, - GnomeFontWeight *font_weight, - gboolean *font_italic_flag, - guint *color, - GtkJustification *just); +GType gl_label_text_get_type (void); + +GObject *gl_label_text_new (glLabel *label); + +glLabelText *gl_label_text_dup (glLabelText *ltext, + glLabel *label); + +void gl_label_text_set_lines (glLabelText *ltext, + GList *lines); +void gl_label_text_set_props (glLabelText *ltext, + gchar *font_family, + gdouble font_size, + GnomeFontWeight font_weight, + gboolean font_italic_flag, + guint color, + GtkJustification just); + +GList *gl_label_text_get_lines (glLabelText *ltext); +void gl_label_text_get_props (glLabelText *ltext, + gchar **font_family, + gdouble *font_size, + GnomeFontWeight *font_weight, + gboolean *font_italic_flag, + guint *color, + GtkJustification *just); G_END_DECLS -- 2.39.5