diff --git a/ChangeLog b/ChangeLog index 13f4eaf2d..b73aa0d21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-03-08 Mike Kestner + + * generator/ObjectGen.cs : ignore virtual_method elems for now. + * parser/gapi2xml.pl : parse the non-signal class methods and add as + virtual_method elements in the API xml + * */*-api.xml : regen + 2004-03-06 Gonzalo Paniagua Javier * glue/Makefile.am: diff --git a/atk/atk-api.xml b/atk/atk-api.xml index c7a4eadc9..92ec9d072 100644 --- a/atk/atk-api.xml +++ b/atk/atk-api.xml @@ -993,6 +993,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1116,6 +1141,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1220,6 +1317,15 @@ + + + + + + + + + @@ -1403,6 +1509,23 @@ + + + + + + + + + + + + + + + + + diff --git a/gda/gda-api.xml b/gda/gda-api.xml index 569ca50b0..1f2e61150 100644 --- a/gda/gda-api.xml +++ b/gda/gda-api.xml @@ -137,6 +137,15 @@ + + + + + + + + + @@ -242,6 +251,13 @@ + + + + + + + @@ -440,6 +456,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -767,6 +827,21 @@ + + + + + + + + + + + + + + + @@ -843,6 +918,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1081,6 +1213,12 @@ + + + + + + @@ -1190,6 +1328,13 @@ + + + + + + + diff --git a/gdk/gdk-api.xml b/gdk/gdk-api.xml index 5324659b8..0652a2def 100644 --- a/gdk/gdk-api.xml +++ b/gdk/gdk-api.xml @@ -639,6 +639,18 @@ + + + + + + + + + + + + @@ -757,6 +769,13 @@ + + + + + + + @@ -793,6 +812,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1096,6 +1235,22 @@ + + + + + + + + + + + + + + + + @@ -1322,6 +1477,12 @@ + + + + + + @@ -1470,6 +1631,12 @@ + + + + + + @@ -4071,6 +4238,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/generator/ObjectGen.cs b/generator/ObjectGen.cs index 876089b27..6bcbd7ec7 100644 --- a/generator/ObjectGen.cs +++ b/generator/ObjectGen.cs @@ -27,6 +27,7 @@ namespace GtkSharp.Generation { switch (node.Name) { case "field": case "callback": + case "virtual_method": Statistics.IgnoreCount++; break; diff --git a/glade/glade-api.xml b/glade/glade-api.xml index d4cbad451..5b504e3a2 100644 --- a/glade/glade-api.xml +++ b/glade/glade-api.xml @@ -67,6 +67,13 @@ + + + + + + + diff --git a/gnome/gnome-api.xml b/gnome/gnome-api.xml index 9f83e1733..d88072395 100644 --- a/gnome/gnome-api.xml +++ b/gnome/gnome-api.xml @@ -756,6 +756,23 @@ + + + + + + + + + + + + + + + + + @@ -1038,6 +1055,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6367,6 +6617,13 @@ + + + + + + + @@ -6447,6 +6704,14 @@ + + + + + + + + @@ -6574,6 +6839,12 @@ + + + + + + @@ -6688,6 +6959,12 @@ + + + + + + diff --git a/gnomedb/gnomedb-api.xml b/gnomedb/gnomedb-api.xml index 84b3db150..4e3cc8382 100644 --- a/gnomedb/gnomedb-api.xml +++ b/gnomedb/gnomedb-api.xml @@ -34,6 +34,13 @@ + + + + + + + @@ -117,6 +124,20 @@ + + + + + + + + + + + + + + @@ -215,6 +236,12 @@ + + + + + + @@ -238,6 +265,13 @@ + + + + + + + @@ -362,6 +396,12 @@ + + + + + + @@ -468,6 +508,20 @@ + + + + + + + + + + + + + + @@ -612,6 +666,13 @@ + + + + + + + @@ -760,6 +821,12 @@ + + + + + + diff --git a/gtk/gtk-api.xml b/gtk/gtk-api.xml index ce1be50cd..5969a1e21 100644 --- a/gtk/gtk-api.xml +++ b/gtk/gtk-api.xml @@ -1268,6 +1268,15 @@ + + + + + + + + + @@ -1371,6 +1380,12 @@ + + + + + + @@ -1397,6 +1412,12 @@ + + + + + + @@ -1663,6 +1684,24 @@ + + + + + + + + + + + + + + + + + + @@ -1850,6 +1889,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1927,6 +1990,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -2053,6 +2140,14 @@ + + + + + + + + @@ -2079,6 +2174,13 @@ + + + + + + + @@ -2103,6 +2205,13 @@ + + + + + + + @@ -2130,6 +2239,12 @@ + + + + + + @@ -2259,6 +2374,12 @@ + + + + + + @@ -2471,6 +2592,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2687,6 +2845,12 @@ + + + + + + @@ -2748,6 +2912,13 @@ + + + + + + + @@ -2931,6 +3102,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3208,6 +3415,13 @@ + + + + + + + @@ -3303,6 +3517,13 @@ + + + + + + + @@ -3412,6 +3633,12 @@ + + + + + + @@ -3714,6 +3941,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3839,6 +4120,13 @@ + + + + + + + @@ -3886,6 +4174,18 @@ + + + + + + + + + + + + @@ -4092,6 +4392,22 @@ + + + + + + + + + + + + + + + + @@ -4261,6 +4577,14 @@ + + + + + + + + @@ -4623,6 +4947,19 @@ + + + + + + + + + + + + + @@ -4730,6 +5067,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4907,6 +5271,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -5117,6 +5503,20 @@ + + + + + + + + + + + + + + @@ -5146,6 +5546,12 @@ + + + + + + @@ -5238,6 +5644,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -5299,6 +5725,12 @@ + + + + + + @@ -5523,6 +5955,19 @@ + + + + + + + + + + + + + @@ -5592,6 +6037,19 @@ + + + + + + + + + + + + + @@ -5621,6 +6079,12 @@ + + + + + + @@ -5672,6 +6136,13 @@ + + + + + + + @@ -5739,6 +6210,14 @@ + + + + + + + + @@ -5943,6 +6422,12 @@ + + + + + + @@ -6007,6 +6492,19 @@ + + + + + + + + + + + + + @@ -6165,6 +6663,14 @@ + + + + + + + + @@ -6239,6 +6745,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6830,6 +7527,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7311,6 +8054,15 @@ + + + + + + + + + @@ -7364,6 +8116,21 @@ + + + + + + + + + + + + + + + @@ -7540,6 +8307,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7866,6 +8676,12 @@ + + + + + + @@ -7940,6 +8756,13 @@ + + + + + + + @@ -8232,6 +9055,12 @@ + + + + + + @@ -8246,9 +9075,9 @@ @@ -8622,6 +9451,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9057,6 +9942,12 @@ + + + + + + @@ -9330,6 +10221,14 @@ + + + + + + + + @@ -9868,6 +10767,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10544,6 +11664,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/gtkhtml/gtkhtml-api.xml b/gtkhtml/gtkhtml-api.xml index 59adf97ce..d70e3b6fb 100644 --- a/gtkhtml/gtkhtml-api.xml +++ b/gtkhtml/gtkhtml-api.xml @@ -444,6 +444,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -889,6 +961,19 @@ + + + + + + + + + + + + + diff --git a/pango/pango-api.xml b/pango/pango-api.xml index 4fa4f0d77..a90ed6178 100644 --- a/pango/pango-api.xml +++ b/pango/pango-api.xml @@ -353,7 +353,7 @@ diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index c792e4748..98edd34e9 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -4,7 +4,7 @@ # # Author: Mike Kestner # -# 2001-2003 Mike Kestner, 2003 Novell, Inc. +# 2001-2003 Mike Kestner, 2003-2004 Novell, Inc. ############################################################## $debug=0; @@ -275,7 +275,7 @@ foreach $type (sort(keys(%ifaces))) { $classdef = $sdefs{$1} if ($ifacetype =~ /struct\s+(\w+)/); if ($initfunc) { - parseInitFunc($iface_el, $initfunc); + parseInitFunc($iface_el, $initfunc, 0); } else { warn "Don't have an init func for $inst.\n" if $debug; } @@ -323,7 +323,7 @@ foreach $type (sort(keys(%objects))) { # Get the props from the class_init func. if ($initfunc) { - parseInitFunc($obj_el, $initfunc); + parseInitFunc($obj_el, $initfunc, 1); } else { warn "Don't have an init func for $inst.\n" if $debug; } @@ -807,7 +807,6 @@ sub addSignalElem my ($spec, $class, $node) = @_; $spec =~ s/\n\s*//g; $class =~ s/\n\s*//g; - $sig_elem = $doc->createElement('signal'); $node->appendChild($sig_elem); @@ -848,10 +847,31 @@ sub addSignalElem if ($parms && ($parms ne "void")) { addParamsElem($sig_elem, split(/,/, $parms)); } + $class =~ s/;\s*\S+\s*\**\s*\(\*\s*$method\)\s*\(.*?\);//; } else { die "$method $class"; } +} +sub addVirtualMethods +{ + my ($class, $node) = @_; + $class =~ s/\n\s*//g; + + while ($class =~ /;\s*(\S+\s*\**)\s*\(\*\s*(\w+)\)\s*\((.*?)\);/) { + $ret = $1; $cname = $2; $parms = $3; + if ($cname !~ /reserved/) { + $vm_elem = $doc->createElement('virtual_method'); + $node->appendChild($vm_elem); + $vm_elem->setAttribute('name', StudlyCaps($cname)); + $vm_elem->setAttribute('cname', $cname); + addReturnElem($vm_elem, $ret); + if ($parms && ($parms ne "void")) { + addParamsElem($vm_elem, split(/,/, $parms)); + } + } + $class =~ s/;\s*\S+\s*\**\s*\(\*\s*\w+\)\s*\(.*?\);//; + } } sub addImplementsElem @@ -869,7 +889,7 @@ sub addImplementsElem sub parseInitFunc { - my ($obj_el, $initfunc) = @_; + my ($obj_el, $initfunc, $is_obj) = @_; my @init_lines = split (/\n/, $initfunc); @@ -897,6 +917,10 @@ sub parseInitFunc } $linenum++; } + + if ($is_obj) { + addVirtualMethods ($classdef, $obj_el); + } } sub parseTypeFunc