2001-11-09 Mike Kestner <mkestner@speakeasy.net>
* codegen/defs-parse.pl : Now genning Window, AccelGroup, Bin, and GdkPixbuf classes to peel the csc error onion. Explicitly add GObject to the "exists ($objects{...})" branches, since GObject is a hard coded Class. svn path=/trunk/gtk-sharp/; revision=1314
This commit is contained in:
parent
1351a509e6
commit
200f01ad2d
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2001-11-09 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* codegen/defs-parse.pl : Now genning Window, AccelGroup, Bin, and
|
||||
GdkPixbuf classes to peel the csc error onion. Explicitly add GObject
|
||||
to the "exists ($objects{...})" branches, since GObject is a hard
|
||||
coded Class.
|
||||
|
||||
2001-11-08 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* codegen/defs-parse.pl : Build a structs hash and gen the structs
|
||||
|
|
|
@ -70,7 +70,7 @@ foreach $key (keys (%structs)) {
|
|||
}
|
||||
|
||||
foreach $key (keys (%objects)) {
|
||||
next if ($key !~ /GtkWindow\b|GtkAccelGroup|GtkBin\b/);
|
||||
next if ($key !~ /GdkPixbuf\b|GtkWindow\b|GtkAccelGroup|GtkBin\b/);
|
||||
gen_object (split (/\n/, $objects{$key}));
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ sub gen_prop ()
|
|||
$cname = $1;
|
||||
|
||||
$def =~ /prop-type "(\w+)/;
|
||||
if (exists ($objects{$1})) {
|
||||
if (exists ($objects{$1}) || ($1 =~ /GObject/)) {
|
||||
$sret = $maptypes{$1};
|
||||
$mret = "GLib.Object";
|
||||
} elsif (exists ($maptypes{$1})) {
|
||||
|
@ -413,7 +413,7 @@ sub gen_method
|
|||
$code .= "Marshal.PtrToStringAnsi($call)";
|
||||
} elsif ($mret eq "int") {
|
||||
$code .= "($sret) $call";
|
||||
} elsif (exists ($objects{$ret})) {
|
||||
} elsif (exists ($objects{$ret}) || ($ret =~ /GObject/)) {
|
||||
$code .= "($sret) GLib.Object.GetObject($call)";
|
||||
} else {
|
||||
die "Unexpected return type match $sret:$mret\n";
|
||||
|
@ -445,7 +445,8 @@ sub gen_param_strings
|
|||
$sig .= "$maptypes{$ptype} $pname";
|
||||
if ($maptypes{$ptype} eq $marshaltypes{$ptype}) {
|
||||
$call .= "$pname";
|
||||
} elsif (exists ($objects{$ptype})) {
|
||||
} elsif (exists ($objects{$ptype}) ||
|
||||
($ptype =~ /GObject/)) {
|
||||
$call .= "$pname.Handle";
|
||||
} elsif ($ptype =~ /gchar/) {
|
||||
$call .= "Marshal.StringToHGlobalAnsi($pname)";
|
||||
|
|
Loading…
Reference in a new issue