[seed] [docs] seed_create_function
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] [docs] seed_create_function
- Date: Sun, 12 Jul 2009 21:30:54 +0000 (UTC)
commit a1ef3808f0f2dd353bf32a66ae5ee9a9bbc67b16
Author: Tim Horton <hortont424 gmail com>
Date: Sun Jul 12 17:27:20 2009 -0400
[docs] seed_create_function
doc/reference/tmpl/seed-nativefuncs.sgml | 11 +++++++++++
libseed/seed-engine.c | 12 ++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/doc/reference/tmpl/seed-nativefuncs.sgml b/doc/reference/tmpl/seed-nativefuncs.sgml
index 59a7d7a..145d2bb 100644
--- a/doc/reference/tmpl/seed-nativefuncs.sgml
+++ b/doc/reference/tmpl/seed-nativefuncs.sgml
@@ -46,3 +46,14 @@ All native C callbacks should have the prototype of SeedFunctionCallback().
@Returns:
+<!-- ##### FUNCTION seed_create_function ##### -->
+<para>
+
+</para>
+
+ ctx:
+ name:
+ callback:
+ object:
+
+
diff --git a/libseed/seed-engine.c b/libseed/seed-engine.c
index 7ff7013..e96e6c7 100644
--- a/libseed/seed-engine.c
+++ b/libseed/seed-engine.c
@@ -1124,6 +1124,18 @@ JSClassDefinition struct_constructor_def = {
NULL /* Convert To Type */
};
+/**
+ * seed_create_function:
+ * @ctx: A valid #SeedContext
+ * @name: The name of the function (used in exceptions).
+ * @func: A #SeedFunctionCallback to implement the function.
+ * @obj: The #SeedObject on which to put the function.
+ *
+ * Creates a JavaScript object representing a first-class function; when
+ * the function is called from JavaScript, @func will be called. Places
+ * the created function as the property @name on @obj.
+ *
+ */
void
seed_create_function (JSContextRef ctx,
gchar * name,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]