Sign in Join

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

Mailing lists / fpc-pascal / 2002-08

Re: Will gtk2forpascal be added to newest version of Free Pascal?

5 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Michael A. Hess
to mili: Hello, Every one You know, there's a wonderful named "gtk2forpascal". It can give…
mili wrote
You know, there's a wonderful named "gtk2forpascal".

We are fully aware of it. If you look you will see that the main developer of 'gtk2 for pascal' is also one of the main developers for the Lazarus project.

So in a word this is being developed with FreePascal and Lazarus in mind. :-)

So I strongly recommend the newest version of freepascal to make it a part of new release. Or, more directly, absorb this project into freepascal project.

I hopefully will be integrated in some fashion as it matures.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com
Mattias Gaertner
to Michael A. Hess
Show quoted text 11 lines
mili (by way of mili ) wrote: > You know, there's a wonderful named > "gtk2forpascal". We are fully aware of it. If you look you will see that the main developer of 'gtk2 for pascal' is also one of the main developers for the Lazarus project. So in a word this is being developed with FreePascal and Lazarus in mind. :-)

True.
Although, it will also support Kylix - not my idea ;)

> So I strongly recommend the newest version of freepascal to make it a part of > new release. Or, more directly, absorb this project into freepascal project. I hopefully will be integrated in some fashion as it matures.

There are still about 100 ToDos left. Mostly internal types and seldom used macros, that can simply be skipped. I guess that is a good day work. The main reason for the beta state is the ugly linking. The glib2 bites the linux ld-config.so.2 and hence the gtk2 needs a special linking order. Because fpc/ppc386 always wants to add the ld-config.so.2 at the end of link.res it fails. If someone can tell us how to tell fpc to change the position of ld-config.so.2 in a generic way, then I think it would be great to add it to fpc. And after that it won't take long for lazarus to provide a gtk2 interface.

Mattias Gaertner

Stefan Ziegenbalg
to mili: Hello, Every one You know, there's a wonderful named "gtk2forpascal". It can give…
mili wrote 7 lines
Hello, Every one You know, there's a wonderful 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.

example:

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

this ugly thing works:

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

Regards Stefan

----------------------------------------------

http://www.sziegenbalg.de
http://www.simage.org

Marco van de Voort
to Michael A. Hess: We are fully aware of it. If you look you will see that the main developer of 'gtk2 for…
Show quoted text 11 lines
mili (by way of mili ) wrote: > You know, there's a wonderful named > "gtk2forpascal". We are fully aware of it. If you look you will see that the main developer of 'gtk2 for pascal' is also one of the main developers for the Lazarus project. So in a word this is being developed with FreePascal and Lazarus in mind. :-)

I played a bit with it, and:

I can compile the libraries with the script, if I replace the

#!/bin/bash

line in the script with

#!/bin/sh

or

#!/usr/bin/env bash

(which is the POSIX compliant way to call bash I'm told)

---

The scripts to build the demoes have the same problem, though the trick with pkg-config seems to work.

Moreover, except that the pkg-config also creates

-Wl,--export-dynamic

as parameters, which FPC doesn't like.

And the dynamic linker option should only be used on Linux (uname -s=linux or so)

mili

Hello, Every one

You know, there's a wonderful 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.

So I strongly recommend the newest version of freepascal to make it a part of new release. Or, more directly, absorb this project into freepascal project.

yours,
mili