diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/ephy-node.c | 15 | ||||
-rw-r--r-- | lib/ephy-node.h | 5 |
3 files changed, 25 insertions, 2 deletions
@@ -1,5 +1,12 @@ 2005-01-15 Christian Persch <chpe@cvs.gnome.org> + * lib/ephy-node.c: (ephy_node_get_type): + * lib/ephy-node.h: + + Add boxed type for EphyNode. + +2005-01-15 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSDialogs.cpp: diff --git a/lib/ephy-node.c b/lib/ephy-node.c index af264cbe6..41dbe57de 100644 --- a/lib/ephy-node.c +++ b/lib/ephy-node.c @@ -1271,3 +1271,18 @@ ephy_node_signal_disconnect (EphyNode *node, node->invalidated_signals++; } } + +GType +ephy_node_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + type = g_boxed_type_register_static ("EphyNode", + (GBoxedCopyFunc) ephy_node_ref, + (GBoxedFreeFunc) ephy_node_unref); + } + + return type; +} diff --git a/lib/ephy-node.h b/lib/ephy-node.h index 34ac0d2ec..7ac63b8eb 100644 --- a/lib/ephy-node.h +++ b/lib/ephy-node.h @@ -28,8 +28,7 @@ G_BEGIN_DECLS -/* convenience macro to check node validity */ - +#define EPHY_TYPE_NODE (ephy_node_get_type ()) #define EPHY_IS_NODE(o) (o != NULL) typedef struct _EphyNode EphyNode; @@ -49,6 +48,8 @@ typedef enum typedef void (*EphyNodeCallback) (EphyNode *node, ...); +GType ephy_node_get_type (void) G_GNUC_CONST; + EphyNode *ephy_node_new (EphyNodeDb *db); EphyNode *ephy_node_new_with_id (EphyNodeDb *db, |