mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 20:15:30 +00:00
2002-09-07 Rachel Hestilow <hestilow@ximian.com>
* parser/gapi2xml.pl: Add support for "fake struct" opaque types. * generator/StructBase.cs: Generate wrapper fields for opaque fields as well as pointer fields. * api/gdk-symbols.xml: Remove GdkAtom as it is now wrapped. svn path=/trunk/gtk-sharp/; revision=7311
This commit is contained in:
parent
e233ca8d49
commit
1f68bc999b
|
@ -1,3 +1,10 @@
|
||||||
|
2002-09-07 Rachel Hestilow <hestilow@ximian.com>
|
||||||
|
|
||||||
|
* parser/gapi2xml.pl: Add support for "fake struct" opaque types.
|
||||||
|
* generator/StructBase.cs: Generate wrapper fields for opaque
|
||||||
|
fields as well as pointer fields.
|
||||||
|
* api/gdk-symbols.xml: Remove GdkAtom as it is now wrapped.
|
||||||
|
|
||||||
2002-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
2002-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
||||||
|
|
||||||
* sample/DbClient/client.cs: updated to make it compile.
|
* sample/DbClient/client.cs: updated to make it compile.
|
||||||
|
|
|
@ -2343,6 +2343,18 @@
|
||||||
<field cname="override_redirect" type="gboolean"/>
|
<field cname="override_redirect" type="gboolean"/>
|
||||||
</struct>
|
</struct>
|
||||||
<alias name="XEvent" cname="GdkXEvent" type="void "/>
|
<alias name="XEvent" cname="GdkXEvent" type="void "/>
|
||||||
|
<struct name="Atom" cname="GdkAtom" opaque="true">
|
||||||
|
<method name="Intern" cname="gdk_atom_intern" shared="true">
|
||||||
|
<return-type type="GdkAtom"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="const-gchar*" name="atom_name"/>
|
||||||
|
<parameter type="gboolean" name="only_if_exists"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="Name" cname="gdk_atom_name">
|
||||||
|
<return-type type="gchar*"/>
|
||||||
|
</method>
|
||||||
|
</struct>
|
||||||
</namespace>
|
</namespace>
|
||||||
<namespace name="Gdk" library="gdk_pixbuf-2.0">
|
<namespace name="Gdk" library="gdk_pixbuf-2.0">
|
||||||
<enum name="Colorspace" cname="GdkColorspace" type="enum">
|
<enum name="Colorspace" cname="GdkColorspace" type="enum">
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<api>
|
<api>
|
||||||
<symbol type="simple" cname="GdkAtom" name="IntPtr"/>
|
|
||||||
<symbol type="manual" cname="GdkEvent" name="Gdk.Event"/>
|
<symbol type="manual" cname="GdkEvent" name="Gdk.Event"/>
|
||||||
</api>
|
</api>
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ namespace GtkSharp.Generation {
|
||||||
type = SymbolTable.GetCSType (c_type);
|
type = SymbolTable.GetCSType (c_type);
|
||||||
if (IsBit (field)) {
|
if (IsBit (field)) {
|
||||||
type = "uint";
|
type = "uint";
|
||||||
} else if (IsPointer (field) && type != "string") {
|
} else if ((IsPointer (field) || SymbolTable.IsOpaque (c_type)) && type != "string") {
|
||||||
type = "IntPtr";
|
type = "IntPtr";
|
||||||
name = "_";
|
name = "_";
|
||||||
} else if (SymbolTable.IsCallback (c_type)) {
|
} else if (SymbolTable.IsCallback (c_type)) {
|
||||||
|
|
|
@ -348,6 +348,15 @@ foreach $key (sort (keys (%types))) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# really, _really_ opaque structs that aren't even defined in sources. Lovely.
|
||||||
|
foreach $key (sort (keys (%ptrs))) {
|
||||||
|
next if $ptrs{$key} !~ /struct\s+(\w+)/;
|
||||||
|
$type = $1;
|
||||||
|
$struct_el = addNameElem ($ns_elem, 'struct', $key, $ns);
|
||||||
|
$struct_el->setAttribute('opaque', 'true');
|
||||||
|
$elem_table{lc($key)} = $struct_el;
|
||||||
|
}
|
||||||
|
|
||||||
addFuncElems();
|
addFuncElems();
|
||||||
|
|
||||||
# This should probably be done in a more generic way
|
# This should probably be done in a more generic way
|
||||||
|
|
Loading…
Reference in a new issue