summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44c00d5)
raw | patch | inline | side by side (parent: 44c00d5)
author | joncruz <joncruz@users.sourceforge.net> | |
Thu, 3 Apr 2008 06:04:53 +0000 (06:04 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Thu, 3 Apr 2008 06:04:53 +0000 (06:04 +0000) |
src/forward.h | patch | blob | history | |
src/sp-object.h | patch | blob | history | |
src/sp-shape.cpp | patch | blob | history |
diff --git a/src/forward.h b/src/forward.h
index 0cab048e0e756ff81464cd6920c2cb247989d7c0..d4a98fbff915016f7c4b14e848307406fecccffe 100644 (file)
--- a/src/forward.h
+++ b/src/forward.h
-#ifndef __FORWARD_H__
-#define __FORWARD_H__
+#ifndef FORWARD_H_SEEN
+#define FORWARD_H_SEEN
/*
* Forward declarations of most used objects
#define SP_TYPE_OBJECT (sp_object_get_type ())
#define SP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_OBJECT, SPObject))
+#define SP_OBJECT_CLASS(clazz) (G_TYPE_CHECK_CLASS_CAST((clazz), SP_TYPE_OBJECT, SPObjectClass))
#define SP_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_OBJECT))
GType sp_object_get_type ();
#define SP_TYPE_ITEM (sp_item_get_type ())
#define SP_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_ITEM, SPItem))
+#define SP_ITEM_CLASS(clazz) (G_TYPE_CHECK_CLASS_CAST((clazz), SP_TYPE_ITEM, SPItemClass))
#define SP_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_ITEM))
GType sp_item_get_type ();
class Verb;
}
-#endif /* !__FORWARD_H__ */
+#endif // FORWARD_H_SEEN
/*
Local Variables:
diff --git a/src/sp-object.h b/src/sp-object.h
index 3c938e8a1554ae6ea1ec553a7649fba952c8ea05..f30654c12ebb214f862aa2f80f9baecf60ba17db 100644 (file)
--- a/src/sp-object.h
+++ b/src/sp-object.h
-#ifndef __SP_OBJECT_H__
-#define __SP_OBJECT_H__
+#ifndef SP_OBJECT_H_SEEN
+#define SP_OBJECT_H_SEEN
/** \file
* Abstract base class for all nodes
SPObject *lastChild() { return _last_child; }
SPObject const *lastChild() const { return _last_child; }
- enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow };
+ enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow };
/** @brief Retrieves children as a GSList */
GSList *childList(bool add_ref, Action action = ActionGeneral);
SPObject *appendChildRepr(Inkscape::XML::Node *repr);
- /** @brief Gets the author-visible label for this object. */
+ /** @brief Gets the author-visible label for this object. */
gchar const *label() const;
- /** @brief Returns a default label for this object. */
+ /** @brief Returns a default label for this object. */
gchar const *defaultLabel() const;
/** @brief Sets the author-visible label for this object.
*
@@ -556,7 +556,7 @@ void sp_object_removeAttribute(SPObject *object, gchar const *key, SPException *
/* Style */
gchar const *sp_object_get_style_property(SPObject const *object,
- gchar const *key, gchar const *def);
+ gchar const *key, gchar const *def);
Inkscape::Version sp_object_get_sodipodi_version(SPObject *object);
SPObject *sp_object_prev(SPObject *child);
-#endif
+#endif // SP_OBJECT_H_SEEN
/*
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index 1556226f15e300cd76f29580274ca537bab33577..e452457939e61e623bf7870e54a46d423367587d 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
-#define __SP_SHAPE_C__
-
/*
* Base class for shapes, including <path> element
*
static void
sp_shape_class_init (SPShapeClass *klass)
{
- GObjectClass *gobject_class;
- SPObjectClass *sp_object_class;
- SPItemClass * item_class;
- SPLPEItemClass * lpe_item_class;
-
- gobject_class = (GObjectClass *) klass;
- sp_object_class = (SPObjectClass *) klass;
- item_class = (SPItemClass *) klass;
+ GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
+ SPObjectClass *sp_object_class = SP_OBJECT_CLASS(klass);
+ SPItemClass * item_class = SP_ITEM_CLASS(klass);
+ SPLPEItemClass * lpe_item_class = SP_LPE_ITEM_CLASS(klass);
- parent_class = (SPLPEItemClass *)g_type_class_peek_parent (klass);
+ parent_class = (SPLPEItemClass *)g_type_class_peek_parent (klass);
gobject_class->finalize = sp_shape_finalize;