some gtk2 code

Miscellaneous Forums/Linux Discussion/some gtk2 code

Yet another update... 1.08

* Split out HTML views into separate modules - see bah.gtkwebgtkhtml and bah.gtkwebmozilla.
* Fixed double-ampersand text displaying.
* Improved WINDOW_CLIENTCOORDS handling.
* Improved gadget positioning - no negative coords!.
* EVENT_MOUSEMOVE on panel/canvas now contain button-pressed value.
* Improved gadgeted freeing.

Also there are TWO new optional modules available. These allow you to choose which HTMLView you want to package (if any!) with your application. Currently it supports GTKHtml and Mozilla widgets...

* bah.gtkwebgtkhtml
* bah.gtkwebmozilla

To use one in your app you would have something like the following:
Framework BaH.GTKMaxGUI
Import BaH.GTKWebMozilla

If you don't need an HTMLView, don't import one, and it'll build your app without that library dependency.

Caveats ;-)
GTKHTML
------
Requires libgtkhtml-3.8

Mozilla
-------
Requires the path to the mozilla libs defined (either via LD_LIBRARY_PATH or by configuring it using ldconfig path/to/the/libs)
An environment variable can be set - MOZ_DIST_BIN - which the app will use to tell mozilla where it is installed. This sets a global string variable - MOZ_DIST_BIN.
The default value is /usr/lib/mozilla-firefox
You can override the value either by setting the environment variable, or by setting the blitz variable at runtime.
Also (isn't there always?)... some firefox dists appear to have different required files to import. In gtkwebmozilla.bmx there is a commented out line - Import "-lxpcom_core" - which you may have to uncomment for your distro. (of course, this could be a problem when attempting to run the app on a different box, but for now I don't know what to do about it).
Other than that, Mozilla provides a much enhanced web-standards supported browsing experience, which you may wish to persevere with...

hmmm. I should probably add more imports for the "lookup" paths for compiling. Currently there is only :
Import "-L/usr/lib/mozilla-firefox"
might want to add :
Import "-L/usr/lib/firefox"

:o)