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:
parent
d6e4fc41c2
commit
7983c29f67
@ -483,7 +483,7 @@ meta_compositor_clutter_plugin_manager_kill_effect (MetaCompositorClutterPluginM
|
|||||||
* appropriate post-effect cleanup is carried out.
|
* appropriate post-effect cleanup is carried out.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
meta_compositor_clutter_plugin_manager_event_0 (MetaCompositorClutterPluginManager *mgr,
|
meta_compositor_clutter_plugin_manager_event_simple (MetaCompositorClutterPluginManager *mgr,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
unsigned long event,
|
unsigned long event,
|
||||||
MetaCompWindowType type,
|
MetaCompWindowType type,
|
||||||
@ -539,8 +539,8 @@ meta_compositor_clutter_plugin_manager_event_0 (MetaCompositorClutterPluginManag
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The public method that the compositor hooks into for events that require
|
* The public method that the compositor hooks into for maximize and unmaximize
|
||||||
* up to 4 additional integer parameters.
|
* events.
|
||||||
*
|
*
|
||||||
* Returns TRUE if at least one of the plugins handled the event type (i.e.,
|
* 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
|
* 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.
|
* appropriate post-effect cleanup is carried out.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
meta_compositor_clutter_plugin_manager_event_4i (MetaCompositorClutterPluginManager *mgr,
|
meta_compositor_clutter_plugin_manager_event_maximize (MetaCompositorClutterPluginManager *mgr,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
unsigned long event,
|
unsigned long event,
|
||||||
MetaCompWindowType type,
|
MetaCompWindowType type,
|
||||||
gint workspace,
|
gint workspace,
|
||||||
gint i0,
|
gint target_x,
|
||||||
gint i1,
|
gint target_y,
|
||||||
gint i2,
|
gint target_width,
|
||||||
gint i3)
|
gint target_height)
|
||||||
{
|
{
|
||||||
GList *l = mgr->plugins;
|
GList *l = mgr->plugins;
|
||||||
gboolean retval = FALSE;
|
gboolean retval = FALSE;
|
||||||
@ -578,7 +578,9 @@ meta_compositor_clutter_plugin_manager_event_4i (MetaCompositorClutterPluginMana
|
|||||||
meta_compositor_clutter_plugin_manager_kill_effect (mgr,
|
meta_compositor_clutter_plugin_manager_kill_effect (mgr,
|
||||||
actor,
|
actor,
|
||||||
ALL_BUT_SWITCH);
|
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;
|
break;
|
||||||
case META_COMPOSITOR_CLUTTER_PLUGIN_UNMAXIMIZE:
|
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,
|
meta_compositor_clutter_plugin_manager_kill_effect (mgr,
|
||||||
actor,
|
actor,
|
||||||
ALL_BUT_SWITCH);
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -31,21 +31,21 @@
|
|||||||
typedef struct MetaCompositorClutterPluginManager MetaCompositorClutterPluginManager;
|
typedef struct MetaCompositorClutterPluginManager MetaCompositorClutterPluginManager;
|
||||||
|
|
||||||
MetaCompositorClutterPluginManager * meta_compositor_clutter_plugin_manager_new (MetaScreen *screen, ClutterActor *stage);
|
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,
|
ClutterActor *actor,
|
||||||
unsigned long event,
|
unsigned long event,
|
||||||
MetaCompWindowType type,
|
MetaCompWindowType type,
|
||||||
gint workspace);
|
gint workspace);
|
||||||
|
|
||||||
gboolean meta_compositor_clutter_plugin_manager_event_4i (MetaCompositorClutterPluginManager *mgr,
|
gboolean meta_compositor_clutter_plugin_manager_event_maximize (MetaCompositorClutterPluginManager *mgr,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
unsigned long event,
|
unsigned long event,
|
||||||
MetaCompWindowType type,
|
MetaCompWindowType type,
|
||||||
gint workspace,
|
gint workspace,
|
||||||
gint i0,
|
gint target_x,
|
||||||
gint i1,
|
gint target_y,
|
||||||
gint i2,
|
gint target_width,
|
||||||
gint i3);
|
gint target_height);
|
||||||
void meta_compositor_clutter_plugin_manager_update_workspaces (MetaCompositorClutterPluginManager *mgr);
|
void meta_compositor_clutter_plugin_manager_update_workspaces (MetaCompositorClutterPluginManager *mgr);
|
||||||
|
|
||||||
void meta_compositor_clutter_plugin_manager_update_workspace (MetaCompositorClutterPluginManager *mgr, MetaWorkspace *w);
|
void meta_compositor_clutter_plugin_manager_update_workspace (MetaCompositorClutterPluginManager *mgr, MetaWorkspace *w);
|
||||||
|
@ -1043,7 +1043,7 @@ map_win (MetaCompWindow *cw)
|
|||||||
* type is present, destroy the actor.
|
* type is present, destroy the actor.
|
||||||
*/
|
*/
|
||||||
if (info->switch_workspace_in_progress || !info->plugin_mgr ||
|
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),
|
CLUTTER_ACTOR (cw),
|
||||||
META_COMPOSITOR_CLUTTER_PLUGIN_MAP,
|
META_COMPOSITOR_CLUTTER_PLUGIN_MAP,
|
||||||
cw->priv->type, 0))
|
cw->priv->type, 0))
|
||||||
@ -1939,7 +1939,7 @@ clutter_cmp_destroy_window (MetaCompositor *compositor,
|
|||||||
priv->destroy_in_progress++;
|
priv->destroy_in_progress++;
|
||||||
|
|
||||||
if (!info->plugin_mgr ||
|
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),
|
CLUTTER_ACTOR (cw),
|
||||||
META_COMPOSITOR_CLUTTER_PLUGIN_DESTROY,
|
META_COMPOSITOR_CLUTTER_PLUGIN_DESTROY,
|
||||||
cw->priv->type, 0))
|
cw->priv->type, 0))
|
||||||
@ -1976,7 +1976,7 @@ clutter_cmp_minimize_window (MetaCompositor *compositor, MetaWindow *window)
|
|||||||
cw->priv->minimize_in_progress++;
|
cw->priv->minimize_in_progress++;
|
||||||
|
|
||||||
if (!info->plugin_mgr ||
|
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),
|
CLUTTER_ACTOR (cw),
|
||||||
META_COMPOSITOR_CLUTTER_PLUGIN_MINIMIZE,
|
META_COMPOSITOR_CLUTTER_PLUGIN_MINIMIZE,
|
||||||
cw->priv->type, 0))
|
cw->priv->type, 0))
|
||||||
@ -2014,7 +2014,7 @@ clutter_cmp_maximize_window (MetaCompositor *compositor, MetaWindow *window,
|
|||||||
cw->priv->maximize_in_progress++;
|
cw->priv->maximize_in_progress++;
|
||||||
|
|
||||||
if (!info->plugin_mgr ||
|
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),
|
CLUTTER_ACTOR (cw),
|
||||||
META_COMPOSITOR_CLUTTER_PLUGIN_MAXIMIZE,
|
META_COMPOSITOR_CLUTTER_PLUGIN_MAXIMIZE,
|
||||||
cw->priv->type, 0, x, y, width, height))
|
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++;
|
cw->priv->unmaximize_in_progress++;
|
||||||
|
|
||||||
if (!info->plugin_mgr ||
|
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),
|
CLUTTER_ACTOR (cw),
|
||||||
META_COMPOSITOR_CLUTTER_PLUGIN_UNMAXIMIZE,
|
META_COMPOSITOR_CLUTTER_PLUGIN_UNMAXIMIZE,
|
||||||
cw->priv->type, 0, x, y, width, height))
|
cw->priv->type, 0, x, y, width, height))
|
||||||
|
Loading…
Reference in New Issue
Block a user