From 7e25c3b2e0969bc84c368b99a11175791e6b74c0 Mon Sep 17 00:00:00 2001 From: Benoit Gschwind Date: Thu, 21 Feb 2008 20:21:58 +0100 Subject: [PATCH] Rename ObFramePlugin to ObFrameEngine --- engines/default/plugin.c | 13 +++++++------ engines/default/plugin.h | 4 ++-- openbox/engine_interface.c | 10 +++++----- openbox/engine_interface.h | 12 ++++++------ openbox/openbox.c | 2 +- openbox/openbox.h | 2 +- render/theme.c | 2 +- render/theme.h | 4 ++-- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/engines/default/plugin.c b/engines/default/plugin.c index 188a9801..69f4730b 100644 --- a/engines/default/plugin.c +++ b/engines/default/plugin.c @@ -1838,10 +1838,11 @@ if(!call_trigger_func) } } -ObFramePlugin plugin = { 0, /* gpointer handler */ -"libdefault.la", /* gchar * filename */ -"Default", /* gchar * name */ -init, //gint (*init) (Display * display, gint screen); +ObFrameEngine plugin = { + 0, /* gpointer handler */ + "libdefault.la", /* gchar * filename */ + "Default", /* gchar * name */ + init, //gint (*init) (Display * display, gint screen); 0, /* */ frame_new, //gpointer (*frame_new) (struct _ObClient *c); frame_free, //void (*frame_free) (gpointer self); @@ -1897,9 +1898,9 @@ init, //gint (*init) (Display * display, gint screen); 0, //gchar *config_title_layout; FALSE, //gboolean moveresize_in_progress; 0, //struct _ObMainLoop *ob_main_loop; -}; + }; -ObFramePlugin * get_info() +ObFrameEngine * get_info() { return &plugin; } diff --git a/engines/default/plugin.h b/engines/default/plugin.h index 3b869321..33d6d9e7 100644 --- a/engines/default/plugin.h +++ b/engines/default/plugin.h @@ -223,9 +223,9 @@ void frame_trigger(gpointer, ObFrameTrigger); /* Global for renderframe.c only */ extern Display * obp_display; extern gint obp_screen; -extern ObFramePlugin plugin; +extern ObFrameEngine plugin; #define OBDEFAULTFRAME(x) ((ObDefaultFrame *)(x)) -ObFramePlugin * get_info(); +ObFrameEngine * get_info(); #endif /*FRAME_DEFAULT_PLUGIN_H_*/ diff --git a/openbox/engine_interface.c b/openbox/engine_interface.c index 6ba3091c..eacd10d6 100644 --- a/openbox/engine_interface.c +++ b/openbox/engine_interface.c @@ -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); -ObFramePlugin * init_frame_plugin(const gchar *name, gboolean allow_fallback, +ObFrameEngine * init_frame_plugin(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) { @@ -71,7 +71,7 @@ ObFramePlugin * init_frame_plugin(const gchar *name, gboolean allow_fallback, 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); - ObFramePlugin * p = load_frame_plugin(absolute_plugin_filename); + ObFrameEngine * p = load_frame_plugin(absolute_plugin_filename); g_free(absolute_plugin_filename); update_frame_plugin(p); @@ -85,7 +85,7 @@ ObFramePlugin * init_frame_plugin(const gchar *name, gboolean allow_fallback, return p; } -void update_frame_plugin(ObFramePlugin * self) +void update_frame_plugin(ObFrameEngine * self) { self->init (obt_display, ob_screen); //self->ob_display = obt_display; @@ -96,7 +96,7 @@ void update_frame_plugin(ObFramePlugin * self) self->ob_main_loop = ob_main_loop; } -ObFramePlugin * load_frame_plugin(const gchar * filename) +ObFrameEngine * load_frame_plugin(const gchar * filename) { GModule *module; gpointer func; @@ -108,7 +108,7 @@ ObFramePlugin * load_frame_plugin(const gchar * filename) } if (g_module_symbol(module, "get_info", &func)) { - ObFramePlugin *plugin = (ObFramePlugin *) ((ObFramePluginFunc) func)(); + ObFrameEngine *plugin = (ObFrameEngine *) ((ObFrameEngineFunc) func)(); return plugin; } else { diff --git a/openbox/engine_interface.h b/openbox/engine_interface.h index b23d6adf..6406b8c6 100644 --- a/openbox/engine_interface.h +++ b/openbox/engine_interface.h @@ -118,7 +118,7 @@ typedef enum OB_TRIGGER_PLUGIN9, /* ... */ } ObFrameTrigger; -struct _ObFramePlugin +struct _ObFrameEngine { gpointer handler; // Currently not used. @@ -217,22 +217,22 @@ enum _ObStyle }; typedef enum _ObStyle ObStyle; -typedef struct _ObFramePlugin ObFramePlugin; -typedef ObFramePlugin * (*ObFramePluginFunc)(void); +typedef struct _ObFrameEngine ObFrameEngine; +typedef ObFrameEngine * (*ObFrameEngineFunc)(void); #define OBFRAME(x) (ObFrame *) (x); /* initialize theme plugin, it read themerc and load * the plugin needed */ -ObFramePlugin * init_frame_plugin(const gchar *name, gboolean allow_fallback, +ObFrameEngine * init_frame_plugin(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(ObFramePlugin *); +void update_frame_plugin(ObFrameEngine *); /* Load modules specified in filename */ -ObFramePlugin * load_frame_plugin(const gchar * filename); +ObFrameEngine * load_frame_plugin(const gchar * filename); /* Give context from string, it's used to parse config file */ ObFrameContext frame_context_from_string(const gchar *name); diff --git a/openbox/openbox.c b/openbox/openbox.c index 018dff21..8cbae592 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -92,7 +92,7 @@ gchar *ob_sm_id = NULL; gchar *ob_sm_save_file = NULL; gboolean ob_sm_restore = TRUE; gboolean ob_debug_xinerama = FALSE; -ObFramePlugin *render_plugin = NULL; +ObFrameEngine * render_plugin = NULL; static ObState state; static gboolean xsync = FALSE; diff --git a/openbox/openbox.h b/openbox/openbox.h index bc6bf21b..fb90887f 100644 --- a/openbox/openbox.h +++ b/openbox/openbox.h @@ -48,7 +48,7 @@ extern gboolean ob_replace_wm; extern gboolean ob_debug_xinerama; /* render function */ -extern ObFramePlugin *render_plugin; +extern ObFrameEngine * render_plugin; /* The state of execution of the window manager */ ObState ob_state(); diff --git a/render/theme.c b/render/theme.c index f44d68a0..e69bdeb5 100644 --- a/render/theme.c +++ b/render/theme.c @@ -47,7 +47,7 @@ static int parse_inline_number(const char *p); static RrPixel32* read_c_image(gint width, gint height, const guint8 *data); static void set_default_appearance(RrAppearance *a); -gint LoadThemeConfig(ObFramePlugin * p, const RrInstance *inst, +gint LoadThemeConfig(ObFrameEngine * p, const RrInstance *inst, 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) diff --git a/render/theme.h b/render/theme.h index 0363050f..ce965321 100644 --- a/render/theme.h +++ b/render/theme.h @@ -241,10 +241,10 @@ struct _RrTheme { gchar *name; }; -struct _ObFramePlugin; +struct _ObFrameEngine; /*! The font values are all optional. If a NULL is used for any of them, then the default font will be used. */ -gint LoadThemeConfig(struct _ObFramePlugin * p, const RrInstance *inst, +gint LoadThemeConfig(struct _ObFrameEngine * p, const RrInstance *inst, 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); -- 2.34.1