AwnEffectsNG
From AWN Wiki
[edit] Overview
The proposal is to re-implement the awn-effects API using cairo surfaces as the fundamental basis instead of pixbufs. As part of this process there will be a refactor of individual effects into separate source files and an exploration of the feasibility/usefulness of a g_module implementation.
The proposed implementation would be fully backwards compatible with the existing API with awn-effects transparently handling the conversion of pixbufs to a cairo surface.
[edit] Advantages
- surface scaling.
- future path to acceleration.
[edit] Existing awn-effects API
Note: The complete documentation can be generated from awn-effects.h using gtk-doc.
[edit] void awn_effects_init (GObject *obj, AwnEffects *fx);
Initializes AwnEffects structure.
[edit] void awn_effects_finalize (AwnEffects *fx);
Finalizes AwnEffects usage and frees internally allocated memory. (also calls awn_unregister_effects()).
[edit] void awn_register_effects (GObject *obj, AwnEffects *fx);
Registers enter-notify and leave-notify events for managed window.
[edit] void awn_unregister_effects (AwnEffects *fx);
Unregisters events for managed window.
[edit] void awn_effect_start (AwnEffects *fx, const AwnEffect effect);
Starts an effect.
[edit] void awn_effect_stop (AwnEffects *fx, const AwnEffect effect);
Stop a single effect.
[edit] void awn_effects_set_title (AwnEffects *fx, AwnTitle *title, AwnTitleCallback title_func);
Makes AwnTitle appear on event-notify.
[edit] void awn_effect_start_ex (AwnEffects *fx, const AwnEffect effect, AwnEventNotify start, AwnEventNotify stop, gint max_loops);
Extended effect start, which provides callbacks for animation start, end and possibility to specify maximum number of loops.
[edit] void awn_draw_background (AwnEffects *, cairo_t *);
[edit] void awn_draw_icons (AwnEffects *, cairo_t *, GdkPixbuf *, GdkPixbuf *);
[edit] void awn_draw_foreground (AwnEffects *, cairo_t *);
[edit] void awn_draw_set_window_size (AwnEffects *, const gint, const gint);
[edit] void awn_draw_set_icon_size (AwnEffects *, const gint, const gint);
[edit] Proposed Additions
- Allow more than once surface in the icon. This may make reflection difficult... something to be explored.
- If point 1 (probably not) is feasible then per surface effects.
- Effects will be done as a queue (list) of Effects Nodes.
- An Effect Node will represent a specific effect to be repeated a set number of times (or until interrupted).
- Each type of effect will have a specific timer resolution.
- The timer resolution of an effect node will be modifiable.
- It will be possible to rewind, interrupt, fast forward and rewind through the effects list.
[edit] Random notes
- gtktimeline

