Commit 26bc2ba7 authored by Bruno Coudoin's avatar Bruno Coudoin

Continued the rework of the API.

parent 504e830c
2006-08-29 Bruno coudoin <bruno.coudoin@free.fr>
Continued the rework of the API.
* docs/C/python.xml:
* po/ChangeLog:
* po/POTFILES.in:
* po/tr.po:
* src/boards/advanced_colors.c: (start_board), (end_board),
(colors_next_level), (game_won), (ok_timeout):
* src/boards/algebra.c: (pause_board), (start_board), (end_board),
(timer_end), (algebra_next_level), (algebra_destroy_all_items),
(display_operand), (algebra_create_item), (item_event), (game_won):
* src/boards/algebra_guesscount.c: (start_board), (end_board),
(algebra_guesscount_next_level), (algebra_guesscount_create_item),
(game_won), (process_time):
* src/boards/animtest.c: (start_board):
* src/boards/awele.c: (start_board), (awele_next_level),
(awele_create_item), (game_won), (to_computer),
(updateCapturedBeans):
* src/boards/awele_alphaBeta.c: (think):
* src/boards/canal_lock.c: (canal_lock_next_level), (game_won),
(move_boat), (item_event):
* src/boards/chess.c: (chess_next_level), (game_won),
(display_white_turn), (display_info), (item_event):
* src/boards/click_on_letter.c: (start_board), (end_board),
(repeat), (sounds_are_fine), (click_on_letter_next_level),
(click_on_letter_create_item), (game_won), (process_ok_timeout),
(config_start):
* src/boards/clickgame.c: (clickgame_start), (clickgame_end),
(clickgame_next_level), (clickgame_move_item), (game_won),
(item_event):
* src/boards/clockgame.c: (start_board), (end_board),
(clockgame_next_level), (clockgame_create_item), (game_won),
(process_ok), (item_event):
* src/boards/colors.c: (colors_config_start), (start_board),
(end_board), (repeat), (game_won), (process_ok_timeout):
* src/boards/crane.c: (start_board), (bonus), (finished),
(select_item):
* src/boards/draw.c: (start_board), (create_item),
(item_event_resize), (item_event_move):
* src/boards/enumerate.c: (start_board), (enumerate_create_item),
(game_won), (item_event), (process_ok):
* src/boards/erase.c: (start_board), (end_board),
(erase_next_level), (bonus), (finished), (game_won):
* src/boards/fifteen.c: (fifteen_next_level),
(fifteen_create_item), (game_won), (test_win):
* src/boards/gletters.c: (level_set_score), (start_board),
(end_board), (key_press), (gletters_next_level),
(gletters_create_item), (player_win), (player_loose),
(gletter_config_start):
* src/boards/gtans.c: (start_board):
* src/boards/gtans_callbacks.c:
(on_wdrawareagrande_button_release_event):
* src/boards/gtans_interface.c: (create_mainwindow):
* src/boards/hanoi.c: (start_board), (hanoi_create_item),
(game_won), (item_event):
* src/boards/hanoi_real.c: (start_board), (hanoi_create_item),
(game_won), (item_event):
* src/boards/imageid.c: (start_board), (end_board),
(imageid_next_level), (imageid_create_item), (game_won),
(process_ok_timeout), (highlight_selected), (config_start):
* src/boards/leftright.c: (start_board), (end_board),
(leftright_next_level), (leftright_create_item), (game_won),
(process_ok_timeout):
* src/boards/machpuzzle.c: (minigolf_next_level), (game_won),
(minigolf_move):
* src/boards/magic_hat.c: (start_board), (process_ok), (finished),
(item_event):
* src/boards/maze.c: (start_board), (repeat), (maze_create_item),
(game_won), (draw_background), (twoDdisplay), (threeDdisplay):
* src/boards/memory.c: (start_board), (end_board), (create_item),
(player_win), (display_card), (check_win), (tux_play),
(sound_callback):
* src/boards/menu2.c: (menu_start), (menu_config),
(menu_create_item), (item_event), (set_content),
(create_info_area), (create_top), (display_welcome),
(menu_config_start):
* src/boards/missingletter.c: (start_board), (end_board),
(missing_letter_next_level), (missing_letter_create_item),
(game_won), (process_ok_timeout), (highlight_selected),
(config_start):
* src/boards/money.c: (money_next_level), (game_won), (process_ok):
* src/boards/money_widget.c: (money_widget_set_position):
* src/boards/paratrooper.c: (pause_board), (start_board),
(paratrooper_move_tux), (next_state):
* src/boards/planegame.c: (start_board), (end_board),
(planegame_next_level), (planegame_cloud_colision),
(planegame_create_item), (item_event):
* src/boards/py-mod-admin.c: (py_gc_board_config_start),
(py_gc_board_config_stop), (py_gc_db_profiles_list_get),
(py_gc_db_users_from_group_get), (py_gc_profile_set_current_user),
(py_gc_profile_get_current_user):
* src/boards/py-mod-bonus.c: (py_gc_bonus_display),
(py_gcompris_gc_bonus_end_display),
(python_gcompris_bonus_module_init):
* src/boards/py-mod-gcompris.c: (py_gc_set_background),
(py_gc_get_canvas), (py_gc_get_window), (py_gc_menu_section_get),
(py_gc_profile_get_current), (py_gc_profile_get_current_user),
(py_gc_board_config_window_display), (py_gcompris_textview),
(py_gc_profile_get_current_user_dirname), (py_gc_im_reset),
(python_gcompris_module_init):
* src/boards/py-mod-score.c: (py_gc_score_start),
(py_gc_score_end), (py_gc_score_set),
(python_gc_score_module_init):
* src/boards/py-mod-score.h:
* src/boards/py-mod-skin.c: (py_gc_skin_image_get),
(py_gc_skin_pixmap_load), (py_gc_skin_get_color_default),
(py_gc_skin_get_font_default), (py_gc_skin_get_color),
(py_gc_skin_get_font), (python_gc_skin_module_init):
* src/boards/py-mod-skin.h:
* src/boards/py-mod-sound.c: (py_gc_sound_play_ogg_list),
(py_gc_sound_play_ogg), (py_gc_sound_reopen), (py_gc_sound_close),
(py_gc_sound_pause), (py_gc_sound_resume),
(py_gc_sound_play_ogg_cb):
* src/boards/py-mod-timer.c: (py_gc_timer_display),
(py_gc_timer_add), (py_gc_timer_end), (py_gc_timer_get_remaining),
(py_gc_timer_pause), (python_gc_timer_module_init):
* src/boards/py-mod-timer.h:
* src/boards/python.c: (pythongc_board_config_start),
(pythongc_board_config_stop):
* src/boards/railroad.c: (start_board), (end_board),
(railroad_next_level), (game_won), (process_ok), (animate_model):
* src/boards/read_colors.c: (start_board), (end_board),
(read_colors_next_level), (game_won), (process_ok_timeout):
* src/boards/reading.c: (start_board), (display_what_to_do),
(reading_create_item), (ask_ready), (ask_yes_no), (player_win),
(player_loose), (reading_config_start):
* src/boards/reversecount.c: (pause_board), (process_error),
(reversecount_next_level), (reversecount_destroy_all_items),
(game_won), (animate_tux):
* src/boards/shapegame.c: (start_board), (increment_sublevel),
(process_ok), (shapegame_init_canvas),
(add_shape_to_list_of_shapes), (shape_goes_back_to_list),
(item_event), (item_event_edition), (create_title),
(add_xml_shape_to_data), (config_start):
* src/boards/smallnumbers.c: (start_board), (end_board),
(smallnumbers_next_level), (smallnumbers_create_item),
(player_win), (player_loose), (smallnumber_config_start):
* src/boards/submarine.c: (start_board), (submarine_create_item),
(update_timeout_slow), (game_won), (ok_timeout),
(submarine_explosion):
* src/boards/superbrain.c: (process_ok), (superbrain_next_level),
(game_won):
* src/boards/target.c: (start_board), (display_windspeed),
(target_create_item), (game_won), (process_ok), (request_score):
* src/boards/traffic.c: (start_board), (end_board),
(traffic_next_level), (game_won), (car_cb):
* src/boards/wordprocessor.c: (start_board),
(display_style_buttons):
* src/boards/wordsgame.c: (start_board), (end_board), (key_press),
(wordsgame_next_level), (wordsgame_create_item), (player_win),
(player_loose):
* src/gcompris/about.c: (gc_about_start), (move_plane):
* src/gcompris/anim.c: (gc_anim_load), (gc_anim_activate),
(gc_anim_swap), (gc_anim_deactivate), (gc_anim_free),
(gc_anim_set_state), (anim_tick):
* src/gcompris/bar.c: (gc_bar_start), (gc_bar_set_level),
(gc_bar_set), (update_exit_button), (bar_play_sound),
(item_event_bar):
* src/gcompris/board.c: (gc_board_get_current_board_plugin),
(gc_board_get_current), (gc_board_set_current), (board_play),
(board_pause), (board_stop), (board_run_next_end),
(board_run_next):
* src/gcompris/board.h:
* src/gcompris/board_config.c: (gc_board_config_start),
(gc_board_config_stop), (check_key), (gc_board_conf_close),
(_response_board_conf), (_conf_window_configured),
(gc_board_config_window_display),
(gc_board_conf_boolean_box_toggled), (gcompris_boolean_box),
(create_radio_buttons), (destroy_hash), (gcompris_radio_buttons),
(spin_changed), (gcompris_spin_int), (gcompris_separator),
(gcompris_textview_yes), (gcompris_textview):
* src/gcompris/board_config.h:
* src/gcompris/bonus.c: (end_gc_bonus_end_display),
(gc_bonus_end_display), (gc_bonus_display), (bonus_image),
(end_bonus):
* src/gcompris/bonus.h:
* src/gcompris/config.c: (gc_config_start), (gc_config_stop),
(gc_locale_get_name), (display_previous_next), (set_locale_flag),
(get_next_locale), (get_previous_locale), (item_event_ok):
* src/gcompris/dialog.c: (gc_dialog):
* src/gcompris/file_selector.c: (gc_selector_file_stop),
(display_file_selector), (display_files):
* src/gcompris/gameutil.c: (gc_difficulty_display),
(gc_file_find_absolute), (gc_util_create_rootdir):
* src/gcompris/gameutil.h:
* src/gcompris/gc_core.h:
* src/gcompris/gcompris.c: (gc_close_all_dialog),
(board_widget_key_press_callback), (gc_get_canvas),
(gc_get_window), (gc_set_background), (setup_window),
(gc_board_end), (gc_canvas_item_grab), (gc_canvas_item_ungrab),
(cleanup), (gc_terminate), (load_properties), (gc_locale_get),
(gc_locale_get_user_default), (gc_locale_set), (gc_log_handler),
(gc_init):
* src/gcompris/gcompris.h:
* src/gcompris/gcompris_alphabeta.c: (gc_alphabeta):
* src/gcompris/gcompris_alphabeta.h:
* src/gcompris/gcompris_config.h:
* src/gcompris/gcompris_confirm.c: (gc_confirm_box_stop),
(display_confirm), (set_content):
* src/gcompris/gcompris_db.c: (gc_db_init), (gc_db_exit),
(gc_db_set_date), (gc_db_set_version), (gc_db_check_boards),
(gc_db_board_update), (gc_db_read_board_from_section),
(gc_db_get_board_id), (gc_db_remove_board),
(gc_db_profile_from_name_get), (gc_db_get_profile),
(gc_db_users_from_group_get), (gc_db_conf_with_table_get),
(gcompris_get_conf), (gcompris_get_board_conf),
(gc_db_profiles_list_get), (gcompris_get_group_from_id),
(gcompris_get_groups_list), (gc_db_is_activity_in_profile):
* src/gcompris/gcompris_db.h:
* src/gcompris/gcompris_files.c: (gcompris_get_user_dirname),
(gc_profile_get_current_user_dirname),
(gcompris_get_board_dirname), (gcompris_get_current_board_dirname):
* src/gcompris/gcompris_files.h:
* src/gcompris/gcompris_im.c: (gc_im_init), (gc_im_reset),
(im_context_commit_callback), (im_context_preedit_callback),
(window_focus_callback):
* src/gcompris/gcompris_im.h:
* src/gcompris/help.c: (gc_help_start), (select_item):
* src/gcompris/images_selector.c: (gc_selector_images_start),
(gc_selector_images_stop):
* src/gcompris/log.c: (gc_log_end):
* src/gcompris/main.c: (main):
* src/gcompris/menu.c: (_add_xml_to_data), (gc_menu_section_get),
(boardlist_compare_func), (gc_menu_has_activity),
(gc_menu_getlist), (gc_menu_load_dir), (gc_menu_load):
* src/gcompris/profile.c: (gc_profile_get_current),
(gc_profile_set_current_user), (gc_profile_get_current_user):
* src/gcompris/profile.h:
* src/gcompris/properties.c: (scan_get_int), (scan_get_string),
(gc_prop_user_root_directory_get), (gc_prop_config_file_get),
(gc_prop_default_database_name_get), (gc_prop_new),
(gc_prop_destroy), (gc_prop_save), (gc_setenv):
* src/gcompris/properties.h:
* src/gcompris/score.c: (gc_score_start), (gc_score_end),
(gc_score_set), (display_number):
* src/gcompris/score.h:
* src/gcompris/skin.c: (gc_skin_image_get), (gc_skin_pixmap_load),
(gc_skin_free_string), (gc_skin_setup_vars),
(gc_skin_str_to_color), (skin_xml_load), (gc_skin_load),
(gc_skin_free), (gc_skin_get_color_default),
(gc_skin_get_gdkcolor_default), (gc_skin_get_font_default),
(gc_skin_get_number_default):
* src/gcompris/skin.h:
* src/gcompris/soundutil.c: (gc_sound_init), (gc_sound_close),
(gc_sound_reopen), (gc_sound_pause), (gc_sound_resume),
(gc_sound_policy_set), (gc_sound_policy_get), (scheduler_bgnd),
(scheduler), (thread_play_ogg), (get_next_sound_to_play),
(gc_sound_play_ogg_cb), (gc_sound_play_ogg),
(gc_sound_play_ogg_list), (gc_sound_alphabet), (gc_sound_callback),
(gc_sound_instance_init), (gc_sound_class_init),
(gc_sound_get_type):
* src/gcompris/soundutil.h:
* src/gcompris/timer.c: (gc_timer_display), (gc_timer_add),
(gc_timer_end), (gc_timer_pause), (gc_timer_get_remaining),
(start_animation), (display_time_ellapsed), (subtimer_increment),
(timer_increment):
* src/gcompris/timer.h:
2006-08-23 Bruno coudoin <bruno.coudoin@free.fr>
- fixed bug#352350 Some typos in the PO file
......
......@@ -43,7 +43,7 @@ xsltproc -o python.html http://docbook.sourceforge.net/release/xsl/current/html/
<sect1>
<title>Notes about this wrapper</title>
<para>Generaly speaking, all C gcompris_xxx functions are wrapped to a
<para>Generaly speaking, all C gc_xxx functions are wrapped to a
corresponding gcompris.xxx function; parameters and return types remains the same.
Some structures have also been wrapped. See below particular notes about this.</para>
......@@ -196,7 +196,7 @@ attribute is readeable and/or writable.</para>
</row>
<row>
<entry>gcompris.set_background(gnomeCanvasGroup, file)</entry>
<entry>GnomeCanvasItem *gcompris_set_background(GnomeCanvasGroup *parent, gchar *file)</entry>
<entry>GnomeCanvasItem *gc_set_background(GnomeCanvasGroup *parent, gchar *file)</entry>
<entry>return a gnome.canvas.CanvasItem object</entry>
</row>
<row>
......@@ -221,12 +221,12 @@ attribute is readeable and/or writable.</para>
</row>
<row>
<entry>gcompris.get_canvas()</entry>
<entry>GnomeCanvas* gcompris_get_canvas()</entry>
<entry>GnomeCanvas* gc_get_canvas()</entry>
<entry>return a gnome.canvas.Canvas</entry>
</row>
<row>
<entry>gcompris.get_window()</entry>
<entry>GtkWidget* gcompris_get_window(void)</entry>
<entry>GtkWidget* gc_get_window(void)</entry>
<entry>return a gtk.Widget</entry>
</row>
<row>
......@@ -261,12 +261,12 @@ attribute is readeable and/or writable.</para>
</row>
<row>
<entry>gcompris.log_set_reason (gcomprisBoard, expected, got)</entry>
<entry>gcompris_log_set_reason (GcomprisBoard *gcomprisBoard, gchar *expected, gchar *got)</entry>
<entry>gc_log_set_reason (GcomprisBoard *gcomprisBoard, gchar *expected, gchar *got)</entry>
<entry></entry>
</row>
<row>
<entry>gcompris.log_end (gcomprisBoard, status)</entry>
<entry>gcompris_log_end (GcomprisBoard *gcomprisBoard, gchar *status)</entry>
<entry>gc_log_end (GcomprisBoard *gcomprisBoard, gchar *status)</entry>
<entry></entry>
</row>
<row>
......@@ -473,17 +473,17 @@ attribute is readeable and/or writable.</para>
<tbody>
<row>
<entry>gcompris.utils.image_to_skin(imagename)</entry>
<entry>gchar *gcompris_image_to_skin(gchar *imagename)</entry>
<entry>gchar *gc_skin_image_get(gchar *imagename)</entry>
<entry>return a string</entry>
</row>
<row>
<entry>gcompris.utils.load_skin_pixmap(pixmapfile)</entry>
<entry>GdkPixbuf *gcompris_load_skin_pixmap(char *pixmapfile)</entry>
<entry>GdkPixbuf *gcompris_skin_pixmap_load(char *pixmapfile)</entry>
<entry>return a gtk.gdk.Pixbuf</entry>
</row>
<row>
<entry>gcompris.utils.load_pixmap(pixmapfile)</entry>
<entry>GdkPixbuf *gcompris_load_pixmap(char *pixmapfile)</entry>
<entry>GdkPixbuf *gc_pixmap_load(char *pixmapfile)</entry>
<entry>return a gtk.gdk.Pixbuf</entry>
</row>
<row>
......@@ -561,12 +561,12 @@ attribute is readeable and/or writable.</para>
<tbody>
<row>
<entry>gcompris.bonus.display(BonusStatusList, BonusList)</entry>
<entry>void gcompris_display_bonus(BonusStatusList, BonusList)</entry>
<entry>void gc_bonus_display(BonusStatusList, BonusList)</entry>
<entry></entry>
</row>
<row>
<entry>gcompris.bonus.board_finished(BoardFinishedList)</entry>
<entry>void board_finished(BoardFinishedList)</entry>
<entry>void gc_bonus_end_display(BoardFinishedList)</entry>
<entry></entry>
</row>
</tbody>
......@@ -620,8 +620,6 @@ attribute is readeable and/or writable.</para>
<entry>BONUS_TUX</entry></row>
<row><entry>gcompris.bonus.GNU</entry>
<entry>BONUS_TUX</entry></row>
<row><entry>gcompris.bonus.LAST</entry>
<entry>BONUS_LAST</entry></row>
</tbody>
</tgroup>
</informaltable>
......@@ -646,8 +644,6 @@ attribute is readeable and/or writable.</para>
<entry>BOARD_FINISHED_TUXLOCO</entry></row>
<row><entry>gcompris.bonus.FINISHED_TOOMANYERRORS</entry>
<entry>BOARD_FINISHED_TOOMANYERRORS</entry></row>
<row><entry>gcompris.bonus.FINISHED_LAST</entry>
<entry>BOARD_FINISHED_LAST</entry></row>
</tbody>
</tgroup>
</informaltable>
......@@ -670,17 +666,17 @@ attribute is readeable and/or writable.</para>
<tbody>
<row>
<entry>gcompris.score.start(style, x, y, max)</entry>
<entry>void gcompris_score_start(ScoreStyleList style, guint x, guint y, guint max)</entry>
<entry>void gc_score_start(ScoreStyleList style, guint x, guint y, guint max)</entry>
<entry></entry>
</row>
<row>
<entry>gcompris.score.end()</entry>
<entry>void gcompris_score_end()</entry>
<entry>void gc_score_end()</entry>
<entry></entry>
</row>
<row>
<entry>gcompris.score.set(value)</entry>
<entry>void gcompris_score_set(guint value)</entry>
<entry>void gc_score_set(guint value)</entry>
<entry></entry>
</row>
</tbody>
......@@ -704,8 +700,6 @@ attribute is readeable and/or writable.</para>
<entry>SCORESTYLE_NOTE</entry></row>
<row><entry>gcompris.score.STYLE_LIFE</entry>
<entry>SCORESTYLE_LIFE</entry></row>
<row><entry>gcompris.score.LAST</entry>
<entry>SCORE_LAST</entry></row>
</tbody>
</tgroup>
</informaltable>
......@@ -728,14 +722,19 @@ attribute is readeable and/or writable.</para>
<tbody>
<row>
<entry>gcompris.sound.play_ogg_list(list)</entry>
<entry>void gcompris_play_ogg_list( GList* files )</entry>
<entry>void gc_sound_play_ogg_list( GList* files )</entry>
<entry>The list argument is a GList</entry>
</row>
<row>
<entry>gcompris.sound.play_ogg(list)</entry>
<entry>void gcompris_play_ogg(char *, ...)</entry>
<entry>void gc_sound_play_ogg(char *, ...)</entry>
<entry>The list argument is a python list containing strings</entry>
</row>
<row>
<entry>gcompris.sound.play_ogg_cb(list)</entry>
<entry>void gc_sound_play_ogg_cb((const gchar *file, GcomprisSoundCallback cb)</entry>
<entry>The list argument is a python string and a function callback. It will be called once the sound has been played.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
......@@ -771,22 +770,22 @@ attribute is readeable and/or writable.</para>
</row>
<row>
<entry>gcompris.timer.add(second)</entry>
<entry>void gcompris_timer_add(int second)</entry>
<entry>void gc_timer_add(int second)</entry>
<entry></entry>
</row>
<row>
<entry>gcompris.timer.end()</entry>
<entry>void gcompris_timer_end(void)</entry>
<entry>void gc_timer_end(void)</entry>
<entry></entry>
</row>
<row>
<entry>gcompris.timer.get_remaining()</entry>
<entry>guint gcompris_timer_get_remaining()</entry>
<entry>guint gc_timer_get_remaining()</entry>
<entry>Return an integer</entry>
</row>
<row>
<entry>gcompris.timer.pause(pause)</entry>
<entry>void gcompris_timer_pause(gboolean pause)</entry>
<entry>void gc_timer_pause(gboolean pause)</entry>
<entry></entry>
</row>
</tbody>
......@@ -873,7 +872,7 @@ attribute is readeable and/or writable.</para>
<tbody>
<row>
<entry>gcompris.anim.CanvasItem.setState(int)</entry>
<entry>gcompris_set_anim_state(GcomprisAnimCanvasItem*, int)</entry>
<entry>gc_anim_set_state(GcomprisAnimCanvasItem*, int)</entry>
<entry></entry>
</row>
</tbody>
......
......@@ -136,7 +136,7 @@ static void start_board (GcomprisBoard *agcomprisBoard) {
gcomprisBoard->number_of_sublevel = 8;
gc_bar_set(GC_BAR_LEVEL);
gcompris_score_start(SCORESTYLE_NOTE,
gc_score_start(SCORESTYLE_NOTE,
gcomprisBoard->width - 220,
gcomprisBoard->height - 50,
gcomprisBoard->number_of_sublevel);
......@@ -159,7 +159,7 @@ static void end_board () {
if(gcomprisBoard!=NULL){
pause_board(TRUE);
gcompris_score_end();
gc_score_end();
colors_destroy_all_items();
// free list
while (g_list_length(listColors) > 0)
......@@ -205,7 +205,7 @@ static void colors_next_level() {
colors_destroy_all_items();
gamewon = FALSE;
gcompris_score_set(gcomprisBoard->sublevel);
gc_score_set(gcomprisBoard->sublevel);
gc_bar_set_level(gcomprisBoard);
/* initialize board only once*/
......@@ -227,7 +227,7 @@ static void colors_next_level() {
/* set background */
str = g_strdup_printf("%s/%s", gcomprisBoard->boarddir, backgroundFile);
g_warning("background = %s\n", str);
gcompris_set_background(gnome_canvas_root(gcomprisBoard->canvas), str);
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas), str);
g_free(str);
}
......@@ -237,7 +237,7 @@ static void colors_next_level() {
color_item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_text_get_type (),
"text", colors[GPOINTER_TO_INT(g_list_nth_data(listColors,0))],
"font", gcompris_skin_font_board_title_bold,
"font", gc_skin_font_board_title_bold,
"x", (double) (color_x1+color_x2)/2,
"y", (double) (color_y1+color_y2)/2,
"anchor", GTK_ANCHOR_CENTER,
......@@ -324,7 +324,7 @@ static void game_won() {
gcomprisBoard->level++;
gcomprisBoard->sublevel = 1;
if (gcomprisBoard->level > gcomprisBoard->maxlevel) {
board_finished(BOARD_FINISHED_TUXLOCO);
gc_bonus_end_display(BOARD_FINISHED_TUXLOCO);
return;
}
......@@ -340,7 +340,7 @@ static void game_won() {
* =====================================================================*/
static gboolean ok_timeout() {
g_warning("+++ ok_timeout errors = %d\n", errors);
gcompris_display_bonus(gamewon, BONUS_SMILEY);
gc_bonus_display(gamewon, BONUS_SMILEY);
if (!gamewon)
errors--;
if (errors <1)
......@@ -348,7 +348,7 @@ static gboolean ok_timeout() {
update_clock();
if (errors <= 1) {
board_finished(BOARD_FINISHED_TOOMANYERRORS);
gc_bonus_end_display(BOARD_FINISHED_TOOMANYERRORS);
}
return FALSE;
......
......@@ -133,13 +133,13 @@ static void pause_board (gboolean pause)
return;
/* Make the timer follow our pause status */
gcompris_timer_pause(pause);
gc_timer_pause(pause);
if(gamewon == TRUE && pause == FALSE) /* the game is won */
algebra_next_level();
if(leavenow == TRUE && pause == FALSE)
board_finished(BOARD_FINISHED_RANDOM);
gc_bonus_end_display(BOARD_FINISHED_RANDOM);
board_paused = pause;
}
......@@ -156,14 +156,14 @@ static void start_board (GcomprisBoard *agcomprisBoard)
/* disable im_context */
gcomprisBoard->disable_im_context = TRUE;
gcompris_set_background(gnome_canvas_root(gcomprisBoard->canvas), "images/scenery2_background.png");
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas), "images/scenery2_background.png");
/* set initial values for this level */
gcomprisBoard->level=1;
gcomprisBoard->maxlevel=9;
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=10; /* Go to next level after this number of 'play' */
gcompris_score_start(SCORESTYLE_NOTE,
gc_score_start(SCORESTYLE_NOTE,
gcomprisBoard->width - 220,
gcomprisBoard->height - 50,
gcomprisBoard->number_of_sublevel);
......@@ -200,7 +200,7 @@ end_board ()
if(gcomprisBoard!=NULL)
{
pause_board(TRUE);
gcompris_score_end();
gc_score_end();
algebra_destroy_all_items();
}
gcomprisBoard = NULL;
......@@ -338,7 +338,7 @@ static void timer_end()
gamewon = FALSE;
leavenow = TRUE;
algebra_destroy_all_items();
gcompris_display_bonus(gamewon, BONUS_SMILEY);
gc_bonus_display(gamewon, BONUS_SMILEY);
}
......@@ -347,7 +347,7 @@ static void algebra_next_level()
{
gc_bar_set_level(gcomprisBoard);
gcompris_score_set(gcomprisBoard->sublevel);
gc_score_set(gcomprisBoard->sublevel);
algebra_destroy_all_items();
......@@ -359,7 +359,7 @@ static void algebra_next_level()
NULL));
maxtime = 20;
gcompris_timer_display(TIMER_X, TIMER_Y,
gc_timer_display(TIMER_X, TIMER_Y,
GCOMPRIS_TIMER_BALLOON, maxtime, timer_end);
/* Try the next level */
......@@ -380,7 +380,7 @@ static void algebra_destroy_all_items()
GnomeCanvasItem *item;
gboolean stop = FALSE;
gcompris_timer_end();
gc_timer_end();
while(g_list_length(item_list)>0)
{
......@@ -439,7 +439,7 @@ static void display_operand(GnomeCanvasGroup *parent,
item = gnome_canvas_item_new (parent,
gnome_canvas_text_get_type (),
"text", &operand,
"font", gcompris_skin_font_board_huge_bold,
"font", gc_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"x", x_align-((strlen(operand_str)-i)*NUMBERSWIDTH),
"y", y,
......@@ -452,7 +452,7 @@ static void display_operand(GnomeCanvasGroup *parent,
focus_item = gnome_canvas_item_new (parent,
gnome_canvas_text_get_type (),
"text", "_",
"font", gcompris_skin_font_board_huge_bold,
"font", gc_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"x", x_align-((strlen(operand_str)-i)*NUMBERSWIDTH),
"y", y,
......@@ -464,7 +464,7 @@ static void display_operand(GnomeCanvasGroup *parent,
bad_item = gnome_canvas_item_new (parent,
gnome_canvas_text_get_type (),
"text", "/",
"font", gcompris_skin_font_board_huge_bold,
"font", gc_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"x", x_align-((strlen(operand_str)-i)*NUMBERSWIDTH),
"y", y,
......@@ -552,7 +552,7 @@ static GnomeCanvasItem *algebra_create_item(GnomeCanvasGroup *parent)
item = gnome_canvas_item_new (parent,
gnome_canvas_text_get_type (),
"text", currentOperation,
"font", gcompris_skin_font_board_huge_bold,
"font", gc_skin_font_board_huge_bold,
"x", x,
"y", y,
"anchor", GTK_ANCHOR_CENTER,
......@@ -564,7 +564,7 @@ static GnomeCanvasItem *algebra_create_item(GnomeCanvasGroup *parent)
item = gnome_canvas_item_new (parent,
gnome_canvas_text_get_type (),
"text", "=",
"font", gcompris_skin_font_board_huge_bold,
"font", gc_skin_font_board_huge_bold,
"x", x_align + NUMBERSWIDTH*(strlen(second_operand_str)+1),
"y", y,
"anchor", GTK_ANCHOR_CENTER,
......@@ -605,12 +605,12 @@ static GnomeCanvasItem *algebra_create_item(GnomeCanvasGroup *parent)
gchar *str2 = NULL;
if(strlen(first_operand_str)==1)
str1 = gcompris_alphabet_sound(first_operand_str);
str1 = gc_sound_alphabet(first_operand_str);
else
str1 = g_strdup_printf("%s.ogg", first_operand_str);
if(strlen(second_operand_str)==1)
str2 = gcompris_alphabet_sound(second_operand_str);
str2 = gc_sound_alphabet(second_operand_str);
else
str2 = g_strdup_printf("%s.ogg", second_operand_str);
......@@ -620,7 +620,7 @@ static GnomeCanvasItem *algebra_create_item(GnomeCanvasGroup *parent)
first_operand_str = g_strdup_printf("sounds/$LOCALE/alphabet/%s", str1);
second_operand_str = g_strdup_printf("sounds/$LOCALE/alphabet/%s", str2);
gcompris_play_ogg(first_operand_str, audioOperand , second_operand_str, "sounds/$LOCALE/misc/equal.ogg", NULL);
gc_sound_play_ogg(first_operand_str, audioOperand , second_operand_str, "sounds/$LOCALE/misc/equal.ogg", NULL);
g_free(str1);
g_free(str2);
......@@ -708,7 +708,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
currentToBeFoundItem=toBeFoundItem;
gcompris_play_ogg ("sounds/gobble.ogg", NULL);
gc_sound_play_ogg ("sounds/gobble.ogg", NULL);
break;
default:
......@@ -814,13 +814,13 @@ static void game_won()
gcomprisBoard->sublevel=1;
gcomprisBoard->level++;
if(gcomprisBoard->level>gcomprisBoard->maxlevel) { // the current board is finished : bail out
board_finished(BOARD_FINISHED_RANDOM);
gc_bonus_end_display(BOARD_FINISHED_RANDOM);
return;
}
gamewon = TRUE;
algebra_destroy_all_items();
gcompris_display_bonus(gamewon, BONUS_SMILEY);
gc_bonus_display(gamewon, BONUS_SMILEY);
init_operation();
return;
}
......
......@@ -205,12 +205,12 @@ static void start_board (GcomprisBoard *agcomprisBoard) {
button_pixmap = gc_pixmap_load(str);
g_free(str);
gcompris_set_background(gnome_canvas_root(gcomprisBoard->canvas),"gcompris/animals/tiger1_by_Ralf_Schmode.jpg");
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),"gcompris/animals/tiger1_by_Ralf_Schmode.jpg");
gcomprisBoard->level=1;
gcomprisBoard->maxlevel=NUMBER_OF_LEVELS;
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=NUMBER_OF_SUBLEVELS; /* Go to next level after this number of 'play' */
gcompris_score_start(SCORESTYLE_NOTE,
gc_score_start(SCORESTYLE_NOTE,
50,
gcomprisBoard->height - 50,
gcomprisBoard->number_of_sublevel);
......@@ -228,7 +228,7 @@ static void start_board (GcomprisBoard *agcomprisBoard) {
static void end_board () {
if(gcomprisBoard!=NULL) {
pause_board(TRUE);
gcompris_score_end();
gc_score_end();
destroy_board();
algebra_guesscount_destroy_all_items();
}
......@@ -265,7 +265,7 @@ static void algebra_guesscount_next_level() {
gamewon = FALSE;
token_count = 0;
gcompris_score_set(gcomprisBoard->sublevel);
gc_score_set(gcomprisBoard->sublevel);
/* Try the next level */
algebra_guesscount_create_item(gnome_canvas_root(gcomprisBoard->canvas));
......@@ -414,7 +414,7 @@ static GnomeCanvasItem *algebra_guesscount_create_item(GnomeCanvasGroup *parent)
calcul_line_item_back[i*2] = gnome_canvas_item_new (boardRootItem,
gnome_canvas_text_get_type (),
"text", BLANK,
"font", gcompris_skin_font_board_title_bold,
"font", gc_skin_font_board_title_bold,
"x", (double) X_EQUAL+BUTTON_WIDTH*1.5 + 1,
"y", (double) y_equal_offset[i]+BUTTON_HEIGHT/2 + 1,
"anchor", GTK_ANCHOR_CENTER,
......@@ -423,7 +423,7 @@ static GnomeCanvasItem *algebra_guesscount_create_item(GnomeCanvasGroup *parent)
calcul_line_item[i*2] = gnome_canvas_item_new (boardRootItem,
gnome_canvas_text_get_type (),
"text", BLANK,
"font", gcompris_skin_font_board_title_bold,
"font", gc_skin_font_board_title_bold,
"x", (double) X_EQUAL+BUTTON_WIDTH*1.5,
"y", (double) y_equal_offset[i]+BUTTON_HEIGHT/2,