Back to index

gcompris  8.2.2
timer.h
Go to the documentation of this file.
00001 /* gcompris - timer.h
00002  *
00003  * Time-stamp: <2001/10/15 01:10:21 bruno>
00004  *
00005  * Copyright (C) 2001 Pascal Georges
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020  */
00021 
00022 #ifndef TIMER_H
00023 #define TIMER_H
00024 
00025 #include <ctype.h>
00026 #include <math.h>
00027 #include <assert.h>
00028 #include "gcompris.h"
00029 
00030 typedef enum
00031 {
00032   GCOMPRIS_TIMER_TEXT,
00033   GCOMPRIS_TIMER_SAND,
00034   GCOMPRIS_TIMER_BALLOON,
00035   GCOMPRIS_TIMER_CLOCK,
00036 } TimerList;
00037 
00038 /* Callback when the timer is completed */
00039 typedef void          (*GcomprisTimerEnd)       ();
00040 
00041 void    gc_timer_display(int x, int y, TimerList type, int second, GcomprisTimerEnd gcomprisTimerEnd);
00042 void    gc_timer_add(int second);
00043 void    gc_timer_end(void);
00044 guint   gc_timer_get_remaining();
00045 void    gc_timer_pause(gboolean pause);
00046 
00047 #endif