~ubuntu-branches/ubuntu/maverick/gcompris/maverick

« back to all changes in this revision

Viewing changes to src/awele-activity/awele.h

  • Committer: Bazaar Package Importer
  • Author(s): Marc Gariepy, Marc Gariepy, Stephane Graber
  • Date: 2010-01-04 17:42:49 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20100104174249-7bupatd9dtxyhvs4
Tags: 9.0-0ubuntu1
[Marc Gariepy]
* New upstream release (9.0).
* Remove cache.c from POTFILES to avoid FTBFS
* Remove unneeded rm in debian/rules (file no longer exists upstream)

[Stephane Graber]
* Bump Debian standards to 3.8.3
* Add patch system (dpatch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * gcompris - awele.h
 
3
 *
 
4
 * Copyright (C) 2005, 2008 Frederic Mazzarol
 
5
 *
 
6
 *   This program is free software; you can redistribute it and/or modify
 
7
 *   it under the terms of the GNU General Public License as published by
 
8
 *   the Free Software Foundation; either version 3 of the License, or
 
9
 *   (at your option) any later version.
 
10
 *
 
11
 *   This program is distributed in the hope that it will be useful,
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *   GNU General Public License for more details.
 
15
 *
 
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/>.
 
18
 */
 
19
 
 
20
 
 
21
#define BOUTON "awele/bouton1.png"      //Chemin relatif vers fichiers boutons
 
22
#define BOUTON_NOTIFY "awele/bouton1_notify.png"        //Chemin relatif vers fichiers boutons cliqu�s
 
23
#define BOUTON_CLIC "awele/bouton1_clic.png"    //Chemin relatif vers fichiers boutons cliqu�s
 
24
#define BEAN "awele/graine1.png"        //Chemin relatif vers fichiers graines
 
25
 
 
26
#define WIDTH 800       // Largeur Fenetre
 
27
#define HEIGHT 600      // Hauteur Fenetre
 
28
/**
 
29
*       Tableau de graines
 
30
*/
 
31
typedef struct {
 
32
        GooCanvasItem *beanPixbuf;
 
33
        char hole;
 
34
}BEANHOLE_LINK;
 
35
 
 
36
 
 
37
typedef struct {
 
38
    GooCanvasItem *msg; //Item message pour dialogue avec utilisateur
 
39
    GooCanvasItem *nbBeansHole[12];     //Tableau d'item affichant le nbre de graine par trou.
 
40
    BEANHOLE_LINK *ptBeansHoleLink;     //pointeur sur structures stockant les item graines et la case dans laquelle elles se trouvent.
 
41
    GooCanvasItem *button[6];   //Item des boutons (affich�s avec pixbufButton)
 
42
    GdkPixbuf *pixbufButtonNotify[6];   //pixbux des boutons notifi�s
 
43
    GdkPixbuf *pixbufButton[6]; //pixbuf des boutons(selection de la case a jouer)
 
44
    GdkPixbuf *pixbufButtonClicked[6];  //pixbuf des boutons cliqu�s
 
45
    GooCanvasItem *Captures[2]; //Tableau d'item affichage nbre graine captur�es.
 
46
    GdkPixbuf *pixbufBeans[4];  //pixbufs des graines
 
47
} GRAPHICS_ELT;
 
48
 
 
49
typedef struct {
 
50
    short int numeroCase;
 
51
    GRAPHICS_ELT *graphsElt;
 
52
} CALLBACK_ARGS;
 
53
 
 
54
/*
 
55
*       Fonctions de traitement des events, signaux et rappels
 
56
*/
 
57
static gboolean buttonClick (GooCanvasItem  *item,
 
58
                             GooCanvasItem  *target,
 
59
                             GdkEventButton *event,
 
60
                             gchar *data);
 
61
 
 
62
/**
 
63
*       Fonctions Mise a jour de l'affichage
 
64
*/
 
65
static BEANHOLE_LINK * updateNbBeans (int alpha);
 
66
static void updateCapturedBeans (void);
 
67
static void initBoardGraphics (GRAPHICS_ELT *graphsElt);