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)
{
}
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];
}
}
-ObFrameEngine plugin = {
+ObFrameEngine engine = {
0, /* gpointer handler */
"libdefault.la", /* gchar * filename */
"Default", /* gchar * name */
ObFrameEngine * get_info()
{
- return &plugin;
+ return &engine;
}
gboolean flash_timeout(gpointer data)
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"
/* 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_*/
/* 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)
{
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);
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;
//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,
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;
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))
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
/* 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);
!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);
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:
}
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:
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:
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>
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);
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);
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 ||
/* 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);