-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Writing an auxiliary function that returns a null terminated array of C strings #278
Comments
Hi, I've not had much time to look at GTK-Fortran lately, and also I'm not really keen to get involved with GTK4. I think that would be semi-trivial. |
Hi James @jtappin string conversion functions don't depend on the GTK version, so such a function could be added in the I have noticed that in GLib there is that function: And I know that modern Fortran can support UTF8 (ISO/IEC 10646), but the standard says that it may be implemented or not by the compiler. |
Here is a patch to add an interface that will return an array of NULL terminated strings if CSTR argument is a 2-D allocatable array. I think that's actually how I originally did it, but changed it because test widgets want a single string with line feeds to separate the lines. P.S. Having a quick play about, I think that actually what I need for the automatic c→f converter is to use |
Thanks a lot @jtappin |
Some GTK functions expect a null terminated array of C strings. For example, in
examples/bazaar.f90
we have this piece of code forgtk_about_dialog_set_authors()
:It would be interesting to write in
src/gtk-sup.f90
an auxiliary function that returns such a null terminated array of C strings. It would be called byexamples/bazaar.f90
,examples/menubar.f90
andsrc/gtk-hl-dialog.f90
.The text was updated successfully, but these errors were encountered: