2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
#ifndef __APPLET_ANIMATION__
22
#define __APPLET_ANIMATION__
24
#include <cairo-dock.h>
27
#define penguin_get_current_animation() (myData.iCurrentAnimation >= 0 ? &myData.pAnimations[myData.iCurrentAnimation] : NULL);
29
#define penguin_is_resting(pAnimation) ((pAnimation) == NULL || (pAnimation)->iNbFrames <= 1 && (pAnimation)->iSpeed == 0)
31
void penguin_move_in_dock (CairoDockModuleInstance *myApplet);
32
gboolean penguin_render_on_container (CairoDockModuleInstance *myApplet, CairoContainer *pContainer, cairo_t *pCairoContext);
33
void penguin_draw_on_dock_opengl (CairoDockModuleInstance *myApplet, CairoContainer *pContainer);
34
void penguin_draw_on_dock (CairoDockModuleInstance *myApplet, CairoContainer *pContainer, cairo_t *pCairoContext);
37
void penguin_move_in_icon (CairoDockModuleInstance *myApplet);
40
gboolean penguin_update_container (CairoDockModuleInstance *myApplet, CairoContainer *pContainer, gboolean *bContinueAnimation);
41
gboolean penguin_update_icon (CairoDockModuleInstance *myApplet, Icon *pIcon, CairoContainer *pContainer, gboolean *bContinueAnimation);
48
void penguin_calculate_new_position (CairoDockModuleInstance *myApplet, PenguinAnimation *pAnimation, int iXMin, int iXMax, int iHeight);
50
void penguin_advance_to_next_frame (CairoDockModuleInstance *myApplet, PenguinAnimation *pAnimation);
52
int penguin_choose_movement_animation (CairoDockModuleInstance *myApplet);
53
int penguin_choose_go_up_animation (CairoDockModuleInstance *myApplet);
54
int penguin_choose_beginning_animation (CairoDockModuleInstance *myApplet);
55
int penguin_choose_ending_animation (CairoDockModuleInstance *myApplet);
56
int penguin_choose_resting_animation (CairoDockModuleInstance *myApplet);
57
int penguin_choose_next_animation (CairoDockModuleInstance *myApplet, PenguinAnimation *pAnimation);
59
void penguin_set_new_animation (CairoDockModuleInstance *myApplet, int iNewAnimation);
61
void penguin_start_animating (CairoDockModuleInstance *myApplet);
62
void penguin_start_animating_with_delay (CairoDockModuleInstance *myApplet);