RuntimeGuiSelection

From Gnash Project Wiki

Jump to: navigation, search

Version 0.8.1 of Gnash introduced support for runtime selection of the GUI.

Currently, this support is a bit confusing, we want to cleanup/fix it. For 0.8.1 they are convenience libs instead, which are compiled into the libgnashgui library. The libgnashplayer library, providing the Player class, will be able to create a user-specified gui among the one built into the libgnashgui library. The set of built-in guis is comunicated to libgnashplayer by use of GUI_XXX macros, passed on by the Makefile as -DGUI_XXX switches to GCC invocation.

A separate GUI is built for each option: gtk-gnash, kde-gnash, sdl-gnash, fb-gnash etc. The gnash file is a shell script that automatically runs an executable.

Known GUIs are:

  • GTK
  • KDE
  • FB
  • SDL
  • FLTK
  • AQUA
  • RISCOS

The configure output, make dumpconfig and gnash --version all use a config.h macro to show which GUIs have been built-in (and which one is the default).

Default GUI

When no -G switch is given to gnash, a default GUI would load. This is currently picked as the first GUI given to the ./configure --enable-gui switch, or 'kde' for klash, or an unspecified default if no --enable-gui is given. For the future, we might want to take a look at the environment (unless some other setting mean is given, like gnashrc) to find out what is best.

Possible things to look at would be:

  • GNOME_DESKTOP_SESSION_ID - to select GTK gui
  •  ??? - to select KDE gui
  • DISPLAY - if unset, select FB gui