Back to index

gcompris  8.2.2
board_config.h
Go to the documentation of this file.
00001 /* gcompris - board_config.h
00002  *
00003  * Time-stamp: <2006/08/29 01:12:58 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 BOARD_CONFIG_H
00023 #define BOARD_CONFIG_H
00024 
00025 void    gc_board_config_start(GcomprisBoard *aBoard,
00026                             GcomprisProfile *aProfile);
00027 void    gc_board_config_stop();
00028 
00029 
00030 /* Usefull fonctions for configuration of boards */
00031 /* This fonction returns the main GtkVBox of the configuration window. */
00032 /* You can add your own widget if you need */
00033 /* the callback is called wish the hash key, value when the apply button is clicked */
00034 
00035 /* the callback type */
00036 typedef void (*GcomprisConfCallback) (GHashTable *table);
00037 
00038 GtkVBox *gc_board_config_window_display(gchar *label, GcomprisConfCallback callback);
00039 
00040 GtkCheckButton *gc_board_config_boolean_box(const gchar *label, gchar *key, gboolean initial_value);
00041 
00042 GtkComboBox *gc_board_config_combo_box(const gchar *label, GList *strings, gchar *key, gchar *init);
00043 
00044 /* Params: */
00045 /*   - Label */
00046 /*   - key (for hashtable  return) */
00047 /*   - g_hash_table (gchar *values, gchar *label) */
00048 /* Returns */
00049 /*   - g_hash_table (gchar *values, GtkWidget *pointer) */
00050 
00051 GHashTable *gc_board_config_radio_buttons(const gchar *label,
00052                                gchar *key,
00053                                GHashTable *buttons_label,
00054                                gchar *init);
00055 
00056 GtkSpinButton *gc_board_config_spin_int(const gchar *label, 
00057                              gchar *key, 
00058                              gint min, 
00059                              gint max, 
00060                              gint step, 
00061                              gint init);
00062 
00063 GtkHSeparator *gc_board_conf_separator();
00064 
00065 GList *gc_locale_gets_list();
00066 
00067 GtkComboBox *gc_board_config_combo_locales( gchar *init);
00068 
00069 void gc_locale_change(gchar *locale);
00070 
00071 void gc_locale_reset();
00072 
00073 GList *gc_locale_gets_asset_list(const gchar *file);
00074 
00075 GtkComboBox *gc_board_config_combo_locales_asset(const gchar *label, gchar *init,
00076                                      const gchar *file);
00077 #endif
00078 
00079 /***********************************/
00080 /* TextView  facility              */
00081 /* Callback is text vaidating function */
00082 /* key is used to pass last validated text on "Apply" event */
00083 /* and returned to callback */
00084 
00085 typedef gboolean (*GcomprisTextCallback) (gchar *key, gchar *text, GtkLabel *label);
00086 
00087 GtkTextView *gc_board_config_textview(const gchar *label, 
00088                             gchar *key,
00089                             const gchar*description, 
00090                             gchar *init_text, 
00091                             GcomprisTextCallback validate);