seed r341 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r341 - trunk/libseed
- Date: Tue, 25 Nov 2008 01:44:37 +0000 (UTC)
Author: racarr
Date: Tue Nov 25 01:44:37 2008
New Revision: 341
URL: http://svn.gnome.org/viewvc/seed?rev=341&view=rev
Log:
More eng->context go bye-bye.
Modified:
trunk/libseed/seed-closure.h
trunk/libseed/seed-signals.c
Modified: trunk/libseed/seed-closure.h
==============================================================================
--- trunk/libseed/seed-closure.h (original)
+++ trunk/libseed/seed-closure.h Tue Nov 25 01:44:37 2008
@@ -25,6 +25,7 @@
typedef struct _SeedClosure {
GClosure closure;
+
JSObjectRef function;
JSObjectRef object;
JSObjectRef this;
Modified: trunk/libseed/seed-signals.c
==============================================================================
--- trunk/libseed/seed-signals.c (original)
+++ trunk/libseed/seed-signals.c Tue Nov 25 01:44:37 2008
@@ -84,7 +84,8 @@
g_free(signal_ids);
}
-static void seed_gobject_signal_connect(const gchar * signal_name,
+static void seed_gobject_signal_connect(JSContextRef ctx,
+ const gchar * signal_name,
GObject * on_obj,
JSObjectRef func,
JSObjectRef this_obj,
@@ -102,9 +103,9 @@
//((SeedClosure *) closure)->object = on_obj;
((SeedClosure *) closure)->return_type = query.return_type;
- if (this_obj && !JSValueIsNull(eng->context, this_obj))
+ if (this_obj && !JSValueIsNull(ctx, this_obj))
{
- JSValueProtect(eng->context, this_obj);
+ JSValueProtect(ctx, this_obj);
((SeedClosure *) closure)->this = this_obj;
}
else
@@ -112,13 +113,13 @@
((SeedClosure *) closure)->this = 0;
}
- if (user_data && !JSValueIsNull(eng->context, user_data))
+ if (user_data && !JSValueIsNull(ctx, user_data))
{
((SeedClosure *) closure)->user_data = user_data;
- JSValueProtect(eng->context, user_data);
+ JSValueProtect(ctx, user_data);
}
- JSValueProtect(eng->context, (JSObjectRef) func);
+ JSValueProtect(ctx, (JSObjectRef) func);
g_signal_connect_closure(on_obj, signal_name, closure, FALSE);
}
@@ -156,7 +157,7 @@
obj = (GObject *)JSObjectGetPrivate(thisObject);
obj_type = G_OBJECT_TYPE(obj);
- seed_gobject_signal_connect(signal_name, obj,
+ seed_gobject_signal_connect(ctx, signal_name, obj,
(JSObjectRef) arguments[1],
NULL, user_data);
@@ -176,7 +177,7 @@
type = G_OBJECT_TYPE(obj);
- signals_ref = JSObjectMake(eng->context, signal_holder_class, obj);
+ signals_ref = JSObjectMake(ctx, signal_holder_class, obj);
while (type != 0)
{
@@ -194,9 +195,9 @@
seed_object_set_property(object_ref, "signal", signals_ref);
connect_func =
- JSObjectMakeFunctionWithCallback(eng->context, NULL,
+ JSObjectMakeFunctionWithCallback(ctx, NULL,
&seed_gobject_signal_connect_by_name);
- JSValueProtect(eng->context, connect_func);
+ JSValueProtect(ctx, connect_func);
seed_object_set_property(signals_ref, "connect", connect_func);
}
@@ -339,18 +340,18 @@
}
if (argumentCount == 1)
- seed_gobject_signal_connect(privates->signal_name,
+ seed_gobject_signal_connect(ctx, privates->signal_name,
privates->object,
(JSObjectRef) arguments[0], NULL, NULL);
if (argumentCount == 2)
- seed_gobject_signal_connect(privates->signal_name,
+ seed_gobject_signal_connect(ctx, privates->signal_name,
privates->object,
(JSObjectRef) arguments[0],
(JSObjectRef) arguments[1], NULL);
if (argumentCount == 3)
- seed_gobject_signal_connect(privates->signal_name,
+ seed_gobject_signal_connect(ctx, privates->signal_name,
privates->object,
(JSObjectRef) arguments[0],
(JSObjectRef) arguments[1],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]