GTK-headers 2.18.6 for FreeBasic

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

GTK-headers 2.18.6 for FreeBasic

Post by TJF »

I translated C-headers from GTK version 2.18.6 for use in FreeBasic.

Features, compared to 'gtk/gtk.bi':
  • All new functions available, e.g. GtkBuilder or Cairo
    More compiler features are translated (e.g. G_DISABLE_DEPRECATED)
    Small bugs are fixed (e.g. gtk_tree_item_new_with_label("NoGo") is working now)
    Can be used with older GTK versions
    Untranslated C-source is included as FreeBasic comment for further translation (mostly asm-code for optimisation)
All 439 files are translated into a single *.bi file called GTK-2.18.6_TJF.bi (1.5 Mb). This file includes:
  • atk-1.28.0
    cairo-1.8.10
    gdk-2.18.6
    glib-2.22.4
    gtk-2.18.6
    pango-1.26.2
You easily may separate the headers, if needed.

This file is part of my package GTK+tobac2.2.0, details and download at http://www.freebasic-portal.de/download ... 0-131.html

To use it, just unpack the zip file and copy 'inc/GTK-2.18.6_TJF.bi' into your folder '*/freebasic/inc/gtk'. Then use
#INCLUDE "gtk/GTK-2.18.6_TJF.bi"
in your source.

I use the bindings in 5 projects, without trouble. Please test and report.

Good luck, TJF.
Last edited by TJF on Mar 30, 2010 5:22, edited 1 time in total.
darkinsanity
Posts: 12
Joined: Feb 18, 2009 11:39
Location: /dev/sda1
Contact:

Post by darkinsanity »

great, now I can use GtkBuilder ^^
I'll try it out when I have time.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

Thanks a lot for your effort, TJF =)
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Post by TJF »

cha0s wrote:Thanks a lot for your effort, TJF =)
Wellcome! It's just an update, just a little piece of the great FB package ;-)
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Post by AGS »

Great job on the GTK+ bindings!

And what is..... h_2_bi.bas? It's mentioned in the GTK header file
' FreeBasic-Header file for GTK, translated with help of h_2_bi.bas
Can I download h_2_bi.bas (and if so, where can I get it?).

Edit: removed email address
Last edited by AGS on Apr 28, 2010 0:12, edited 1 time in total.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Post by TJF »

AGS wrote:Great job on the GTK+ bindings!
Thanks!
AGS wrote:And what is..... h_2_bi.bas? It's mentioned in the GTK header file
' FreeBasic-Header file for GTK, translated with help of h_2_bi.bas by
' <adress removed>, including:
That's the tool I developed to do this job. I tried to use SWIG, without success. So I coded a 'stupid' wrapper that does not check types. It generates code anyway. If the C source isn't as expected, the FB code is marked with '???' and the C source is included as comment. If the C source can not be translated, it is included as comment in the FB code without translation.

That way more than 80 % of the GTK bindings have been translated. The rest was translated by hand, mostly precompiler macros.
AGS wrote:Can I download h_2_bi.bas (and if so, where can I get it?).
Not now. First I have to fix some bugs. Then some code has to be written to configure the tool without changing the source. Finaly I like to write some documentation. When I can finish, I'll upload at http://www.freebasic-portal.de/download ... ncompiler/.
Last edited by TJF on May 09, 2010 21:01, edited 2 times in total.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

h_2_bi.bas

Post by TJF »

I finished h_2_bi.bas, download at
http://www.freebasic-portal.de/download ... s-134.html

BR
Post Reply