mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
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
This commit is contained in:
parent
82b1d0d7e5
commit
5e3d93da87
@ -55,9 +55,6 @@ struct _MetaCompScreen
|
|||||||
};
|
};
|
||||||
|
|
||||||
void meta_switch_workspace_completed (MetaScreen *screen);
|
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,
|
gboolean meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||||
MetaPlugin *plugin,
|
MetaPlugin *plugin,
|
||||||
|
@ -263,38 +263,6 @@ meta_plugin_get_info (MetaPlugin *plugin)
|
|||||||
return NULL;
|
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:
|
* _meta_plugin_effect_started:
|
||||||
* @plugin: the plugin
|
* @plugin: the plugin
|
||||||
@ -315,7 +283,7 @@ meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
|
|||||||
{
|
{
|
||||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
MetaScreen *screen = priv->screen;
|
||||||
|
|
||||||
if (priv->running-- < 0)
|
if (priv->running-- < 0)
|
||||||
{
|
{
|
||||||
@ -389,80 +357,6 @@ meta_plugin_destroy_completed (MetaPlugin *plugin,
|
|||||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_DESTROY);
|
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:
|
* meta_plugin_begin_modal:
|
||||||
* @plugin: a #MetaPlugin
|
* @plugin: a #MetaPlugin
|
||||||
@ -521,16 +415,6 @@ meta_plugin_end_modal (MetaPlugin *plugin,
|
|||||||
meta_end_modal_for_plugin (priv->screen, plugin, timestamp);
|
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:
|
* meta_plugin_get_screen:
|
||||||
* @plugin: a #MetaPlugin
|
* @plugin: a #MetaPlugin
|
||||||
|
@ -284,7 +284,8 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
|
|||||||
{
|
{
|
||||||
MetaPlugin *plugin = META_PLUGIN (data);
|
MetaPlugin *plugin = META_PLUGIN (data);
|
||||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
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)
|
while (l)
|
||||||
{
|
{
|
||||||
@ -317,6 +318,7 @@ switch_workspace (MetaPlugin *plugin,
|
|||||||
gint from, gint to,
|
gint from, gint to,
|
||||||
MetaMotionDirection direction)
|
MetaMotionDirection direction)
|
||||||
{
|
{
|
||||||
|
MetaScreen *screen;
|
||||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
GList *l;
|
GList *l;
|
||||||
ClutterActor *workspace0 = clutter_group_new ();
|
ClutterActor *workspace0 = clutter_group_new ();
|
||||||
@ -325,11 +327,13 @@ switch_workspace (MetaPlugin *plugin,
|
|||||||
int screen_width, screen_height;
|
int screen_width, screen_height;
|
||||||
ClutterAnimation *animation;
|
ClutterAnimation *animation;
|
||||||
|
|
||||||
stage = meta_plugin_get_stage (plugin);
|
screen = meta_plugin_get_screen (plugin);
|
||||||
|
stage = CLUTTER (meta_get_stage_for_screen (screen));
|
||||||
|
|
||||||
meta_plugin_query_screen_size (plugin,
|
meta_screen_get_size (screen,
|
||||||
&screen_width,
|
&screen_width,
|
||||||
&screen_height);
|
&screen_height);
|
||||||
|
|
||||||
clutter_actor_set_anchor_point (workspace1,
|
clutter_actor_set_anchor_point (workspace1,
|
||||||
screen_width,
|
screen_width,
|
||||||
screen_height);
|
screen_height);
|
||||||
@ -348,7 +352,7 @@ switch_workspace (MetaPlugin *plugin,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
l = g_list_last (meta_plugin_get_window_actors (plugin));
|
l = g_list_last (meta_get_window_actors (screen));
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/extensions/Xfixes.h>
|
||||||
|
|
||||||
#include <meta/types.h>
|
#include <meta/types.h>
|
||||||
#include <meta/compositor.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);
|
void meta_enable_unredirect_for_screen (MetaScreen *screen);
|
||||||
|
|
||||||
ClutterActor *meta_get_background_actor_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
|
#endif
|
||||||
|
@ -246,35 +246,6 @@ void
|
|||||||
meta_plugin_destroy_completed (MetaPlugin *plugin,
|
meta_plugin_destroy_completed (MetaPlugin *plugin,
|
||||||
MetaWindowActor *actor);
|
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:
|
* MetaModalOptions:
|
||||||
* @META_MODAL_POINTER_ALREADY_GRABBED: if set the pointer is already
|
* @META_MODAL_POINTER_ALREADY_GRABBED: if set the pointer is already
|
||||||
@ -300,8 +271,6 @@ void
|
|||||||
meta_plugin_end_modal (MetaPlugin *plugin,
|
meta_plugin_end_modal (MetaPlugin *plugin,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
|
||||||
GList * meta_plugin_get_window_actors (MetaPlugin *plugin);
|
|
||||||
Display * meta_plugin_get_xdisplay (MetaPlugin *plugin);
|
|
||||||
MetaScreen *meta_plugin_get_screen (MetaPlugin *plugin);
|
MetaScreen *meta_plugin_get_screen (MetaPlugin *plugin);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user