Top |
Functions
const MetaPluginInfo * | meta_plugin_get_info () |
#define | META_PLUGIN_DECLARE() |
void | meta_plugin_switch_workspace_completed () |
void | meta_plugin_minimize_completed () |
void | meta_plugin_unminimize_completed () |
void | meta_plugin_maximize_completed () |
void | meta_plugin_unmaximize_completed () |
void | meta_plugin_map_completed () |
void | meta_plugin_destroy_completed () |
gboolean | meta_plugin_begin_modal () |
void | meta_plugin_end_modal () |
MetaScreen * | meta_plugin_get_screen () |
void | meta_plugin_manager_set_plugin_type () |
Types and Values
struct | MetaPlugin |
struct | MetaPluginClass |
struct | MetaPluginInfo |
struct | MetaPluginVersion |
enum | MetaModalOptions |
Functions
meta_plugin_switch_workspace_completed ()
void
meta_plugin_switch_workspace_completed
(MetaPlugin *plugin
);
meta_plugin_minimize_completed ()
void meta_plugin_minimize_completed (MetaPlugin *plugin
,MetaWindowActor *actor
);
meta_plugin_unminimize_completed ()
void meta_plugin_unminimize_completed (MetaPlugin *plugin
,MetaWindowActor *actor
);
meta_plugin_maximize_completed ()
void meta_plugin_maximize_completed (MetaPlugin *plugin
,MetaWindowActor *actor
);
meta_plugin_unmaximize_completed ()
void meta_plugin_unmaximize_completed (MetaPlugin *plugin
,MetaWindowActor *actor
);
meta_plugin_map_completed ()
void meta_plugin_map_completed (MetaPlugin *plugin
,MetaWindowActor *actor
);
meta_plugin_destroy_completed ()
void meta_plugin_destroy_completed (MetaPlugin *plugin
,MetaWindowActor *actor
);
meta_plugin_begin_modal ()
gboolean meta_plugin_begin_modal (MetaPlugin *plugin
,MetaModalOptions options
,guint32 timestamp
);
This function is used to grab the keyboard and mouse for the exclusive
use of the plugin. Correct operation requires that both the keyboard
and mouse are grabbed, or thing will break. (In particular, other
passive X grabs in Meta can trigger but not be handled by the normal
keybinding handling code.) However, the plugin can establish the keyboard
and/or mouse grabs ahead of time and pass in the
META_MODAL_POINTER_ALREADY_GRABBED
and/or META_MODAL_KEYBOARD_ALREADY_GRABBED
options. This facility is provided for two reasons: first to allow using
this function to establish modality after a passive grab, and second to
allow using obscure features of XGrabPointer()
and XGrabKeyboard()
without
having to add them to this API.
meta_plugin_end_modal ()
void meta_plugin_end_modal (MetaPlugin *plugin
,guint32 timestamp
);
Ends the modal operation begun with meta_plugin_begin_modal()
. This
ungrabs both the mouse and keyboard even when
META_MODAL_POINTER_ALREADY_GRABBED
or
META_MODAL_KEYBOARD_ALREADY_GRABBED
were provided as options
when beginnning the modal operation.
meta_plugin_get_screen ()
MetaScreen *
meta_plugin_get_screen (MetaPlugin *plugin
);
Gets the MetaScreen corresponding to a plugin.
Types and Values
struct MetaPluginClass
struct MetaPluginClass { /** * MetaPluginClass::start: * * Virtual function called when the compositor starts managing a screen */ void (*start) (MetaPlugin *plugin); /** * MetaPluginClass::minimize: * @actor: a #MetaWindowActor * * Virtual function called when the window represented by @actor is minimized. */ void (*minimize) (MetaPlugin *plugin, MetaWindowActor *actor); /** * MetaPluginClass::unminimize: * @actor: a #MetaWindowActor * * Virtual function called when the window represented by @actor is unminimized. */ void (*unminimize) (MetaPlugin *plugin, MetaWindowActor *actor); /** * MetaPluginClass::maximize: * @actor: a #MetaWindowActor * @x: target X coordinate * @y: target Y coordinate * @width: target width * @height: target height * * Virtual function called when the window represented by @actor is maximized. */ void (*maximize) (MetaPlugin *plugin, MetaWindowActor *actor, gint x, gint y, gint width, gint height); /** * MetaPluginClass::unmaximize: * @actor: a #MetaWindowActor * @x: target X coordinate * @y: target Y coordinate * @width: target width * @height: target height * * Virtual function called when the window represented by @actor is unmaximized. */ void (*unmaximize) (MetaPlugin *plugin, MetaWindowActor *actor, gint x, gint y, gint width, gint height); /** * MetaPluginClass::map: * @actor: a #MetaWindowActor * * Virtual function called when the window represented by @actor is mapped. */ void (*map) (MetaPlugin *plugin, MetaWindowActor *actor); /** * MetaPluginClass::destroy: * @actor: a #MetaWindowActor * * Virtual function called when the window represented by @actor is destroyed. */ void (*destroy) (MetaPlugin *plugin, MetaWindowActor *actor); /** * MetaPluginClass::switch_workspace: * @from: origin workspace * @to: destination workspace * @direction: a #MetaMotionDirection * * Virtual function called when the window represented by @actor is destroyed. */ void (*switch_workspace) (MetaPlugin *plugin, gint from, gint to, MetaMotionDirection direction); void (*show_tile_preview) (MetaPlugin *plugin, MetaWindow *window, MetaRectangle *tile_rect, int tile_monitor_number); void (*hide_tile_preview) (MetaPlugin *plugin); void (*show_window_menu) (MetaPlugin *plugin, MetaWindow *window, MetaWindowMenuType menu, int x, int y); void (*show_window_menu_for_rect) (MetaPlugin *plugin, MetaWindow *window, MetaWindowMenuType menu, MetaRectangle *rect); /** * MetaPluginClass::kill_window_effects: * @actor: a #MetaWindowActor * * Virtual function called when the effects on @actor need to be killed * prematurely; the plugin must call the completed() callback as if the effect * terminated naturally. */ void (*kill_window_effects) (MetaPlugin *plugin, MetaWindowActor *actor); /** * MetaPluginClass::kill_switch_workspace: * * Virtual function called when the workspace-switching effect needs to be * killed prematurely. */ void (*kill_switch_workspace) (MetaPlugin *plugin); /** * MetaPluginClass::xevent_filter: * @event: (type xlib.XEvent): * * Virtual function called when handling each event. * * Returns: %TRUE if the plugin handled the event type (i.e., if the return * value is %FALSE, there will be no subsequent call to the manager * completed() callback, and the compositor must ensure that any appropriate * post-effect cleanup is carried out. */ gboolean (*xevent_filter) (MetaPlugin *plugin, XEvent *event); /** * MetaPluginClass::keybinding_filter: * @binding: a #MetaKeyBinding * * Virtual function called when handling each keybinding. * * Returns: %TRUE if the plugin handled the keybinding. */ gboolean (*keybinding_filter) (MetaPlugin *plugin, MetaKeyBinding *binding); /** * MetaPluginClass::confirm_display_config: * @plugin: a #MetaPlugin * * Virtual function called when the display configuration changes. * The common way to implement this function is to show some form * of modal dialog that should ask the user if everything was ok. * * When confirmed by the user, the plugin must call meta_plugin_complete_display_change() * to make the configuration permanent. If that function is not * called within the timeout, the previous configuration will be * reapplied. */ void (*confirm_display_change) (MetaPlugin *plugin); /** * MetaPluginClass::plugin_info: * @plugin: a #MetaPlugin * * Virtual function that returns information about the #MetaPlugin. * * Returns: a #MetaPluginInfo. */ const MetaPluginInfo * (*plugin_info) (MetaPlugin *plugin); };
Members
virtual function called when the compositor starts managing a screen |
||
virtual function called when a window is minimized |
||
virtual function called when a window is maximized |
||
virtual function called when a window is unmaximized |
||
virtual function called when a window is mapped |
||
virtual function called when a window is destroyed |
||
virtual function called when the user switches to another workspace |
||
virtual function called when the effects on a window
need to be killed prematurely; the plugin must call the |
||
virtual function called when the workspace-switching effect needs to be killed prematurely |
||
virtual function called when handling each event |
||
virtual function called when handling each keybinding |
||
virtual function that returns information about the MetaPlugin |
struct MetaPluginInfo
struct MetaPluginInfo { const gchar *name; const gchar *version; const gchar *author; const gchar *license; const gchar *description; };
struct MetaPluginVersion
struct MetaPluginVersion { /* * Version information; the first three numbers match the Meta version * with which the plugin was compiled (see clutter-plugins/simple.c for sample * code). */ guint version_major; guint version_minor; guint version_micro; /* * Version of the plugin API; this is unrelated to the matacity version * per se. The API version is checked by the plugin manager and must match * the one used by it (see clutter-plugins/default.c for sample code). */ guint version_api; };