Plugin manager API cleanup

Renamed meta_compositor_clutter_plugin_manager_event_0 to
meta_compositor_clutter_plugin_manager_event_simple and
meta_compositor_clutter_plugin_manager_event_4i to
meta_compositor_clutter_plugin_manager_event_maximize for improved clarity.
This commit is contained in:
Tomas Frydrych 2008-10-07 09:01:58 +01:00
parent d6e4fc41c2
commit 7983c29f67
3 changed files with 32 additions and 28 deletions

View File

@ -483,11 +483,11 @@ meta_compositor_clutter_plugin_manager_kill_effect (MetaCompositorClutterPluginM
* appropriate post-effect cleanup is carried out.
*/
gboolean
meta_compositor_clutter_plugin_manager_event_0 (MetaCompositorClutterPluginManager *mgr,
ClutterActor *actor,
unsigned long event,
MetaCompWindowType type,
gint workspace)
meta_compositor_clutter_plugin_manager_event_simple (MetaCompositorClutterPluginManager *mgr,
ClutterActor *actor,
unsigned long event,
MetaCompWindowType type,
gint workspace)
{
GList *l = mgr->plugins;
gboolean retval = FALSE;
@ -539,8 +539,8 @@ meta_compositor_clutter_plugin_manager_event_0 (MetaCompositorClutterPluginManag
}
/*
* The public method that the compositor hooks into for events that require
* up to 4 additional integer parameters.
* The public method that the compositor hooks into for maximize and unmaximize
* events.
*
* Returns TRUE if at least one of the plugins handled the event type (i.e.,
* if the return value is FALSE, there will be no subsequent call to the
@ -548,15 +548,15 @@ meta_compositor_clutter_plugin_manager_event_0 (MetaCompositorClutterPluginManag
* appropriate post-effect cleanup is carried out.
*/
gboolean
meta_compositor_clutter_plugin_manager_event_4i (MetaCompositorClutterPluginManager *mgr,
meta_compositor_clutter_plugin_manager_event_maximize (MetaCompositorClutterPluginManager *mgr,
ClutterActor *actor,
unsigned long event,
MetaCompWindowType type,
gint workspace,
gint i0,
gint i1,
gint i2,
gint i3)
gint target_x,
gint target_y,
gint target_width,
gint target_height)
{
GList *l = mgr->plugins;
gboolean retval = FALSE;
@ -578,7 +578,9 @@ meta_compositor_clutter_plugin_manager_event_4i (MetaCompositorClutterPluginMana
meta_compositor_clutter_plugin_manager_kill_effect (mgr,
actor,
ALL_BUT_SWITCH);
plg->maximize (actor, type, workspace, i0, i1, i2, i3);
plg->maximize (actor, type, workspace,
target_x, target_y,
target_width, target_height);
}
break;
case META_COMPOSITOR_CLUTTER_PLUGIN_UNMAXIMIZE:
@ -587,7 +589,9 @@ meta_compositor_clutter_plugin_manager_event_4i (MetaCompositorClutterPluginMana
meta_compositor_clutter_plugin_manager_kill_effect (mgr,
actor,
ALL_BUT_SWITCH);
plg->unmaximize (actor, type, workspace, i0, i1, i2, i3);
plg->unmaximize (actor, type, workspace,
target_x, target_y,
target_width, target_height);
}
break;
default:

View File

@ -31,21 +31,21 @@
typedef struct MetaCompositorClutterPluginManager MetaCompositorClutterPluginManager;
MetaCompositorClutterPluginManager * meta_compositor_clutter_plugin_manager_new (MetaScreen *screen, ClutterActor *stage);
gboolean meta_compositor_clutter_plugin_manager_event_0 (MetaCompositorClutterPluginManager *mgr,
gboolean meta_compositor_clutter_plugin_manager_event_simple (MetaCompositorClutterPluginManager *mgr,
ClutterActor *actor,
unsigned long event,
MetaCompWindowType type,
gint workspace);
gboolean meta_compositor_clutter_plugin_manager_event_4i (MetaCompositorClutterPluginManager *mgr,
gboolean meta_compositor_clutter_plugin_manager_event_maximize (MetaCompositorClutterPluginManager *mgr,
ClutterActor *actor,
unsigned long event,
MetaCompWindowType type,
gint workspace,
gint i0,
gint i1,
gint i2,
gint i3);
gint target_x,
gint target_y,
gint target_width,
gint target_height);
void meta_compositor_clutter_plugin_manager_update_workspaces (MetaCompositorClutterPluginManager *mgr);
void meta_compositor_clutter_plugin_manager_update_workspace (MetaCompositorClutterPluginManager *mgr, MetaWorkspace *w);
@ -55,6 +55,6 @@ gboolean meta_compositor_clutter_plugin_manager_switch_workspace (MetaCompositor
gint from,
gint to);
gboolean meta_compositor_clutter_plugin_manager_xevent_filter (MetaCompositorClutterPluginManager *mgr,
gboolean meta_compositor_clutter_plugin_manager_xevent_filter (MetaCompositorClutterPluginManager *mgr,
XEvent *xev);
#endif

View File

@ -1043,7 +1043,7 @@ map_win (MetaCompWindow *cw)
* type is present, destroy the actor.
*/
if (info->switch_workspace_in_progress || !info->plugin_mgr ||
!meta_compositor_clutter_plugin_manager_event_0 (info->plugin_mgr,
!meta_compositor_clutter_plugin_manager_event_simple (info->plugin_mgr,
CLUTTER_ACTOR (cw),
META_COMPOSITOR_CLUTTER_PLUGIN_MAP,
cw->priv->type, 0))
@ -1808,8 +1808,8 @@ clutter_cmp_process_event (MetaCompositor *compositor,
screen = meta_window_get_screen (window);
info = meta_screen_get_compositor_data (screen);
if (meta_compositor_clutter_plugin_manager_xevent_filter
(info->plugin_mgr,
if (meta_compositor_clutter_plugin_manager_xevent_filter
(info->plugin_mgr,
event) == TRUE)
return;
}
@ -1939,7 +1939,7 @@ clutter_cmp_destroy_window (MetaCompositor *compositor,
priv->destroy_in_progress++;
if (!info->plugin_mgr ||
!meta_compositor_clutter_plugin_manager_event_0 (info->plugin_mgr,
!meta_compositor_clutter_plugin_manager_event_simple (info->plugin_mgr,
CLUTTER_ACTOR (cw),
META_COMPOSITOR_CLUTTER_PLUGIN_DESTROY,
cw->priv->type, 0))
@ -1976,7 +1976,7 @@ clutter_cmp_minimize_window (MetaCompositor *compositor, MetaWindow *window)
cw->priv->minimize_in_progress++;
if (!info->plugin_mgr ||
!meta_compositor_clutter_plugin_manager_event_0 (info->plugin_mgr,
!meta_compositor_clutter_plugin_manager_event_simple (info->plugin_mgr,
CLUTTER_ACTOR (cw),
META_COMPOSITOR_CLUTTER_PLUGIN_MINIMIZE,
cw->priv->type, 0))
@ -2014,7 +2014,7 @@ clutter_cmp_maximize_window (MetaCompositor *compositor, MetaWindow *window,
cw->priv->maximize_in_progress++;
if (!info->plugin_mgr ||
!meta_compositor_clutter_plugin_manager_event_4i (info->plugin_mgr,
!meta_compositor_clutter_plugin_manager_event_maximize (info->plugin_mgr,
CLUTTER_ACTOR (cw),
META_COMPOSITOR_CLUTTER_PLUGIN_MAXIMIZE,
cw->priv->type, 0, x, y, width, height))
@ -2047,7 +2047,7 @@ clutter_cmp_unmaximize_window (MetaCompositor *compositor, MetaWindow *window,
cw->priv->unmaximize_in_progress++;
if (!info->plugin_mgr ||
!meta_compositor_clutter_plugin_manager_event_4i (info->plugin_mgr,
!meta_compositor_clutter_plugin_manager_event_maximize (info->plugin_mgr,
CLUTTER_ACTOR (cw),
META_COMPOSITOR_CLUTTER_PLUGIN_UNMAXIMIZE,
cw->priv->type, 0, x, y, width, height))