1 /* 2 * Copyright © 2007 Christian Persch 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef AISLERIOT_CONF_H 19 #define AISLERIOT_CONF_H 20 21 #include <glib.h> 22 #include "ar-conf.h" 23 24 G_BEGIN_DECLS 25 26 typedef enum { 27 CONF_THEME, 28 CONF_VARIATION, 29 CONF_RECENT_GAMES, 30 CONF_SHOW_TOOLBAR, 31 CONF_CLICK_TO_MOVE, 32 CONF_SOUND, 33 CONF_SHOW_STATUSBAR, 34 CONF_ANIMATIONS, 35 CONF_STATISTICS /* must be last */ 36 } AisleriotConfKey; 37 38 typedef struct { 39 guint wins; 40 guint total; 41 guint best; 42 guint worst; 43 } AisleriotStatistic; 44 45 void aisleriot_conf_init (void); 46 47 void aisleriot_conf_shutdown (void); 48 49 const char *aisleriot_conf_get_key (AisleriotConfKey key); 50 51 gboolean aisleriot_conf_get_options (const char *game_module, int *options); 52 53 void aisleriot_conf_set_options (const char *game_module, int options); 54 55 void aisleriot_conf_get_statistic (const char *game_module, 56 AisleriotStatistic * statistic); 57 58 void aisleriot_conf_set_statistic (const char *game_module, 59 AisleriotStatistic * statistic); 60 61 G_END_DECLS 62 #endif /* !AISLERIOT_CONF_H */ 63