1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/* gcompris - board_config.h
*
* Time-stamp: <2006/08/29 01:12:58 bruno>
*
* Copyright (C) 2001 Pascal Georges
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
void gc_board_config_start(GcomprisBoard *aBoard,
GcomprisProfile *aProfile);
void gc_board_config_stop();
/* Usefull fonctions for configuration of boards */
/* This fonction returns the main GtkVBox of the configuration window. */
/* You can add your own widget if you need */
/* the callback is called wish the hash key, value when the apply button is clicked */
/* the callback type */
typedef void (*GcomprisConfCallback) (GHashTable *table);
GtkVBox *gc_board_config_window_display(gchar *label, GcomprisConfCallback callback);
GtkCheckButton *gcompris_boolean_box(const gchar *label, gchar *key, gboolean initial_value);
GtkComboBox *gcompris_combo_box(const gchar *label, GList *strings, gchar *key, gchar *init);
/* Params: */
/* - Label */
/* - key (for hashtable return) */
/* - g_hash_table (gchar *values, gchar *label) */
/* Returns */
/* - g_hash_table (gchar *values, GtkWidget *pointer) */
GHashTable *gcompris_radio_buttons(const gchar *label,
gchar *key,
GHashTable *buttons_label,
gchar *init);
GtkSpinButton *gcompris_spin_int(const gchar *label,
gchar *key,
gint min,
gint max,
gint step,
gint init);
GtkHSeparator *gcompris_separator();
GList *gc_locale_gets_list();
GtkComboBox *gcompris_combo_locales( gchar *init);
void gcompris_change_locale(gchar *locale);
void gcompris_reset_locale();
GList *gc_locale_gets_asset_list(const gchar *file);
GtkComboBox *gcompris_combo_locales_asset(const gchar *label, gchar *init,
const gchar *file);
#endif
/***********************************/
/* TextView facility */
/* Callback is text vaidating function */
/* key is used to pass last validated text on "Apply" event */
/* and returned to callback */
typedef gboolean (*GcomprisTextCallback) (gchar *key, gchar *text, GtkLabel *label);
GtkTextView *gcompris_textview(const gchar *label,
gchar *key,
const gchar*description,
gchar *init_text,
GcomprisTextCallback validate);
|