awn-effects

awn-effects

Synopsis

enum                AwnEffect;
enum                AwnEffectSequence;
const gchar*        (*AwnTitleCallback)                 (GObject *);
void                (*AwnEventNotify)                   (GObject *);
                    AwnEffects;
void                awn_effects_init                    (GObject *obj,
                                                         AwnEffects *fx);
void                awn_effects_finalize                (AwnEffects *fx);
void                awn_register_effects                (GObject *obj,
                                                         AwnEffects *fx);
void                awn_unregister_effects              (AwnEffects *fx);
void                awn_effect_start                    (AwnEffects *fx,
                                                         const AwnEffect effect);
void                awn_effect_stop                     (AwnEffects *fx,
                                                         const AwnEffect effect);
void                awn_effects_set_title               (AwnEffects *fx,
                                                         AwnTitle *title,
                                                         AwnTitleCallback title_func);
void                awn_effect_start_ex                 (AwnEffects *fx,
                                                         const AwnEffect effect,
                                                         AwnEventNotify start,
                                                         AwnEventNotify stop,
                                                         gint max_loops);
void                awn_draw_background                 (AwnEffects *,
                                                         cairo_t *);
void                awn_draw_icons                      (AwnEffects *,
                                                         cairo_t *,
                                                         GdkPixbuf *,
                                                         GdkPixbuf *);
void                awn_draw_foreground                 (AwnEffects *,
                                                         cairo_t *);
void                awn_draw_set_window_size            (AwnEffects *,
                                                         const gint ,
                                                         const gint );
void                awn_draw_set_icon_size              (AwnEffects *,
                                                         const gint ,
                                                         const gint );

Description

Details

enum AwnEffect

typedef enum {
	AWN_EFFECT_NONE,
	AWN_EFFECT_OPENING,
	AWN_EFFECT_LAUNCHING,
	AWN_EFFECT_HOVER,
	AWN_EFFECT_ATTENTION,
	AWN_EFFECT_CLOSING,
	AWN_EFFECT_DESATURATE
} AwnEffect;


enum AwnEffectSequence

typedef enum {
	AWN_EFFECT_DIR_NONE,
	AWN_EFFECT_DIR_STOP,
	AWN_EFFECT_DIR_DOWN,
	AWN_EFFECT_DIR_UP,
	AWN_EFFECT_DIR_LEFT,
	AWN_EFFECT_DIR_RIGHT,
	AWN_EFFECT_SQUISH_DOWN,
	AWN_EFFECT_SQUISH_DOWN2,
	AWN_EFFECT_SQUISH_UP,
	AWN_EFFECT_SQUISH_UP2,
	AWN_EFFECT_TURN_1,
	AWN_EFFECT_TURN_2,
	AWN_EFFECT_TURN_3,
	AWN_EFFECT_TURN_4,
	AWN_EFFECT_SPOTLIGHT_ON,
	AWN_EFFECT_SPOTLIGHT_TREMBLE_UP,
	AWN_EFFECT_SPOTLIGHT_TREMBLE_DOWN,
	AWN_EFFECT_SPOTLIGHT_OFF
} AwnEffectSequence;


AwnTitleCallback ()

const gchar*        (*AwnTitleCallback)                 (GObject *);

Param1 :

Returns :


AwnEventNotify ()

void                (*AwnEventNotify)                   (GObject *);

Param1 :


AwnEffects

typedef struct {
	GObject *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;

	guint enter_notify;
	guint leave_notify;
	guint timer_id;

	/* padding so we dont break ABI compability every time */
	void *pad1;
	void *pad2;
	void *pad3;
	void *pad4;
} AwnEffects;


awn_effects_init ()

void                awn_effects_init                    (GObject *obj,
                                                         AwnEffects *fx);

Initializes AwnEffects structure.

obj :

Object which will be passed to all callback functions, this object is also passed to gtk_widget_queue_draw() during the animation.

fx :

Pointer to AwnEffects structure.

awn_effects_finalize ()

void                awn_effects_finalize                (AwnEffects *fx);

Finalizes AwnEffects usage and frees internally allocated memory. (also calls awn_unregister_effects())

fx :

Pointer to AwnEffects structure.

awn_register_effects ()

void                awn_register_effects                (GObject *obj,
                                                         AwnEffects *fx);

Registers "enter-notify-event" and "leave-notify-event" signals for the managed window.

obj :

Managed window to which the effects will apply.

fx :

Pointer to AwnEffects structure.

awn_unregister_effects ()

void                awn_unregister_effects              (AwnEffects *fx);

Unregisters events for managed window.

fx :

Pointer to AwnEffects structure.

awn_effect_start ()

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

Start a single effect. The effect will loop until awn_effect_stop() is called.

fx :

Pointer to AwnEffects structure.

effect :

AwnEffect to schedule.

awn_effect_stop ()

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

Stop a single effect.

fx :

Pointer to AwnEffects structure.

effect :

AwnEffect to stop.

awn_effects_set_title ()

void                awn_effects_set_title               (AwnEffects *fx,
                                                         AwnTitle *title,
                                                         AwnTitleCallback title_func);

Makes AwnTitle appear on "enter-notify-event".

fx :

Pointer to AwnEffects structure.

title :

Pointer to AwnTitle instance.

title_func :

Pointer to function which returns desired title text.

awn_effect_start_ex ()

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.

fx :

Pointer to AwnEffects structure.

effect :

Effect to schedule.

start :

Function which will be called when animation starts.

stop :

Function which will be called when animation finishes.

max_loops :

Number of maximum animation loops (0 for unlimited).

awn_draw_background ()

void                awn_draw_background                 (AwnEffects *,
                                                         cairo_t *);

Param1 :

Param2 :


awn_draw_icons ()

void                awn_draw_icons                      (AwnEffects *,
                                                         cairo_t *,
                                                         GdkPixbuf *,
                                                         GdkPixbuf *);

Param1 :

Param2 :

Param3 :

Param4 :


awn_draw_foreground ()

void                awn_draw_foreground                 (AwnEffects *,
                                                         cairo_t *);

Param1 :

Param2 :


awn_draw_set_window_size ()

void                awn_draw_set_window_size            (AwnEffects *,
                                                         const gint ,
                                                         const gint );

Param1 :

Param2 :

Param3 :


awn_draw_set_icon_size ()

void                awn_draw_set_icon_size              (AwnEffects *,
                                                         const gint ,
                                                         const gint );

Param1 :

Param2 :

Param3 :