boxed.h | boxed.h | |||
---|---|---|---|---|
skipping to change at line 43 | skipping to change at line 43 | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
typedef enum { | typedef enum { | |||
GJS_BOXED_CREATION_NONE = 0, | GJS_BOXED_CREATION_NONE = 0, | |||
GJS_BOXED_CREATION_NO_COPY = (1 << 0) | GJS_BOXED_CREATION_NO_COPY = (1 << 0) | |||
} GjsBoxedCreationFlags; | } GjsBoxedCreationFlags; | |||
/* Hack for now... why doesn't gobject-introspection have this? */ | /* Hack for now... why doesn't gobject-introspection have this? */ | |||
typedef GIStructInfo GIBoxedInfo; | typedef GIStructInfo GIBoxedInfo; | |||
JSBool gjs_define_boxed_class (JSContext *context, | void gjs_define_boxed_class (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIBoxedInfo *info, | ||||
JSObject **constructor_ | ||||
p, | ||||
JSObject **prototype_p) | ||||
; | ||||
JSObject* gjs_lookup_boxed_constructor (JSContext *context, | ||||
GIBoxedInfo *info); | GIBoxedInfo *info); | |||
JSObject* gjs_lookup_boxed_prototype (JSContext *context, | JSObject* gjs_lookup_boxed_prototype (JSContext *context, | |||
GIBoxedInfo *info); | GIBoxedInfo *info); | |||
JSClass* gjs_lookup_boxed_class (JSContext *context, | ||||
GIBoxedInfo *info); | ||||
void* gjs_c_struct_from_boxed (JSContext *context, | void* gjs_c_struct_from_boxed (JSContext *context, | |||
JSObject *obj); | JSObject *obj); | |||
JSObject* gjs_boxed_from_c_struct (JSContext *context, | JSObject* gjs_boxed_from_c_struct (JSContext *context, | |||
GIStructInfo *info, | GIStructInfo *info, | |||
void *gboxed, | void *gboxed, | |||
GjsBoxedCreationFlags flags); | GjsBoxedCreationFlags flags); | |||
JSBool gjs_typecheck_boxed (JSContext *context, | JSBool gjs_typecheck_boxed (JSContext *context, | |||
JSObject *obj, | JSObject *obj, | |||
GIStructInfo *expected_inf o, | GIStructInfo *expected_inf o, | |||
GType expected_typ e, | GType expected_typ e, | |||
End of changes. 3 change blocks. | ||||
9 lines changed or deleted | 1 lines changed or added | |||
compat.h | compat.h | |||
---|---|---|---|---|
skipping to change at line 32 | skipping to change at line 32 | |||
* IN THE SOFTWARE. | * IN THE SOFTWARE. | |||
*/ | */ | |||
#if !defined (__GJS_GJS_MODULE_H__) && !defined (GJS_COMPILATION) | #if !defined (__GJS_GJS_MODULE_H__) && !defined (GJS_COMPILATION) | |||
#error "Only <gjs/gjs-module.h> can be included directly." | #error "Only <gjs/gjs-module.h> can be included directly." | |||
#endif | #endif | |||
#ifndef __GJS_COMPAT_H__ | #ifndef __GJS_COMPAT_H__ | |||
#define __GJS_COMPAT_H__ | #define __GJS_COMPAT_H__ | |||
#pragma GCC diagnostic push | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) | |||
#pragma GCC diagnostic ignored "-Wstrict-prototypes" | _Pragma("GCC diagnostic push") | |||
#pragma GCC diagnostic ignored "-Winvalid-offsetof" | _Pragma("GCC diagnostic ignored \"-Wstrict-prototypes\"") | |||
_Pragma("GCC diagnostic ignored \"-Winvalid-offsetof\"") | ||||
#endif | ||||
#include <jsapi.h> | #include <jsapi.h> | |||
#include <jsdbgapi.h> // Needed by some bits | #include <jsdbgapi.h> // Needed by some bits | |||
#pragma GCC diagnostic pop | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) | |||
_Pragma("GCC diagnostic pop") | ||||
#endif | ||||
#include <glib.h> | #include <glib.h> | |||
#include <gjs/jsapi-util.h> | #include <gjs/jsapi-util.h> | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
/* This file inspects jsapi.h and attempts to provide a compatibility shim. | /* This file inspects jsapi.h and attempts to provide a compatibility shim. | |||
* See https://bugzilla.gnome.org/show_bug.cgi?id=622896 for some initial d iscussion. | * See https://bugzilla.gnome.org/show_bug.cgi?id=622896 for some initial d iscussion. | |||
*/ | */ | |||
#define JSVAL_IS_OBJECT(obj) (JSVAL_IS_NULL(obj) || !JSVAL_IS_PRIMITIVE(obj | ||||
)) | ||||
static JSBool G_GNUC_UNUSED JS_NewNumberValue(JSContext *cx, double d, jsva | ||||
l *rval) | ||||
{ | ||||
*rval = JS_NumberValue(d); | ||||
if (JSVAL_IS_NUMBER(*rval)) | ||||
return JS_TRUE; | ||||
return JS_FALSE; | ||||
} | ||||
/** | /** | |||
* GJS_NATIVE_CONSTRUCTOR_DECLARE: | * GJS_NATIVE_CONSTRUCTOR_DECLARE: | |||
* Prototype a constructor. | * Prototype a constructor. | |||
*/ | */ | |||
#define GJS_NATIVE_CONSTRUCTOR_DECLARE(name) \ | #define GJS_NATIVE_CONSTRUCTOR_DECLARE(name) \ | |||
static JSBool \ | static JSBool \ | |||
gjs_##name##_constructor(JSContext *context, \ | gjs_##name##_constructor(JSContext *context, \ | |||
unsigned argc, \ | unsigned argc, \ | |||
jsval *vp) | jsval *vp) | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 20 lines changed or added | |||
context.h | context.h | |||
---|---|---|---|---|
skipping to change at line 69 | skipping to change at line 69 | |||
const char *filename, | const char *filename, | |||
int *exit_statu s_p, | int *exit_statu s_p, | |||
GError **error); | GError **error); | |||
gboolean gjs_context_define_string_array (GjsContext *js_context, | gboolean gjs_context_define_string_array (GjsContext *js_context, | |||
const char *array_name , | const char *array_name , | |||
gssize array_leng th, | gssize array_leng th, | |||
const char **array_valu es, | const char **array_valu es, | |||
GError **error); | GError **error); | |||
GList* gjs_context_get_all (void); | GList* gjs_context_get_all (void); | |||
void* gjs_context_get_native_context (GjsContext *js_context); | ||||
/* initial_frame is a JSStackFrame, but cannot be exposed as such in the | GjsContext *gjs_context_get_current (void); | |||
public API. Pass NULL to get the topmost frame. | void gjs_context_make_current (GjsContext *js_context); | |||
*/ | ||||
void gjs_context_print_stack_to_buffer (GjsContext *js_context, | void* gjs_context_get_native_context (GjsContext *js_context); | |||
void *initial_fram | ||||
e, | ||||
GString *buf); | ||||
void gjs_context_print_stack_stderr (GjsContext *js_context); | void gjs_context_print_stack_stderr (GjsContext *js_context); | |||
void gjs_context_maybe_gc (GjsContext *context); | void gjs_context_maybe_gc (GjsContext *context); | |||
void gjs_context_gc (GjsContext *context); | void gjs_context_gc (GjsContext *context); | |||
void gjs_dumpstack (void); | void gjs_dumpstack (void); | |||
G_END_DECLS | G_END_DECLS | |||
End of changes. 2 change blocks. | ||||
8 lines changed or deleted | 4 lines changed or added | |||
enumeration.h | enumeration.h | |||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
#include <girepository.h> | #include <girepository.h> | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_define_enum_values (JSContext *context, | JSBool gjs_define_enum_values (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIEnumInfo *info); | GIEnumInfo *info); | |||
JSBool gjs_define_enumeration (JSContext *context, | JSBool gjs_define_enumeration (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIEnumInfo *info, | GIEnumInfo *info); | |||
JSObject **enumeration_p); | ||||
JSObject* gjs_lookup_enumeration (JSContext *context, | JSObject* gjs_lookup_enumeration (JSContext *context, | |||
GIEnumInfo *info); | GIEnumInfo *info); | |||
G_END_DECLS | G_END_DECLS | |||
#endif /* __GJS_ENUMERATION_H__ */ | #endif /* __GJS_ENUMERATION_H__ */ | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added | |||
gerror.h | gerror.h | |||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
#ifndef __GJS_ERROR_H__ | #ifndef __GJS_ERROR_H__ | |||
#define __GJS_ERROR_H__ | #define __GJS_ERROR_H__ | |||
#include <glib.h> | #include <glib.h> | |||
#include <girepository.h> | #include <girepository.h> | |||
#include "gjs/jsapi-util.h" | #include "gjs/jsapi-util.h" | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_define_error_class (JSContext *context, | void gjs_define_error_class (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIEnumInfo *info, | ||||
JSObject **constructor_ | ||||
p, | ||||
JSObject **prototype_p) | ||||
; | ||||
JSObject* gjs_lookup_error_constructor (JSContext *context, | ||||
GIEnumInfo *info); | ||||
JSObject* gjs_lookup_error_prototype (JSContext *context, | ||||
GIEnumInfo *info); | ||||
JSClass* gjs_lookup_error_class (JSContext *context, | ||||
GIEnumInfo *info); | GIEnumInfo *info); | |||
GError* gjs_gerror_from_error (JSContext *context, | GError* gjs_gerror_from_error (JSContext *context, | |||
JSObject *obj); | JSObject *obj); | |||
JSObject* gjs_error_from_gerror (JSContext *context, | JSObject* gjs_error_from_gerror (JSContext *context, | |||
GError *gerror, | GError *gerror, | |||
gboolean add_stack); | gboolean add_stack); | |||
JSBool gjs_typecheck_gerror (JSContext *context, | JSBool gjs_typecheck_gerror (JSContext *context, | |||
JSObject *obj, | JSObject *obj, | |||
JSBool throw); | JSBool throw); | |||
End of changes. 2 change blocks. | ||||
11 lines changed or deleted | 1 lines changed or added | |||
gjs-module.h | gjs-module.h | |||
---|---|---|---|---|
skipping to change at line 31 | skipping to change at line 31 | |||
* IN THE SOFTWARE. | * IN THE SOFTWARE. | |||
*/ | */ | |||
#ifndef __GJS_GJS_MODULE_H__ | #ifndef __GJS_GJS_MODULE_H__ | |||
#define __GJS_GJS_MODULE_H__ | #define __GJS_GJS_MODULE_H__ | |||
#include <gjs/gjs.h> | #include <gjs/gjs.h> | |||
#include <gjs/native.h> | #include <gjs/native.h> | |||
#include <gjs/mem.h> | #include <gjs/mem.h> | |||
#include <gjs/importer.h> | #include <gjs/importer.h> | |||
#include <gjs/runtime.h> | ||||
#include <gjs/jsapi-util.h> | #include <gjs/jsapi-util.h> | |||
#endif /* __GJS_GJS_umodule_H__ */ | #endif /* __GJS_GJS_umodule_H__ */ | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
importer.h | importer.h | |||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
#include <glib.h> | #include <glib.h> | |||
#include "gjs/jsapi-util.h" | #include "gjs/jsapi-util.h" | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_create_root_importer (JSContext *context, | JSBool gjs_create_root_importer (JSContext *context, | |||
const char **initial_search_path, | const char **initial_search_path, | |||
gboolean add_standard_search_path); | gboolean add_standard_search_path); | |||
JSBool gjs_define_root_importer (JSContext *context, | JSBool gjs_define_root_importer (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object); | |||
const char *importer_name); | ||||
JSObject* gjs_define_importer (JSContext *context, | JSObject* gjs_define_importer (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
const char *importer_name, | const char *importer_name, | |||
const char **initial_search_path, | const char **initial_search_path, | |||
gboolean add_standard_search_path); | gboolean add_standard_search_path); | |||
G_END_DECLS | G_END_DECLS | |||
#endif /* __GJS_IMPORTER_H__ */ | #endif /* __GJS_IMPORTER_H__ */ | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added | |||
interface.h | interface.h | |||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
#define __GJS_INTERFACE_H__ | #define __GJS_INTERFACE_H__ | |||
#include <glib.h> | #include <glib.h> | |||
#include <girepository.h> | #include <girepository.h> | |||
#include "gjs/jsapi-util.h" | #include "gjs/jsapi-util.h" | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_define_interface_class (JSContext *context, | JSBool gjs_define_interface_class (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIInterfaceInfo *info, | GIInterfaceInfo *info); | |||
JSObject **prototype_p); | ||||
G_END_DECLS | G_END_DECLS | |||
#endif /* __GJS_INTERFACE_H__ */ | #endif /* __GJS_INTERFACE_H__ */ | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added | |||
jsapi-util.h | jsapi-util.h | |||
---|---|---|---|---|
skipping to change at line 32 | skipping to change at line 32 | |||
*/ | */ | |||
#ifndef __GJS_JSAPI_UTIL_H__ | #ifndef __GJS_JSAPI_UTIL_H__ | |||
#define __GJS_JSAPI_UTIL_H__ | #define __GJS_JSAPI_UTIL_H__ | |||
#if !defined (__GJS_GJS_MODULE_H__) && !defined (GJS_COMPILATION) | #if !defined (__GJS_GJS_MODULE_H__) && !defined (GJS_COMPILATION) | |||
#error "Only <gjs/gjs-module.h> can be included directly." | #error "Only <gjs/gjs-module.h> can be included directly." | |||
#endif | #endif | |||
#include <gjs/compat.h> | #include <gjs/compat.h> | |||
#include <gjs/runtime.h> | ||||
#include <glib-object.h> | #include <glib-object.h> | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
#define GJS_UTIL_ERROR gjs_util_error_quark () | #define GJS_UTIL_ERROR gjs_util_error_quark () | |||
GQuark gjs_util_error_quark (void); | GQuark gjs_util_error_quark (void); | |||
enum { | enum { | |||
GJS_UTIL_ERROR_NONE, | GJS_UTIL_ERROR_NONE, | |||
GJS_UTIL_ERROR_ARGUMENT_INVALID, | GJS_UTIL_ERROR_ARGUMENT_INVALID, | |||
GJS_UTIL_ERROR_ARGUMENT_UNDERFLOW, | GJS_UTIL_ERROR_ARGUMENT_UNDERFLOW, | |||
GJS_UTIL_ERROR_ARGUMENT_OVERFLOW, | GJS_UTIL_ERROR_ARGUMENT_OVERFLOW, | |||
GJS_UTIL_ERROR_ARGUMENT_TYPE_MISMATCH | GJS_UTIL_ERROR_ARGUMENT_TYPE_MISMATCH | |||
}; | }; | |||
typedef enum { | ||||
GJS_GLOBAL_SLOT_IMPORTS, | ||||
GJS_GLOBAL_SLOT_KEEP_ALIVE, | ||||
GJS_GLOBAL_SLOT_LAST, | ||||
} GjsGlobalSlot; | ||||
typedef struct GjsRootedArray GjsRootedArray; | typedef struct GjsRootedArray GjsRootedArray; | |||
/* Flags that should be set on properties exported from native code modules . | /* Flags that should be set on properties exported from native code modules . | |||
* Basically set these on API, but do NOT set them on data. | * Basically set these on API, but do NOT set them on data. | |||
* | * | |||
* READONLY: forbid setting prop to another value | * READONLY: forbid setting prop to another value | |||
* PERMANENT: forbid deleting the prop | * PERMANENT: forbid deleting the prop | |||
* ENUMERATE: allows copyProperties to work among other reasons to have it | * ENUMERATE: allows copyProperties to work among other reasons to have it | |||
*/ | */ | |||
#define GJS_MODULE_PROP_FLAGS (JSPROP_PERMANENT | JSPROP_ENUMERATE) | #define GJS_MODULE_PROP_FLAGS (JSPROP_PERMANENT | JSPROP_ENUMERATE) | |||
skipping to change at line 125 | skipping to change at line 132 | |||
* A convenience macro for prototype implementations. | * A convenience macro for prototype implementations. | |||
* Similar to GJS_DEFINE_PROTO but marks the prototype as abstract, | * Similar to GJS_DEFINE_PROTO but marks the prototype as abstract, | |||
* you won't be able to instantiate it using the new keyword | * you won't be able to instantiate it using the new keyword | |||
*/ | */ | |||
#define GJS_DEFINE_PROTO_ABSTRACT(tn, cn) \ | #define GJS_DEFINE_PROTO_ABSTRACT(tn, cn) \ | |||
_GJS_DEFINE_PROTO_FULL(tn, cn, NULL) | _GJS_DEFINE_PROTO_FULL(tn, cn, NULL) | |||
#define _GJS_DEFINE_PROTO_FULL(type_name, cname, ctor) \ | #define _GJS_DEFINE_PROTO_FULL(type_name, cname, ctor) \ | |||
static JSPropertySpec gjs_##cname##_proto_props[]; \ | static JSPropertySpec gjs_##cname##_proto_props[]; \ | |||
static JSFunctionSpec gjs_##cname##_proto_funcs[]; \ | static JSFunctionSpec gjs_##cname##_proto_funcs[]; \ | |||
static void gjs_##cname##_finalize(JSContext *context, JSObject *obj); \ | static void gjs_##cname##_finalize(JSFreeOp *fop, JSObject *obj); \ | |||
static JSBool gjs_##cname##_new_resolve(JSContext *context, \ | static JSBool gjs_##cname##_new_resolve(JSContext *context, \ | |||
JSObject *obj, \ | JSObject *obj, \ | |||
jsval id, \ | jsval id, \ | |||
unsigned flags, \ | unsigned flags, \ | |||
JSObject **objp) \ | JSObject **objp) \ | |||
{ \ | { \ | |||
return JS_TRUE; \ | return JS_TRUE; \ | |||
} \ | } \ | |||
static struct JSClass gjs_##cname##_class = { \ | static struct JSClass gjs_##cname##_class = { \ | |||
type_name, \ | type_name, \ | |||
skipping to change at line 148 | skipping to change at line 155 | |||
JS_PropertyStub, \ | JS_PropertyStub, \ | |||
JS_PropertyStub, \ | JS_PropertyStub, \ | |||
JS_PropertyStub, \ | JS_PropertyStub, \ | |||
JS_StrictPropertyStub, \ | JS_StrictPropertyStub, \ | |||
JS_EnumerateStub,\ | JS_EnumerateStub,\ | |||
(JSResolveOp) gjs_##cname##_new_resolve, \ | (JSResolveOp) gjs_##cname##_new_resolve, \ | |||
JS_ConvertStub, \ | JS_ConvertStub, \ | |||
gjs_##cname##_finalize, \ | gjs_##cname##_finalize, \ | |||
NULL, \ | NULL, \ | |||
NULL, \ | NULL, \ | |||
NULL, \ | NULL, NULL, NULL \ | |||
NULL, NULL, NULL, NULL, NULL \ | ||||
}; \ | }; \ | |||
jsval gjs_##cname##_create_proto(JSContext *context, JSObject *module, cons t char *proto_name, JSObject *parent) \ | jsval gjs_##cname##_create_proto(JSContext *context, JSObject *module, cons t char *proto_name, JSObject *parent) \ | |||
{ \ | { \ | |||
jsval rval; \ | jsval rval; \ | |||
JSObject *global = gjs_get_import_global(context); \ | JSObject *global = gjs_get_import_global(context); \ | |||
if (!gjs_object_get_property(context, global, \ | jsid class_name = gjs_intern_string_to_id(context, gjs_##cname##_class. | |||
gjs_##cname##_class.name, &rval)) { \ | name); \ | |||
if (!JS_GetPropertyById(context, global, class_name, &rval)) | ||||
\ | ||||
return JSVAL_NULL; \ | ||||
if (JSVAL_IS_VOID(rval)) { \ | ||||
JSObject *prototype = JS_InitClass(context, global, \ | JSObject *prototype = JS_InitClass(context, global, \ | |||
parent, \ | parent, \ | |||
&gjs_##cname##_class, \ | &gjs_##cname##_class, \ | |||
ctor, \ | ctor, \ | |||
0, \ | 0, \ | |||
&gjs_##cname##_proto_props[0], \ | &gjs_##cname##_proto_props[0], \ | |||
&gjs_##cname##_proto_funcs[0], \ | &gjs_##cname##_proto_funcs[0], \ | |||
NULL, \ | NULL, \ | |||
NULL); \ | NULL); \ | |||
if (prototype == NULL) { \ | if (prototype == NULL) { \ | |||
return JSVAL_NULL; \ | return JSVAL_NULL; \ | |||
} \ | } \ | |||
if (!gjs_object_require_property( \ | if (!gjs_object_require_property( \ | |||
context, global, NULL, \ | context, global, NULL, \ | |||
gjs_##cname##_class.name, &rval)) { \ | class_name, &rval)) { \ | |||
return JSVAL_NULL; \ | return JSVAL_NULL; \ | |||
} \ | } \ | |||
if (!JS_DefineProperty(context, module, proto_name, \ | if (!JS_DefineProperty(context, module, proto_name, \ | |||
rval, NULL, NULL, GJS_MODULE_PROP_FLAGS)) \ | rval, NULL, NULL, GJS_MODULE_PROP_FLAGS)) \ | |||
return JSVAL_NULL; \ | return JSVAL_NULL; \ | |||
} \ | } \ | |||
return rval; \ | return rval; \ | |||
} | } | |||
gboolean gjs_init_context_standard (JSContext *context); | gboolean gjs_init_context_standard (JSContext *context); | |||
JSContext* gjs_runtime_get_context (JSRuntime *runtime); | ||||
JSObject* gjs_get_import_global (JSContext *context); | JSObject* gjs_get_import_global (JSContext *context); | |||
gboolean gjs_object_has_property (JSContext *context, | ||||
JSObject *obj, | jsval gjs_get_global_slot (JSContext *context, | |||
const char *property_nam | GjsGlobalSlot slot); | |||
e); | void gjs_set_global_slot (JSContext *context, | |||
gboolean gjs_object_get_property (JSContext *context, | GjsGlobalSlot slot, | |||
JSObject *obj, | jsval value); | |||
const char *property_nam | ||||
e, | ||||
jsval *value_p); | ||||
gboolean gjs_object_require_property (JSContext *context, | gboolean gjs_object_require_property (JSContext *context, | |||
JSObject *obj, | JSObject *obj, | |||
const char *obj_descript ion, | const char *obj_descript ion, | |||
const char *property_nam | jsid property_nam | |||
e, | e, | |||
jsval *value_p); | ||||
/* This one is defined in runtime.c, so the compiler can optimize the call | ||||
to get_const_string() it uses. */ | ||||
gboolean gjs_object_get_property_const (JSContext *context, | ||||
JSObject *obj, | ||||
GjsConstString property_nam | ||||
e, | ||||
jsval *value_p); | jsval *value_p); | |||
JSObject *gjs_new_object_for_constructor (JSContext *context, | JSObject *gjs_new_object_for_constructor (JSContext *context, | |||
JSClass *clasp, | JSClass *clasp, | |||
jsval *vp); | jsval *vp); | |||
JSBool gjs_init_class_dynamic (JSContext *context, | JSBool gjs_init_class_dynamic (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
JSObject *parent_proto , | JSObject *parent_proto , | |||
const char *ns_name, | const char *ns_name, | |||
const char *class_name, | const char *class_name, | |||
skipping to change at line 245 | skipping to change at line 258 | |||
const char *format, | const char *format, | |||
...) G_GNUC_PRINTF (2, 3); | ...) G_GNUC_PRINTF (2, 3); | |||
void gjs_throw_custom (JSContext *context, | void gjs_throw_custom (JSContext *context, | |||
const char *error_class, | const char *error_class, | |||
const char *format, | const char *format, | |||
...) G_GNUC_PRINTF (3, 4); | ...) G_GNUC_PRINTF (3, 4); | |||
void gjs_throw_literal (JSContext *context, | void gjs_throw_literal (JSContext *context, | |||
const char *string); | const char *string); | |||
void gjs_throw_g_error (JSContext *context, | void gjs_throw_g_error (JSContext *context, | |||
GError *error); | GError *error); | |||
JSBool gjs_log_exception (JSContext *context, | ||||
char **message_p); | JSBool gjs_log_exception (JSContext *context); | |||
JSBool gjs_log_and_keep_exception (JSContext *context, | JSBool gjs_log_and_keep_exception (JSContext *context); | |||
char **message_p); | ||||
JSBool gjs_move_exception (JSContext *src_context, | JSBool gjs_move_exception (JSContext *src_context, | |||
JSContext *dest_context ); | JSContext *dest_context ); | |||
void gjs_log_exception_props (JSContext *context, | JSBool gjs_log_exception_full (JSContext *context, | |||
jsval exc); | jsval exc, | |||
JSString *message); | ||||
#ifdef __GJS_UTIL_LOG_H__ | #ifdef __GJS_UTIL_LOG_H__ | |||
void gjs_log_object_props (JSContext *context, | void gjs_log_object_props (JSContext *context, | |||
JSObject *obj, | JSObject *obj, | |||
GjsDebugTopic topic, | GjsDebugTopic topic, | |||
const char *prefix); | const char *prefix); | |||
#endif | #endif | |||
char* gjs_value_debug_string (JSContext *context, | char* gjs_value_debug_string (JSContext *context, | |||
jsval value); | jsval value); | |||
void gjs_explain_scope (JSContext *context, | void gjs_explain_scope (JSContext *context, | |||
const char *title); | const char *title); | |||
skipping to change at line 310 | skipping to change at line 324 | |||
const char *filename_str ing, | const char *filename_str ing, | |||
gssize n_bytes, | gssize n_bytes, | |||
jsval *value_p); | jsval *value_p); | |||
JSBool gjs_string_get_uint16_data (JSContext *context, | JSBool gjs_string_get_uint16_data (JSContext *context, | |||
jsval value, | jsval value, | |||
guint16 **data_p, | guint16 **data_p, | |||
gsize *len_p); | gsize *len_p); | |||
JSBool gjs_get_string_id (JSContext *context, | JSBool gjs_get_string_id (JSContext *context, | |||
jsid id, | jsid id, | |||
char **name_p); | char **name_p); | |||
jsid gjs_intern_string_to_id (JSContext *context, | ||||
const char *string); | ||||
gboolean gjs_unichar_from_string (JSContext *context, | gboolean gjs_unichar_from_string (JSContext *context, | |||
jsval string, | jsval string, | |||
gunichar *result); | gunichar *result); | |||
const char* gjs_get_type_name (jsval value); | const char* gjs_get_type_name (jsval value); | |||
JSBool gjs_value_to_int64 (JSContext *context, | JSBool gjs_value_to_int64 (JSContext *context, | |||
const jsval val, | const jsval val, | |||
gint64 *result); | gint64 *result); | |||
skipping to change at line 364 | skipping to change at line 380 | |||
/* Functions intended for more "internal" use */ | /* Functions intended for more "internal" use */ | |||
void gjs_maybe_gc (JSContext *context); | void gjs_maybe_gc (JSContext *context); | |||
void gjs_enter_gc (void); | void gjs_enter_gc (void); | |||
void gjs_leave_gc (void); | void gjs_leave_gc (void); | |||
gboolean gjs_try_block_gc (void); | gboolean gjs_try_block_gc (void); | |||
void gjs_block_gc (void); | void gjs_block_gc (void); | |||
void gjs_unblock_gc (void); | void gjs_unblock_gc (void); | |||
JSBool gjs_context_get_frame_info (JSContext *context, | ||||
jsval *stack, | ||||
jsval *fileName, | ||||
jsval *lineNumber); | ||||
G_END_DECLS | G_END_DECLS | |||
#endif /* __GJS_JSAPI_UTIL_H__ */ | #endif /* __GJS_JSAPI_UTIL_H__ */ | |||
End of changes. 13 change blocks. | ||||
24 lines changed or deleted | 46 lines changed or added | |||
keep-alive.h | keep-alive.h | |||
---|---|---|---|---|
skipping to change at line 75 | skipping to change at line 75 | |||
void *data ); | void *data ); | |||
JSObject* gjs_keep_alive_get_global (JSContext *cont ext); | JSObject* gjs_keep_alive_get_global (JSContext *cont ext); | |||
void gjs_keep_alive_add_global_child (JSContext *cont ext, | void gjs_keep_alive_add_global_child (JSContext *cont ext, | |||
GjsUnrootedFunc notify , | GjsUnrootedFunc notify , | |||
JSObject *chil d, | JSObject *chil d, | |||
void *data ); | void *data ); | |||
void gjs_keep_alive_remove_global_child (JSContext *cont ext, | void gjs_keep_alive_remove_global_child (JSContext *cont ext, | |||
GjsUnrootedFunc notify , | GjsUnrootedFunc notify , | |||
JSObject *chil d, | JSObject *chil d, | |||
void *data ); | void *data ); | |||
JSObject* gjs_keep_alive_get_for_import_global (JSContext *conte xt); | ||||
G_END_DECLS | G_END_DECLS | |||
#endif /* __GJS_KEEP_ALIVE_H__ */ | #endif /* __GJS_KEEP_ALIVE_H__ */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 0 lines changed or added | |||
object.h | object.h | |||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
#ifndef __GJS_OBJECT_H__ | #ifndef __GJS_OBJECT_H__ | |||
#define __GJS_OBJECT_H__ | #define __GJS_OBJECT_H__ | |||
#include <glib.h> | #include <glib.h> | |||
#include <girepository.h> | #include <girepository.h> | |||
#include "gjs/jsapi-util.h" | #include "gjs/jsapi-util.h" | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_define_object_class (JSContext *context, | void gjs_define_object_class (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIObjectInfo *info, | ||||
GType gtype, | GType gtype, | |||
JSObject **constructor_p, | JSObject **constructor_p); | |||
JSObject **prototype_p); | ||||
JSObject* gjs_lookup_object_prototype (JSContext *context, | ||||
GType gtype); | ||||
JSObject* gjs_object_from_g_object (JSContext *context, | JSObject* gjs_object_from_g_object (JSContext *context, | |||
GObject *gobj); | GObject *gobj); | |||
GObject* gjs_g_object_from_object (JSContext *context, | GObject* gjs_g_object_from_object (JSContext *context, | |||
JSObject *obj); | JSObject *obj); | |||
JSBool gjs_typecheck_object (JSContext *context, | JSBool gjs_typecheck_object (JSContext *context, | |||
JSObject *obj, | JSObject *obj, | |||
GType expected_type, | GType expected_type, | |||
JSBool throw); | JSBool throw); | |||
void gjs_object_process_pending_toggles (void); | void gjs_object_process_pending_toggles (void); | |||
End of changes. 3 change blocks. | ||||
5 lines changed or deleted | 3 lines changed or added | |||
param.h | param.h | |||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
#ifndef __GJS_PARAM_H__ | #ifndef __GJS_PARAM_H__ | |||
#define __GJS_PARAM_H__ | #define __GJS_PARAM_H__ | |||
#include <glib.h> | #include <glib.h> | |||
#include <girepository.h> | #include <girepository.h> | |||
#include "gjs/jsapi-util.h" | #include "gjs/jsapi-util.h" | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_define_param_class (JSContext *context, | void gjs_define_param_class (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object); | |||
JSObject **prototype_p); | ||||
GParamSpec* gjs_g_param_from_param (JSContext *context, | GParamSpec* gjs_g_param_from_param (JSContext *context, | |||
JSObject *obj); | JSObject *obj); | |||
JSObject* gjs_param_from_g_param (JSContext *context, | JSObject* gjs_param_from_g_param (JSContext *context, | |||
GParamSpec *param); | GParamSpec *param); | |||
JSBool gjs_typecheck_param (JSContext *context, | JSBool gjs_typecheck_param (JSContext *context, | |||
JSObject *obj, | JSObject *obj, | |||
GType expected_type, | GType expected_type, | |||
JSBool throw); | JSBool throw); | |||
JSObject* gjs_lookup_param_prototype (JSContext *context); | ||||
G_END_DECLS | G_END_DECLS | |||
#endif /* __GJS_PARAM_H__ */ | #endif /* __GJS_PARAM_H__ */ | |||
End of changes. 2 change blocks. | ||||
4 lines changed or deleted | 2 lines changed or added | |||
repo.h | repo.h | |||
---|---|---|---|---|
skipping to change at line 43 | skipping to change at line 43 | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_define_repo (JSContext *context, | JSBool gjs_define_repo (JSContext *context, | |||
JSObject *module_obj , | JSObject *module_obj , | |||
const char *name); | const char *name); | |||
const char* gjs_info_type_name (GIInfoType type); | const char* gjs_info_type_name (GIInfoType type); | |||
JSObject* gjs_lookup_private_namespace (JSContext *context); | JSObject* gjs_lookup_private_namespace (JSContext *context); | |||
JSObject* gjs_lookup_namespace_object (JSContext *context, | JSObject* gjs_lookup_namespace_object (JSContext *context, | |||
GIBaseInfo *info); | GIBaseInfo *info); | |||
JSObject* gjs_lookup_namespace_object_by_name (JSContext *context, | JSObject* gjs_lookup_namespace_object_by_name (JSContext *context, | |||
const char *name); | jsid name); | |||
JSObject* gjs_lookup_function_object (JSContext *context, | JSObject* gjs_lookup_function_object (JSContext *context, | |||
GIFunctionInfo *info); | GIFunctionInfo *info); | |||
JSObject * gjs_lookup_generic_prototype (JSContext *context, | ||||
GIBaseInfo *info); | ||||
JSBool gjs_define_info (JSContext *context, | JSBool gjs_define_info (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIBaseInfo *info); | GIBaseInfo *info); | |||
char* gjs_camel_from_hyphen (const char *hyphen_nam e); | char* gjs_camel_from_hyphen (const char *hyphen_nam e); | |||
char* gjs_hyphen_from_camel (const char *camel_name ); | char* gjs_hyphen_from_camel (const char *camel_name ); | |||
#if GJS_VERBOSE_ENABLE_GI_USAGE | #if GJS_VERBOSE_ENABLE_GI_USAGE | |||
void _gjs_log_info_usage(GIBaseInfo *info); | void _gjs_log_info_usage(GIBaseInfo *info); | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added | |||
union.h | union.h | |||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
#define __GJS_UNION_H__ | #define __GJS_UNION_H__ | |||
#include <glib.h> | #include <glib.h> | |||
#include <girepository.h> | #include <girepository.h> | |||
#include "gjs/jsapi-util.h" | #include "gjs/jsapi-util.h" | |||
G_BEGIN_DECLS | G_BEGIN_DECLS | |||
JSBool gjs_define_union_class (JSContext *context, | JSBool gjs_define_union_class (JSContext *context, | |||
JSObject *in_object, | JSObject *in_object, | |||
GIUnionInfo *info, | ||||
JSObject **constructor_p, | ||||
JSObject **prototype_p); | ||||
JSObject* gjs_lookup_union_constructor (JSContext *context, | ||||
GIUnionInfo *info); | ||||
JSObject* gjs_lookup_union_prototype (JSContext *context, | ||||
GIUnionInfo *info); | ||||
JSClass* gjs_lookup_union_class (JSContext *context, | ||||
GIUnionInfo *info); | GIUnionInfo *info); | |||
void* gjs_c_union_from_union (JSContext *context, | void* gjs_c_union_from_union (JSContext *context, | |||
JSObject *obj); | JSObject *obj); | |||
JSObject* gjs_union_from_c_union (JSContext *context, | JSObject* gjs_union_from_c_union (JSContext *context, | |||
GIUnionInfo *info, | GIUnionInfo *info, | |||
void *gboxed); | void *gboxed); | |||
JSBool gjs_typecheck_union (JSContext *context, | JSBool gjs_typecheck_union (JSContext *context, | |||
JSObject *obj, | JSObject *obj, | |||
GIStructInfo *expected_inf o, | GIStructInfo *expected_inf o, | |||
GType expected_typ e, | GType expected_typ e, | |||
End of changes. 1 change blocks. | ||||
8 lines changed or deleted | 0 lines changed or added | |||