Just moving ahead now with GTK3

It still has some extra debugging prints but basically it is a SUCCESS!!

This is some plain GTK code to enter (just copy and paste into your console)

gtk-init
window: gtk-window-new 0
gtk-window-set-title window "Ren-C"
g-signal-connect-data window "destroy" get-handle :gtk-main-quit window null 2
box1: gtk-box-new 0 6
gtk-container-add window box1
label1: gtk-label-new "Label!"
blok: [print "Hello"]
f: function [][print "Greetings from function f!!!"]
button1: gtk-button-new-with-label "Impressive!"
g-signal-connect-data button1 "clicked" :f null null 0
gtk-container-add box1 label1
gtk-container-add box1 button1
gtk-widget-show-all window
gtk-box-set-homogeneous box1 true
gtk-box-get-homogeneous box1
gtk-main-level
gtk-main

And it is returning on the button click:

>> gtk-main
Inside self_signal_connect_helper
main level is 1 HIGH
before rebElide of user_data
Greetings from function f!!!
After rebElide of user_data

I must clean up the code, but to preserve working code I just pushed to the r3n branch for you all to reproduce.

Having these things liberates the way to the next level.

I have several code snippets of VIEW and LAYOUT functions laying around so time to decide on how to use GOB!s and what is most efficient for this project.

3 Likes