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>
|
||||
|
||||
* gtk/Gtk.metadata: hide TextTag.Weight property and implement it
|
||||
|
|
|
@ -6606,9 +6606,6 @@
|
|||
</parameters>
|
||||
</method>
|
||||
</object>
|
||||
<struct name="CanvasHacktextPriv" cname="GnomeCanvasHacktextPriv" opaque="true" />
|
||||
</namespace>
|
||||
<namespace name="Gnome" library="gnomeprintui-2-2">
|
||||
<object name="GPAOptionMenu" cname="GPAOptionMenu" parent="GPAWidget">
|
||||
<field cname="menu" type="GtkWidget*" />
|
||||
<field cname="node" type="GPANode*" />
|
||||
|
@ -6703,5 +6700,6 @@
|
|||
</parameters>
|
||||
</constructor>
|
||||
</object>
|
||||
<struct name="CanvasHacktextPriv" cname="GnomeCanvasHacktextPriv" opaque="true" />
|
||||
</namespace>
|
||||
</api>
|
|
@ -49,24 +49,38 @@ for ($apinode = $root->firstChild; $apinode; $apinode = $apinode->nextSibling ()
|
|||
}
|
||||
|
||||
my @files = ();
|
||||
my @realfiles = ();
|
||||
my %excludes = ();
|
||||
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") {
|
||||
my ($dir);
|
||||
$dir = $srcnode->firstChild->nodeValue;
|
||||
print "$dir\n";
|
||||
system ("gapi_pp.pl $dir | gapi2xml.pl $ns $outfile.pre $lib");
|
||||
print "<dir $dir> ";
|
||||
@files = (@files, `ls $dir/*.c`);
|
||||
@files = (@files, `ls $dir/*.h`);
|
||||
} elsif ($srcnode->nodeName eq "file") {
|
||||
$incfile = $srcnode->firstChild->nodeValue;
|
||||
print "<file $incfile> ";
|
||||
@files = (@files, $srcnode->firstChild->nodeValue);
|
||||
} elsif ($srcnode->nodeName eq "exclude") {
|
||||
$excfile = $srcnode->firstChild->nodeValue;
|
||||
print "<exclude $excfile> ";
|
||||
$excludes{$srcnode->firstChild->nodeValue} = 1;
|
||||
} else {
|
||||
die "Unexpected source $srcnode->nodeName \n";
|
||||
}
|
||||
|
||||
}
|
||||
print "\n";
|
||||
if ($#files >= 0) {
|
||||
$pp_args = join (" ", @files);
|
||||
print "$pp_args\n";
|
||||
foreach $file (@files) {
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,8 @@ while ($line = <STDIN>) {
|
|||
$types{$2} = $1;
|
||||
} elsif ($line =~ /typedef\s+(\w+)\s+(\**)(\w+);/) {
|
||||
$types{$3} = $1 . $2;
|
||||
} elsif ($line =~ /typedef\s+enum\s+(\w+)\s+(\w+);/) {
|
||||
$etypes{$1} = $2;
|
||||
} elsif ($line =~ /(typedef\s+)?\benum\b/) {
|
||||
$edef = $line;
|
||||
while ($line = <STDIN>) {
|
||||
|
@ -167,9 +169,10 @@ while ($line = <STDIN>) {
|
|||
|
||||
foreach $cname (sort(keys(%edefs))) {
|
||||
$ecnt++;
|
||||
$def = $edefs{$cname};
|
||||
$cname = $etypes{$cname} if (exists($etypes{$cname}));
|
||||
$enums{lc($cname)} = $cname;
|
||||
$enum_elem = addNameElem($ns_elem, 'enum', $cname, $ns);
|
||||
$def = $edefs{$cname};
|
||||
if ($def =~ /=\s*1\s*<<\s*\d+/) {
|
||||
$enum_elem->setAttribute('type', "flags");
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue