UI Binding Options
There are many bindings for Gtk2 including Ruby. This comes via a post by Roman Yakovenko on the boost listserv.
I could get started with UI development on Linux immediately, but I’d rather create that library of cross-browser primatives. This library will be a study in binding C to Ruby with UIs in mind.
The one thing that concerns me at the outset is WinMain. Neither Linux or OS X use such a beast, they use C’s main. I’d like the testing framework to be universal. Thus I’d like to be able to program window shells and mains in Ruby. (Creating an “application framework” with a root application class, is a bad place to start.)
Creating a CSS renderer control is a way to go. From Windows, one would call a function with a large and complicated struct, which is the windows way, providing telling the control it’s bounds, and where it will draw. Then it needs to hit test, and send messages to the control. The control is not a GDI control, in that it doesn’t take up an HWND, rather it draws somewhere.
Creating a framework to launch the renderer in OS X and Gtk will be much easier.
Here are more Ruby UI binding resources, including Carbon. I’ve started to play with Carbon on my own.
To start, I’m going to work on OS X carbon to get a Hello, World! page displayed, then port Gtk2.
The real impediment is establishing a build environment on Windows, which means installing gcc and all kinds of grief. After the framing of a Hello, World! program, build issues shouldn’t arise for a while.