Sign in Join

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

Mailing lists / fpc-pascal / 2005-04

FPC and signals spreading

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Jan Je/lowicki

Hello all,

I had a problem with porting some code from gtk1.2: installed signal callbacks were blocking signasl propagation despite fact they returned false.

I have found a solution by myself: old handlers returned one-byte boolean. Threr was enough for gtk1.2, while gtk2 needs lognbool.

The second question (is gtkentry widget in W32 release corrupted?) remains alive.

With regards

Jan Jelowicki

------------------------------------------------------------------- Wroclaw University of Agriculture Akademia Rolnicza we Wroclawiu Department of Mathematics Katedra Matematyki -------------------------------------------------------------------

Marco van de Voort
to Jan Je/lowicki
The second question (is gtkentry widget in W32 release corrupted?) remains alive.

GTK1 was debugged for Windows because lazarus used Lazarus switched to plain win32 later, so I don't think GTK2 on windows is too well debugged in relation with FPC, and I know nobody that uses GTK2 with FPC on Windows.

Maybe the best way to start is to check GTK2 itself, and see if you can find a list of differences between GTK2 on *nix and windows. (e.g. #ifdefs in the headers, calling conventions etc)

Michalis Kamburelis
to Marco van de Voort
Marco van de Voort wrote 13 lines
>The second question (is gtkentry widget in W32 release corrupted?) >remains alive. GTK1 was debugged for Windows because lazarus used Lazarus switched to plain win32 later, so I don't think GTK2 on windows is too well debugged in relation with FPC, and I know nobody that uses GTK2 with FPC on Windows. Maybe the best way to start is to check GTK2 itself, and see if you can find a list of differences between GTK2 on *nix and windows. (e.g. #ifdefs in the headers, calling conventions etc)

Well, I used my GTK 2 code on Windows and there were no note that I initially wrote and tested that code on Linux, not on Windows.

I used GTK libraries as installed by GIMP for Win32 installer [http://gimp-win.sourceforge.net/], libraries there are partially taken from libraries at [http://gnuwin32.sourceforge.net/] so these are really correctly compiled, official GTK 2 libraries for Win32. You don't need anything special for FPC to work with GTK 2.

As for #ifdefs between Windows and Unices -- there really aren't many on GTK level. Calling conventions in compiled Win32 libraries that I mentioned above are always cdecl, just like under Unices, so there's also no problem here. GTK+ reference has a page about "Win32 specific issues in GTK"
[http://developer.gnome.org/doc/API/2.0/gtk/gtk-windows.html] but there is nothing really important for "normal" programs.

In summary, there are no "known general problems" with GTK 2 + Win32 + FPC. Everything should work just as under X-Windows under Unices.

Janusz: I think that you must reveal in more details where are your problems. Show us some piece of code etc.

Michalis