[Gtk-sharp-list] Does exist a C# Wrapper for the GNode struct
msanchez at igalia.com
Wed Feb 1 03:41:39 EST 2006
El mar, 31-01-2006 a las 10:34 -0500, Dan Winship escribió:
> There are two pieces to what you have to do: decide how you want to
> represent the GNodes in C#, and then tell that to GAPI.
> For the first part, it depends on whether or not you need to manipulate
> the GNodes from C#, or if you're just going to be treating them as
> opaque cookies that you receive from some methods and pass back to
> others. If you need to manipulate them, you'll need to create your own
> wrapper type for them in C#. Look at the way that GList is wrapped for
> some ideas, as well as the generated wrappers for a GLib.Opaque-based
> type like Gdk.Cursor. Another possibility would be to try running GAPI
> on gnode.h, and seeing what it comes up with. You might need to tweak it
> a bit before it's usable.
> On the other hand, if you don't need to ever actually use the GNodes
> from C#, then you could just map GNode* to IntPtr.
> Once you've decided what type to map it to (either your own wrapper
> type, or IntPtr), tell GAPI by using a symbols file, as explained at
> http://mono-project.com/GAPI#Symbols. (Use "simple" to map to IntPtr, or
> "manual" to map to an opaque type.)
Thanks a lot, I'll finally use the ItnPtr mapping as you've suggested
until I need to manage the GNode from my C# world. Then, if needed, I'll
make my own wrapper for it.
More information about the Gtk-sharp-list