Sign in Join

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

Mailing lists / fpc-devel / 2009-10

GTK vs GTK2

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Desmond Coertzen

I have a stupid question, but I can not for the life of me figure this out quickly:

Recent official release of lazarus was 0.9.28, it is based on fpc 2.2.4-0.

The default widget se is gtk2. I'm trying to do a test where i am compiling against gtk1, but i get a compiler error when trying to go back to gtk1 : "Interfaces unit not found", but works fine when compiling gtk2. I didn't see an Interface unit in the fpc source location /usr/share/fpcsrc

Is there someone that can help me overcome this?

My actual reason for this, is testing the speed when copying to the canvas from png images. It seems to be extremely slow compared to my previous compile with fpc 2.2.2 in lazarus 0.9.26-2.

Is anyone experiencing the same thing? Any advice will be appreciated.

Reply by email

Graeme Geldenhuys
to Desmond Coertzen

2009/10/19 Desmond Coertzen :

The default widget se is gtk2. I'm trying to do a test where i am compiling against gtk1, but i get a compiler error when trying to go back to gtk1 : "Interfaces unit not found", but works fine when compiling gtk2. I didn't

Did you actually compile the LCL with GTK1? You can't just switch a project from one widgetset to another without first compiling the LCL itself in the widgetset you desire.

"Tools > Configure Build Lazarus" menu option

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

Reply by email

Desmond Coertzen
to Graeme Geldenhuys

Thank you for the advice.

That works then. I can build against gtk1 or gtk2.

I have this problem then: The GTK2 canvas is very slow compared to GTK1.

I'm busy doing more work to add debug data to see where the slowdown takes place.

If anyone has advice in the meantime, please let me know

Graeme Geldenhuys wrote 26 lines
2009/10/19 Desmond Coertzen : > > The default widget se is gtk2. I'm trying to do a test where i am compiling > against gtk1, but i get a compiler error when trying to go back to gtk1 : > "Interfaces unit not found", but works fine when compiling gtk2. I didn't Did you actually compile the LCL with GTK1? You can't just switch a project from one widgetset to another without first compiling the LCL itself in the widgetset you desire. "Tools > Configure Build Lazarus" menu option -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Desmond Coertzen
to Felipe Monteiro de Carvalho

More testing...

I think the problem here is not the speed at which i can splash stuff onto a canvas (the difference between GTk1 vs GTk2 is very little), but rather the rate at which the OnPaint events are called with the TCustomControl class when using with GTk2

There seems to be a delay of at least 16ms between paint events (i measured 18.519ms).

I think the problem might be an indefinite sleep between each fetch from the event queue, or, the fetch is on a timer and only one event is fetched on each timer interval instead of flushing the entire queue on each timer event.

I don't know how the GTK2 implementation in fpc works. I'm only guessing here.

My FPC version is 2.2.4, target Linux for i386

I have not tried Qt yet.

Anyone with more advice?

On Mon, Oct 19, 2009 at 5:53 PM, Felipe Monteiro de Carvalho <

Show quoted text 10 lines
wrote: You could try the Qt widgetset too. -- Felipe Monteiro de Carvalho _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email