Freeciv-3.2
|
#include "log.h"
#include "support.h"
#include "city.h"
#include "connection.h"
#include "player.h"
#include "canvas_g.h"
#include "citydlg_g.h"
#include "cityrep_g.h"
#include "dialogs_g.h"
#include "gui_main_g.h"
#include "menu_g.h"
#include "pages_g.h"
#include "plrdlg_g.h"
#include "ratesdlg_g.h"
#include "repodlgs_g.h"
#include "client_main.h"
#include "connectdlg_common.h"
#include "options.h"
#include "tilespec.h"
#include "zoom.h"
#include "update_queue.h"
#include "spechash.h"
#include "speclist.h"
Go to the source code of this file.
Data Structures | |
struct | update_queue_data |
struct | waiting_queue_data |
#define NEED_UPDATE | ( | city_update, | |
action | |||
) |
#define SPECHASH_IDATA_FREE update_queue_data_destroy |
Definition at line 61 of file update_queue.c.
#define SPECHASH_IDATA_FREE waiting_queue_list_destroy |
Definition at line 61 of file update_queue.c.
#define SPECHASH_IDATA_TYPE struct update_queue_data * |
Definition at line 60 of file update_queue.c.
#define SPECHASH_IDATA_TYPE struct waiting_queue_list * |
Definition at line 60 of file update_queue.c.
#define SPECHASH_IKEY_TYPE uq_callback_t |
Definition at line 59 of file update_queue.c.
#define SPECHASH_INT_KEY_TYPE |
Definition at line 86 of file update_queue.c.
#define SPECHASH_TAG update_queue |
Definition at line 58 of file update_queue.c.
#define SPECHASH_TAG waiting_queue |
Definition at line 58 of file update_queue.c.
#define SPECLIST_TAG waiting_queue |
Definition at line 77 of file update_queue.c.
#define SPECLIST_TYPE struct waiting_queue_data |
Definition at line 78 of file update_queue.c.
Definition at line 63 of file update_queue.c.
#define update_queue_hash_iterate_end HASH_ITERATE_END |
Definition at line 66 of file update_queue.c.
#define waiting_queue_list_iterate | ( | list, | |
data | |||
) | TYPED_LIST_ITERATE(struct waiting_queue_data, list, data) |
Definition at line 80 of file update_queue.c.
#define waiting_queue_list_iterate_end LIST_ITERATE_END |
Definition at line 82 of file update_queue.c.
Update cities gui.
Definition at line 580 of file update_queue.c.
Referenced by city_report_dialog_update_city(), popup_city_dialog(), and refresh_city_dialog().
Update the city report.
Definition at line 666 of file update_queue.c.
Referenced by city_packet_common(), client_remove_city(), cma_preset_add_popup_callback(), cma_preset_remove_response(), handle_player_info(), and popdown_city_cma_dialog().
Request the city to be updated in the city report.
Definition at line 641 of file update_queue.c.
Referenced by city_packet_common(), cma_release_city(), handle_city_update_counters(), popup_cma_from_city_report_callback(), and real_city_dialog_refresh().
void client_start_server_and_set_page | ( | enum client_pages | page | ) |
Start server and then, set the client page.
Definition at line 506 of file update_queue.c.
Referenced by load_saved_game_callback(), start_scenario_callback(), and fc_client::switch_page().
Update the connection list in the start page.
Definition at line 650 of file update_queue.c.
Referenced by handle_conn_info(), handle_player_remove(), handle_team_name_info(), popup_conn_list_dialog(), real_set_client_page(), real_set_client_page(), set_client_state(), and update_start_page().
Update the economy report.
Definition at line 682 of file update_queue.c.
Referenced by handle_city_info(), handle_player_info(), handle_unit_packet_common(), handle_unit_remove(), and real_city_dialog_refresh().
enum client_pages get_client_page | ( | void | ) |
Returns the next client page.
Definition at line 520 of file update_queue.c.
Referenced by chatline_is_scrolled_to_bottom(), exit_load_dlg_callback(), flush_dirty(), handle_server_join_reply(), load_selected_game_callback(), main_callback(), real_conn_list_dialog_update(), real_menus_update(), set_client_state(), and voteinfo_gui_update().
Request the menus to be initialized and updated.
Definition at line 554 of file update_queue.c.
Referenced by enable_menus(), set_client_state(), tilespec_reread_callback(), and tilespec_reread_frozen_refresh().
Request the menus to be updated.
Definition at line 562 of file update_queue.c.
Referenced by city_packet_common(), do_move_unit(), focus_units_changed(), handle_city_remove(), handle_conn_info(), handle_edit_fogofwar_state(), handle_game_info(), handle_new_year(), handle_player_info(), handle_research_info(), handle_spaceship_info(), handle_tile_info(), handle_unit_packet_common(), popdown_city_dialog(), real_city_dialog_popup(), real_set_client_page(), and resize_minimap().
Update the menus.
Definition at line 543 of file update_queue.c.
Referenced by menus_init(), and menus_update().
Update multipliers/policy dialog.
Definition at line 572 of file update_queue.c.
Referenced by handle_player_info().
Update the nation report.
Definition at line 658 of file update_queue.c.
Referenced by handle_conn_info(), handle_conn_ping_info(), handle_game_info(), handle_player_diplstate(), handle_player_info(), handle_player_remove(), players_window_dlg_callback(), popup_players_dialog(), toggle_draw_alliance_status_callback(), toggle_draw_ceasefire_status_callback(), toggle_draw_neutral_status_callback(), toggle_draw_peace_status_callback(), and toggle_draw_war_status_callback().
Request the city dialog to be popped up for the city.
Definition at line 623 of file update_queue.c.
Referenced by city_packet_common(), do_map_click(), main_key_down_handler(), main_key_down_handler(), meswin_popup_city(), notify_goto_dialog_goto_callback(), notify_goto_response(), popup_citydlg_from_city_report_callback(), popup_iterate(), and zoom_to_city_callback().
Request the city dialog to be updated for the city.
Definition at line 632 of file update_queue.c.
Referenced by button_press_callback(), button_press_callback(), city_packet_common(), city_set_queue(), client_remove_unit(), cma_activate_preset_callback(), cma_active_callback(), cma_iterate(), cma_release_city(), governors_iterate(), handle_tile_info(), handle_unit_packet_common(), handle_worker_task(), hscale_changed(), and popdown_city_cma_dialog().
Update the science report.
Definition at line 674 of file update_queue.c.
Referenced by handle_city_info(), handle_player_info(), and handle_research_info().
void set_client_page | ( | enum client_pages | page | ) |
Set the client page.
Definition at line 496 of file update_queue.c.
Referenced by back_callback(), cancel_connect_dlg_callback(), connect_network_game_callback(), exit_load_dlg_callback(), exit_meta_server_dlg_callback(), handle_game_load(), handle_server_join_reply(), join_game_callback(), load_game_callback(), load_selected_game_callback(), main_callback(), popup_connection_dialog(), set_client_state(), set_connection_state(), and fc_client::switch_page().
Set the client page.
Definition at line 476 of file update_queue.c.
Referenced by client_start_server_and_set_page(), get_client_page(), set_client_page(), and update_queue_is_switching_page().
Update the units report.
Definition at line 698 of file update_queue.c.
Referenced by handle_unit_packet_common().
Update the units report.
Definition at line 690 of file update_queue.c.
Referenced by handle_city_info(), handle_player_info(), handle_unit_packet_common(), and handle_unit_remove().
void update_queue_add | ( | uq_callback_t | callback, |
void * | data | ||
) |
Add a callback to the update queue. NB: you can only set a callback once. Setting a callback twice will overwrite the previous.
Definition at line 345 of file update_queue.c.
Referenced by city_report_dialog_update(), city_report_dialog_update_city(), conn_list_dialog_update(), economy_report_dialog_update(), fullscreen_callback(), menus_init(), menus_update(), meswin_dialog_update(), multipliers_dialog_update(), players_dialog_update(), popup_city_dialog(), refresh_city_dialog(), resize_window_callback(), science_report_dialog_update(), set_client_page(), unit_select_dialog_update(), and units_report_dialog_update().
void update_queue_add_full | ( | uq_callback_t | callback, |
void * | data, | ||
uq_free_fn_t | free_data_func | ||
) |
Add a callback to the update queue. NB: you can only set a callback once. Setting a callback twice will overwrite the previous.
Definition at line 356 of file update_queue.c.
void update_queue_connect_processing_finished | ( | int | request_id, |
uq_callback_t | callback, | ||
void * | data | ||
) |
Connects the callback to the end of the processing (in server side) of the request.
Definition at line 450 of file update_queue.c.
Referenced by client_start_server_and_set_page(), and client_take_player().
void update_queue_connect_processing_finished_full | ( | int | request_id, |
uq_callback_t | callback, | ||
void * | data, | ||
uq_free_fn_t | free_data_func | ||
) |
Connects the callback to the end of the processing (in server side) of the request.
Definition at line 462 of file update_queue.c.
Referenced by do_disband_alternative().
void update_queue_connect_processing_started | ( | int | request_id, |
uq_callback_t | callback, | ||
void * | data | ||
) |
Connects the callback to the start of the processing (in server side) of the request.
Definition at line 423 of file update_queue.c.
void update_queue_connect_processing_started_full | ( | int | request_id, |
uq_callback_t | callback, | ||
void * | data, | ||
uq_free_fn_t | free_data_func | ||
) |
Connects the callback to the start of the processing (in server side) of the request.
Definition at line 435 of file update_queue.c.
|
static |
Free a update queue data.
Definition at line 117 of file update_queue.c.
Referenced by waiting_queue_data_destroy().
|
inlinestatic |
Create a new update queue data.
Definition at line 105 of file update_queue.c.
Referenced by update_queue_add(), update_queue_add_full(), and waiting_queue_data_new().
Free the update queue.
Definition at line 242 of file update_queue.c.
Freezes the update queue.
Definition at line 216 of file update_queue.c.
bool update_queue_has_callback | ( | uq_callback_t | callback | ) |
Returns whether this callback is listed in the update queue.
Definition at line 367 of file update_queue.c.
Referenced by menus_update(), and update_queue_is_switching_page().
bool update_queue_has_callback_full | ( | uq_callback_t | callback, |
const void ** | data, | ||
uq_free_fn_t * | free_data_func | ||
) |
Returns whether this callback is listed in the update queue and get the its data and free function. 'data' and 'free_data_func' can be NULL.
Definition at line 378 of file update_queue.c.
Referenced by get_client_page().
Initialize the update queue.
Definition at line 169 of file update_queue.c.
Referenced by client_game_free(), client_game_init(), and client_main().
Free the update queue.
Definition at line 252 of file update_queue.c.
Referenced by update_queue_force_thaw(), update_queue_push(), and update_unqueue().
Returns whether there's page switching already in progress.
Definition at line 535 of file update_queue.c.
Referenced by set_turn_done_button_state().
Moves the instances waiting to the request_id to the callback queue.
Definition at line 288 of file update_queue.c.
Referenced by handle_processing_finished().
Moves the instances waiting to the request_id to the callback queue.
Definition at line 279 of file update_queue.c.
Referenced by handle_processing_started().
|
inlinestatic |
Add a callback to the update queue. NB: you can only set a callback once. Setting a callback twice will overwrite the previous.
Definition at line 329 of file update_queue.c.
Referenced by update_queue_add(), update_queue_add_full(), and waiting_queue_execute_pending_requests().
Free the update queue.
Definition at line 224 of file update_queue.c.
Referenced by update_queue_force_thaw().
Unqueue all updates.
Definition at line 297 of file update_queue.c.
Referenced by update_queue_push(), and update_queue_thaw().
|
inlinestatic |
Connects the callback to a network event.
Definition at line 402 of file update_queue.c.
Referenced by update_queue_connect_processing_finished(), update_queue_connect_processing_finished_full(), update_queue_connect_processing_started(), and update_queue_connect_processing_started_full().
|
static |
Free a waiting queue data.
Definition at line 143 of file update_queue.c.
Referenced by waiting_queue_add_pending_request().
|
inlinestatic |
Extract the update_queue_data from the waiting queue data.
Definition at line 157 of file update_queue.c.
Referenced by waiting_queue_execute_pending_requests().
|
inlinestatic |
Create a new waiting queue data.
Definition at line 130 of file update_queue.c.
Referenced by waiting_queue_add_pending_request().
|
inlinestatic |
Moves the instances waiting to the request_id to the callback queue.
Definition at line 261 of file update_queue.c.
Referenced by update_queue_processing_finished(), and update_queue_processing_started().
|
static |
Definition at line 93 of file update_queue.c.
Referenced by update_queue_connect_processing_finished(), update_queue_connect_processing_finished_full(), update_queue_free(), update_queue_init(), and update_queue_processing_finished().
|
static |
Definition at line 92 of file update_queue.c.
Referenced by update_queue_connect_processing_started(), update_queue_connect_processing_started_full(), update_queue_free(), update_queue_init(), and update_queue_processing_started().
|
static |
Definition at line 91 of file update_queue.c.
Referenced by update_queue_add(), update_queue_add_full(), update_queue_free(), update_queue_has_callback(), update_queue_has_callback_full(), update_queue_init(), update_queue_push(), update_queue_thaw(), and update_unqueue().
|
static |
Definition at line 94 of file update_queue.c.
Referenced by update_queue_free(), update_queue_freeze(), update_queue_init(), update_queue_is_frozen(), and update_queue_thaw().
Definition at line 95 of file update_queue.c.
Referenced by update_queue_free(), update_queue_init(), update_queue_push(), update_queue_thaw(), and update_unqueue().