Header updates for Gtk-3.0 and others

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:

Header updates for Gtk-3.0 and others

Post by TJF »

I started a new project gir_headers @ github.com, where I collect some FreeBASIC header files for Gnome libraries, auto-created by the tool GirToBac from GObject Introspection (GI) *.gir files. It's a follow-up project of GNOME Header Set (32/64 bit). Hosting moved due to more easy update handling.

In a fist glance it contains a set of headers for the library Gtk-3.0 in version 3.22.11 (and matching dependencies). Since all headers install in a new folder named Gir, you can have both, the original FB headers and the GI headers on your box, and use either of them.

I just checked the compiling, but didn't really test. So please report in case of any trouble.

Regards

[edit]
Too much links in the text above. Here's the pure project link again:

https://github.com/DTJF/gir_headers
[/edit]
Last edited by TJF on Aug 05, 2018 9:28, edited 1 time in total.
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: Header updates for Gtk-3.0 and others

Post by VANYA »

Excellent! The compiler project is not updated, but at least the headers can be modern.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Header for Gtk-4.0

Post by TJF »

Just uploaded an up-date:

* improved GLib and GObject macros
* Gtk-4.0

Gtk-4.0 isn't released yet, but for those who want to test I created experimental headers.

Regards
James Klutho
Posts: 14
Joined: Nov 11, 2009 23:44

Re: Header updates for Gtk-3.0 and others

Post by James Klutho »

Thanks for these. I will give them a test. I abandoned GTK on Linux FB because the GTK3 headers were not up to date.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Header updates for Gtk-3.0 and others

Post by TJF »

Hello James Klutho,

you're welcome! Mind the chapter Migrating from GTK+ 2.x to GTK+ 3 in the documentation.

Regards
wallyg
Posts: 270
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Header updates for Gtk-3.0 and others

Post by wallyg »

Thank you for the update, it is most appreciated.

After GTK 4.0 comes out, and you hear of a Windows 10 version, I would greatly appreciate finding out where I can download it.

Thank you again for all your great work.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Header updates for Gtk-3.0 and others

Post by TJF »

Hi wallyg,

Gtk4 isn't released yet. In order to test, you'll have to compile from source.

Find NSIS installers for the most recent versions at

https://github.com/tschoonj/GTK-for-Win ... r/releases

The maintainer announced to add Gtk4 when a MINGW MSYS2 package is available.

Regards
wallyg
Posts: 270
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Header updates for Gtk-3.0 and others

Post by wallyg »

I finally got Gtk 3.24.18 downloaded on my Windows 10 machine via msys. That was fairly painless.

I tried and it works great with only commenting out 1 line in my program.

However, I tried something in the new version which came in via 3.22. It did not work. I tracked it down to the Gir version being 3.18. I got it at https://github.com/DTJF/gir_headers. Any chance a 3.24 version will ever be available? I looked at the documentation and I do not know C or how to use it or make or ... I am solely a windows person since 1.0 (boy do I have stories about that version), prior to that Dos 3.0. Never used Unix or Linux.

Thanks for everything over the years.

Wally
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Header updates for Gtk-3.0 and others

Post by TJF »

Hi wallyg!

I just updated the headers for the current Ubuntu-20.04 version. This includes a Gtk-3.24.18 header and all matching sub headers.

BTW:
wallyg wrote:I finally got Gtk 3.24.18 downloaded on my Windows 10 machine via msys. That was fairly painless.
Can you provide a brief guide how you did that?

Regards
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Header updates for Gtk-3.0 and others

Post by srvaldez »

Hi TJF
what I do to install packages in msys2 is for example
pacman -Ss gtk
you will probably get a long list of packages to choose from, for example
mingw32/mingw-w64-i686-gtk3 3.24.18-1
then to install
pacman -S mingw-w64-i686-gtk3
I install the 64-bit version likewise
pacman -S mingw-w64-x86_64-gtk3
wallyg
Posts: 270
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Header updates for Gtk-3.0 and others

Post by wallyg »

I do the same thing, and I have a 3.24.18 installed and working.

But what I need is the gtk-3.24.18 or as close as possible .bi file. Your version of Gir that is posted is for 3.18 according to the documentation.

Thank you as always for your fantastic help. Thanks in fact for everything.

Wall
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Header updates for Gtk-3.0 and others

Post by TJF »

@srvaldez

Thanks for the guide. It's not for be, but I hope other wodniws users will benefit from your work.
wallyg wrote:Your version of Gir that is posted is for 3.18 according to the documentation.
Yes, that was the case until May 25, 2020 12:30 h. Currently the headers are 3.24.18, exactly your version.
wallyg
Posts: 270
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Header updates for Gtk-3.0 and others

Post by wallyg »

Wow, what service. Thank you and everyone that makes this happen.

I looked at gtk 4.0. The list of changes and things that need to be converted is huge. I think I will continue existing projects with 3.24 and over time, get ready for 4.0 for my next project. Maybe by that time all will be stable and we have a 4.x gtk.bi file and a windows exe file.

Wally
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Header updates for Gtk-3.0 and others

Post by TJF »

Thanks for information!

Now I understand why it's so hard to find current NSIS installers. They're obsolet since msys2 provides a package manager named pacman that can serve binaries from a build-farm (pre-compiled pool), similar to LINUX distributions. I didn't know that.

I checked the package mingw-w64-gtk3. In folder /mingw64/share/gir-1.0/ it contains the files Gtk-3.0.gir, Gdk-3.0.gir and GdkWin32-3.0.gir. After the complete installation there should be further files in that folder like GLib-2.0.gir, Pango-1.0.gir, ...

One can use that files to auto-build custom FB-headers matching exactly the binaries installed. Find details in the girtobac documentation.
wallyg
Posts: 270
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Header updates for Gtk-3.0 and others

Post by wallyg »

Thank you for the information. I will check it out shortly.

Wally
Post Reply