|
marco 1.29.1
Window manager
|
"Special effects" other than compositor effects. More...
Typedefs | |
| typedef void(* | MetaEffectFinished) (gpointer data) |
| A callback which will be called when the effect has finished. | |
Enumerations | |
| enum | MetaEffectType { META_EFFECT_MINIMIZE , META_EFFECT_UNMINIMIZE , META_EFFECT_FOCUS , META_EFFECT_CLOSE , META_NUM_EFFECTS } |
Functions | |
| void | meta_effect_run_minimize (MetaWindow *window, MetaRectangle *window_rect, MetaRectangle *target, MetaEffectFinished finished, gpointer data) |
| Performs the minimize effect. | |
| void | meta_effect_run_unminimize (MetaWindow *window, MetaRectangle *window_rect, MetaRectangle *icon_rect, MetaEffectFinished finished, gpointer data) |
| Performs the unminimize effect. | |
| void | meta_effect_run_close (MetaWindow *window, MetaEffectFinished finished, gpointer data) |
| Performs the close effect. | |
| void | meta_effect_run_focus (MetaWindow *window, MetaEffectFinished finished, gpointer data) |
| Performs the focus effect. | |
| void | meta_effects_begin_wireframe (MetaScreen *screen, const MetaRectangle *rect, int width, int height) |
| Grabs the server and paints a wireframe rectangle on the screen. | |
| void | meta_effects_update_wireframe (MetaScreen *screen, const MetaRectangle *old_rect, int old_width, int old_height, const MetaRectangle *new_rect, int new_width, int new_height) |
| Moves a wireframe rectangle around after its creation by meta_effects_begin_wireframe(). | |
| void | meta_effects_end_wireframe (MetaScreen *screen, const MetaRectangle *old_rect, int width, int height) |
| Removes a wireframe rectangle from the screen and ends the grab started by meta_effects_begin_wireframe(). | |
"Special effects" other than compositor effects.
Before we had a serious compositor, we supported swooping rectangles for minimising and so on. These are still supported today, even when the compositor is enabled. The file contains two parts:
1) A set of functions, each of which implements a special effect. (Only the minimize function does anything interesting; we should probably get rid of the rest.)
2) A set of functions for moving a highlighted wireframe box around the screen, optionally with height and width shown in the middle. This is used for moving and resizing when reduced_resources is set.
There was formerly a system which allowed callers to drop in their own handlers for various things; it was never used (people who want their own handlers can just modify this file, after all) and it added a good deal of extra complexity, so it has been removed. If you want it, it can be found in svn r3769.
| typedef void(* MetaEffectFinished) (gpointer data) |
A callback which will be called when the effect has finished.
| enum MetaEffectType |
| void meta_effect_run_close | ( | MetaWindow * | window, |
| MetaEffectFinished | finished, | ||
| gpointer | data | ||
| ) |
Performs the close effect.
There is no such effect. FIXME: delete this.
| window | The window we're moving |
| finished | Callback for when it's finished |
| data | Data for callback |
References create_effect(), META_EFFECT_CLOSE, NULL, and run_handler().
Referenced by event_callback().
| void meta_effect_run_focus | ( | MetaWindow * | window, |
| MetaEffectFinished | finished, | ||
| gpointer | data | ||
| ) |
Performs the focus effect.
There is no such effect. FIXME: delete this.
| window | The window we're moving |
| finished | Callback for when it's finished |
| data | Data for callback |
References create_effect(), META_EFFECT_FOCUS, NULL, and run_handler().
Referenced by meta_window_focus().
| void meta_effect_run_minimize | ( | MetaWindow * | window, |
| MetaRectangle * | window_rect, | ||
| MetaRectangle * | target, | ||
| MetaEffectFinished | finished, | ||
| gpointer | data | ||
| ) |
Performs the minimize effect.
| window | The window we're moving |
| window_rect | Its current state |
| target | Where it should end up |
| finished | Callback for when it's finished |
| data | Data for callback |
References create_effect(), MetaMinimizeEffect::icon_rect, META_EFFECT_MINIMIZE, MetaEffect::minimize, NULL, run_handler(), MetaEffect::u, and MetaMinimizeEffect::window_rect.
Referenced by implement_showing().
| void meta_effect_run_unminimize | ( | MetaWindow * | window, |
| MetaRectangle * | window_rect, | ||
| MetaRectangle * | icon_rect, | ||
| MetaEffectFinished | finished, | ||
| gpointer | data | ||
| ) |
Performs the unminimize effect.
There is no such effect. FIXME: delete this.
| window | The window we're moving |
| icon_rect | Its current state |
| window_rect | Where it should end up |
| finished | Callback for when it's finished |
| data | Data for callback |
References create_effect(), MetaMinimizeEffect::icon_rect, META_EFFECT_UNMINIMIZE, MetaEffect::minimize, NULL, run_handler(), MetaEffect::u, and MetaMinimizeEffect::window_rect.
Referenced by meta_window_show().
| void meta_effects_begin_wireframe | ( | MetaScreen * | screen, |
| const MetaRectangle * | rect, | ||
| int | width, | ||
| int | height | ||
| ) |
Grabs the server and paints a wireframe rectangle on the screen.
Since this involves starting a grab, please be considerate of other users and don't keep the grab for long. You may move the wireframe around using meta_effects_update_wireframe() and remove it, and undo the grab, using meta_effects_end_wireframe().
| screen | The screen to draw the rectangle on. |
| rect | The size of the rectangle to draw. |
| width | The width to display in the middle (or 0 not to) |
| height | The width to display in the middle (or 0 not to) |
References meta_display_grab(), meta_effects_update_wireframe(), meta_ui_push_delay_exposes(), NULL, and screen.
Referenced by meta_window_begin_wireframe().
| void meta_effects_end_wireframe | ( | MetaScreen * | screen, |
| const MetaRectangle * | old_rect, | ||
| int | width, | ||
| int | height | ||
| ) |
Removes a wireframe rectangle from the screen and ends the grab started by meta_effects_begin_wireframe().
| old_rect | Where the rectangle is now |
| old_width | The width that was displayed on it (or 0 if there wasn't) |
| old_height | The height that was displayed on it (or 0 if there wasn't) |
References meta_display_ungrab(), meta_effects_update_wireframe(), meta_ui_pop_delay_exposes(), NULL, and screen.
Referenced by meta_window_end_wireframe().
| void meta_effects_update_wireframe | ( | MetaScreen * | screen, |
| const MetaRectangle * | old_rect, | ||
| int | old_width, | ||
| int | old_height, | ||
| const MetaRectangle * | new_rect, | ||
| int | new_width, | ||
| int | new_height | ||
| ) |
Moves a wireframe rectangle around after its creation by meta_effects_begin_wireframe().
(Perhaps we ought to remember the old positions and not require people to pass them in?)
| old_rect | Where the rectangle is now |
| old_width | The width that was displayed on it (or 0 if there wasn't) |
| old_height | The height that was displayed on it (or 0 if there wasn't) |
| new_rect | Where the rectangle is going |
| new_width | The width that will be displayed on it (or 0 not to) |
| new_height | The height that will be displayed on it (or 0 not to) |
References draw_xor_rect(), and screen.
Referenced by meta_effects_begin_wireframe(), meta_effects_end_wireframe(), and meta_window_update_wireframe().