[mutter] plugin: Remove unneeded wrapper APIs
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] plugin: Remove unneeded wrapper APIs
- Date: Thu, 8 Mar 2012 23:04:41 +0000 (UTC)
commit 5e3d93da877884d630ce3631f7d7eb4cc0a0cd09
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Feb 29 21:44:43 2012 -0500
plugin: Remove unneeded wrapper APIs
Mutter originally started out with the idea that only a subset of the total
API was exposed to plugins, so some APIs are duplicated on MutterPlugin.
We've long since abandoned that idea; remove these wrappers.
https://bugzilla.gnome.org/show_bug.cgi?id=671103
src/compositor/compositor-private.h | 3 -
src/compositor/meta-plugin.c | 118 +----------------------------------
src/compositor/plugins/default.c | 16 +++--
src/meta/compositor-mutter.h | 4 +
src/meta/meta-plugin.h | 31 ---------
5 files changed, 15 insertions(+), 157 deletions(-)
---
diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h
index 23f639f..e7eadf8 100644
--- a/src/compositor/compositor-private.h
+++ b/src/compositor/compositor-private.h
@@ -55,9 +55,6 @@ struct _MetaCompScreen
};
void meta_switch_workspace_completed (MetaScreen *screen);
-void meta_set_stage_input_region (MetaScreen *screen,
- XserverRegion region);
-void meta_empty_stage_input_region (MetaScreen *screen);
gboolean meta_begin_modal_for_plugin (MetaScreen *screen,
MetaPlugin *plugin,
diff --git a/src/compositor/meta-plugin.c b/src/compositor/meta-plugin.c
index 055b1b0..475f877 100644
--- a/src/compositor/meta-plugin.c
+++ b/src/compositor/meta-plugin.c
@@ -263,38 +263,6 @@ meta_plugin_get_info (MetaPlugin *plugin)
return NULL;
}
-ClutterActor *
-meta_plugin_get_overlay_group (MetaPlugin *plugin)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
-
- return meta_get_overlay_group_for_screen (priv->screen);
-}
-
-ClutterActor *
-meta_plugin_get_stage (MetaPlugin *plugin)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
-
- return meta_get_stage_for_screen (priv->screen);
-}
-
-ClutterActor *
-meta_plugin_get_window_group (MetaPlugin *plugin)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
-
- return meta_get_window_group_for_screen (priv->screen);
-}
-
-ClutterActor *
-meta_plugin_get_background_actor (MetaPlugin *plugin)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
-
- return meta_get_background_actor_for_screen (priv->screen);
-}
-
/**
* _meta_plugin_effect_started:
* @plugin: the plugin
@@ -315,7 +283,7 @@ meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
{
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
- MetaScreen *screen = meta_plugin_get_screen (plugin);
+ MetaScreen *screen = priv->screen;
if (priv->running-- < 0)
{
@@ -389,80 +357,6 @@ meta_plugin_destroy_completed (MetaPlugin *plugin,
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_DESTROY);
}
-void
-meta_plugin_query_screen_size (MetaPlugin *plugin,
- int *width,
- int *height)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
-
- meta_screen_get_size (priv->screen, width, height);
-}
-
-void
-meta_plugin_set_stage_reactive (MetaPlugin *plugin,
- gboolean reactive)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
- MetaScreen *screen = priv->screen;
-
- if (reactive)
- meta_set_stage_input_region (screen, None);
- else
- meta_empty_stage_input_region (screen);
-}
-
-void
-meta_plugin_set_stage_input_area (MetaPlugin *plugin,
- gint x, gint y, gint width, gint height)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
- MetaScreen *screen = priv->screen;
- MetaDisplay *display = meta_screen_get_display (screen);
- Display *xdpy = meta_display_get_xdisplay (display);
- XRectangle rect;
- XserverRegion region;
-
- rect.x = x;
- rect.y = y;
- rect.width = width;
- rect.height = height;
-
- region = XFixesCreateRegion (xdpy, &rect, 1);
- meta_set_stage_input_region (screen, region);
- XFixesDestroyRegion (xdpy, region);
-}
-
-void
-meta_plugin_set_stage_input_region (MetaPlugin *plugin,
- XserverRegion region)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
- MetaScreen *screen = priv->screen;
-
- meta_set_stage_input_region (screen, region);
-}
-
-/**
- * meta_plugin_get_window_actors:
- * @plugin: A #MetaPlugin
- *
- * This function returns all of the #MetaWindowActor objects referenced by Mutter, including
- * override-redirect windows. The returned list is a snapshot of Mutter's current
- * stacking order, with the topmost window last.
- *
- * The 'restacked' signal of #MetaScreen signals when this value has changed.
- *
- * Returns: (transfer none) (element-type MetaWindowActor): Windows in stacking order, topmost last
- */
-GList *
-meta_plugin_get_window_actors (MetaPlugin *plugin)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
-
- return meta_get_window_actors (priv->screen);
-}
-
/**
* meta_plugin_begin_modal:
* @plugin: a #MetaPlugin
@@ -521,16 +415,6 @@ meta_plugin_end_modal (MetaPlugin *plugin,
meta_end_modal_for_plugin (priv->screen, plugin, timestamp);
}
-Display *
-meta_plugin_get_xdisplay (MetaPlugin *plugin)
-{
- MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
- MetaDisplay *display = meta_screen_get_display (priv->screen);
- Display *xdpy = meta_display_get_xdisplay (display);
-
- return xdpy;
-}
-
/**
* meta_plugin_get_screen:
* @plugin: a #MetaPlugin
diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c
index 791715d..e78d617 100644
--- a/src/compositor/plugins/default.c
+++ b/src/compositor/plugins/default.c
@@ -284,7 +284,8 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
{
MetaPlugin *plugin = META_PLUGIN (data);
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
- GList *l = meta_plugin_get_window_actors (plugin);
+ MetaScreen *screen = meta_plugin_get_screen (plugin);
+ GList *l = meta_get_window_actors (screen);
while (l)
{
@@ -317,6 +318,7 @@ switch_workspace (MetaPlugin *plugin,
gint from, gint to,
MetaMotionDirection direction)
{
+ MetaScreen *screen;
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
GList *l;
ClutterActor *workspace0 = clutter_group_new ();
@@ -325,11 +327,13 @@ switch_workspace (MetaPlugin *plugin,
int screen_width, screen_height;
ClutterAnimation *animation;
- stage = meta_plugin_get_stage (plugin);
+ screen = meta_plugin_get_screen (plugin);
+ stage = CLUTTER (meta_get_stage_for_screen (screen));
+
+ meta_screen_get_size (screen,
+ &screen_width,
+ &screen_height);
- meta_plugin_query_screen_size (plugin,
- &screen_width,
- &screen_height);
clutter_actor_set_anchor_point (workspace1,
screen_width,
screen_height);
@@ -348,7 +352,7 @@ switch_workspace (MetaPlugin *plugin,
return;
}
- l = g_list_last (meta_plugin_get_window_actors (plugin));
+ l = g_list_last (meta_get_window_actors (screen));
while (l)
{
diff --git a/src/meta/compositor-mutter.h b/src/meta/compositor-mutter.h
index 5be1f0e..e196c65 100644
--- a/src/meta/compositor-mutter.h
+++ b/src/meta/compositor-mutter.h
@@ -27,6 +27,7 @@
#include <clutter/clutter.h>
#include <X11/Xlib.h>
+#include <X11/extensions/Xfixes.h>
#include <meta/types.h>
#include <meta/compositor.h>
@@ -43,5 +44,8 @@ void meta_disable_unredirect_for_screen (MetaScreen *screen);
void meta_enable_unredirect_for_screen (MetaScreen *screen);
ClutterActor *meta_get_background_actor_for_screen (MetaScreen *screen);
+void meta_set_stage_input_region (MetaScreen *screen,
+ XserverRegion region);
+void meta_empty_stage_input_region (MetaScreen *screen);
#endif
diff --git a/src/meta/meta-plugin.h b/src/meta/meta-plugin.h
index a7f87dc..8e46ec8 100644
--- a/src/meta/meta-plugin.h
+++ b/src/meta/meta-plugin.h
@@ -246,35 +246,6 @@ void
meta_plugin_destroy_completed (MetaPlugin *plugin,
MetaWindowActor *actor);
-ClutterActor *
-meta_plugin_get_overlay_group (MetaPlugin *plugin);
-
-ClutterActor *
-meta_plugin_get_window_group (MetaPlugin *plugin);
-
-ClutterActor *
-meta_plugin_get_background_actor (MetaPlugin *plugin);
-
-ClutterActor *
-meta_plugin_get_stage (MetaPlugin *plugin);
-
-void
-meta_plugin_query_screen_size (MetaPlugin *plugin,
- int *width,
- int *height);
-
-void
-meta_plugin_set_stage_reactive (MetaPlugin *plugin,
- gboolean reactive);
-
-void
-meta_plugin_set_stage_input_area (MetaPlugin *plugin,
- gint x, gint y, gint width, gint height);
-
-void
-meta_plugin_set_stage_input_region (MetaPlugin *plugin,
- XserverRegion region);
-
/**
* MetaModalOptions:
* @META_MODAL_POINTER_ALREADY_GRABBED: if set the pointer is already
@@ -300,8 +271,6 @@ void
meta_plugin_end_modal (MetaPlugin *plugin,
guint32 timestamp);
-GList * meta_plugin_get_window_actors (MetaPlugin *plugin);
-Display * meta_plugin_get_xdisplay (MetaPlugin *plugin);
MetaScreen *meta_plugin_get_screen (MetaPlugin *plugin);
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]