![]() |
![]() |
![]() |
Awn Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
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
);
"active" gboolean : Read / Write / Construct "active-rect-color" DesktopAgnosticColor* : Read / Write "active-rect-outline" DesktopAgnosticColor* : Read / Write "arrow-png" gchar* : Read / Write / Construct "arrows-count" gint : Read / Write / Construct "border-clip" gint : Read / Write / Construct "custom-active-png" gchar* : Read / Write / Construct "depressed" gboolean : Read / Write / Construct "dot-color" DesktopAgnosticColor* : Read / Write "effects" gint : Read / Write / Construct "icon-alpha" gfloat : Read / Write / Construct "icon-offset" gint : Read / Write / Construct "indirect-paint" gboolean : Read / Write / Construct "make-shadow" gboolean : Read / Write / Construct "no-clear" gboolean : Read / Write / Construct "position" GtkPositionType : Read / Write / Construct "progress" gfloat : Read / Write / Construct "reflection-alpha" gfloat : Read / Write / Construct "reflection-offset" gint : Read / Write / Construct "reflection-visible" gboolean : Read / Write / Construct "spotlight-png" gchar* : Read / Write / Construct "widget" GtkWidget* : Read / Write
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;
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. |
"active"
property"active" gboolean : Read / Write / Construct
Determines whether to draw the active rectangle behind the icon.
Default value: FALSE
"active-rect-color"
property "active-rect-color" DesktopAgnosticColor* : Read / Write
Color used for painting active rectangle.
"active-rect-outline"
property "active-rect-outline" DesktopAgnosticColor* : Read / Write
Color used for painting outline of active rectangle.
"arrow-png"
property"arrow-png" gchar* : Read / Write / Construct
Icon to draw when arrows-count is more than 0.
Default value: "__awn_internal_arrow1"
"arrows-count"
property"arrows-count" gint : Read / Write / Construct
Determines the number of arrows drawn.
Allowed values: >= 0
Default value: 0
"border-clip"
property"border-clip" gint : Read / Write / Construct
Determines amount of clipping of the icon edge. (suitable for offset on the 3D bar)
Allowed values: >= 0
Default value: 0
"custom-active-png"
property"custom-active-png" gchar* : Read / Write / Construct
Path to a custom png icon which will be painted when the property "active" is set to TRUE.
Default value: NULL
"depressed"
property"depressed" gboolean : Read / Write / Construct
Determines whether to draw the icon slightly desaturated.
Default value: FALSE
"dot-color"
property "dot-color" DesktopAgnosticColor* : Read / Write
Color used for painting glowing dot.
"effects"
property"effects" gint : Read / Write / Construct
Set a bitmask to specify which kind of effects are used on the widget.
Default value: 0
"icon-alpha"
property"icon-alpha" gfloat : Read / Write / Construct
Determines alpha value of the drawn icon.
Allowed values: [0,1]
Default value: 1
"icon-offset"
property"icon-offset" gint : Read / Write / Construct
Determines offset of the icon from border of the widget's window.
Default value: 0
"indirect-paint"
property"indirect-paint" gboolean : Read / Write / Construct
Determines whether transformations are applied directly to the widget, or to an offscreen buffer before being painted to target widget. Set to FALSE to improve performance, but will cause artifacts if used on non-transparent window.
Default value: TRUE
"make-shadow"
property"make-shadow" gboolean : Read / Write / Construct
Determines whether to draw a shadow around the icon.
Default value: FALSE
"no-clear"
property"no-clear" gboolean : Read / Write / Construct
Whether the context should be cleared when painting. Set no-clear to FALSE to improve performace if you're using background of proper color on the widget.
Default value: TRUE
"position"
property"position" GtkPositionType : Read / Write / Construct
Determines position of the widget.
Default value: GTK_POS_BOTTOM
"progress"
property"progress" gfloat : Read / Write / Construct
Extra progress pie painted on the pie and percentage value it represents. Set to 1.0 to hide the progress pie.
Allowed values: [0,1]
Default value: 1
"reflection-alpha"
property"reflection-alpha" gfloat : Read / Write / Construct
Determines alpha value of the reflected icon.
Allowed values: [0,1]
Default value: 0.25
"reflection-offset"
property"reflection-offset" gint : Read / Write / Construct
Determines offset of the reflection from the drawn icon.
Default value: 0
"reflection-visible"
property"reflection-visible" gboolean : Read / Write / Construct
Determines whether the reflection is visible.
Default value: TRUE
"spotlight-png"
property"spotlight-png" gchar* : Read / Write / Construct
Path to png icon which will be used for the spotlight effect.
Default value: "__awn_internal_spotlight"
"widget"
property"widget" GtkWidget* : Read / Write
Determines which widget is animated by this instance of AwnEffects.
"animation-end"
signalvoid user_function (AwnEffects *arg0,
AwnEffect arg1,
gpointer user_data) : Run First
fx
: The AwnEffects instance which received the signal.
effect
: Effect type which just finished.
The ::animation-end signal is emitted when the animation finishes, and as ::animation-start signal is emitted only once for the entire animation (see the note in description for ::animation-start signal). You also have to explicitely ask AwnEffects to emit this signal using awn_effects_start_ex method.
|
user data set when the signal handler was connected. |
"animation-start"
signalvoid user_function (AwnEffects *arg0,
AwnEffect arg1,
gpointer user_data) : Run First
fx
: The AwnEffects instance which received the signal.
effect
: Effect type which was started.
The ::animation-start signal is emitted when the animation starts playing (ie. all other animations queued before it finish playing). You also have to explicitely ask AwnEffects to emit this signal using awn_effects_start_ex method. Note: Signal is emitted only once even if another animation with higher priority interrupts the animation and this animation is started again later (ie. no signal on this second start).
|
user data set when the signal handler was connected. |