]> Dogcows Code - chaz/openbox/blobdiff - openbox/engine.c
add focus options to the new rc file
[chaz/openbox] / openbox / engine.c
index 235277397ffddafaf287b3557401d6f3853f76a1..0ede97ff2f900869a70f4d3d23246bcab4ce7db9 100644 (file)
@@ -6,9 +6,17 @@
 #  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)) { \
@@ -58,16 +66,17 @@ static gboolean load(char *name)
     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);
@@ -76,6 +85,7 @@ void engine_startup(char *engine)
 
 void engine_shutdown()
 {
+    g_free(engine_name);
     if (module != NULL) {
        eshutdown();
        g_module_close(module);
This page took 0.025974 seconds and 4 git commands to generate.