| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#ifndef __APPLET_ANIMATION__ |
| 22 |
#define __APPLET_ANIMATION__ |
| 23 |
|
| 24 |
#include <cairo-dock.h> |
| 25 |
|
| 26 |
|
| 27 |
#define penguin_get_current_animation() (myData.iCurrentAnimation >= 0 ? &myData.pAnimations[myData.iCurrentAnimation] : NULL); |
| 28 |
|
| 29 |
#define penguin_is_resting(pAnimation) (pAnimation == NULL || ((pAnimation)->iNbFrames <= 1 && (pAnimation)->iSpeed == 0)) |
| 30 |
|
| 31 |
#define penguin_remove_notfications() do {\ |
| 32 |
gldi_object_remove_notification (myIcon, NOTIFICATION_UPDATE_ICON_SLOW, (GldiNotificationFunc) penguin_update_icon, myApplet);\ |
| 33 |
gldi_object_remove_notification (myDock, NOTIFICATION_UPDATE_SLOW, (GldiNotificationFunc) penguin_update_container, myApplet);\ |
| 34 |
gldi_object_remove_notification (myDock, NOTIFICATION_RENDER, (GldiNotificationFunc) penguin_render_on_container, myApplet); } while (0) |
| 35 |
|
| 36 |
void penguin_move_in_dock (GldiModuleInstance *myApplet); |
| 37 |
gboolean penguin_render_on_container (GldiModuleInstance *myApplet, GldiContainer *pContainer, cairo_t *pCairoContext); |
| 38 |
void penguin_draw_on_dock_opengl (GldiModuleInstance *myApplet, GldiContainer *pContainer); |
| 39 |
void penguin_draw_on_dock (GldiModuleInstance *myApplet, GldiContainer *pContainer, cairo_t *pCairoContext); |
| 40 |
|
| 41 |
|
| 42 |
void penguin_move_in_icon (GldiModuleInstance *myApplet); |
| 43 |
|
| 44 |
|
| 45 |
gboolean penguin_update_container (GldiModuleInstance *myApplet, GldiContainer *pContainer, gboolean *bContinueAnimation); |
| 46 |
gboolean penguin_update_icon (GldiModuleInstance *myApplet, Icon *pIcon, GldiContainer *pContainer, gboolean *bContinueAnimation); |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
void penguin_calculate_new_position (GldiModuleInstance *myApplet, PenguinAnimation *pAnimation, int iXMin, int iXMax, int iHeight); |
| 54 |
|
| 55 |
void penguin_advance_to_next_frame (GldiModuleInstance *myApplet, PenguinAnimation *pAnimation); |
| 56 |
|
| 57 |
int penguin_choose_movement_animation (GldiModuleInstance *myApplet); |
| 58 |
int penguin_choose_go_up_animation (GldiModuleInstance *myApplet); |
| 59 |
int penguin_choose_beginning_animation (GldiModuleInstance *myApplet); |
| 60 |
int penguin_choose_ending_animation (GldiModuleInstance *myApplet); |
| 61 |
int penguin_choose_resting_animation (GldiModuleInstance *myApplet); |
| 62 |
int penguin_choose_next_animation (GldiModuleInstance *myApplet, PenguinAnimation *pAnimation); |
| 63 |
|
| 64 |
void penguin_set_new_animation (GldiModuleInstance *myApplet, int iNewAnimation); |
| 65 |
|
| 66 |
void penguin_start_animating (GldiModuleInstance *myApplet); |
| 67 |
void penguin_start_animating_with_delay (GldiModuleInstance *myApplet); |
| 68 |
|
| 69 |
|
| 70 |
#endif |