[fpc-pascal]Will gtk2forpascal be added to newest version of Free Pascal?

Stefan Ziegenbalg stefan.ziegenbalg at mailbox.tu-dresden.de
Sun Aug 25 21:12:18 CEST 2002

mili (by way of mili ) wrote:
> Hello, Every one
> You know, there's a wonderful project at sourceforge.net named 
> "gtk2forpascal". It can give perfect gtk2 access for free pascal. I have 
> tested some of it's functionality and was greatly impressed by its 
> performance. Combining with the OOP of free pascal, it will be much simple 
> for us to develop Gtk2 program.

There is one problem of gtk2: varargs. It is a incompatibility of the 
compiler (Bug #2085). For cdecl; functions array of const isn't vararg 
compatible, as the documentation says.

In connection with this some constants should be defined as typed 
constants, (for example PANGO_SCALE_* ) to make sure that the compiler 
knows, what kind of variable must be pushed to the stack.


tag:=gtk_text_buffer_create_tag(buffer, "tigtag",
        "foreground", ["blue",       // this works
        "scale", PANGO_SCALE_LARGE,  // this not

this ugly thing works:

var d   : double;
     i   : array[0..1] of longint absolute d;
tag:=gtk_text_buffer_create_tag(buffer, "tigtag",
        "foreground", ["blue",       // this works
        "scale", i[0], i[1],         // this also

Regards Stefan

mailto:stefan.ziegenbalg at mailbox.tu-dresden.de

More information about the fpc-pascal mailing list