Move lines around. No functional change.
This commit is contained in:
101
src/ld-symbol.c
101
src/ld-symbol.c
@@ -17,55 +17,6 @@
|
||||
#include "ld-library.h"
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user