projects
/
gnome.introspection-doc-generator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introspect/NameSpace.js
[gnome.introspection-doc-generator]
/
Introspect
/
NameSpace.js
diff --git
a/Introspect/NameSpace.js
b/Introspect/NameSpace.js
index
3158093
..
6adab51
100644
(file)
--- a/
Introspect/NameSpace.js
+++ b/
Introspect/NameSpace.js
@@
-12,7
+12,6
@@
console = imports.console.console;
NameSpace = {
NameSpace = {
-
references : { },
references : { },
@@
-51,8
+50,8
@@
NameSpace = {
}
}
}
}
- var gi = GI.
I
Repository.get_default();
- var pth = GI.
I
Repository.get_search_path ();
+ var gi = GI.Repository.get_default();
+ var pth = GI.Repository.get_search_path ();
scanGir(pth[0]);
ret.sort();
scanGir(pth[0]);
ret.sort();
@@
-63,7
+62,7
@@
NameSpace = {
ns: function(ns) {
ns: function(ns) {
- var gi = GI.
I
Repository.get_default();
+ var gi = GI.Repository.get_default();
ret = {
titleType: 'Namespace',
ns: ns,
ret = {
titleType: 'Namespace',
ns: ns,
@@
-88,41
+87,42
@@
NameSpace = {
interfaces: [],
};
interfaces: [],
};
- for (var i=0; i < gi.get_n_infos (ns); i++ ) {
- var info = gi.get_info (ns, i);
-
+ for (var i=0; i < GI.Repository.get_n_infos (gi,ns); i++ ) {
+ var info = GI.Repository.get_info (gi, ns, i);
+ print("NAME: " + info.get_name());
+ continue;
var info_type = GI.base_info_get_type (info);
switch(info_type) {
var info_type = GI.base_info_get_type (info);
switch(info_type) {
- case GI.I
I
nfoType.OBJECT:
- ret.objects.push(
GI.base_info_get_name(info
));
- this.clsGatherInterfaces(ns ,
GI.base_info_get_name(info
));
+ case GI.InfoType.OBJECT:
+ ret.objects.push(
info.get_name(
));
+ this.clsGatherInterfaces(ns ,
info.get_name(
));
continue;
continue;
- case GI.I
I
nfoType.INTERFACE:
- ret.interfaces.push(
GI.base_info_get_name(info
));
+ case GI.InfoType.INTERFACE:
+ ret.interfaces.push(
info.get_name(
));
continue;
continue;
- case GI.I
I
nfoType.FUNCTION:
+ case GI.InfoType.FUNCTION:
new imports.Method.Method(info, ret, 'functions', []);
continue;
new imports.Method.Method(info, ret, 'functions', []);
continue;
- case GI.I
I
nfoType.CALLBACK:
+ case GI.InfoType.CALLBACK:
// new Introspect.Callback(info, ret, 'callbacks', []);
continue;
// new Introspect.Callback(info, ret, 'callbacks', []);
continue;
- case GI.I
I
nfoType.ENUM:
- case GI.I
I
nfoType.FLAGS:
- ret.enums.push(
GI.base_info_get_name(info
));
+ case GI.InfoType.ENUM:
+ case GI.InfoType.FLAGS:
+ ret.enums.push(
info.get_name(
));
continue;
continue;
- case GI.I
I
nfoType.STRUCT:
+ case GI.InfoType.STRUCT:
if (GI.struct_info_is_gtype_struct (info)) {
continue;
}
if (GI.struct_info_is_gtype_struct (info)) {
continue;
}
- ret.structs.push(
GI.base_info_get_name(info
));
+ ret.structs.push(
info.get_name(
));
continue;
continue;
- case GI.I
I
nfoType.UNION:
- ret.unions.push(
GI.base_info_get_name(info
));
+ case GI.InfoType.UNION:
+ ret.unions.push(
info.get_name(
));
continue;
continue;
- case GI.I
I
nfoType.CONSTANT:
+ case GI.InfoType.CONSTANT:
new imports.Constant.Constant(info, ret, 'values', []);
continue;
new imports.Constant.Constant(info, ret, 'values', []);
continue;
@@
-134,9
+134,9
@@
NameSpace = {
}
}
- var gi = GI.
I
Repository.get_default();
- var ver =
gi.get_version(
ns);
- var pth = GI.
I
Repository.get_search_path ();
+ var gi = GI.Repository.get_default();
+ var ver =
GI.Repository.get_version(gi,
ns);
+ var pth = GI.Repository.get_search_path ();
var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
//console.log(fn);
ret.gir_file = gir_path + '/'+ ns + '-' + ver + '.gir';
var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
//console.log(fn);
ret.gir_file = gir_path + '/'+ ns + '-' + ver + '.gir';
@@
-153,8
+153,9
@@
NameSpace = {
// called when you list the namespace
clsGatherInterfaces : function(ns, cls)
{
// called when you list the namespace
clsGatherInterfaces : function(ns, cls)
{
- var gi = GI.IRepository.get_default();
- var bb = gi.find_by_name(ns, cls);
+ // print("clsGatherInterfaces: " + ns + ", " + cls);
+ var gi = GI.Repository.get_default();
+ var bb = GI.Repository.find_by_name(gi,ns, cls);
var fullname = ns+'.'+cls;
this.ifaceList = this.ifaceList || { };
var fullname = ns+'.'+cls;
this.ifaceList = this.ifaceList || { };
@@
-163,7
+164,7
@@
NameSpace = {
var prop = GI.object_info_get_interface(bb,i);
var prop = GI.object_info_get_interface(bb,i);
- var add =
GI.base_info_get_namespace(prop) +'.' + GI.base_info_get_name(prop
);
+ var add =
prop.get_namespace() +'.' + prop.get_name(
);
this.ifaceList[add] = this.ifaceList[add] || [];
if (this.ifaceList[add].indexOf(fullname) < 0) {
this.ifaceList[add].push(fullname);
this.ifaceList[add] = this.ifaceList[add] || [];
if (this.ifaceList[add].indexOf(fullname) < 0) {
this.ifaceList[add].push(fullname);
@@
-179,7
+180,9
@@
NameSpace = {
doc : function(what) {
doc : function(what) {
+ print ("DOC: + " +what);
var ns = what.split('.').shift();
var ns = what.split('.').shift();
+ return '';
this.commentLoad(ns);
return typeof(this.comments[ns][what]) == 'undefined' ? '' : this.comments[ns][what];
this.commentLoad(ns);
return typeof(this.comments[ns][what]) == 'undefined' ? '' : this.comments[ns][what];
@@
-197,8
+200,8
@@
NameSpace = {
}
console.log("LOAD DOCS: " + ns);
}
console.log("LOAD DOCS: " + ns);
- var gi = GI.
I
Repository.get_default();
- var ver =
gi.get_version(
ns);
+ var gi = GI.Repository.get_default();
+ var ver =
GI.Repository.get_version(gi,
ns);
if (!ver) {
this.comments[ns] = {};
return;
if (!ver) {
this.comments[ns] = {};
return;
@@
-255,7
+258,7
@@
NameSpace = {
}
}
}
}
- var pth = GI.
I
Repository.get_search_path ();
+ var pth = GI.Repository.get_search_path ();
var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
@@
-288,7
+291,7
@@
NameSpace = {
return this.registry[ns +'.' + name];
}
return this.registry[ns +'.' + name];
}
-}
)
;
+};