comp.lang.ada
 help / color / mirror / Atom feed
* GtkAda for GTk4?
@ 2022-02-13 15:32 Andreas Almroth
  2022-02-13 16:46 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Almroth @ 2022-02-13 15:32 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-13 15:32 GtkAda for GTk4? Andreas Almroth
@ 2022-02-13 16:46 ` Dmitry A. Kazakov
  2022-02-13 20:26   ` Andreas Almroth
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2022-02-13 16:46 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-13 16:46 ` Dmitry A. Kazakov
@ 2022-02-13 20:26   ` Andreas Almroth
  2022-02-13 20:45     ` Dmitry A. Kazakov
  2022-02-13 22:35     ` Luke A. Guest
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Almroth @ 2022-02-13 20:26 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-13 20:26   ` Andreas Almroth
@ 2022-02-13 20:45     ` Dmitry A. Kazakov
  2022-02-14  7:46       ` Emmanuel Briot
  2022-02-13 22:35     ` Luke A. Guest
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2022-02-13 20:45 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-13 20:26   ` Andreas Almroth
  2022-02-13 20:45     ` Dmitry A. Kazakov
@ 2022-02-13 22:35     ` Luke A. Guest
  2022-02-14  8:45       ` Andreas Almroth
  1 sibling, 1 reply; 9+ messages in thread
From: Luke A. Guest @ 2022-02-13 22:35 UTC (permalink / raw)


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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-13 20:45     ` Dmitry A. Kazakov
@ 2022-02-14  7:46       ` Emmanuel Briot
  2022-02-14  8:47         ` Andreas Almroth
  2022-02-14 19:50         ` Fernando Oleo Blanco
  0 siblings, 2 replies; 9+ messages in thread
From: Emmanuel Briot @ 2022-02-14  7:46 UTC (permalink / raw)


> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-13 22:35     ` Luke A. Guest
@ 2022-02-14  8:45       ` Andreas Almroth
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Almroth @ 2022-02-14  8:45 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-14  7:46       ` Emmanuel Briot
@ 2022-02-14  8:47         ` Andreas Almroth
  2022-02-14 19:50         ` Fernando Oleo Blanco
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Almroth @ 2022-02-14  8:47 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GtkAda for GTk4?
  2022-02-14  7:46       ` Emmanuel Briot
  2022-02-14  8:47         ` Andreas Almroth
@ 2022-02-14 19:50         ` Fernando Oleo Blanco
  1 sibling, 0 replies; 9+ messages in thread
From: Fernando Oleo Blanco @ 2022-02-14 19:50 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-02-14 19:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13 15:32 GtkAda for GTk4? Andreas Almroth
2022-02-13 16:46 ` Dmitry A. Kazakov
2022-02-13 20:26   ` Andreas Almroth
2022-02-13 20:45     ` Dmitry A. Kazakov
2022-02-14  7:46       ` Emmanuel Briot
2022-02-14  8:47         ` Andreas Almroth
2022-02-14 19:50         ` Fernando Oleo Blanco
2022-02-13 22:35     ` Luke A. Guest
2022-02-14  8:45       ` Andreas Almroth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox