1 /*********************************************************************** 2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold 3 This program is free software; you can redistribute it and/or modify 4 it under the terms of the GNU General Public License as published by 5 the Free Software Foundation; either version 2, or (at your option) 6 any later version. 7 8 This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 GNU General Public License for more details. 12 ***********************************************************************/ 13 14 #ifdef HAVE_CONFIG_H 15 #include <fc_config.h> 16 #endif 17 18 // client 19 #include "gui_interface.h" 20 21 // gui-qt 22 #include "fonts.h" 23 24 #include "qtg_cxxside.h" 25 26 /*********************************************************************** 27 Setup the gui callback table. 28 ***********************************************************************/ setup_gui_funcs()29void setup_gui_funcs() 30 { 31 struct gui_funcs *funcs = get_gui_funcs(); 32 33 funcs->ui_init = qtg_ui_init; 34 funcs->ui_main = qtg_ui_main; 35 funcs->ui_exit = qtg_ui_exit; 36 37 funcs->get_gui_type = qtg_get_gui_type; 38 funcs->insert_client_build_info = qtg_insert_client_build_info; 39 40 funcs->version_message = qtg_version_message; 41 funcs->real_output_window_append = qtg_real_output_window_append; 42 43 funcs->is_view_supported = qtg_is_view_supported; 44 funcs->free_intro_radar_sprites = qtg_free_intro_radar_sprites; 45 funcs->load_gfxfile = qtg_load_gfxfile; 46 funcs->create_sprite = qtg_create_sprite; 47 funcs->get_sprite_dimensions = qtg_get_sprite_dimensions; 48 funcs->crop_sprite = qtg_crop_sprite; 49 funcs->free_sprite = qtg_free_sprite; 50 51 funcs->color_alloc = qtg_color_alloc; 52 funcs->color_free = qtg_color_free; 53 54 funcs->canvas_create = qtg_canvas_create; 55 funcs->canvas_free = qtg_canvas_free; 56 funcs->canvas_set_zoom = qtg_canvas_set_zoom; 57 funcs->has_zoom_support = qtg_has_zoom_support; 58 funcs->canvas_mapview_init = qtg_canvas_mapview_init; 59 funcs->canvas_copy = qtg_canvas_copy; 60 funcs->canvas_put_sprite = qtg_canvas_put_sprite; 61 funcs->canvas_put_sprite_full = qtg_canvas_put_sprite_full; 62 funcs->canvas_put_sprite_fogged = qtg_canvas_put_sprite_fogged; 63 funcs->canvas_put_rectangle = qtg_canvas_put_rectangle; 64 funcs->canvas_fill_sprite_area = qtg_canvas_fill_sprite_area; 65 funcs->canvas_put_line = qtg_canvas_put_line; 66 funcs->canvas_put_curved_line = qtg_canvas_put_curved_line; 67 funcs->get_text_size = qtg_get_text_size; 68 funcs->canvas_put_text = qtg_canvas_put_text; 69 70 funcs->set_rulesets = qtg_set_rulesets; 71 funcs->options_extra_init = qtg_options_extra_init; 72 funcs->server_connect = qtg_server_connect; 73 funcs->add_net_input = qtg_add_net_input; 74 funcs->remove_net_input = qtg_remove_net_input; 75 funcs->real_conn_list_dialog_update = qtg_real_conn_list_dialog_update; 76 funcs->close_connection_dialog = qtg_close_connection_dialog; 77 funcs->add_idle_callback = qtg_add_idle_callback; 78 funcs->sound_bell = qtg_sound_bell; 79 80 funcs->real_set_client_page = qtg_real_set_client_page; 81 funcs->get_current_client_page = qtg_get_current_client_page; 82 83 funcs->set_unit_icon = qtg_set_unit_icon; 84 funcs->set_unit_icons_more_arrow = qtg_set_unit_icons_more_arrow; 85 funcs->real_focus_units_changed = qtg_real_focus_units_changed; 86 funcs->gui_update_font = qtg_gui_update_font; 87 funcs->set_city_names_font_sizes = qtg_set_city_names_font_sizes; 88 89 funcs->editgui_refresh = qtg_editgui_refresh; 90 funcs->editgui_notify_object_created = qtg_editgui_notify_object_created; 91 funcs->editgui_notify_object_changed = qtg_editgui_notify_object_changed; 92 funcs->editgui_popup_properties = qtg_editgui_popup_properties; 93 funcs->editgui_tileset_changed = qtg_editgui_tileset_changed; 94 funcs->editgui_popdown_all = qtg_editgui_popdown_all; 95 96 funcs->popup_combat_info = qtg_popup_combat_info; 97 funcs->update_timeout_label = qtg_update_timeout_label; 98 funcs->start_turn = qtg_start_turn; 99 funcs->real_city_dialog_popup = qtg_real_city_dialog_popup; 100 funcs->real_city_dialog_refresh = qtg_real_city_dialog_refresh; 101 funcs->popdown_city_dialog = qtg_popdown_city_dialog; 102 funcs->popdown_all_city_dialogs = qtg_popdown_all_city_dialogs; 103 funcs->city_to_disappear = qtg_city_to_disappear; 104 funcs->handmade_scenario_warning = qtg_handmade_scenario_warning; 105 funcs->refresh_unit_city_dialogs = qtg_refresh_unit_city_dialogs; 106 funcs->city_dialog_is_open = qtg_city_dialog_is_open; 107 108 funcs->request_transport = qtg_request_transport; 109 110 funcs->gui_load_theme = qtg_gui_load_theme; 111 funcs->gui_clear_theme = qtg_gui_clear_theme; 112 funcs->get_gui_specific_themes_directories = qtg_get_gui_specific_themes_directories; 113 funcs->get_useable_themes_in_directory = qtg_get_useable_themes_in_directory; 114 } 115