[lasem] mathml_semantics: implement get_body.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] mathml_semantics: implement get_body.
- Date: Sun, 11 Dec 2011 17:20:45 +0000 (UTC)
commit 061dbf8d7c921cf9f369fa5ca375d73957404c35
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Dec 11 18:18:37 2011 +0100
mathml_semantics: implement get_body.
src/lsmmathmlsemanticselement.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/src/lsmmathmlsemanticselement.c b/src/lsmmathmlsemanticselement.c
index fd6aa56..8f367c2 100644
--- a/src/lsmmathmlsemanticselement.c
+++ b/src/lsmmathmlsemanticselement.c
@@ -32,10 +32,31 @@ lsm_mathml_semantics_element_get_node_name (LsmDomNode *node)
return "semantics";
}
+static gboolean
+lsm_mathml_semantics_element_can_append_child (LsmDomNode *self, LsmDomNode *child)
+{
+ if (!LSM_IS_MATHML_ELEMENT (child))
+ return FALSE;
+
+ return TRUE;
+}
+
/* LsmMathmlElement implementation */
/* LsmMathmlSemanticsElement implementation */
+LsmMathmlElement *
+lsm_mathml_semantics_element_get_body (LsmMathmlSemanticsElement *semantics)
+{
+ LsmDomNode *node;
+
+ g_return_val_if_fail (LSM_IS_MATHML_SEMANTICS_ELEMENT (semantics), NULL);
+
+ node = LSM_DOM_NODE (semantics);
+
+ return LSM_MATHML_ELEMENT (node->first_child);
+}
+
LsmDomNode *
lsm_mathml_semantics_element_new (void)
{
@@ -43,7 +64,7 @@ lsm_mathml_semantics_element_new (void)
}
static void
-lsm_mathml_semantics_element_init (LsmMathmlSemanticsElement *container)
+lsm_mathml_semantics_element_init (LsmMathmlSemanticsElement *semantics)
{
}
@@ -55,6 +76,7 @@ lsm_mathml_semantics_element_class_init (LsmMathmlSemanticsElementClass *klass)
LsmDomNodeClass *d_node_class = LSM_DOM_NODE_CLASS (klass);
d_node_class->get_node_name = lsm_mathml_semantics_element_get_node_name;
+ d_node_class->can_append_child = lsm_mathml_semantics_element_can_append_child;
}
G_DEFINE_TYPE (LsmMathmlSemanticsElement, lsm_mathml_semantics_element, LSM_TYPE_MATHML_ELEMENT)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]