mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
plugin-manager: Make the event an enum
This commit is contained in:
parent
fd443ecf2a
commit
7de1f3a7be
@ -149,7 +149,7 @@ meta_plugin_manager_kill_switch_workspace (MetaPluginManager *plugin_mgr)
|
|||||||
gboolean
|
gboolean
|
||||||
meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
|
meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
|
||||||
MetaWindowActor *actor,
|
MetaWindowActor *actor,
|
||||||
unsigned long event)
|
MetaPluginEffect event)
|
||||||
{
|
{
|
||||||
MetaPlugin *plugin = plugin_mgr->plugin;
|
MetaPlugin *plugin = plugin_mgr->plugin;
|
||||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||||
@ -196,7 +196,7 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("Incorrect handler called for event %lu", event);
|
g_warning ("Incorrect handler called for event %d", event);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@ -214,7 +214,7 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
|
|||||||
gboolean
|
gboolean
|
||||||
meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr,
|
meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr,
|
||||||
MetaWindowActor *actor,
|
MetaWindowActor *actor,
|
||||||
unsigned long event,
|
MetaPluginEffect event,
|
||||||
gint target_x,
|
gint target_x,
|
||||||
gint target_y,
|
gint target_y,
|
||||||
gint target_width,
|
gint target_width,
|
||||||
@ -253,7 +253,7 @@ meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_warning ("Incorrect handler called for event %lu", event);
|
g_warning ("Incorrect handler called for event %d", event);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
@ -26,15 +26,15 @@
|
|||||||
#include <meta/screen.h>
|
#include <meta/screen.h>
|
||||||
#include <meta/meta-plugin.h>
|
#include <meta/meta-plugin.h>
|
||||||
|
|
||||||
#define META_PLUGIN_MINIMIZE (1<<0)
|
typedef enum {
|
||||||
#define META_PLUGIN_MAXIMIZE (1<<1)
|
META_PLUGIN_MINIMIZE,
|
||||||
#define META_PLUGIN_UNMAXIMIZE (1<<2)
|
META_PLUGIN_MAXIMIZE,
|
||||||
#define META_PLUGIN_MAP (1<<3)
|
META_PLUGIN_UNMAXIMIZE,
|
||||||
#define META_PLUGIN_DESTROY (1<<4)
|
META_PLUGIN_MAP,
|
||||||
#define META_PLUGIN_SWITCH_WORKSPACE (1<<5)
|
META_PLUGIN_DESTROY,
|
||||||
#define META_PLUGIN_UNMINIMIZE (1<<6)
|
META_PLUGIN_SWITCH_WORKSPACE,
|
||||||
|
META_PLUGIN_UNMINIMIZE,
|
||||||
#define META_PLUGIN_ALL_EFFECTS (~0)
|
} MetaPluginEffect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MetaPluginManager: (skip)
|
* MetaPluginManager: (skip)
|
||||||
@ -48,11 +48,11 @@ void meta_plugin_manager_load (const gchar *plugin_name);
|
|||||||
|
|
||||||
gboolean meta_plugin_manager_event_simple (MetaPluginManager *mgr,
|
gboolean meta_plugin_manager_event_simple (MetaPluginManager *mgr,
|
||||||
MetaWindowActor *actor,
|
MetaWindowActor *actor,
|
||||||
unsigned long event);
|
MetaPluginEffect event);
|
||||||
|
|
||||||
gboolean meta_plugin_manager_event_maximize (MetaPluginManager *mgr,
|
gboolean meta_plugin_manager_event_maximize (MetaPluginManager *mgr,
|
||||||
MetaWindowActor *actor,
|
MetaWindowActor *actor,
|
||||||
unsigned long event,
|
MetaPluginEffect event,
|
||||||
gint target_x,
|
gint target_x,
|
||||||
gint target_y,
|
gint target_y,
|
||||||
gint target_width,
|
gint target_width,
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <X11/extensions/Xdamage.h>
|
#include <X11/extensions/Xdamage.h>
|
||||||
#include <meta/compositor-mutter.h>
|
#include <meta/compositor-mutter.h>
|
||||||
#include "meta-surface-actor.h"
|
#include "meta-surface-actor.h"
|
||||||
|
#include "meta-plugin-manager.h"
|
||||||
|
|
||||||
MetaWindowActor *meta_window_actor_new (MetaWindow *window);
|
MetaWindowActor *meta_window_actor_new (MetaWindow *window);
|
||||||
|
|
||||||
@ -55,8 +56,8 @@ void meta_window_actor_sync_updates_frozen (MetaWindowActor *self);
|
|||||||
void meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
|
void meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
|
||||||
gboolean no_delay_frame);
|
gboolean no_delay_frame);
|
||||||
|
|
||||||
void meta_window_actor_effect_completed (MetaWindowActor *actor,
|
void meta_window_actor_effect_completed (MetaWindowActor *actor,
|
||||||
gulong event);
|
MetaPluginEffect event);
|
||||||
|
|
||||||
MetaSurfaceActor *meta_window_actor_get_surface (MetaWindowActor *self);
|
MetaSurfaceActor *meta_window_actor_get_surface (MetaWindowActor *self);
|
||||||
void meta_window_actor_update_surface (MetaWindowActor *self);
|
void meta_window_actor_update_surface (MetaWindowActor *self);
|
||||||
|
@ -1043,7 +1043,7 @@ meta_window_actor_effect_in_progress (MetaWindowActor *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_freeze_thaw_effect (gulong event)
|
is_freeze_thaw_effect (MetaPluginEffect event)
|
||||||
{
|
{
|
||||||
switch (event)
|
switch (event)
|
||||||
{
|
{
|
||||||
@ -1058,8 +1058,8 @@ is_freeze_thaw_effect (gulong event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_simple_effect (MetaWindowActor *self,
|
start_simple_effect (MetaWindowActor *self,
|
||||||
gulong event)
|
MetaPluginEffect event)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
MetaCompositor *compositor = priv->compositor;
|
MetaCompositor *compositor = priv->compositor;
|
||||||
@ -1123,8 +1123,8 @@ meta_window_actor_after_effects (MetaWindowActor *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_window_actor_effect_completed (MetaWindowActor *self,
|
meta_window_actor_effect_completed (MetaWindowActor *self,
|
||||||
gulong event)
|
MetaPluginEffect event)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
|
|
||||||
@ -1300,7 +1300,7 @@ meta_window_actor_show (MetaWindowActor *self,
|
|||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
MetaCompositor *compositor = priv->compositor;
|
MetaCompositor *compositor = priv->compositor;
|
||||||
gulong event = 0;
|
MetaPluginEffect event;
|
||||||
|
|
||||||
g_return_if_fail (!priv->visible);
|
g_return_if_fail (!priv->visible);
|
||||||
|
|
||||||
@ -1335,7 +1335,7 @@ meta_window_actor_hide (MetaWindowActor *self,
|
|||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
MetaCompositor *compositor = priv->compositor;
|
MetaCompositor *compositor = priv->compositor;
|
||||||
gulong event = 0;
|
MetaPluginEffect event = 0;
|
||||||
|
|
||||||
g_return_if_fail (priv->visible);
|
g_return_if_fail (priv->visible);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user