ome name updates plugin to engine
authorBenoit Gschwind <doth.gschwind@gmail.com>
Fri, 22 Feb 2008 21:58:07 +0000 (22:58 +0100)
committerBenoit Gschwind <doth.gschwind@gmail.com>
Fri, 22 Feb 2008 21:58:07 +0000 (22:58 +0100)
engines/default/plugin.c
engines/default/plugin.h
openbox/engine_interface.c
openbox/engine_interface.h
openbox/event.c
openbox/keytree.h
openbox/mouse.c
openbox/openbox.c

index 26d00ef4eccf5d2c77927c7bd7806d26c8f8af12..b5db95f4ecec9bc1adc0fda29cd5ef2c21c1505c 100644 (file)
@@ -1505,31 +1505,31 @@ void trigger_unmax_horz(gpointer self)
 void trigger_max_horz_toggle(gpointer self)
 {
 }
-void trigger_plugin1(gpointer self)
+void trigger_engine1(gpointer self)
 {
 }
-void trigger_plugin2(gpointer self)
+void trigger_engine2(gpointer self)
 {
 }
-void trigger_plugin3(gpointer self)
+void trigger_engine3(gpointer self)
 {
 }
-void trigger_plugin4(gpointer self)
+void trigger_engine4(gpointer self)
 {
 }
-void trigger_plugin5(gpointer self)
+void trigger_engine5(gpointer self)
 {
 }
-void trigger_plugin6(gpointer self)
+void trigger_engine6(gpointer self)
 {
 }
-void trigger_plugin7(gpointer self)
+void trigger_engine7(gpointer self)
 {
 }
-void trigger_plugin8(gpointer self)
+void trigger_engine8(gpointer self)
 {
 }
-void trigger_plugin9(gpointer self)
+void trigger_engine9(gpointer self)
 {
 }
 
@@ -1542,10 +1542,10 @@ void frame_trigger(gpointer self, ObFrameTrigger trigger_name)
                     trigger_max, trigger_unmax, trigger_max_troggle,
                     trigger_max_vert, trigger_unmax_vert, trigger_max_toggle,
                     trigger_max_horz, trigger_unmax_horz,
-                    trigger_max_horz_toggle, trigger_plugin1, trigger_plugin2,
-                    trigger_plugin3, trigger_plugin4, trigger_plugin5,
-                    trigger_plugin6, trigger_plugin7, trigger_plugin8,
-                    trigger_plugin9, NULL, 
+                    trigger_max_horz_toggle, trigger_engine1, trigger_engine2,
+                    trigger_engine3, trigger_engine4, trigger_engine5,
+                    trigger_engine6, trigger_engine7, trigger_engine8,
+                    trigger_engine9, NULL, 
 };
 
 void (*call_trigger_func)(gpointer) = trigger_func[trigger_name];
@@ -1555,7 +1555,7 @@ if(!call_trigger_func)
 }
 }
 
-ObFrameEngine plugin = {
+ObFrameEngine engine = {
         0, /* gpointer handler */
         "libdefault.la", /* gchar * filename */
         "Default", /* gchar * name */
@@ -1599,7 +1599,7 @@ ObFrameEngine plugin = {
 
 ObFrameEngine * get_info()
 {
-    return &plugin;
+    return &engine;
 }
 
 gboolean flash_timeout(gpointer data)
index 3cb46275fa244fa490864ac0d1d49b50eab2c1bf..13f817bb4b3ca3de41bca90fe2e896aca8f46e55 100644 (file)
@@ -15,8 +15,8 @@
 
  See the COPYING file for a copy of the GNU General Public License.
  */
-#ifndef FRAME_DEFAULT_PLUGIN_H_
-#define FRAME_DEFAULT_PLUGIN_H_
+#ifndef FRAME_DEFAULT_ENGINE_H_
+#define FRAME_DEFAULT_ENGINE_H_
 
 #include "config.h"
 #include "render/render.h"
@@ -211,9 +211,9 @@ void frame_trigger(gpointer, ObFrameTrigger);
 /* Global for renderframe.c only */
 extern Display * obp_display;
 extern gint obp_screen;
-extern ObFrameEngine plugin;
+extern ObFrameEngine engine;
 #define OBDEFAULTFRAME(x) ((ObDefaultFrame *)(x))
 
 ObFrameEngine * get_info();
 
-#endif /*FRAME_DEFAULT_PLUGIN_H_*/
+#endif /*FRAME_DEFAULT_ENGINE_H_*/
index 53dd945361a554b8404fab2c9c678de677020450..f43e7fd2994f59012c77dd80cb3fd8f3f7955997 100644 (file)
@@ -34,7 +34,7 @@ XrmDatabase loaddb(const gchar *name, gchar **path);
 /* Read string in XrmDatabase */
 gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value);
 
-ObFrameEngine * init_frame_plugin(const gchar *name, gboolean allow_fallback,
+ObFrameEngine * init_frame_engine(const gchar *name, gboolean allow_fallback,
         RrFont *active_window_font, RrFont *inactive_window_font,
         RrFont *menu_title_font, RrFont *menu_item_font, RrFont *osd_font)
 {
@@ -64,17 +64,17 @@ ObFrameEngine * init_frame_plugin(const gchar *name, gboolean allow_fallback,
             return 0;
     }
 
-    gchar * plugin_filename;
-    if (!read_string(db, "frame.theme.engine", &plugin_filename)) {
-        plugin_filename = "libdefault.la";
+    gchar * engine_filename;
+    if (!read_string(db, "frame.theme.engine", &engine_filename)) {
+        engine_filename = "libdefault.la";
     }
-    ob_debug("Try to init : %s", plugin_filename);
-    gchar * absolute_plugin_filename = g_build_filename(g_get_home_dir(),
-            ".config", "openbox", "engines", plugin_filename, NULL);
-    ObFrameEngine * p = load_frame_plugin(absolute_plugin_filename);
-    g_free(absolute_plugin_filename);
+    ob_debug("Try to init : %s", engine_filename);
+    gchar * absolute_engine_filename = g_build_filename(g_get_home_dir(),
+            ".config", "openbox", "engines", engine_filename, NULL);
+    ObFrameEngine * p = load_frame_engine(absolute_engine_filename);
+    g_free(absolute_engine_filename);
 
-    update_frame_plugin(p);
+    update_frame_engine(p);
 
     (p->load_theme_config)(ob_rr_inst, name, path, db, active_window_font,
             inactive_window_font, menu_title_font, menu_item_font, osd_font);
@@ -85,7 +85,7 @@ ObFrameEngine * init_frame_plugin(const gchar *name, gboolean allow_fallback,
     return p;
 }
 
-void update_frame_plugin(ObFrameEngine * self)
+void update_frame_engine(ObFrameEngine * self)
 {
     self->init (obt_display, ob_screen);
     //self->ob_display = obt_display;
@@ -96,20 +96,20 @@ void update_frame_plugin(ObFrameEngine * self)
     //self->ob_main_loop = ob_main_loop;
 }
 
-ObFrameEngine * load_frame_plugin(const gchar * filename)
+ObFrameEngine * load_frame_engine(const gchar * filename)
 {
     GModule *module;
     gpointer func;
 
     if (!(module = g_module_open(filename, G_MODULE_BIND_LOCAL))) {
-        ob_debug ("Failed to load plugin (%s): %s\n",
+        ob_debug ("Failed to load engine (%s): %s\n",
                 filename, g_module_error());
         exit(1);
     }
 
     if (g_module_symbol(module, "get_info", &func)) {
-        ObFrameEngine *plugin = (ObFrameEngine *) ((ObFrameEngineFunc) func)();
-        return plugin;
+        ObFrameEngine *engine = (ObFrameEngine *) ((ObFrameEngineFunc) func)();
+        return engine;
     }
     else {
         ob_debug_type(OB_DEBUG_SM,
@@ -118,30 +118,11 @@ ObFrameEngine * load_frame_plugin(const gchar * filename)
         exit(1);
     }
 
-    ob_debug_type(OB_DEBUG_SM, "Invalid plugin (%s)\n", filename);
+    ob_debug_type(OB_DEBUG_SM, "Invalid engine (%s)\n", filename);
     g_module_close(module);
     exit(1);
 }
-/*
- static gboolean scan_plugin_func(const gchar * path, const gchar * basename,
- gpointer data)
- {
- if (!str_has_suffix_nocase(basename, SHARED_SUFFIX))
- return FALSE;
 
- if (!g_file_test(path, G_FILE_TEST_IS_REGULAR))
- return FALSE;
-
- add_plugin(path);
-
- return FALSE;
- }
-
- static void scan_plugins(const gchar * path)
- {
- dir_foreach(path, scan_plugin_func, NULL, NULL);
- }
- */
 gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value)
 {
     gboolean ret = FALSE;
@@ -265,9 +246,9 @@ ObFrameContext frame_context_from_string(const gchar *name)
     return OB_FRAME_CONTEXT_NONE;
 }
 
-ObFrameContext plugin_frame_context(ObClient *client, Window win, gint x, gint y)
+ObFrameContext engine_frame_context(ObClient *client, Window win, gint x, gint y)
 {
-    /* this part is commun to all plugin */
+    /* this part is commun to all engine */
     if (frame_engine->moveresize_in_progress)
         return OB_FRAME_CONTEXT_MOVE_RESIZE;
     if (win == obt_root(ob_screen))
index d9075b4222be83581b95afa5b42903460727b1a1..0e6522b70028841a999d6e1f7da3e91d5c11b72c 100644 (file)
@@ -107,15 +107,15 @@ typedef enum
     OB_TRIGGER_MAX_HORZ,
     OB_TRIGGER_UNMAX_HORZ,
     OB_TRIGGER_MAX_HORZ_TOGGLE,
-    OB_TRIGGER_PLUGIN1,
-    OB_TRIGGER_PLUGIN2,
-    OB_TRIGGER_PLUGIN3,
-    OB_TRIGGER_PLUGIN4, /* ... */
-    OB_TRIGGER_PLUGIN5, /* ... */
-    OB_TRIGGER_PLUGIN6, /* ... */
-    OB_TRIGGER_PLUGIN7, /* ... */
-    OB_TRIGGER_PLUGIN8, /* ... */
-    OB_TRIGGER_PLUGIN9, /* ... */
+    OB_TRIGGER_ENGINE1,
+    OB_TRIGGER_ENGINE2,
+    OB_TRIGGER_ENGINE3,
+    OB_TRIGGER_ENGINE4, /* ... */
+    OB_TRIGGER_ENGINE5, /* ... */
+    OB_TRIGGER_ENGINE6, /* ... */
+    OB_TRIGGER_ENGINE7, /* ... */
+    OB_TRIGGER_ENGINE8, /* ... */
+    OB_TRIGGER_ENGINE9, /* ... */
 } ObFrameTrigger;
 
 struct _ObFrameEngine
@@ -212,19 +212,19 @@ typedef ObFrameEngine * (*ObFrameEngineFunc)(void);
 
 /* initialize theme plugin, it read themerc and load
  * the plugin needed */
-ObFrameEngine * init_frame_plugin(const gchar *name, gboolean allow_fallback,
+ObFrameEngine * init_frame_engine(const gchar *name, gboolean allow_fallback,
         RrFont *active_window_font, RrFont *inactive_window_font,
         RrFont *menu_title_font, RrFont *menu_item_font, RrFont *osd_font);
 
 /* Update plugin data */
-void update_frame_plugin(ObFrameEngine *);
+void update_frame_engine(ObFrameEngine *);
 
 /* Load modules specified in filename */
-ObFrameEngine * load_frame_plugin(const gchar * filename);
+ObFrameEngine * load_frame_engine(const gchar * filename);
 
 /* Give context from string, it's used to parse config file */
 ObFrameContext frame_context_from_string(const gchar *name);
-ObFrameContext plugin_frame_context(ObClient *, Window, gint, gint);
+ObFrameContext engine_frame_context(ObClient *, Window, gint, gint);
 
 void frame_client_gravity(ObClient * self, gint *x, gint *y);
 void frame_frame_gravity(ObClient * self, gint *x, gint *y);
index 980141dee5c9f49f72db5433d41aa1e81f8d46f1..b41a0cf5ceaa5ebaa4729c8f21bd613ea597e687 100644 (file)
@@ -888,7 +888,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
             !grab_on_keyboard())
         {
             /* use where the press occured */
-            con = plugin_frame_context(client, e->xbutton.window, px, py);
+            con = engine_frame_context(client, e->xbutton.window, px, py);
             con = mouse_button_frame_context(con, e->xbutton.button,
                                              e->xbutton.state);
 
@@ -927,7 +927,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
            notifies, but we still get motion events */
         if (grab_on_pointer()) break;
 
-        con = plugin_frame_context(client, e->xmotion.window,
+        con = engine_frame_context(client, e->xmotion.window,
                             e->xmotion.x, e->xmotion.y);
         switch (con) {
         case OB_FRAME_CONTEXT_TITLEBAR:
@@ -956,7 +956,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         }
         break;
     case LeaveNotify:
-        con = plugin_frame_context(client, e->xcrossing.window,
+        con = engine_frame_context(client, e->xcrossing.window,
                             e->xcrossing.x, e->xcrossing.y);
         switch (con) {
         case OB_FRAME_CONTEXT_TITLEBAR:
@@ -1006,7 +1006,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         break;
     case EnterNotify:
     {
-        con = plugin_frame_context(client, e->xcrossing.window,
+        con = engine_frame_context(client, e->xcrossing.window,
                             e->xcrossing.x, e->xcrossing.y);
         switch (con) {
         case OB_FRAME_CONTEXT_MAXIMIZE:
index 391cb154fb91a5cc61c2f12ac8771dd8a17b91b3..25d7c4637b504bfad9b36962f49d4c87587d143c 100644 (file)
@@ -16,8 +16,8 @@
    See the COPYING file for a copy of the GNU General Public License.
 */
 
-#ifndef __plugin_keyboard_tree_h
-#define __plugin_keyboard_tree_h
+#ifndef __engine_keyboard_tree_h
+#define __engine_keyboard_tree_h
 
 #include <glib.h>
 
index f2903919eeaf6ced7120f2142888a62846068a9b..16b727cc8cc7a4b635d380226029a7e0a0794e53 100644 (file)
@@ -224,7 +224,7 @@ void mouse_event(ObClient *client, XEvent *e)
 
     switch (e->type) {
     case ButtonPress:
-        context = plugin_frame_context(client, e->xbutton.window,
+        context = engine_frame_context(client, e->xbutton.window,
                                 e->xbutton.x, e->xbutton.y);
         context = mouse_button_frame_context(context, e->xbutton.button,
                                              e->xbutton.state);
@@ -273,7 +273,7 @@ void mouse_event(ObClient *client, XEvent *e)
 
     case ButtonRelease:
         /* use where the press occured in the window */
-        context = plugin_frame_context(client, e->xbutton.window, pwx, pwy);
+        context = engine_frame_context(client, e->xbutton.window, pwx, pwy);
         context = mouse_button_frame_context(context, e->xbutton.button,
                                              e->xbutton.state);
 
@@ -338,7 +338,7 @@ void mouse_event(ObClient *client, XEvent *e)
 
     case MotionNotify:
         if (button) {
-            context = plugin_frame_context(client, e->xmotion.window, pwx, pwy);
+            context = engine_frame_context(client, e->xmotion.window, pwx, pwy);
             context = mouse_button_frame_context(context, button, state);
 
             if (ABS(e->xmotion.x_root - px) >= config_mouse_threshold ||
index 3bbb96874814ed7bedb86919550fe60381c63dad..505f4417be966a347411276d4a3c4bbcd19a8302 100644 (file)
@@ -257,7 +257,7 @@ gint main(gint argc, gchar **argv)
             /* load the theme specified in the rc file */
               {
                 ob_debug("Entering LoadThemeConfig");
-                frame_engine = init_frame_plugin (
+                frame_engine = init_frame_engine (
                     config_theme, TRUE, config_font_activewindow,
                     config_font_inactivewindow, config_font_menutitle,
                     config_font_menuitem, config_font_osd);