• GtkAda for GTk4?

    From Andreas Almroth@21:1/5 to All on Sun Feb 13 07:32:23 2022
    Hi all,

    Looking at the excellent support for GTK in GtkAda over the past many years, which I have enjoyed using, I was looking for (aka googling) references to any initial thoughts/work on having GtkAda to also support GTK4.

    I know, GTK4 has only been "out" for little over a year, but it would be interesting to know if anyone considering doing this. I would be glad to participate, although with limited know-how of the inner workings of GtkAda, but at least testing perhaps.

    Kind regards
    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to Andreas Almroth on Sun Feb 13 17:46:04 2022
    On 2022-02-13 16:32, Andreas Almroth wrote:

    Looking at the excellent support for GTK in GtkAda over the past many years, which I have enjoyed using, I was looking for (aka googling) references to any initial thoughts/work on having GtkAda to also support GTK4.

    Well, knowing GTK's disastrous history it cannot be "also", it must be
    either 3 or 4. GTK 4 breaks basically everything one could ever think of.

    To me new features in GTK 4 do not look worth changing the API again,
    not even useful, just fancy stuff. It seems that GTK team keep on
    breaking the API rather out of fun than necessity. Instead of hardening
    the code. GTK 3 is still buggy as hell.

    Of course, at some point one will have to migrate, but how about sitting
    GTK 4 over and going straight to GTK 5? Unless they lose remaining users...

    I know, GTK4 has only been "out" for little over a year, but it would be interesting to know if anyone considering doing this. I would be glad to participate, although with limited know-how of the inner workings of GtkAda, but at least testing perhaps.

    GtkAda is maintained by AdaCore, so it is them to ask.

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to Andreas Almroth on Sun Feb 13 21:45:57 2022
    On 2022-02-13 21:26, Andreas Almroth wrote:

    Well, they might, but it is still based on C, which is easier to interface to from Ada, than say C++ (which I have found cumbersome).

    Absolutely. C API is a huge advantage. However GTK and stuff is
    monstrous, practically impossible to handle manually.

    GtkAda bindings are generated by a tool designed by AdaCore. This tool
    might require massive changes when migrating to GTK 4.

    I cannot speak for AdaCore, but I think any help will be welcome.

    Good luck.

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Almroth@21:1/5 to Dmitry A. Kazakov on Sun Feb 13 12:26:11 2022
    On Sunday, 13 February 2022 at 17:46:09 UTC+1, Dmitry A. Kazakov wrote:
    On 2022-02-13 16:32, Andreas Almroth wrote:

    Looking at the excellent support for GTK in GtkAda over the past many years, which I have enjoyed using, I was looking for (aka googling) references to any initial thoughts/work on having GtkAda to also support GTK4.
    Well, knowing GTK's disastrous history it cannot be "also", it must be either 3 or 4. GTK 4 breaks basically everything one could ever think of.


    True, their rationale is it makes it better :-)

    To me new features in GTK 4 do not look worth changing the API again,
    not even useful, just fancy stuff. It seems that GTK team keep on
    breaking the API rather out of fun than necessity. Instead of hardening
    the code. GTK 3 is still buggy as hell.


    Yes, when logging, one tend to get endless log entries on things that should not happen, but the application tends to functions, and one has learnt to work arounds the usual issues.

    Of course, at some point one will have to migrate, but how about sitting
    GTK 4 over and going straight to GTK 5? Unless they lose remaining users...

    Well, they might, but it is still based on C, which is easier to interface to from Ada, than say C++ (which I have found cumbersome). Most other GUI frameworks are based on C++, for instance QT. QTAda is as far as I know not maintained (I haven't seen
    much in a very long time).


    I know, GTK4 has only been "out" for little over a year, but it would be interesting to know if anyone considering doing this. I would be glad to participate, although with limited know-how of the inner workings of GtkAda, but at least testing
    perhaps.
    GtkAda is maintained by AdaCore, so it is them to ask.


    I could try my luck with them :-)

    Thanks
    /A

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Andreas Almroth on Sun Feb 13 22:35:44 2022
    On 13/02/2022 20:26, Andreas Almroth wrote:
    On Sunday, 13 February 2022 at 17:46:09 UTC+1, Dmitry A. Kazakov wrote:
    On 2022-02-13 16:32, Andreas Almroth wrote:

    Looking at the excellent support for GTK in GtkAda over the past many years, which I have enjoyed using, I was looking for (aka googling) references to any initial thoughts/work on having GtkAda to also support GTK4.
    Well, knowing GTK's disastrous history it cannot be "also", it must be
    either 3 or 4. GTK 4 breaks basically everything one could ever think of.


    It's almost like wxAda would've been better...

    Well, they might, but it is still based on C, which is easier to interface to from Ada, than say C++ (which I have found cumbersome). Most other GUI frameworks are based on C++, for instance QT. QTAda is as far as I know not maintained (I haven't seen
    much in a very long time).

    Can confirm, binding C++ is too easy to burn out on, having done so on
    wxAda.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Emmanuel Briot@21:1/5 to All on Sun Feb 13 23:46:01 2022
    GtkAda bindings are generated by a tool designed by AdaCore. This tool
    might require massive changes when migrating to GTK 4.

    I wrote that python script years ago, when the XML files that describe the gtk+ API were actually pretty bad type-wise.
    The script is full of special cases, and very ugly. I don't think anyone should use it as a basis for binding to gtk 4, it
    would likely be much better to restart from scratch. I believe the XML files have improved significantly since then, and
    are used by more languages bindings, too, so that could likely be simplified.

    Emmanuel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Almroth@21:1/5 to Luke A. Guest on Mon Feb 14 00:45:07 2022
    On Sunday, 13 February 2022 at 23:35:48 UTC+1, Luke A. Guest wrote:
    On 13/02/2022 20:26, Andreas Almroth wrote:
    On Sunday, 13 February 2022 at 17:46:09 UTC+1, Dmitry A. Kazakov wrote:
    On 2022-02-13 16:32, Andreas Almroth wrote:

    Looking at the excellent support for GTK in GtkAda over the past many years, which I have enjoyed using, I was looking for (aka googling) references to any initial thoughts/work on having GtkAda to also support GTK4.
    Well, knowing GTK's disastrous history it cannot be "also", it must be
    either 3 or 4. GTK 4 breaks basically everything one could ever think of. >>
    It's almost like wxAda would've been better...
    Well, they might, but it is still based on C, which is easier to interface to from Ada, than say C++ (which I have found cumbersome). Most other GUI frameworks are based on C++, for instance QT. QTAda is as far as I know not maintained (I haven't
    seen much in a very long time).
    Can confirm, binding C++ is too easy to burn out on, having done so on wxAda.

    First, I have to correct myself... Seems Leonid Dulman provides QT5 and QT6 support as part of Ada Studio (google qt6ada). Just saw another post on the adagorge.org re-design, and found QT that way...

    /A

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Almroth@21:1/5 to briot.e...@gmail.com on Mon Feb 14 00:47:53 2022
    On Monday, 14 February 2022 at 08:46:03 UTC+1, briot.e...@gmail.com wrote:
    GtkAda bindings are generated by a tool designed by AdaCore. This tool might require massive changes when migrating to GTK 4.
    I wrote that python script years ago, when the XML files that describe the gtk+ API were actually pretty bad type-wise.
    The script is full of special cases, and very ugly. I don't think anyone should use it as a basis for binding to gtk 4, it
    would likely be much better to restart from scratch. I believe the XML files have improved significantly since then, and
    are used by more languages bindings, too, so that could likely be simplified.

    Emmanuel

    Thanks Emmanuel for your input. Seems it indeed would be a larger effort, and as Dimitry states, perhaps one should wait for next major release. It will take some time in any event to create the interface binding.

    /A

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fernando Oleo Blanco@21:1/5 to All on Mon Feb 14 20:50:20 2022
    Am Sun, 13 Feb 2022 23:46:01 -0800 (PST)
    schrieb Emmanuel Briot <briot.emmanuel@gmail.com>:

    I wrote that python script years ago, when the XML files that
    describe the gtk+ API were actually pretty bad type-wise. The script
    is full of special cases, and very ugly. I don't think anyone should
    use it as a basis for binding to gtk 4, it would likely be much
    better to restart from scratch. I believe the XML files have improved significantly since then, and are used by more languages bindings,
    too, so that could likely be simplified.

    Emmanuel

    This may be worth mentioning...

    Fortran also has a GTK binding [1]. It is also autogenerated with a
    Python script. As far as I can remember, the change from GTK3 to 4 was
    not too big. It did obviously require changes and a bit of elbow
    grease, but they had GTK4 support as soon as it became official. The
    actual code is present here [2].

    This may serve as a comparison or reference for what may be needed. It
    is obvious that the Fortran people did have a different starting point
    and Fortran is a different language. I am just including it for
    reference.

    Cheers,
    Fer

    [1] https://github.com/vmagnin/gtk-fortran
    [2] https://github.com/vmagnin/gtk-fortran/tree/gtk4/src

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)