Wednesday, June 25, 2008

Amazing features in 0.9.26

I don't remeber any release which excited me so much like the not yet finished 0.9.26. The reason is that many great features which were once a distant dream are now ready from becoming reality. I will describe some of them bellow.

* Windows Unicode support, even in Windows 9x. This is a very strong feature, which will take Lazarus much closer to having full Unicode support in all our supported platforms, something indispensable for any modern GUI Library. This allows us to show in the same application Russian, Portuguese and Chinese, for example, regardless of the Windows locale. Having Windows 9x support with the help of some testers puts us ahead of many other GUI Toolkits that dropped Windows 9x. Extended information for users can be found here.

* Native Mac OS X version with the Carbon widgetset. Yes, no more X11, no more Gtk under Mac OS X. A native IDE instead, which can be launched form the Dock and integrates nicely into the system. Copy+Paste, Debugging, everything works in the new Mac IDE. I expect this to boost Lazarus popularity under Mac OS X. In the long term a Cocoa interface is being developed, but the Carbon IDE should be more the enough in the next 1-2 years.

* TIcon.Handle finally working. This is also a long awaited feature, and should help removing some necessary ifdefs when using TTrayIcon, which needs TIcon.Handle to work.

* A much better Windows CE interface. Lazarus 0.9.24 was the first release supporting Windows CE, but many bugs were present at the time, making it somewhat problematic to develop real applications. In Lazarus 0.9.25 we have made a great work polishing the Windows CE interface, and this new release will push it to a new level, making it ready for the development of high quality applications. For some screenshots and extended information of the work being done, take a look here

* Tons of bugfixes

The final feature, which would make Lazarus finally ready for 1.0 (just my opinion! I know others disagree) is unfortunately not in this list. It would be the retirement of the Gtk 1 widgetset, and the move to a fully unicode and modern Linux Toolkit. I have worked a lot in the Gtk 2 widgetset, trying to get it to a development level where it could substitute Gtk 1, but I got really frustrated, partly because of the low quality of the mixed gtk1/gtk2 interface code, but also because Gtk just doesn't help. Having worked with the Windows API, Qt, fpGUI, Cocoa and Gtk, I am absolutely sure that Gtk is the worse GUI toolkit I have ever seen. Yes, even worse then direct Windows API, because at least the Windows API works!

The final shot in Gtk 2 for me was the fact that the Qt 4 interface, which I started 2 years ago just to learn how the LCL worked inside, managed to become much more reliable then the Gtk 2 interface which was already being developed a long time before, and without the support of most core developers! (Paul is the only core developer doing heavy development in Qt). Unfortunately Qt is not LGPL, and we expect to support the development of proprietary applications without the need to buy licenses, so Qt cannot substitute Gtk =/ At the moment I believe that fpGUI is the widgetset with the highest changes to substitute Gtk 1. The highest obstacles are the lack of developers and fpGUI being still under development, which makes it's API not so stable, but I really believe this path may have a great future.

A small comparison of the development difficulty in each widgetset:
Implementing TTrayIcon under Windows API: 4 hours
Implementing TTrayIcon under Qt: 3 hours
Implementing TTrayIcon under Gtk 2: 2 *weeks*

Concluding, I had originally planned for 2 posts, 1 about the great new stuff in 0.9.26 and 1 ranting about Gtk, but I managed to cover both topics here =D In conclusion I think we are reaching a new milestone, a new development level, but our official Linux interface (gtk 1) is unfortunately limited and we have no good enough substitute yet.

11 comments:

Unknown said...

good article, felipe. i agree with you on gtk. it's not easy. i'm interested in helping with fpgui, but i need to get up to speed on lcl internals (and there's not much documentation).

Felipe Monteiro de Carvalho said...

There is a reasonable amount of information here:

http://wiki.lazarus.freepascal.org/LCL_Internals

But the best way is probably just setting a target: Say, implement control X in fpGUI, and just try to implement it. If you get stuck you can always send an e-mail in the mailling list.

Andrew Haines said...

I agree with henry, great article. However I think that the trayicon example is not quite fair since windows and qt have "native" traywidgets gtk (current bindings) does not. The Gtk1 and Gtk2 implementations are really X11 implementations which is inherently horrible and clumsy to use :)

There is now a gtk trayicon widget in newer version of Gtk2 but the bindings don't yet exist for freepascal.

Unknown said...

I disagree about gtk2/fpgui, yes gtk2 is the shit but it's very close to being ready IMHO. Also it's THE native linux widgetset, we just have to support it as default especially on GNOME distroes.

I've been using Gtk2 Lazarus for about a year now with some minor problems here and there, but lately the biggest showstoppers I get are LCL-wide regressions (like the TIcon bitmap problem with OI). Gtk2 for me was quite stable lately (yes there are smaller issues, but not blockers).

Anonymous said...

Nice blog Felipe. I agree that fpGUI is the way to go! It's a awesome toolkit, but then I might be a bit bias. ;-)

Felipe Monteiro de Carvalho said...

This seams to have caused a lot of controversy. I don't want to give a false impression that I am against the gtk widgetset. If it turns out that gtk2 becomes the default linux widgetset sooner then I am thinking this would be great!

I was just expressing my frustration with the little progress I accomplished compared to the time I invested in it.

Unknown said...

i agree with almindor. i've been using gtk2 for ages now and it's about time gtk1 dies. it gives a bad impression. the main reason i'm interested in fpgui is that it's better for embedded devices, since you don't need the weight of gtk2. even better would be to use directfb and ditch x altogether :) but i'm getting ahead of myself.

Donald Shimoda said...

I have to say : wow! Lazarus 0.9.25 fells like a delphi 7 version with steriods. Working with that IDE is a pleasure. You guys made a great work. :)

I finish to migrate a server application from win32/delphi to lazarus/linux, using Remobjects+Zeos+Synapse+DCPlibs. Amazing, work excelent and with little changes. With some ifdefs i reserve to test the oportunity to compile in delphi.

Im very happy about lazarus progress. Same to FCL.

Best regards.

P.S. Version 0.9.26 is not available for test or yes?

Donald Shimoda said...

I forget to say the only 3 things i miss are:

Visual inheritance
Datamodule use ala delphi.
Tframe.

Best regards.

Felipe Monteiro de Carvalho said...

> P.S. Version 0.9.26 is not available for test or yes?

Lazarus 0.9.25 is the test version of 0.9.26

Unknown said...

Hi,

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading.

Nice blog. I will keep visiting this blog very often.

-
Hire Delphi Developers