![]() |
![]() |
![]() |
libawn Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum AwnEffect; AwnEffects; AwnEffects* awn_effects_new (); AwnEffects* awn_effects_new_for_widget (GtkWidget *widget); void awn_effects_free (AwnEffects *fx); void awn_effects_finalize (AwnEffects *fx); void awn_effects_register (AwnEffects *fx, GtkWidget *obj); void awn_effects_unregister (AwnEffects *fx); void awn_effects_start (AwnEffects *fx, const AwnEffect effect); void awn_effects_stop (AwnEffects *fx, const AwnEffect effect); void awn_effects_set_title (AwnEffects *fx, AwnTitle *title, AwnTitleCallback title_func); void awn_effects_start_ex (AwnEffects *fx, const AwnEffect effect, AwnEventNotify start, AwnEventNotify stop, gint max_loops); void awn_effects_draw_background (AwnEffects *, cairo_t *); void awn_effects_draw_icons (AwnEffects *, cairo_t *, GdkPixbuf *, GdkPixbuf *); void awn_effects_draw_icons_cairo (AwnEffects *fx, cairo_t *cr, cairo_t *, cairo_t *); void awn_effects_draw_foreground (AwnEffects *, cairo_t *); void awn_effects_draw_set_window_size (AwnEffects *, const gint , const gint ); void awn_effects_draw_set_icon_size (AwnEffects *, const gint , const gint ); void awn_effects_reflection_off (AwnEffects *fx); void awn_effects_reflection_on (AwnEffects *fx); void awn_effects_set_offset_cut (AwnEffects *fx, gboolean cut);
typedef enum { AWN_EFFECT_NONE, AWN_EFFECT_OPENING, AWN_EFFECT_LAUNCHING, AWN_EFFECT_HOVER, AWN_EFFECT_ATTENTION, AWN_EFFECT_CLOSING, AWN_EFFECT_DESATURATE } AwnEffect;
typedef struct { GtkWidget *self; GtkWidget *focus_window; AwnSettings *settings; AwnTitle *title; AwnTitleCallback get_title; GList *effect_queue; gint icon_width, icon_height; gint window_width, window_height; /* EFFECT VARIABLES */ gboolean effect_lock; AwnEffect current_effect; AwnEffectSequence direction; gint count; gdouble x_offset; gdouble y_offset; gdouble curve_offset; gint delta_width; gint delta_height; GtkAllocation clip_region; gdouble rotate_degrees; gfloat alpha; gfloat spotlight_alpha; gfloat saturation; gfloat glow_amount; gint icon_depth; gint icon_depth_direction; /* State variables */ gboolean hover; gboolean clip; gboolean flip; gboolean spotlight; gboolean do_reflections; gboolean do_offset_cut; guint enter_notify; guint leave_notify; guint timer_id; cairo_t * icon_ctx; cairo_t * reflect_ctx; AwnEffectsOp * op_list; /* padding so we dont break ABI compability every time */ void *pad1; void *pad2; void *pad3; void *pad4; } AwnEffects;
Structure containing all necessary variables for effects state for particular widget.
AwnEffects* awn_effects_new ();
Creates and initializes new AwnEffects structure. After using this constructor it is necessary to set 'self' member to be able to use effects properly.
Returns : |
Newly created AwnEffects instance. |
AwnEffects* awn_effects_new_for_widget (GtkWidget *widget);
Creates and initializes new AwnEffects structure.
|
Object which will be passed to all callback functions, this object
is also passed to gtk_widget_queue_draw() during the animation.
|
Returns : |
Newly created AwnEffects instance. |
void awn_effects_free (AwnEffects *fx);
Cleans up (by calling awn_effects_finalize) and frees AwnEffects structure.
|
Pointer to AwnEffects structure. |
void awn_effects_finalize (AwnEffects *fx);
Finalizes AwnEffects usage and frees internally allocated memory.
|
Pointer to AwnEffects structure. |
void awn_effects_register (AwnEffects *fx, GtkWidget *obj);
Registers "enter-notify-event" and "leave-notify-event" signals for the managed window.
|
Pointer to AwnEffects structure. |
|
GtkWidget derived class providing enter-notify-event and leave-notify-event signals. |
void awn_effects_unregister (AwnEffects *fx);
Unregisters events for managed window.
|
Pointer to AwnEffects structure. |
void awn_effects_start (AwnEffects *fx, const AwnEffect effect);
Start a single effect. The effect will loop until awn_effect_stop()
is called.
|
Pointer to AwnEffects structure. |
|
AwnEffect to schedule. |
void awn_effects_stop (AwnEffects *fx, const AwnEffect effect);
Stop a single effect.
|
Pointer to AwnEffects structure. |
|
AwnEffect to stop. |
void awn_effects_set_title (AwnEffects *fx, AwnTitle *title, AwnTitleCallback title_func);
Makes AwnTitle appear on "enter-notify-event".
|
Pointer to AwnEffects structure. |
|
Pointer to AwnTitle instance. |
|
Pointer to function which returns desired title text. |
void awn_effects_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.
|
Pointer to AwnEffects structure. |
|
Effect to schedule. |
|
Function which will be called when animation starts. |
|
Function which will be called when animation finishes. |
|
Number of maximum animation loops (0 for unlimited). |
void awn_effects_draw_background (AwnEffects *, cairo_t *);
|
|
|
void awn_effects_draw_icons (AwnEffects *, cairo_t *, GdkPixbuf *, GdkPixbuf *);
|
|
|
|
|
|
|
void awn_effects_draw_icons_cairo (AwnEffects *fx, cairo_t *cr, cairo_t *, cairo_t *);
|
|
|
|
|
|
|
void awn_effects_draw_foreground (AwnEffects *, cairo_t *);
|
|
|
void awn_effects_draw_set_window_size (AwnEffects *, const gint , const gint );
|
|
|
|
|
void awn_effects_draw_set_icon_size (AwnEffects *, const gint , const gint );
|
|
|
|
|
void awn_effects_set_offset_cut (AwnEffects *fx, gboolean cut);
|
|
|