Gtk2 API and Examples

  1. 2 weeks ago

    I've created Gtk+2 API Library and several examples on how to use it.

    xojo-libgtk2
    xojo-libgtk2-tutorial

    Feel free to give a feedback by open an issue or create a PR.

  2. Tim J

    Feb 10 Pre-Release Testers, Xojo Pro Back in Phoenix, AZ USA (desic...

    Have you double checked these with the 2017r2/r3 changes to GTK-3?

  3. Edited 2 weeks ago

    Not sure what do you mean. Other xojo user has already shared Gtk3 API. This library provide Gtk2 API only and currently tested with xojo < 2017r2. However, that's interesting, I'll check if this library can be used with xojo >= 2017r2.

  4. Tim J

    Feb 10 Pre-Release Testers, Xojo Pro Back in Phoenix, AZ USA (desic...

    That's what I mean - can your GTK-2 module be used with the new version of Xojo.

  5. Quick test using Xojo2017r2, it works.

  6. Christian S

    Feb 10 Pre-Release Testers, Xojo Pro Germany

    For MBS Plugin, we dynamically load either gtk 2 or 3 libraries depending on the Xojo host version.

    For Your declares, you may want to make sure you keep the library name as a constant, so people can easy switch between the both library names: libgtk-x11-2.0.so vs libgtk-3.so

  7. Since Gtk3 released two(?) versions of theme, I don't really like it. I prefer to choose Gtk2 over Gtk3.

  8. Christian S

    Feb 10 Pre-Release Testers, Xojo Pro Germany

    You have no choice. If gtk3 is missing, a Xojo 2017r3 app will not launch.

  9. Gtk3 doesn't have a problem running in my system. I only prefer to develop using Gtk2 over Gtk3. I'm waiting Gtk4 first stable release to see what is it :D

  10. Axel S

    is not verified Feb 10 Europe (Germany, Erfurt)

    Linux Mint 18.3 64bit - Xojo 2016R4.1

    I looked at it. They are all console apps.
    Too bad, but none of the examples runs in debug mode.
    My license is for desktop only, so I can not build it. =(

  11. Sorry about that.

    I've pushed desktop version into repository. Please check it. Tested desktop version on Linux mint and it works.
    Seems there is dependency conflict when execute desktop example using Xojo >= 2017r2.

    -image-

  12. I'm getting a functionNotfoundexception on this line:

      gtk_init(argc, argv) 
  13. please type this on your console

    ldconfig -p | grep libgtk-

    and paste the result here.

  14. What's your distro?

  15. Edited 2 weeks ago

    I got
    -bash: ldconfig: command not found

    macOS High Sierra 10.13.3

    Edit: I looked it up seems like it's a Linux thing

  16. Oh sorry, currently this library only run on linux. I don't put #If Not TargetLinux because I think everybody knows Gtk is linux library. My bad.

    In this page https://www.gtk.org/download/macos.php , there is Gtk for Mac. But, I don't have Mac. So, I don't know dylib name of gtk shared library on Mac.

    You can check Gtk+2 library on your system and replace Gtk2Lib constant value with the dylib name.

  17. No worries,
    I saw "ModGtkStatusbar.xojo_code" and for some reason thought statusitem :)
    I will install Linux Mint when I get the chance.

    Thanks Asis.

  18. You're welcome :)

or Sign Up to reply!