Freeciv-3.3: /fast/freeciv/nightly/main/client/update_queue.h File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Macros | Typedefs | Functions
update_queue.h File Reference
`#include "support.h"`
`#include "specenum_gen.h"`

Go to the source code of this file.

## Macros

#define | UQ_FREEDATA(fn) ((uq_free_fn_t) fn)
#define | SPECENUM_NAME client_pages
#define | SPECENUM_VALUE0 PAGE_MAIN /* Main menu, aka intro page. */
#define | SPECENUM_VALUE1 PAGE_START /* Start new game page. */
#define | SPECENUM_VALUE2 PAGE_SCENARIO /* Start new scenario page. */
#define | SPECENUM_VALUE3 PAGE_LOAD /* Load saved game page. */
#define | SPECENUM_VALUE4 PAGE_NETWORK /* Connect to network page. */
#define | SPECENUM_VALUE5 PAGE_GAME /* In game page. */

## Typedefs

typedef void(* | uq_callback_t) (void *data)
typedef void(* | uq_free_fn_t) (void *data)

## Functions

void | update_queue_init (void)
void | update_queue_free (void)
void | update_queue_freeze (void)
void | update_queue_thaw (void)
void | update_queue_force_thaw (void)
bool | update_queue_is_frozen (void)
void | update_queue_processing_started (int request_id)
void | update_queue_processing_finished (int request_id)
void | update_queue_add (uq_callback_t callback, void *data)
void | update_queue_add_full (uq_callback_t callback, void *data, uq_free_fn_t free_data_func)
bool | update_queue_has_callback (uq_callback_t callback)
bool | update_queue_has_callback_full (uq_callback_t callback, const void **data, uq_free_fn_t *free_data_func)
void | update_queue_connect_processing_started (int request_id, uq_callback_t callback, void *data)
void | update_queue_connect_processing_started_full (int request_id, uq_callback_t callback, void *data, uq_free_fn_t free_data_func)
void | update_queue_connect_processing_finished (int request_id, uq_callback_t callback, void *data)
void | update_queue_connect_processing_finished_full (int request_id, uq_callback_t callback, void *data, uq_free_fn_t free_data_func)
bool | update_queue_is_switching_page (void)
void | science_report_dialog_update (void)
void | economy_report_dialog_update (void)
void | units_report_dialog_update (void)
void | set_client_page (enum client_pages page)
void | client_start_server_and_set_page (enum client_pages page)
enum client_pages | get_client_page (void)

## Macro Definition Documentation

## ◆ SPECENUM_NAME

#define SPECENUM_NAME client_pages

Definition at line 74 of file update_queue.h.

## ◆ SPECENUM_VALUE0

#define SPECENUM_VALUE0 PAGE_MAIN /* Main menu, aka intro page. */

Definition at line 75 of file update_queue.h.

## ◆ SPECENUM_VALUE1

#define SPECENUM_VALUE1 PAGE_START /* Start new game page. */

Definition at line 76 of file update_queue.h.

## ◆ SPECENUM_VALUE2

#define SPECENUM_VALUE2 PAGE_SCENARIO /* Start new scenario page. */

Definition at line 77 of file update_queue.h.

## ◆ SPECENUM_VALUE3

#define SPECENUM_VALUE3 PAGE_LOAD /* Load saved game page. */

Definition at line 78 of file update_queue.h.

## ◆ SPECENUM_VALUE4

#define SPECENUM_VALUE4 PAGE_NETWORK /* Connect to network page. */

Definition at line 79 of file update_queue.h.

## ◆ SPECENUM_VALUE5

#define SPECENUM_VALUE5 PAGE_GAME /* In game page. */

Definition at line 80 of file update_queue.h.

## ◆ UQ_FREEDATA

#define UQ_FREEDATA | ( |  | fn | ) | ((uq_free_fn_t) fn)

Definition at line 25 of file update_queue.h.

## Typedef Documentation

## ◆ uq_callback_t

typedef void(* uq_callback_t) (void *data)

Definition at line 23 of file update_queue.h.

## ◆ uq_free_fn_t

typedef void(* uq_free_fn_t) (void *data)

Definition at line 24 of file update_queue.h.

## Function Documentation

## ◆ client_start_server_and_set_page()

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().

## ◆ economy_report_dialog_update()

void economy_report_dialog_update | ( | void |  | ) |

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().

## ◆ get_client_page()

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().

## ◆ science_report_dialog_update()

void science_report_dialog_update | ( | void |  | ) |

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().

## ◆ set_client_page()

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().

## ◆ units_report_dialog_update()

void units_report_dialog_update | ( | void |  | ) |

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().

## ◆ update_queue_add()

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().

## ◆ update_queue_add_full()

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.

## ◆ update_queue_connect_processing_finished()

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().

## ◆ update_queue_connect_processing_finished_full()

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().

## ◆ update_queue_connect_processing_started()

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.

## ◆ update_queue_connect_processing_started_full()

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.

## ◆ update_queue_force_thaw()

void update_queue_force_thaw | ( | void |  | ) |

Free the update queue.

Definition at line 242 of file update_queue.c.

## ◆ update_queue_free()

void update_queue_free | ( | void |  | ) |

Free the update queue.

Definition at line 190 of file update_queue.c.

Referenced by at_exit().

## ◆ update_queue_freeze()

void update_queue_freeze | ( | void |  | ) |

Freezes the update queue.

Definition at line 216 of file update_queue.c.

## ◆ update_queue_has_callback()

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().

## ◆ update_queue_has_callback_full()

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().

## ◆ update_queue_init()

void update_queue_init | ( | void |  | ) |

Initialize the update queue.

Definition at line 169 of file update_queue.c.

Referenced by client_game_free(), client_game_init(), and client_main().

## ◆ update_queue_is_frozen()

bool update_queue_is_frozen | ( | void |  | ) |

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().

## ◆ update_queue_is_switching_page()

bool update_queue_is_switching_page | ( | void |  | ) |

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().

## ◆ update_queue_processing_finished()

void update_queue_processing_finished | ( | int | request_id | ) |

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().

## ◆ update_queue_processing_started()

void update_queue_processing_started | ( | int | request_id | ) |

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().

## ◆ update_queue_thaw()

void update_queue_thaw | ( | void |  | ) |

Free the update queue.

Definition at line 224 of file update_queue.c.

Referenced by update_queue_force_thaw().