-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompareDataFunc parameters have type nint #1180
Comments
Unfortunately I can't tell you the best way how to solve it as I'm not a GTK dev. So I don't know the alternatives. At least in regard to the API it is correct as it is: https://docs.gtk.org/glib/callback.CompareDataFunc.html Perhaps there could be some optimisation later on but this would need to be thought through carefully. There recently was a discussion. But I don't know the outcome of it. It would be great to see a C sample how to properly sort a column. From the docs I would think it should be a ColumnViewSorter. If I have sample I could take a look what is needed to make it work as this is the 2nd request for this. But I really need more information to keep things efficient for me. If I have to do all the GTK stuff myself I prefer to do other things with less overhead first. |
As Perhaps there could be some convenience API here to make life easier but then I would need to know more details: If you manage to get the But again without any support I'm currently not willing to invest my time into it. You can check out the milestones to see the roadmap. There are more than enough points for the coming months and probably years. So if you care to fundamentally improve the column sorter experience for GirCore let's do this together. I can support with GirCore details and support finding a solution but your part would be the analysis of the GTK column view sorter possibilities so I get an overview on how to do sorting with different c samples. Then I can verify what is needed to get it working and start working on it or even support you getting your hands dirty in GirCore if you care. |
I'd like to implement a Gtk.ColumnView with sortable columns.
One way to do this is to create a Gtk.CustomSorter object. To build one, I need to provide a CompareDataFunc, which is defined like this:
If the arguments a and b had type
object
, I could cast them to the appropriate type and perform my own comparison. But they have typenint
. Shouldn'tnint
beobject
here? Or is there some way (e.g. using unsafe code) that I can cast annint
to anobject
?The text was updated successfully, but these errors were encountered: