mutter/src/compositor/compositor-private.h
Owen W. Taylor 67682a2683 Add a modal mode for plugins
mutter_plugin_begin_modal() and mutter_plugin_begin_modal() allow putting
a plugin into a "modal" state. This means:

 - The plugin has the keyboard and mouse grabbed
 - All keyboard and mouse events go exclusively to the plugin

mutter-plugin.[ch]: Add public API
compositor.c compositor-private.h: Implement the API
mutter-plugin-manager.c: When reloading plugins, make sure none of them
  are modal at that moment, and if so force-unmodal them.
common.h: Add META_GRAB_OP_COMPOSITOR
display: When display->grab_op is META_GRAB_OP_COMPOSITOR forward relevant
  events exclusively to the compositor.

http://bugzilla.gnome.org/show_bug.cgi?id=590754
2009-08-26 12:26:58 -04:00

69 lines
2.1 KiB
C

/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef META_COMPOSITOR_PRIVATE_H
#define META_COMPOSITOR_PRIVATE_H
#include <X11/extensions/Xfixes.h>
#include "compositor.h"
#include "display.h"
#include "mutter-plugin-manager.h"
#include <clutter/clutter.h>
typedef struct _MetaCompScreen MetaCompScreen;
struct _MetaCompositor
{
MetaDisplay *display;
Atom atom_x_root_pixmap;
Atom atom_x_set_root;
Atom atom_net_wm_window_opacity;
guint repaint_func_id;
ClutterActor *shadow_src;
MutterPlugin *modal_plugin;
gboolean show_redraw : 1;
gboolean debug : 1;
gboolean no_mipmaps : 1;
};
struct _MetaCompScreen
{
MetaScreen *screen;
ClutterActor *stage, *window_group, *overlay_group;
ClutterActor *hidden_group;
GList *windows;
GHashTable *windows_by_xid;
Window output;
/* Before we create the output window */
XserverRegion pending_input_region;
gint switch_workspace_in_progress;
MutterPluginManager *plugin_mgr;
};
void mutter_switch_workspace_completed (MetaScreen *screen);
void mutter_set_stage_input_region (MetaScreen *screen,
XserverRegion region);
void mutter_empty_stage_input_region (MetaScreen *screen);
gboolean mutter_begin_modal_for_plugin (MetaScreen *screen,
MutterPlugin *plugin,
Window grab_window,
Cursor cursor,
MetaModalOptions options,
guint32 timestamp);
void mutter_end_modal_for_plugin (MetaScreen *screen,
MutterPlugin *plugin,
guint32 timestamp);
void mutter_check_end_modal (MetaScreen *screen);
#endif /* META_COMPOSITOR_PRIVATE_H */