![]() |
![]() |
![]() |
Awn Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum AwnEffect; AwnEffectsPrivate; struct AwnEffects; AwnEffects * awn_effects_new_for_widget (GtkWidget *widget
); void awn_effects_start (AwnEffects *fx
,const AwnEffect effect
); void awn_effects_stop (AwnEffects *fx
,const AwnEffect effect
); void awn_effects_start_ex (AwnEffects *fx
,const AwnEffect effect
,gint max_loops
,gboolean signal_start
,gboolean signal_end
); void awn_effects_set_icon_size (AwnEffects *fx
,gint width
,gint height
,gboolean requestSize
); cairo_t * awn_effects_cairo_create (AwnEffects *fx
); cairo_t * awn_effects_cairo_create_clipped (AwnEffects *fx
,GdkEventExpose *event
); void awn_effects_cairo_destroy (AwnEffects *fx
); void awn_effects_add_overlay (AwnEffects *fx
,AwnOverlay *overlay
); void awn_effects_remove_overlay (AwnEffects *fx
,AwnOverlay *overlay
); GList * awn_effects_get_overlays (AwnEffects *fx
); void awn_effects_redraw (AwnEffects *fx
); void awn_effects_main_effect_loop (AwnEffects *fx
); void awn_effects_emit_anim_start (AwnEffects *fx
,AwnEffect effect
); void awn_effects_emit_anim_end (AwnEffects *fx
,AwnEffect effect
);
typedef enum { AWN_EFFECT_NONE = 0, AWN_EFFECT_OPENING = 1, AWN_EFFECT_CLOSING = 2, AWN_EFFECT_HOVER = 3, AWN_EFFECT_LAUNCHING = 4, AWN_EFFECT_ATTENTION = 5, AWN_EFFECT_DESATURATE } AwnEffect;
struct AwnEffects { GObject parent; /* Properties */ GtkWidget *widget; gboolean no_clear; gboolean indirect_paint; gint position; guint set_effects; gint icon_offset; gint refl_offset; gfloat icon_alpha; gfloat refl_alpha; gboolean do_reflection; gboolean make_shadow; gboolean is_active; gboolean depressed; gint arrows_count; gchar *label; gfloat progress; gint border_clip; GQuark spotlight_icon; GQuark arrow_icon; GQuark custom_active_icon; /* properties end */ cairo_t * window_ctx; cairo_t * virtual_ctx; AwnEffectsPrivate *priv; };
Class containing all necessary variables for effects state for particular widget.
AwnEffects * awn_effects_new_for_widget (GtkWidget *widget
);
Creates new AwnEffects instance.
|
Managed widget, computing window width and height is based on it and
it is also passed to gtk_widget_queue_draw() during the animations. |
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 instance. |
|
AwnEffect to schedule. |
void awn_effects_stop (AwnEffects *fx
,const AwnEffect effect
);
Stop a single effect.
|
Pointer to AwnEffects instance. |
|
AwnEffect to stop. |
void awn_effects_start_ex (AwnEffects *fx
,const AwnEffect effect
,gint max_loops
,gboolean signal_start
,gboolean signal_end
);
Extended effect start, which provides a way to specify maximum number of loops and possibility to emit signals for animation start & end.
|
Pointer to AwnEffects instance. |
|
Effect to schedule. |
|
Number of maximum animation loops (0 for unlimited). |
|
Determines whether the animation should emit "animation-start" signal when it starts. |
|
Determines whether the animation should emit "animation-end" signal when it finishes. |
void awn_effects_set_icon_size (AwnEffects *fx
,gint width
,gint height
,gboolean requestSize
);
Sets up correct offsets in managed window based on dimensions of drawn icon.
|
Pointer to AwnEffects instance. |
|
Width of drawn icon. |
|
Height of drawn icon. |
|
Set to true to call gtk_widget_set_size_request for the managed widget. |
cairo_t * awn_effects_cairo_create (AwnEffects *fx
);
awn_effects_cairo_destroy()
on the cairo context
returned by this call.
|
Pointer to AwnEffects instance. |
Returns : |
cairo context where an icon can be drawn. (the icon should have dimensions specified by a previous call to awn_effects_set_icon_size) |
cairo_t * awn_effects_cairo_create_clipped (AwnEffects *fx
,GdkEventExpose *event
);
Creates a Cairo context for drawing to "widget". The drawing
region will be clipped to event
's region member, and translated to its
area member, so you can always paint the icon at coordinates [0, 0].
awn_effects_cairo_destroy()
on the cairo context
returned by this call.
|
Pointer to AwnEffects instance. |
|
GdkEventExpose received by the widget. |
Returns : |
cairo context where an icon can be drawn. (the icon should have dimensions specified by a previous call to awn_effects_set_icon_size) |
void awn_effects_cairo_destroy (AwnEffects *fx
);
Finish drawing of the icon and run all post-ops.
|
Pointer to AwnEffects instance. |
void awn_effects_add_overlay (AwnEffects *fx
,AwnOverlay *overlay
);
Adds an overlay to the list of rendered overlays.
|
AwnEffects instance. |
|
AwnOverlay instance which should be added. |
void awn_effects_remove_overlay (AwnEffects *fx
,AwnOverlay *overlay
);
Removes overlay from the list of rendered overlays.
|
AwnEffects instance. |
|
AwnOverlay which was previously added using awn_effects_add_overlay. |
GList * awn_effects_get_overlays (AwnEffects *fx
);
|
AwnEffects instance. |
Returns : |
a newly-allocated list of the overlays added to this effects instance. |
void awn_effects_redraw (AwnEffects *fx
);
Schedules redraw of the managed widget. Contrary to gtk_widget_queue_draw, this function tries to minimize the area that needs to be redrawn.
|
AwnEffects instance. |