Removed no longer needed completed() pointer from plugin struct.

This commit is contained in:
Tomas Frydrych 2008-10-10 11:38:00 +01:00
parent 6b1719de1c
commit 2fffd6fe9f
4 changed files with 16 additions and 53 deletions

View File

@ -110,7 +110,6 @@ metacity_SOURCES += \
compositor/clutter/tidy-texture-frame.h \ compositor/clutter/tidy-texture-frame.h \
compositor/clutter/shaped-texture.c \ compositor/clutter/shaped-texture.c \
compositor/clutter/shaped-texture.h \ compositor/clutter/shaped-texture.h \
compositor/clutter/compositor-clutter-plugin.c \
include/compositor-clutter-plugin.h \ include/compositor-clutter-plugin.h \
compositor/clutter/compositor-clutter-plugin-manager.c \ compositor/clutter/compositor-clutter-plugin-manager.c \
compositor/clutter/compositor-clutter-plugin-manager.h compositor/clutter/compositor-clutter-plugin-manager.h

View File

@ -52,23 +52,6 @@ struct MetaCompositorClutterPluginPrivate
gboolean disabled : 1; gboolean disabled : 1;
}; };
/*
* This function gets called when an effect completes. It is responsible for
* any post-effect cleanup.
*/
static void
meta_compositor_clutter_effect_completed (MetaCompositorClutterPlugin *plugin,
MetaCompWindow *actor,
unsigned long event)
{
if (!actor)
{
g_warning ("Plugin [%s] passed NULL for actor!",
(plugin && plugin->name) ? plugin->name : "unknown");
}
meta_compositor_clutter_window_effect_completed (actor, event);
}
static void static void
free_plugin_workspaces (MetaCompositorClutterPlugin *plg) free_plugin_workspaces (MetaCompositorClutterPlugin *plg)
@ -144,7 +127,6 @@ meta_compositor_clutter_plugin_load (MetaCompositorClutterPluginManager *mgr,
priv = g_new0 (MetaCompositorClutterPluginPrivate, 1); priv = g_new0 (MetaCompositorClutterPluginPrivate, 1);
plg->params = g_strdup (params); plg->params = g_strdup (params);
plg->completed = meta_compositor_clutter_effect_completed;
plg->manager_private = priv; plg->manager_private = priv;
priv->module = module; priv->module = module;
priv->self = mgr; priv->self = mgr;
@ -713,3 +695,18 @@ meta_comp_clutter_plugin_get_stage (MetaCompositorClutterPlugin *plugin)
return meta_compositor_clutter_get_stage_for_screen (mgr->screen); return meta_compositor_clutter_get_stage_for_screen (mgr->screen);
} }
void
meta_comp_clutter_plugin_effect_completed (MetaCompositorClutterPlugin *plugin,
MetaCompWindow *actor,
unsigned long event)
{
if (!actor)
{
g_warning ("Plugin [%s] passed NULL for actor!",
(plugin && plugin->name) ? plugin->name : "unknown");
}
meta_compositor_clutter_window_effect_completed (actor, event);
}

View File

@ -25,11 +25,3 @@
#include "compositor-clutter-plugin.h" #include "compositor-clutter-plugin.h"
void
meta_comp_clutter_plugin_effect_completed (MetaCompositorClutterPlugin *plugin,
MetaCompWindow *actor,
unsigned long event)
{
if (plugin->completed)
plugin->completed (plugin, actor, event);
}

View File

@ -229,43 +229,18 @@ struct MetaCompositorClutterPlugin
* data. * data.
*/ */
/*
* Manager callback for completed effects; this function must be called on the
* completion of each effect.
*
* For switch-workspace effect the plugin might pass back any actor from the
* actor list, but the actor parameter must not be NULL.
*/
void (*completed) (MetaCompositorClutterPlugin *plugin,
MetaCompWindow *actor,
unsigned long event);
/* Private; manager private data. */ /* Private; manager private data. */
void *manager_private; void *manager_private;
}; };
G_INLINE_FUNC
void void
meta_comp_clutter_plugin_effect_completed (MetaCompositorClutterPlugin *plugin, meta_comp_clutter_plugin_effect_completed (MetaCompositorClutterPlugin *plugin,
MetaCompWindow *actor, MetaCompWindow *actor,
unsigned long event); unsigned long event);
#if defined (G_CAN_INLINE)
G_INLINE_FUNC
void
meta_comp_clutter_plugin_effect_completed (MetaCompositorClutterPlugin *plugin,
MetaCompWindow *actor,
unsigned long event)
{
if (plugin->completed)
plugin->completed (plugin, actor, event);
}
#endif
#endif
ClutterActor * ClutterActor *
meta_comp_clutter_plugin_get_overlay_group (MetaCompositorClutterPlugin *plugin); meta_comp_clutter_plugin_get_overlay_group (MetaCompositorClutterPlugin *plugin);
ClutterActor * ClutterActor *
meta_comp_clutter_plugin_get_stage (MetaCompositorClutterPlugin *plugin); meta_comp_clutter_plugin_get_stage (MetaCompositorClutterPlugin *plugin);
#endif