Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2020-04

Completely solve the GTK trouble

9 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

jiaxing ruan

GTK changes too fast and our GTK3 binding is not updated. We don't have to resource to catch up GTK. I suggest we abandon the GTK3 and any later GTK version interface and instead create an IUP interface. IUP uses GTK underlying, so we don't miss anything. Our apps will look just like when they use the GTK widgetset. IUP focuses more on compatibility than GTK. Even software written for IUP 3.15 could easily compiled and run with IUP 3.27. IUP also has a permissive license. As far as I know IUP is as portable as Lazarus is, so we don't have to care about portability, too.

Let me see what's your thoughts.

With my ability I can only leave suggestion. I don't have the skill to do it myself nor the finance to hire someone else to do. But I think this is the most reasonable move for us.

p/s: We already has an IUP binding, also permissive licensed that we could fork and merge into Lazarus: https://github.com/ruanjiaxing/iup_pascal [https://avatars0.githubusercontent.com/u/62635950?s=400&v=4]<https://github.com/ruanjiaxing/iup_pascal> ruanjiaxing/iup_pascal<https://github.com/ruanjiaxing/iup_pascal> Pascal binding for Iup. Contribute to ruanjiaxing/iup_pascal development by creating an account on GitHub. github.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200414/02531544/attachment.html>

Reply by email

Sven Barth
to jiaxing ruan

jiaxing ruan via lazarus schrieb am Di.,
14. Apr. 2020, 05:59:

Show quoted text 15 lines
GTK changes too fast and our GTK3 binding is not updated. We don't have to resource to catch up GTK. I suggest we abandon the GTK3 and any later GTK version interface and instead create an IUP interface. IUP uses GTK underlying, so we don't miss anything. Our apps will look just like when they use the GTK widgetset. IUP focuses more on compatibility than GTK. Even software written for IUP 3.15 could easily compiled and run with IUP 3.27. IUP also has a permissive license. As far as I know IUP is as portable as Lazarus is, so we don't have to care about portability, too. Let me see what's your thoughts. With my ability I can only leave suggestion. I don't have the skill to do it myself nor the finance to hire someone else to do. But I think this is the most reasonable move for us.

We don't need to run after the latest GTK version. Even other applications like GIMP or desktop environments like XFCE switch to GTK3 only now, because it has become stable. So in fact this is the right point to get GTK3 fully running and there has already been work put into the last months. What's missing is people testing it, reporting bugs and maybe also people who are willing to dig into it to fix those bugs.

Regards,
Sven

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200414/7f2d53ea/attachment.html>

Reply by email

jiaxing ruan
to Sven Barth

Do you need tester? I can help with testing. But anything needs more knowledge I afraid I can't.

Anyway, did we at any time found it's tired to catch up with GTK? May be we could keep the current GTK3 interface. But my suggestion also deal with GTK4, GTK5... One IUP interface, we could choose the appropriate GTK version. IUP currently supports both GTK2 and GTK3 and the API still the same. What I appreciate IUP is it focuses on a stable API. As I said, programs written for IUP 3.15 still compile and run fine with IUP 3.27. Investing on an IUP interface rather than GTK4, GTK5... interface is the most reasonable way to go.

Reply by email

zeljko
to jiaxing ruan
jiaxing ruan wrote 11 lines
Do you need tester? I can help with testing. But anything needs more knowledge I afraid I can't. Anyway, did we at any time found it's tired to catch up with GTK? May be we could keep the current GTK3 interface. But my suggestion also deal with GTK4, GTK5... One IUP interface, we could choose the appropriate GTK version. IUP currently supports both GTK2 and GTK3 and the API still the same. What I appreciate IUP is it focuses on a stable API. As I said, programs written for IUP 3.15 still compile and run fine with IUP 3.27. Investing on an IUP interface rather than GTK4, GTK5... interface is the most reasonable way to go.

Never heard about IUP, but maybe we can get ideas for various gtk3 implementations from IUP. Maybe you should provide direct link to IUP library, not to your h2pas conversion.

zeljko

Reply by email

Michael Van Canneyt
to zeljko
zeljko wrote 16 lines
On 4/14/20 10:07 AM, jiaxing ruan via lazarus wrote: > Do you need tester? I can help with testing. But anything needs more > knowledge I afraid I can't. > > Anyway, did we at any time found it's tired to catch up with GTK? May be > we could keep the current GTK3 interface. But my suggestion also deal > with GTK4, GTK5... One IUP interface, we could choose the appropriate > GTK version. IUP currently supports both GTK2 and GTK3 and the API still > the same. What I appreciate IUP is it focuses on a stable API. As I > said, programs written for IUP 3.15 still compile and run fine with IUP > 3.27. Investing on an IUP interface rather than GTK4, GTK5... interface > is the most reasonable way to go. Never heard about IUP, but maybe we can get ideas for various gtk3 implementations from IUP. Maybe you should provide direct link to IUP library, not to your h2pas conversion.

See
http://webserver2.tecgraf.puc-rio.br/iup/

I looked into it.
Seems to me that a small OOP wrapper around the iup headers is a good idea. The LUA bindings add some nice ideas, it looks like what we know as properties.

What does worry me in this widgetset is that there are 2 things missing:
1. a canvas for regular controls. There is a canvas, but is a separate control, and I'm not 100% sure whether that is a requirement for a LCL widgetset.
2. No absolute positioning, which does not go well with the LCL. You need to use existing layouters.

So for these reasons I am not yet sure it's a viable candidate for a new widgetset. Given that and the fact it adds it adds an additional layer, I would definitely not let it replace the existing GTK2/GTK3 interfaces.

Michael.

Michael.

Reply by email

jiaxing ruan
to Michael Van Canneyt

I skipped the Lua part in my binding because I think it will not needed for Free Pascal. Don't know if we would have any use for it.

About 1: Could we do canvas drawing with IUPCD? It use CD (Canvas Draw) graphic library, also developed by the same developer. Note that IUPCD is shipped with IUP itself, we don't need to install a separate library CD.

About 2: I don't know about that. But I think there should be way to do absolute layout with IUP. Could you check it again? I have never use absolute position with IUP, though.

I don't want it to replace GTK2 interface. But the GTK3 interface is definitely bad. I want to use IUP as an abstract layer on top of GTK. IUP, something not changed much, ontop of GTK, something changes rapidly. It will save us a lot of maintenance job in the future. It's my reasoning.

________________________________

Earlier message 49 lines
From: lazarus on behalf of Michael Van Canneyt via lazarus Sent: Tuesday, April 14, 2020 6:08 PM To: zeljko via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] Completely solve the GTK trouble On Tue, 14 Apr 2020, zeljko via lazarus wrote: > On 4/14/20 10:07 AM, jiaxing ruan via lazarus wrote: >> Do you need tester? I can help with testing. But anything needs more >> knowledge I afraid I can't. >> >> Anyway, did we at any time found it's tired to catch up with GTK? May be >> we could keep the current GTK3 interface. But my suggestion also deal >> with GTK4, GTK5... One IUP interface, we could choose the appropriate >> GTK version. IUP currently supports both GTK2 and GTK3 and the API still >> the same. What I appreciate IUP is it focuses on a stable API. As I >> said, programs written for IUP 3.15 still compile and run fine with IUP >> 3.27. Investing on an IUP interface rather than GTK4, GTK5... interface >> is the most reasonable way to go. > > Never heard about IUP, but maybe we can get ideas for various gtk3 > implementations from IUP. Maybe you should provide direct link to IUP > library, not to your h2pas conversion. See http://webserver2.tecgraf.puc-rio.br/iup/ I looked into it. Seems to me that a small OOP wrapper around the iup headers is a good idea. The LUA bindings add some nice ideas, it looks like what we know as properties. What does worry me in this widgetset is that there are 2 things missing: 1. a canvas for regular controls. There is a canvas, but is a separate control, and I'm not 100% sure whether that is a requirement for a LCL widgetset. 2. No absolute positioning, which does not go well with the LCL. You need to use existing layouters. So for these reasons I am not yet sure it's a viable candidate for a new widgetset. Given that and the fact it adds it adds an additional layer, I would definitely not let it replace the existing GTK2/GTK3 interfaces. Michael. Michael. --

Reply by email

Michael Van Canneyt
to jiaxing ruan
jiaxing ruan wrote
I skipped the Lua part in my binding because I think it will not needed for Free Pascal. Don't know if we would have any use for it.

I only mentioned it because it contains ideas for properties. I don't propose to create/use lua bindings.

About 1: Could we do canvas drawing with IUPCD? It use CD (Canvas Draw) graphic library, also developed by the same developer. Note that IUPCD is shipped with IUP itself, we don't need to install a separate library CD.

I don't know, the info I can find is not conclusive.

About 2: I don't know about that. But I think there should be way to do absolute layout with IUP. Could you check it again? I have never use absolute position with IUP, though.

iupCBox seems to be intended for absolute positioning.

Show quoted text 5 lines
I don't want it to replace GTK2 interface. But the GTK3 interface is definitely bad. I want to use IUP as an abstract layer on top of GTK. IUP, something not changed much, ontop of GTK, something changes rapidly. It will save us a lot of maintenance job in the future. It's my reasoning.

Yes, I understood that.
At the same time it is an extra layer on top of gtk over which you have no control...

Michael.

Reply by email

jiaxing ruan
to Michael Van Canneyt

We have no control over GTK, too. IUP is better in this regard as it doesn't change as much as GTK. IUP is much smaller than GTK, too. Creating binding for IUP I only have to use h2pas. I don't think h2pas is able to create binding for the whole GTK stuffs, which also include GDK, ATK, GObject, GLib... I know about gir2pascal, but if it good enough why our GTK binding is too bad?

@Sven Barth<mailto:> I tried with Lazarus trunk + FPC trunk from Fpcupdeluxe, built using Win64 interface but after that I configured to rebuild it with GTK3 inferface and it failed immediately. So I don't know how could I help testing Lazarus GTK3 as even build it is impossible. I installed GTK3 runtime and MinGW 8.1, both properly added to PATH. Does a Linux machine absolutely needed? I only do Windows stuffs so I afraid I can't help with that.

________________________________

Earlier message 37 lines
From: lazarus on behalf of Michael Van Canneyt via lazarus Sent: Tuesday, April 14, 2020 6:57 PM To: jiaxing ruan via lazarus Cc: Michael Van Canneyt Subject: Re: [Lazarus] Completely solve the GTK trouble On Tue, 14 Apr 2020, jiaxing ruan via lazarus wrote: > I skipped the Lua part in my binding because I think it will not needed for Free Pascal. Don't know if we would have any use for it. I only mentioned it because it contains ideas for properties. I don't propose to create/use lua bindings. > > About 1: Could we do canvas drawing with IUPCD? It use CD (Canvas Draw) graphic library, also developed by the same developer. Note that IUPCD is shipped with IUP itself, we don't need to install a separate library CD. I don't know, the info I can find is not conclusive. > > About 2: I don't know about that. But I think there should be way to do absolute layout with IUP. Could you check it again? I have never use absolute position with IUP, though. iupCBox seems to be intended for absolute positioning. > I don't want it to replace GTK2 interface. But the GTK3 interface is > definitely bad. I want to use IUP as an abstract layer on top of GTK. > IUP, something not changed much, ontop of GTK, something changes rapidly. > It will save us a lot of maintenance job in the future. It's my > reasoning. Yes, I understood that. At the same time it is an extra layer on top of gtk over which you have no control... Michael. --

Reply by email

Sven Barth
to jiaxing ruan

jiaxing ruan schrieb am Di., 14. Apr. 2020,
15:03:

Show quoted text 7 lines
We have no control over GTK, too. IUP is better in this regard as it doesn't change as much as GTK. IUP is much smaller than GTK, too. Creating binding for IUP I only have to use h2pas. I don't think h2pas is able to create binding for the whole GTK stuffs, which also include GDK, ATK, GObject, GLib... I know about gir2pascal, but if it good enough why our GTK binding is too bad?

Adding another level of abstraction between the LCL and the underlying toolkit will result in more problems. What if we need something for the LCL that is available in GTK, but not in IUP?

Show quoted text 8 lines
@Sven Barth I tried with Lazarus trunk + FPC trunk from Fpcupdeluxe, built using Win64 interface but after that I configured to rebuild it with GTK3 inferface and it failed immediately. So I don't know how could I help testing Lazarus GTK3 as even build it is impossible. I installed GTK3 runtime and MinGW 8.1, both properly added to PATH. Does a Linux machine absolutely needed? I only do Windows stuffs so I afraid I can't help with that.

I have never tested GTK on Windows, so I can't comment here. My suggestion is indeed to use a Linux. Though if you have a Windows 10 you could also use Windows Subsystem for Linux with a X server on the Windows side.

Regards,
Sven

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200414/0bcb372a/attachment.html>

Reply by email