aboutsummaryrefslogtreecommitdiff
path: root/src/ld-symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ld-symbol.c')
-rw-r--r--src/ld-symbol.c101
1 files changed, 50 insertions, 51 deletions
diff --git a/src/ld-symbol.c b/src/ld-symbol.c
index 6cffee0..45f11c9 100644
--- a/src/ld-symbol.c
+++ b/src/ld-symbol.c
@@ -18,55 +18,6 @@
/**
- * ld_symbol_area_copy:
- * @self: An #LdSymbolArea structure.
- *
- * Makes a copy of the structure.
- * The result must be freed by ld_symbol_area_free().
- *
- * Return value: A copy of @self.
- **/
-LdSymbolArea *
-ld_symbol_area_copy (const LdSymbolArea *self)
-{
- LdSymbolArea *new_area;
-
- g_return_val_if_fail (self != NULL, NULL);
-
- new_area = g_slice_new (LdSymbolArea);
- *new_area = *self;
- return new_area;
-}
-
-/**
- * ld_symbol_area_free:
- * @self: An #LdSymbolArea structure.
- *
- * Frees the structure created with ld_symbol_area_copy().
- **/
-void
-ld_symbol_area_free (LdSymbolArea *self)
-{
- g_return_if_fail (self != NULL);
-
- g_slice_free (LdSymbolArea, self);
-}
-
-GType
-ld_symbol_area_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- our_type = g_boxed_type_register_static
- (g_intern_static_string ("LdSymbolArea"),
- (GBoxedCopyFunc) ld_symbol_area_copy,
- (GBoxedFreeFunc) ld_symbol_area_free);
- return our_type;
-}
-
-
-/**
* SECTION:ld-symbol
* @short_description: A symbol.
* @see_also: #LdDiagram, #LdCanvas
@@ -78,8 +29,6 @@ ld_symbol_area_get_type (void)
* cairo_save() and cairo_restore() when drawing to store the state.
*/
-G_DEFINE_ABSTRACT_TYPE (LdSymbol, ld_symbol, G_TYPE_OBJECT);
-
enum
{
PROP_0,
@@ -94,6 +43,8 @@ static void ld_symbol_set_property (GObject *object, guint property_id,
const GValue *value, GParamSpec *pspec);
+G_DEFINE_ABSTRACT_TYPE (LdSymbol, ld_symbol, G_TYPE_OBJECT);
+
static void
ld_symbol_class_init (LdSymbolClass *klass)
{
@@ -251,3 +202,51 @@ ld_symbol_draw (LdSymbol *self, cairo_t *cr)
g_return_if_fail (klass->draw != NULL);
klass->draw (self, cr);
}
+
+/**
+ * ld_symbol_area_copy:
+ * @self: An #LdSymbolArea structure.
+ *
+ * Makes a copy of the structure.
+ * The result must be freed by ld_symbol_area_free().
+ *
+ * Return value: A copy of @self.
+ **/
+LdSymbolArea *
+ld_symbol_area_copy (const LdSymbolArea *self)
+{
+ LdSymbolArea *new_area;
+
+ g_return_val_if_fail (self != NULL, NULL);
+
+ new_area = g_slice_new (LdSymbolArea);
+ *new_area = *self;
+ return new_area;
+}
+
+/**
+ * ld_symbol_area_free:
+ * @self: An #LdSymbolArea structure.
+ *
+ * Frees the structure created with ld_symbol_area_copy().
+ **/
+void
+ld_symbol_area_free (LdSymbolArea *self)
+{
+ g_return_if_fail (self != NULL);
+
+ g_slice_free (LdSymbolArea, self);
+}
+
+GType
+ld_symbol_area_get_type (void)
+{
+ static GType our_type = 0;
+
+ if (our_type == 0)
+ our_type = g_boxed_type_register_static
+ (g_intern_static_string ("LdSymbolArea"),
+ (GBoxedCopyFunc) ld_symbol_area_copy,
+ (GBoxedFreeFunc) ld_symbol_area_free);
+ return our_type;
+}