2003-12-12 Mike Kestner <mkestner@ximian.com>
* gnome/gnome-api.xml : regen'd * parser/gapi2xml.pl : handle typedef enum _foo foo; * parser/gapi-parser : support <exclude> elements in addition to <dir> and <file> to specify the sources to be parsed. svn path=/trunk/gtk-sharp/; revision=21081
This commit is contained in:
parent
74cc769b7f
commit
406320a945
4 changed files with 31 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-12-12 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
|
* gnome/gnome-api.xml : regen'd
|
||||||
|
* parser/gapi2xml.pl : handle typedef enum _foo foo;
|
||||||
|
* parser/gapi-parser : support <exclude> elements in addition to <dir>
|
||||||
|
and <file> to specify the sources to be parsed.
|
||||||
|
|
||||||
2003-12-12 Radek Doulik <rodo@ximian.com>
|
2003-12-12 Radek Doulik <rodo@ximian.com>
|
||||||
|
|
||||||
* gtk/Gtk.metadata: hide TextTag.Weight property and implement it
|
* gtk/Gtk.metadata: hide TextTag.Weight property and implement it
|
||||||
|
|
|
@ -6606,9 +6606,6 @@
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
</object>
|
</object>
|
||||||
<struct name="CanvasHacktextPriv" cname="GnomeCanvasHacktextPriv" opaque="true" />
|
|
||||||
</namespace>
|
|
||||||
<namespace name="Gnome" library="gnomeprintui-2-2">
|
|
||||||
<object name="GPAOptionMenu" cname="GPAOptionMenu" parent="GPAWidget">
|
<object name="GPAOptionMenu" cname="GPAOptionMenu" parent="GPAWidget">
|
||||||
<field cname="menu" type="GtkWidget*" />
|
<field cname="menu" type="GtkWidget*" />
|
||||||
<field cname="node" type="GPANode*" />
|
<field cname="node" type="GPANode*" />
|
||||||
|
@ -6703,5 +6700,6 @@
|
||||||
</parameters>
|
</parameters>
|
||||||
</constructor>
|
</constructor>
|
||||||
</object>
|
</object>
|
||||||
|
<struct name="CanvasHacktextPriv" cname="GnomeCanvasHacktextPriv" opaque="true" />
|
||||||
</namespace>
|
</namespace>
|
||||||
</api>
|
</api>
|
|
@ -49,24 +49,38 @@ for ($apinode = $root->firstChild; $apinode; $apinode = $apinode->nextSibling ()
|
||||||
}
|
}
|
||||||
|
|
||||||
my @files = ();
|
my @files = ();
|
||||||
|
my @realfiles = ();
|
||||||
|
my %excludes = ();
|
||||||
for ($srcnode = $nsnode->firstChild; $srcnode; $srcnode = $srcnode->nextSibling ()) {
|
for ($srcnode = $nsnode->firstChild; $srcnode; $srcnode = $srcnode->nextSibling ()) {
|
||||||
next if ($srcnode->nodeName ne "dir" && $srcnode->nodeName ne "file");
|
next if ($srcnode->nodeName ne "dir" && $srcnode->nodeName ne "file" && $srcnode->nodeName ne "exclude");
|
||||||
|
|
||||||
if ($srcnode->nodeName eq "dir") {
|
if ($srcnode->nodeName eq "dir") {
|
||||||
my ($dir);
|
my ($dir);
|
||||||
$dir = $srcnode->firstChild->nodeValue;
|
$dir = $srcnode->firstChild->nodeValue;
|
||||||
print "$dir\n";
|
print "<dir $dir> ";
|
||||||
system ("gapi_pp.pl $dir | gapi2xml.pl $ns $outfile.pre $lib");
|
@files = (@files, `ls $dir/*.c`);
|
||||||
|
@files = (@files, `ls $dir/*.h`);
|
||||||
} elsif ($srcnode->nodeName eq "file") {
|
} elsif ($srcnode->nodeName eq "file") {
|
||||||
|
$incfile = $srcnode->firstChild->nodeValue;
|
||||||
|
print "<file $incfile> ";
|
||||||
@files = (@files, $srcnode->firstChild->nodeValue);
|
@files = (@files, $srcnode->firstChild->nodeValue);
|
||||||
|
} elsif ($srcnode->nodeName eq "exclude") {
|
||||||
|
$excfile = $srcnode->firstChild->nodeValue;
|
||||||
|
print "<exclude $excfile> ";
|
||||||
|
$excludes{$srcnode->firstChild->nodeValue} = 1;
|
||||||
} else {
|
} else {
|
||||||
die "Unexpected source $srcnode->nodeName \n";
|
die "Unexpected source $srcnode->nodeName \n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
print "\n";
|
||||||
if ($#files >= 0) {
|
if ($#files >= 0) {
|
||||||
$pp_args = join (" ", @files);
|
foreach $file (@files) {
|
||||||
print "$pp_args\n";
|
chomp ($file);
|
||||||
|
@realfiles = (@realfiles, $file) if (!exists($excludes{$file}));
|
||||||
|
}
|
||||||
|
|
||||||
|
$pp_args = join (" ", @realfiles);
|
||||||
system ("gapi_pp.pl $pp_args | gapi2xml.pl $ns $outfile.pre $lib");
|
system ("gapi_pp.pl $pp_args | gapi2xml.pl $ns $outfile.pre $lib");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,8 @@ while ($line = <STDIN>) {
|
||||||
$types{$2} = $1;
|
$types{$2} = $1;
|
||||||
} elsif ($line =~ /typedef\s+(\w+)\s+(\**)(\w+);/) {
|
} elsif ($line =~ /typedef\s+(\w+)\s+(\**)(\w+);/) {
|
||||||
$types{$3} = $1 . $2;
|
$types{$3} = $1 . $2;
|
||||||
|
} elsif ($line =~ /typedef\s+enum\s+(\w+)\s+(\w+);/) {
|
||||||
|
$etypes{$1} = $2;
|
||||||
} elsif ($line =~ /(typedef\s+)?\benum\b/) {
|
} elsif ($line =~ /(typedef\s+)?\benum\b/) {
|
||||||
$edef = $line;
|
$edef = $line;
|
||||||
while ($line = <STDIN>) {
|
while ($line = <STDIN>) {
|
||||||
|
@ -167,9 +169,10 @@ while ($line = <STDIN>) {
|
||||||
|
|
||||||
foreach $cname (sort(keys(%edefs))) {
|
foreach $cname (sort(keys(%edefs))) {
|
||||||
$ecnt++;
|
$ecnt++;
|
||||||
|
$def = $edefs{$cname};
|
||||||
|
$cname = $etypes{$cname} if (exists($etypes{$cname}));
|
||||||
$enums{lc($cname)} = $cname;
|
$enums{lc($cname)} = $cname;
|
||||||
$enum_elem = addNameElem($ns_elem, 'enum', $cname, $ns);
|
$enum_elem = addNameElem($ns_elem, 'enum', $cname, $ns);
|
||||||
$def = $edefs{$cname};
|
|
||||||
if ($def =~ /=\s*1\s*<<\s*\d+/) {
|
if ($def =~ /=\s*1\s*<<\s*\d+/) {
|
||||||
$enum_elem->setAttribute('type', "flags");
|
$enum_elem->setAttribute('type', "flags");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue