Sign in Join

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

Mailing lists / lazarus / 2008-08

Gtk?

24 messages · 11 people · –

Reply by email Subscribe to this list Your subscription

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

Reenen Laurie

Hi Everybody

I don't want to rehash stuff that's already been discussed at length, but I missed that part...

According to the blog (lazarus-dev.blogspot.com) Gtk is just so complicated. Why don't we just decide on Qt4 as it is now gpl, and focus all our energies on getting qt 4 stable. Then we can have 1 very cool looking stable widget set that has scalability, and pretty much will be able to satisfy 99% of the users needs (and that 1% isn't likely to be fulfilled by GTK anyway).

Regards,
-Reenen

Reply by email

Graeme Geldenhuys
to Reenen Laurie
Reenen Laurie wrote
According to the blog (lazarus-dev.blogspot.com) Gtk is just so complicated. Why don't we just decide on Qt4 as it is now gpl, and focus all our energies on getting qt 4 stable. Then we can have 1

And that means we can only develop GPL applications. Unless you don't mind paying the $2500 per developer (x3) license for Qt so our company can continue using Lazarus.

Alternatively, all stop developing other widget sets for LCL and everybody work on fpGUI to get it as good as Qt4. ;-) The possibility of that happening is just as good as Qt becoming the only LCL widgetset.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Reenen Laurie
to Graeme Geldenhuys

Ahhh... I forget about non-gpl programmers...

fpGUI sounds like a plan. :-)

Graeme Geldenhuys wrote 27 lines
On 8/6/08, Reenen Laurie wrote: > According to the blog (lazarus-dev.blogspot.com) Gtk is just so > complicated. Why don't we just decide on Qt4 as it is now gpl, and > focus all our energies on getting qt 4 stable. Then we can have 1 And that means we can only develop GPL applications. Unless you don't mind paying the $2500 per developer (x3) license for Qt so our company can continue using Lazarus. Alternatively, all stop developing other widget sets for LCL and everybody work on fpGUI to get it as good as Qt4. ;-) The possibility of that happening is just as good as Qt becoming the only LCL widgetset. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
o__ ,_.>/ _ (_)_\(_)_______ ...speed is good _______________ I believe five out of four people have a problem with fractions.

Reply by email

Boian Mitov
to Reenen Laurie

I second that,

I have not taken much look at the fpGUI architecture but if it is made so it can also serve as a low level Qt/Gtk wrapper then the LCL can be made purely to rely on fpGUI and the complexity in it will be reduced. As I said I have not looked too deep into the underlying architecture but if the platform/framework specific stuff is all placed into as tiny layer (fpGUI) as possible, the LCL can really be made more portable, and the platform/framework specific functionality will become well insolated. This will make it (in theory) both easier to support and port to other environments. It also will allow for more native implementations of the fpGUI and probably it becoming a framework of its own right. Personally I would put my vote on fpGUI ;-) .

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 10 lines
----- Original Message ----- From: "Reenen Laurie" To: "General mailing list" Sent: Wednesday, August 06, 2008 12:50 PM Subject: Re: [Lazarus] [lazarus] Gtk? > Ahhh... I forget about non-gpl programmers... > > fpGUI sounds like a plan. :-)

Reply by email

Mattias Gaertner
to Reenen Laurie: Hi Everybody I don't want to rehash stuff that's already been discussed at length, but I…
Show quoted text 11 lines
Hi Everybody I don't want to rehash stuff that's already been discussed at length, but I missed that part... According to the blog (lazarus-dev.blogspot.com) Gtk is just so complicated. Why don't we just decide on Qt4 as it is now gpl, and focus all our energies on getting qt 4 stable. Then we can have 1 very cool looking stable widget set that has scalability, and pretty much will be able to satisfy 99% of the users needs (and that 1% isn't likely to be fulfilled by GTK anyway).

Why qt? Why not fpgui? Or write a cool widgetset using opengl?

As long as some people support a widgetset it will be supported.

Mattias

Reply by email

Reenen Laurie
to Mattias Gaertner

My concern is the amount of work that goes into making something "work" on Gtk1, Gtk2, Windows, Carbon, Qt, etc.

Some of the older widget sets doesn't support cool (or even basic) user interface stuff like docking... The gimp still makes me shudder.

You can "get it to work" on those widget sets, but with weeks of coding - working "around" the lack of support. Sometimes breaking support for other widget sets.

Boian's idea of a "thin layer" sounds like a decent enough solution.

Regards,
-Reenen

Mattias Gaertner wrote 26 lines
On Wed, 6 Aug 2008 21:12:20 +0200 "Reenen Laurie" wrote: > Hi Everybody > > I don't want to rehash stuff that's already been discussed at length, > but I missed that part... > > According to the blog (lazarus-dev.blogspot.com) Gtk is just so > complicated. Why don't we just decide on Qt4 as it is now gpl, and > focus all our energies on getting qt 4 stable. Then we can have 1 > very cool looking stable widget set that has scalability, and pretty > much will be able to satisfy 99% of the users needs (and that 1% isn't > likely to be fulfilled by GTK anyway). Why qt? Why not fpgui? Or write a cool widgetset using opengl? As long as some people support a widgetset it will be supported. Mattias _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
o__ ,_.>/ _ (_)_\(_)_______ ...speed is good _______________ I believe five out of four people have a problem with fractions.

Reply by email

Graeme Geldenhuys
to Reenen Laurie: Ahhh... I forget about non-gpl programmers... fpGUI sounds like a plan. :-) On Wed, Aug…
Reenen Laurie wrote
Ahhh... I forget about non-gpl programmers...

Yup, there are a few of us actually using FPC & Lazarus to make a living. :)

I believe five out of four people have a problem with fractions.

:-) Good one!

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Pavel Řezníček
to Reenen Laurie: My concern is the amount of work that goes into making something "work" on Gtk1, Gtk2,…

Reenen Laurie napsal(a):

Show quoted text 16 lines
My concern is the amount of work that goes into making something "work" on Gtk1, Gtk2, Windows, Carbon, Qt, etc. Some of the older widget sets doesn't support cool (or even basic) user interface stuff like docking... The gimp still makes me shudder. You can "get it to work" on those widget sets, but with weeks of coding - working "around" the lack of support. Sometimes breaking support for other widget sets. Boian's idea of a "thin layer" sounds like a decent enough solution. Regards, -Reenen

Hello all,

Well, I'm new to this group but I think that the difficult stuff of unifying many widgetsets under one interface, thus creating an universal, multi-platform widgetset, is great in result - from the point of view of the end-user developer. If others made the work in place of the Lazarus Team (fpGUI team, if I understand good), yes, it would be great to rely on that. But don't forget that the used unifying code of fpGUI goes then out of control of the Lazarus/LCL Team. Or am I wrong with that?

Regards,
Pavel

Reply by email

Boian Mitov
to Lord Satan

I am calling basicEventCreate in a project. In Windows it works fine in Linux it throws exception. Is it expected?

basicEventCreate( NIL, False, False, '' );

What are the alternatives if I need an event that is autoclear and another that is manually cleared in Linux?

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Reply by email

Ales Katona
to Reenen Laurie: Hi Everybody I don't want to rehash stuff that's already been discussed at length, but I…

Reenen Laurie wrote / nap?sal(a):

Show quoted text 20 lines
Hi Everybody I don't want to rehash stuff that's already been discussed at length, but I missed that part... According to the blog (lazarus-dev.blogspot.com) Gtk is just so complicated. Why don't we just decide on Qt4 as it is now gpl, and focus all our energies on getting qt 4 stable. Then we can have 1 very cool looking stable widget set that has scalability, and pretty much will be able to satisfy 99% of the users needs (and that 1% isn't likely to be fulfilled by GTK anyway). Regards, -Reenen _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Well I played with Gtk2 a bit lately (that is the native thing, not via LCL) and I think that later versions (2.10+ and especially 2.12) are actually becoming usable.

The thing is, our biggest problem is missing features and "2.6+" support which holds us back. I agree with it somewhat but I think we need to look into the future too so I started a "gtk2ext" unit which contains lazy linked Gtk2.8+ stuff.

Each new component can be checked with Available_componentname_2_x(). So say something (like tray icon) was added in 2.12 you can do if Available_GtkStatusIcon_2_12() then ...

Same goes for PARTS of components. There are new functions added each major release to older components too. I'm slowly mapping that and adding them, with same checking mechanism. So if you do Available_SomethingOld_2_10() you check if all the new 2_10 functions of that component are there (logically 2.12+ should be true as well).

Those who thing gtk2 needs help can help me with this as it's not a trivial task. It seems our old gtk2 2.6 binding is missing a lot of things. I'm currently going "down by the docs" and filling in stuff, but if someone wants to help, tell me which part you want to work on so we don't collide.

The structure is rather simple and very h2pas friendly:

unit gtk2ext (inside fpc/packages/gtk2/src/gtkext) contains include files for header and implementation parts named after the components they include/extend. If you want to extend an old component or add new one, just add the 2 new include files.

Adding new ones is especially easy, because gtk2 has header files in this exact fashion (this is very nice of them). So you can just h2pas them and then fiddle with the result (most work is making the macroes into inline functions).

After this is done, the unit can be added to lazarus too (under different name) until next fpc version which has it (2.2.4) and we can do "if xxx then" to e.g: use proper tray icon for example (the gtk2 native tray icon works better, it doesn't "get missing" on gnome boot etc.)

Ales

Reply by email

Boian Mitov
to Marco van de Voort

Hi Marco,

Thank you!
How I can get it to work? I have TThread classes in the project.

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 16 lines
----- Original Message ----- From: "Marco van de Voort" To: "General mailing list" Sent: Friday, August 08, 2008 3:02 AM Subject: Re: [Lazarus] calling basicEventCreate in Linux > On Wed, Aug 06, 2008 at 07:15:44PM -0700, Boian Mitov wrote: >> I am calling basicEventCreate in a project. In Windows it works fine in >> Linux it throws exception. Is it expected? > > If you don't use cthreads, it is expected yes :-) > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Boian Mitov
to Marco van de Voort: If you don't use cthreads, it is expected yes :-)

Hi Marco,

Is there a setting I have to make in order for this to work? Or do I need to write a bit of code in the project?
Please help!
Any suggestion?

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 16 lines
----- Original Message ----- From: "Marco van de Voort" To: "General mailing list" Sent: Friday, August 08, 2008 3:02 AM Subject: Re: [Lazarus] calling basicEventCreate in Linux > On Wed, Aug 06, 2008 at 07:15:44PM -0700, Boian Mitov wrote: >> I am calling basicEventCreate in a project. In Windows it works fine in >> Linux it throws exception. Is it expected? > > If you don't use cthreads, it is expected yes :-) > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Boian Mitov
to JoshyFun

Hi JoshyFun,

I get the same error when I use TEvent.
TEvent uses basicEventCreate in Linux internally. Is TEvent also obsolete? What it is replaced with? I have no problems using alternative signaling, but I can't figure out which one I should use.

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 29 lines
----- Original Message ----- From: "JoshyFun" To: "General mailing list" Sent: Friday, August 08, 2008 2:15 PM Subject: Re: [Lazarus] calling basicEventCreate in Linux > Hello Boian, > > Friday, August 8, 2008, 10:36:55 PM, you wrote: > > > http://www.freepascal.org/docs-html/rtl/system/basiceventcreate.html > > Basically: > > BasicEventCreate > Obsolete. Don't use > > :-? > > -- > Best regards, > JoshyFun > > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Inoussa OUEDRAOGO
to Boian Mitov: Is there a setting I have to make in order for this to work? Or do I need to write a bit…

2008/8/8 Boian Mitov :

Show quoted text 28 lines
Hi Marco, Is there a setting I have to make in order for this to work? Or do I need to write a bit of code in the project? Please help! Any suggestion? With best regards, Boian Mitov -------------------------------------------------------------------- Mitov Software http://www.mitov.com -------------------------------------------------------------------- ----- Original Message ----- From: "Marco van de Voort" To: "General mailing list" Sent: Friday, August 08, 2008 3:02 AM Subject: Re: [Lazarus] calling basicEventCreate in Linux > On Wed, Aug 06, 2008 at 07:15:44PM -0700, Boian Mitov wrote: >> I am calling basicEventCreate in a project. In Windows it works fine in >> Linux it throws exception. Is it expected? > > If you don't use cthreads, it is expected yes :-)

To use "cthreads", just include it as the very first unit of your program, susch as

<code>
    program sample;
    {$mode objfpc}{$H+}
    uses
      {$IFDEF UNIX}{$IFDEF UseCThreads}
      cthreads,
      {$ENDIF}{$ENDIF}
    ....;
    begin
      ...
    end.
</code>

Hope this help.

Inoussa O.

Reply by email

Boian Mitov
to Inoussa OUEDRAOGO

Hi Inoussa,

Thank you!
I am actually writing Lazarus component packages. Will this work in the package? I guess it should, but just to make sure. Also where I should put the uses section in the package unit, or in the component units?

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 34 lines
----- Original Message ----- From: "Inoussa OUEDRAOGO" To: "General mailing list" Sent: Friday, August 08, 2008 3:14 PM Subject: Re: [Lazarus] calling basicEventCreate in Linux > > To use "cthreads", just include it as the very first unit of your > program, susch as > > <code> > program sample; > > {$mode objfpc}{$H+} > > uses > {$IFDEF UNIX}{$IFDEF UseCThreads} > cthreads, > {$ENDIF}{$ENDIF} > ....; > > begin > ... > end. > </code> > > Hope this help. > -- > Inoussa O. > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Inoussa OUEDRAOGO
to Boian Mitov

2008/8/8 Boian Mitov :

Show quoted text 7 lines
Hi Inoussa, Thank you! I am actually writing Lazarus component packages. Will this work in the package? I guess it should, but just to make sure. Also where I should put the uses section in the package unit, or in the component units?

As the "cthreads" use is application wide, I think that it is up to the application to include "cthreads" unit.

Inoussa O.

Reply by email

Boian Mitov
to Inoussa OUEDRAOGO

Hi Inoussa,

Thank you!
The problem is that the components are multithreading, and as soon as I drop the component on the form in Linux it crashes Lazarus. The components have thousands of thread locks in them. The Lazarus in this case is the application. I apparently will have to add this to the component packages somehow. Obviously any application that includes the components will have to use the "cthreads" in this case. The components are for real time video audio and signal processing, and they have to be multithreading in order to process the streams without interfering with the GUI. This is a large set of over 200 components I am porting from Delphi to support Lazarus. So far they work fairly well in Lazarus under Windows, but I am having the TEvent problem in Linux.
What is the best approach? I can write my own TEvent if it is needed, but I hope there is a better approach.

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 26 lines
----- Original Message ----- From: "Inoussa OUEDRAOGO" To: "General mailing list" Sent: Friday, August 08, 2008 4:14 PM Subject: Re: [Lazarus] calling basicEventCreate in Linux > 2008/8/8 Boian Mitov : >> Hi Inoussa, >> >> Thank you! >> I am actually writing Lazarus component packages. Will this work in the >> package? I guess it should, but just to make sure. >> Also where I should put the uses section in the package unit, or in the >> component units? > > As the "cthreads" use is application wide, I think that it is up to the > application to include "cthreads" unit. > > > -- > Inoussa O. > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Boian Mitov
to Inoussa OUEDRAOGO: 2008/8/8 Boian Mitov : As the "cthreads" use is application wide, I think that it is up…

I added it to the first unit of the package but now after rebuilding I can start Lazarus:

I am getting:

Threading has been used before cthreads was initialized. Make cthreads one of the first units in your uses clause. Runtime error 211 at $08651EFA
$08651EFA
$087B99ED

Please help! How to use thread synchronization inside Lazarus components in Linux? Do I need to write my own TEvent class for that? Is there alternative event that I can use and will work?

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 26 lines
----- Original Message ----- From: "Inoussa OUEDRAOGO" To: "General mailing list" Sent: Friday, August 08, 2008 4:14 PM Subject: Re: [Lazarus] calling basicEventCreate in Linux > 2008/8/8 Boian Mitov : >> Hi Inoussa, >> >> Thank you! >> I am actually writing Lazarus component packages. Will this work in the >> package? I guess it should, but just to make sure. >> Also where I should put the uses section in the package unit, or in the >> component units? > > As the "cthreads" use is application wide, I think that it is up to the > application to include "cthreads" unit. > > > -- > Inoussa O. > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gaertner
to Boian Mitov
Show quoted text 14 lines
I added it to the first unit of the package but now after rebuilding I can start Lazarus: I am getting: Threading has been used before cthreads was initialized. Make cthreads one of the first units in your uses clause. Runtime error 211 at $08651EFA $08651EFA $087B99ED Please help! How to use thread synchronization inside Lazarus components in Linux? Do I need to write my own TEvent class for that? Is there alternative event that I can use and will work?

May this help you:
http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial#Units_needed_for_a_multithreaded_application

Mattias

Reply by email

Boian Mitov
to Mattias Gaertner

Hi Mattias,

Exactly what I need :-) .
It seems to works so far :-) .
Thank you!

With best regards,
Boian Mitov

-------------------------------------------------------------------- Mitov Software
http://www.mitov.com
--------------------------------------------------------------------

Earlier message 9 lines
----- Original Message ----- From: "Mattias Gaertner" To: Sent: Friday, August 08, 2008 10:44 PM Subject: Re: [Lazarus] calling basicEventCreate in Linux > May this help you: > http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial#Units_needed_for_a_multithreaded_application

Reply by email