~ubuntu-branches/ubuntu/trusty/gcompris/trusty

« back to all changes in this revision

Viewing changes to src/boards/awele.h

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2006-12-15 23:08:17 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061215230817-exr5ks1hd73s3tlk
Tags: 8.2.2-1
* New upstream bugfix release, fixes among other things the support for
  the version of gnucap shipped in etch.
* Add missing dependency on python-gtk2 (Closes: #396523).
* Removed reference to non-existent sound file from memory.c (upstream
  fix - impacts 8.2 as well).  
* Now suggests gnuchess, gnucap, and tuxpaint.
* Updated extended description for the main package.

Show diffs side-by-side

added added

removed removed

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