Skip to content
Discussion options

You must be logged in to vote

This is what a list actually is: https://docs.gtk.org/glib/struct.List.html

There is currently no additional support to retrieve the things inside the list in a convenient way. The related issue is: #588 which is planned for version 0.11.0.

If you know that inside the list is some GObject you can call some internal API to work around this problem:

var obj = GObject.Internal.InstanceWrapper.WrapHandle<ExpectedType>(ptrfromlist, false);
alternatively you can call and should be able to see what is inside the object and cast it accordingly:
var obj = GObject.Internal.InstanceWrapper.WrapHandle<GObject.Object>(ptrfromlist, false);

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gnomeimprovement
Comment options

@badcel
Comment options

Answer selected by badcel
@gnomeimprovement
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants