From d1dbdf0316e5892f44f58bc3440ed0568f851663 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 8 May 2008 23:23:49 +0000 Subject: [PATCH] 2008-05-08 Mike Kestner * atk/atk-api-2.12.raw: reparsed. * gdk/gdk-api-2.12.raw: reparsed. * gtk/gtk-api-2.12.raw: reparsed. * parser/gapi2xml.pl: fixes for signal and vm order needed for proper interface struct layout. [Fixes #386802] svn path=/trunk/gtk-sharp/; revision=102848 --- ChangeLog | 8 ++ atk/atk-api-2.12.raw | 328 +++++++++++++++++++++---------------------- gdk/gdk-api-2.12.raw | 14 +- gtk/gtk-api-2.12.raw | 300 +++++++++++++++++++-------------------- parser/gapi2xml.pl | 31 +++- 5 files changed, 353 insertions(+), 328 deletions(-) diff --git a/ChangeLog b/ChangeLog index d334a5f43..6103bb1be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-08 Mike Kestner + + * atk/atk-api-2.12.raw: reparsed. + * gdk/gdk-api-2.12.raw: reparsed. + * gtk/gtk-api-2.12.raw: reparsed. + * parser/gapi2xml.pl: fixes for signal and vm order needed for + proper interface struct layout. [Fixes #386802] + 2008-05-07 Stephane Delcroix * gtk/Object.custom: swap the event removing and destroy calls. diff --git a/atk/atk-api-2.12.raw b/atk/atk-api-2.12.raw index 43d44a437..3f7bfbe5a 100644 --- a/atk/atk-api-2.12.raw +++ b/atk/atk-api-2.12.raw @@ -358,13 +358,6 @@ - - - - - - - @@ -471,6 +464,13 @@ + + + + + + + @@ -572,24 +572,6 @@ - - - - - - - - - - - - - - - - - - @@ -629,6 +611,24 @@ + + + + + + + + + + + + + + + + + + @@ -783,13 +783,6 @@ - - - - - - - @@ -810,6 +803,13 @@ + + + + + + + @@ -912,12 +912,6 @@ - - - - - - @@ -964,6 +958,12 @@ + + + + + + @@ -1055,56 +1055,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1313,6 +1263,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1489,33 +1489,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1655,6 +1628,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1931,12 +1931,6 @@ - - - - - - @@ -1987,6 +1981,12 @@ + + + + + + @@ -2100,49 +2100,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2257,6 +2214,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdk/gdk-api-2.12.raw b/gdk/gdk-api-2.12.raw index 64e0f30cd..ebb582d22 100644 --- a/gdk/gdk-api-2.12.raw +++ b/gdk/gdk-api-2.12.raw @@ -674,13 +674,6 @@ - - - - - - - @@ -706,6 +699,13 @@ + + + + + + + diff --git a/gtk/gtk-api-2.12.raw b/gtk/gtk-api-2.12.raw index 794192975..d4eb29531 100644 --- a/gtk/gtk-api-2.12.raw +++ b/gtk/gtk-api-2.12.raw @@ -1775,47 +1775,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1924,6 +1883,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2210,28 +2210,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -2314,6 +2292,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -3547,6 +3547,13 @@ + + + + + + + @@ -3577,13 +3584,6 @@ - - - - - - - @@ -4646,33 +4646,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4721,6 +4694,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5575,6 +5575,12 @@ + + + + + + @@ -5585,12 +5591,6 @@ - - - - - - @@ -5796,13 +5796,6 @@ - - - - - - - @@ -5812,6 +5805,13 @@ + + + + + + + @@ -9661,14 +9661,6 @@ - - - - - - - - @@ -9690,6 +9682,14 @@ + + + + + + + + @@ -9948,6 +9948,16 @@ + + + + + + + + + + @@ -10027,16 +10037,6 @@ - - - - - - - - - - @@ -10320,12 +10320,6 @@ - - - - - - @@ -10342,6 +10336,12 @@ + + + + + + @@ -12005,6 +12005,13 @@ + + + + + + + @@ -12021,13 +12028,6 @@ - - - - - - - @@ -12549,9 +12549,6 @@ - - - @@ -12566,6 +12563,9 @@ + + + @@ -19131,12 +19131,6 @@ - - - - - - @@ -19144,6 +19138,12 @@ + + + + + + diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index 0368adcc4..2ed65f1ab 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -316,10 +316,10 @@ foreach $type (sort(keys(%ifaces))) { $classdef = $sdefs{$1} if ($ifacetype =~ /struct\s+(\w+)/); if ($initfunc) { - parseInitFunc($iface_el, $initfunc); + parseInitFunc($iface_el, $initfunc, $classdef); } else { warn "Don't have an init func for $inst.\n" if $debug; - addVirtualMethods ($classdef, $iface_el); + addVirtualMethods ($classdef, $classdef, $iface_el); } } @@ -371,7 +371,7 @@ foreach $type (sort(keys(%objects))) { # Get the props from the class_init func. if ($initfunc) { - parseInitFunc($obj_el, $initfunc); + parseInitFunc($obj_el, $initfunc, $classdef); } else { warn "Don't have an init func for $inst.\n" if $debug; } @@ -988,15 +988,30 @@ sub addSignalElem sub addVirtualMethods { - my ($class, $node) = @_; + my ($class, $orig_class, $node) = @_; $class =~ s/\n\s*//g; $class =~ s/\/\*.*?\*\///g; + my $idx = 0; + my $ins_sibling = $node->firstChild; + while ($ins_sibling && ($ins_sibling->nodeName eq "field" || $ins_sibling->nodeName eq "property")) { + $ins_sibling = $ins_sibling->nextSibling (); + } while ($class =~ /;\s*(G_CONST_RETURN\s+)?(\S+\s*\**)\s*\(\s*\*\s*(\w+)\)\s*\((.*?)\);/) { $ret = $1 . $2; $cname = $3; $parms = $4; + $orig_class =~ /;\s*(G_CONST_RETURN\s+)?(\S+\s*\**)\s*\(\s*\*\s*(\w+)\)\s*\((.*?)\);/; + while ($ins_sibling && $3 ne $cname) { + $ins_sibling = $ins_sibling->nextSibling (); + $orig_class =~ s/;(.*?\));/;/; + $orig_class =~ /;\s*(G_CONST_RETURN\s+)?(\S+\s*\**)\s*\(\s*\*\s*(\w+)\)\s*\((.*?)\);/; + } if ($cname !~ /reserved/) { $vm_elem = $doc->createElement('virtual_method'); - $node->appendChild($vm_elem); + if ($ins_sibling) { + $node->insertBefore($vm_elem, $ins_sibling); + } else { + $node->appendChild($vm_elem); + } $vm_elem->setAttribute('name', StudlyCaps($cname)); $vm_elem->setAttribute('cname', $cname); addReturnElem($vm_elem, $ret); @@ -1005,6 +1020,7 @@ sub addVirtualMethods } } $class =~ s/;\s*(G_CONST_RETURN\s+)?\S+\s*\**\s*\(\s*\*\s*\w+\)\s*\(.*?\);/;/; + $orig_class =~ s/;.*?\);/;/; } } @@ -1023,7 +1039,8 @@ sub addImplementsElem sub parseInitFunc { - my ($obj_el, $initfunc) = @_; + my ($obj_el, $initfunc, $classdef) = @_; + my $orig_classdef = $classdef; my @init_lines = split (/\n/, $initfunc); @@ -1059,7 +1076,7 @@ sub parseInitFunc $linenum++; } - addVirtualMethods ($classdef, $obj_el); + addVirtualMethods ($classdef, $orig_classdef, $obj_el); } sub parseTypeFuncMacro