-
Notifications
You must be signed in to change notification settings - Fork 2
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
GAccessor Module #6
Comments
The For I'm totally open to changing things, but here was my reasoning for not putting the autogenerated methods directly in
This all needs to be documented far better than it currently is... |
Ok thanks for explaining. For me it totally makes sense to group the autogenerated stuff in |
What would be an argument against wrapping Julia-friendly function names besides the time input of doing so? |
Sorry for my silence -- I've been busy. I will implement accessor functions like One thing that I think is clear is we won't be able to export all of these accessor functions because of name collisions with other packages. |
OK, this is now done and I just updated the docs. The vast majority of the accessor functions are not currently exported, but a lot of them could be. There's >500 of them so it seems a bit excessive to export all, and some will collide with other packages. So I'm inclined to export just the most important. Sound reasonable? If so, we should discuss which are the important ones. |
I think this is reasonable. One might even think about not exporting any of them. My main point was just to get rid of |
Apologies if this is an irrelevant point, but would wrapping these functions explicitly allow you to provide some protection against some of the c-stack corruption issues faced in GTK3 with certain calls? We faced issues with GtkCombo in particular, and never quite figured out what was causing it, opting to just lock the user away from it when it wasn't needed. It's also possible these issues are moot in GTK4, but I figured I'd ask for the sake of discussion. |
The autogenerated wrappers do some checks but are pretty much as unsafe as ccalls. I think it should be possible to create wrappers for GtkComboBox that are relatively safe to use, but I have no experience with that API in C. You might try looking for examples with the pygobject bindings... |
I would like to discuss the
GAccessor
orG_
module. Here are some thoughts/questions:G_
seems to be an unnecessary implementation detail. If its about namespacing, I would findGtk.set_...
more natural thanG_.set_...
.G_
but automatically create wrapper functions inGtk
, which handle the 1-based indexing. This should be doable with some macro-code-gen magic.get/set
in the name. It's somewhat unjulian but it helps making the connection to the C API.The text was updated successfully, but these errors were encountered: