# include <stdlib.h>
#endif
-static GModule *module;
-static EngineStartup *estartup;
-static EngineShutdown *eshutdown;
+char *engine_name = NULL;
+char *engine_theme = NULL;
+char *engine_layout = "NDSLIMC";
+char *engine_font = "Sans-7";
+gboolean engine_shadow = FALSE;
+int engine_shadow_offset = 1;
+int engine_shadow_tint = 25;
+
+static GModule *module = NULL;
+static EngineStartup *estartup = NULL;
+static EngineShutdown *eshutdown = NULL;
#define LOADSYM(name, var) \
if (!g_module_symbol(module, #name, (gpointer*)&var)) { \
return TRUE;
}
-void engine_startup(char *engine)
+void engine_startup()
{
module = NULL;
+}
- if (engine != NULL) {
- if (load(engine))
- return;
- g_warning("Failed to load the engine '%s'", engine);
- g_message("Falling back to the default: '%s'", DEFAULT_ENGINE);
- }
+void engine_load()
+{
+ if (load(engine_name))
+ return;
+ g_warning("Failed to load the engine '%s'", engine_name);
+ g_message("Falling back to the default: '%s'", DEFAULT_ENGINE);
if (!load(DEFAULT_ENGINE)) {
g_critical("Failed to load the engine '%s'. Aborting", DEFAULT_ENGINE);
exit(1);
void engine_shutdown()
{
+ g_free(engine_name);
if (module != NULL) {
eshutdown();
g_module_close(module);