AwnEffects

AwnEffects

Synopsis

enum                AwnEffect;
gboolean            (*AwnEffectsOpfn)                   (AwnEffects *fx,
                                                         GtkAllocation *alloc,
                                                         gpointer user_data);
#define             AWN_EFFECTS_ACTIVE_RECT_PADDING
                    AwnEffectsOp;
struct              AwnEffects;
struct              AwnEffectsClass;
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);

Object Hierarchy

  GObject
   +----AwnEffects

Properties

  "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

Signals

  "animation-end"                                  : Run First
  "animation-start"                                : Run First

Description

Details

enum AwnEffect

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;

AWN_EFFECT_NONE

AWN_EFFECT_OPENING

AWN_EFFECT_CLOSING

AWN_EFFECT_HOVER

AWN_EFFECT_LAUNCHING

AWN_EFFECT_ATTENTION

AWN_EFFECT_DESATURATE


AwnEffectsOpfn ()

gboolean            (*AwnEffectsOpfn)                   (AwnEffects *fx,
                                                         GtkAllocation *alloc,
                                                         gpointer user_data);


AWN_EFFECTS_ACTIVE_RECT_PADDING

#define AWN_EFFECTS_ACTIVE_RECT_PADDING 3


AwnEffectsOp

typedef struct {
    AwnEffectsOpfn      fn;
    gpointer            data;
} AwnEffectsOp;


struct AwnEffects

struct AwnEffects;

Class containing all necessary variables for effects state for particular widget.


struct AwnEffectsClass

struct AwnEffectsClass {
    GObjectClass parent_class;

    void (*animation_start)(AwnEffects* fx, AwnEffect effect);
    void (*animation_end)(AwnEffects* fx, AwnEffect effect);

    GPtrArray* animations;
    GData*     custom_icons;
};


awn_effects_new_for_widget ()

AwnEffects *        awn_effects_new_for_widget          (GtkWidget *widget);


awn_effects_start ()

void                awn_effects_start                   (AwnEffects *fx,
                                                         const AwnEffect effect);


awn_effects_stop ()

void                awn_effects_stop                    (AwnEffects *fx,
                                                         const AwnEffect effect);


awn_effects_start_ex ()

void                awn_effects_start_ex                (AwnEffects *fx,
                                                         const AwnEffect effect,
                                                         gint max_loops,
                                                         gboolean signal_start,
                                                         gboolean signal_end);


awn_effects_set_icon_size ()

void                awn_effects_set_icon_size           (AwnEffects *fx,
                                                         gint width,
                                                         gint height,
                                                         gboolean requestSize);


awn_effects_cairo_create ()

cairo_t *           awn_effects_cairo_create            (AwnEffects *fx);


awn_effects_cairo_create_clipped ()

cairo_t *           awn_effects_cairo_create_clipped    (AwnEffects *fx,
                                                         GdkEventExpose *event);


awn_effects_cairo_destroy ()

void                awn_effects_cairo_destroy           (AwnEffects *fx);


awn_effects_add_overlay ()

void                awn_effects_add_overlay             (AwnEffects *fx,
                                                         AwnOverlay *overlay);


awn_effects_remove_overlay ()

void                awn_effects_remove_overlay          (AwnEffects *fx,
                                                         AwnOverlay *overlay);


awn_effects_get_overlays ()

GList *             awn_effects_get_overlays            (AwnEffects *fx);


awn_effects_redraw ()

void                awn_effects_redraw                  (AwnEffects *fx);


awn_effects_main_effect_loop ()

void                awn_effects_main_effect_loop        (AwnEffects *fx);


awn_effects_emit_anim_start ()

void                awn_effects_emit_anim_start         (AwnEffects *fx,
                                                         AwnEffect effect);


awn_effects_emit_anim_end ()

void                awn_effects_emit_anim_end           (AwnEffects *fx,
                                                         AwnEffect effect);

Property Details

The "active" property

  "active"                   gboolean              : Read / Write / Construct

Determines whether to draw active hint around icon.

Default value: FALSE


The "active-rect-color" property

  "active-rect-color"        DesktopAgnosticColor*  : Read / Write

Color used for painting active rectangle.


The "active-rect-outline" property

  "active-rect-outline"      DesktopAgnosticColor*  : Read / Write

Color used for painting outline of active rectangle.


The "arrow-png" property

  "arrow-png"                gchar*                : Read / Write / Construct

Icon to draw when arrows-count is more than 0.

Default value: "__awn_internal_arrow1"


The "arrows-count" property

  "arrows-count"             gint                  : Read / Write / Construct

Number of arrows to draw.

Allowed values: >= 0

Default value: 0


The "border-clip" property

  "border-clip"              gint                  : Read / Write / Construct

Clips border of the icon.

Allowed values: >= 0

Default value: 0


The "custom-active-png" property

  "custom-active-png"        gchar*                : Read / Write / Construct

Custom icon to draw when in active state.

Default value: NULL


The "depressed" property

  "depressed"                gboolean              : Read / Write / Construct

Determines whether to draw the icon slightly desaturated.

Default value: FALSE


The "dot-color" property

  "dot-color"                DesktopAgnosticColor*  : Read / Write

Color used for painting glowing dot.


The "effects" property

  "effects"                  gint                  : Read / Write / Construct

Active effects set for this instance.

Default value: 0


The "icon-alpha" property

  "icon-alpha"               gfloat                : Read / Write / Construct

Alpha value of drawn icon.

Allowed values: [0,1]

Default value: 1


The "icon-offset" property

  "icon-offset"              gint                  : Read / Write / Construct

Offset of drawn icon to window border.

Default value: 0


The "indirect-paint" property

  "indirect-paint"           gboolean              : Read / Write / Construct

Determines whether to apply transforms directly on the window or paint to a buffer instead.

Default value: TRUE


The "make-shadow" property

  "make-shadow"              gboolean              : Read / Write / Construct

Determines whether shadow is drawn around icon.

Default value: FALSE


The "no-clear" property

  "no-clear"                 gboolean              : Read / Write / Construct

Don't clear background to transparent.

Default value: TRUE


The "position" property

  "position"                 GtkPositionType       : Read / Write / Construct

Icon position.

Default value: GTK_POS_BOTTOM


The "progress" property

  "progress"                 gfloat                : Read / Write / Construct

Value displayed on extra progress pie drawn on the icon.

Allowed values: [0,1]

Default value: 1


The "reflection-alpha" property

  "reflection-alpha"         gfloat                : Read / Write / Construct

Alpha value of drawn reflection.

Allowed values: [0,1]

Default value: 0.25


The "reflection-offset" property

  "reflection-offset"        gint                  : Read / Write / Construct

Offset of drawn reflection to icon.

Default value: 0


The "reflection-visible" property

  "reflection-visible"       gboolean              : Read / Write / Construct

Determines whether reflection is visible.

Default value: TRUE


The "spotlight-png" property

  "spotlight-png"            gchar*                : Read / Write / Construct

Icon to draw for the spotlight effect.

Default value: "__awn_internal_spotlight"


The "widget" property

  "widget"                   GtkWidget*            : Read / Write

Widget to draw to.

Signal Details

The "animation-end" signal

void                user_function                      (AwnEffects *awneffects,
                                                        AwnEffect   arg1,
                                                        gpointer    user_data)       : Run First

awneffects :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "animation-start" signal

void                user_function                      (AwnEffects *awneffects,
                                                        AwnEffect   arg1,
                                                        gpointer    user_data)       : Run First

awneffects :

the object which received the signal.

user_data :

user data set when the signal handler was connected.