[Lazarus] Completely solve the GTK trouble

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list
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


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list
jiaxing ruan via lazarus <[hidden email]> schrieb am Di., 14. Apr. 2020, 05:59:
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 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list
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.

From: Sven Barth <[hidden email]>
Sent: Tuesday, April 14, 2020 12:58 PM
To: Lazarus mailing list <[hidden email]>
Cc: jiaxing ruan <[hidden email]>
Subject: Re: [Lazarus] Completely solve the GTK trouble
 
jiaxing ruan via lazarus <[hidden email]> schrieb am Di., 14. Apr. 2020, 05:59:
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 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list
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.

zeljko
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list


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.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list
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.


From: lazarus <[hidden email]> on behalf of Michael Van Canneyt via lazarus <[hidden email]>
Sent: Tuesday, April 14, 2020 6:08 PM
To: zeljko via lazarus <[hidden email]>
Cc: Michael Van Canneyt <[hidden email]>
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.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list


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.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list
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?

[hidden email] 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.


From: lazarus <[hidden email]> on behalf of Michael Van Canneyt via lazarus <[hidden email]>
Sent: Tuesday, April 14, 2020 6:57 PM
To: jiaxing ruan via lazarus <[hidden email]>
Cc: Michael Van Canneyt <[hidden email]>
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.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Completely solve the GTK trouble

Free Pascal - Lazarus mailing list
jiaxing ruan <[hidden email]> schrieb am Di., 14. Apr. 2020, 15:03:
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? 


[hidden email] 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 

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus