[Gtk-sharp-list] LibGlade

Rachel Hestilow hestilow@ximian.com
13 Aug 2002 11:21:54 -0500


--=-SDG8szswbYTNht7Wp2xT
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Tue, 2002-08-13 at 07:01, Ricardo Fern=E1ndez Pascual wrote:
>=20
> > As for GList, I have talked with Duncan a bit on the best way to handle
> > G*List (marshalling requirements are a bit tricky here). The current
> > implementation is definitely a hack though.
>=20
> I'm just curious, what are those requirements? I can't think of anything
> apart of having a pointer (IntPtr) to the first element of the list. I
> could implement those classes.
>=20

The problem is that the "data" member is stored as a gpointer. I suspect
what we will have to do is give up on any hope of guaranteed typesafety
from that and just add a variety of casting-operator accessors for the
common data types. GObject data are easy enough to handle now that
introspection has hit CVS, but struct pointers will _never_ work (no way
for the list class to "sniff" the struct type), so the user will have to
use the StructName.New(IntPtr) construct.

If the lists are mutable, the marshalling situation becomes a lot
trickier because of the necessity of generating IntPtrs. Sometimes this
can be done with an IntPtr constructor, or unsafe code, but this is not
always possible with managed types.

-- Rachel



--=-SDG8szswbYTNht7Wp2xT
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA9WTIhapOJdUj74F4RAuZUAKCjh56yTrLw9ugpY7qBS5sweWFWbACffD/m
URwK/b0I3HrPxxaVj3wemf8=
=1B4e
-----END PGP SIGNATURE-----

--=-SDG8szswbYTNht7Wp2xT--