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

Freeciv-3.3

Loading...
Searching...
No Matches
update_queue.h
Go to the documentation of this file.
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#ifndef FC__UPDATE_QUEUE_H
14#define FC__UPDATE_QUEUE_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "support.h" /* bool */
22
23 typedef void (*uq_callback_t) (void *data);
24 typedef void (*uq_free_fn_t) (void *data);
25#define UQ_FREEDATA(fn) ((uq_free_fn_t) fn)
26
27/* General update queue. */
28void update_queue_init(void);
29void update_queue_free(void);
30
31void update_queue_freeze(void);
32void update_queue_thaw(void);
33void update_queue_force_thaw(void);
34bool update_queue_is_frozen(void);
35
36void update_queue_processing_started(int request_id);
37void update_queue_processing_finished(int request_id);
38
39/* User interface. */
40void update_queue_add(uq_callback_t callback, void *data);
41void update_queue_add_full(uq_callback_t callback, void *data,
42 uq_free_fn_t free_data_func);
43bool update_queue_has_callback(uq_callback_t callback);
44bool update_queue_has_callback_full(uq_callback_t callback,
45 const void **data,
46 uq_free_fn_t *free_data_func);
47
48void update_queue_connect_processing_started(int request_id,
49 uq_callback_t callback,
50 void *data);
51void update_queue_connect_processing_started_full(int request_id,
52 uq_callback_t callback,
53 void *data,
54 uq_free_fn_t
55 free_data_func);
56void update_queue_connect_processing_finished(int request_id,
57 uq_callback_t callback,
58 void *data);
59void update_queue_connect_processing_finished_full(int request_id,
60 uq_callback_t callback,
61 void *data,
62 uq_free_fn_t
63 free_data_func);
64
65bool update_queue_is_switching_page(void);
66
67void science_report_dialog_update(void);
68void economy_report_dialog_update(void);
69void units_report_dialog_update(void);
70
71/**************************************************************************
72 Toplevel window pages modes.
73**************************************************************************/
74#define SPECENUM_NAME client_pages
75#define SPECENUM_VALUE0 PAGE_MAIN /* Main menu, aka intro page. */
76#define SPECENUM_VALUE1 PAGE_START /* Start new game page. */
77#define SPECENUM_VALUE2 PAGE_SCENARIO /* Start new scenario page. */
78#define SPECENUM_VALUE3 PAGE_LOAD /* Load saved game page. */
79#define SPECENUM_VALUE4 PAGE_NETWORK /* Connect to network page. */
80#define SPECENUM_VALUE5 PAGE_GAME /* In game page. */
81#include "specenum_gen.h"
82
83void set_client_page(enum client_pages page);
84void client_start_server_and_set_page(enum client_pages page);
85enum client_pages get_client_page(void);
86
87#ifdef __cplusplus
88}
89#endif /* __cplusplus */
90
91#endif /* FC__UPDATE_QUEUE_H */
incite_cost
char * incite_cost
Definition comments.c:74
specenum_gen.h
callback
Definition gui_main.c:2405
support.h
update_queue_is_switching_page
bool update_queue_is_switching_page(void)
Definition update_queue.c:535
update_queue_free
void update_queue_free(void)
Definition update_queue.c:190
client_start_server_and_set_page
void client_start_server_and_set_page(enum client_pages page)
Definition update_queue.c:506
update_queue_is_frozen
bool update_queue_is_frozen(void)
Definition update_queue.c:252
economy_report_dialog_update
void economy_report_dialog_update(void)
Definition update_queue.c:682
set_client_page
void set_client_page(enum client_pages page)
Definition update_queue.c:496
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)
Definition update_queue.c:462
update_queue_add_full
void update_queue_add_full(uq_callback_t callback, void *data, uq_free_fn_t free_data_func)
Definition update_queue.c:356
update_queue_connect_processing_started
void update_queue_connect_processing_started(int request_id, uq_callback_t callback, void *data)
Definition update_queue.c:423
uq_free_fn_t
void(* uq_free_fn_t)(void *data)
Definition update_queue.h:24
science_report_dialog_update
void science_report_dialog_update(void)
Definition update_queue.c:674
update_queue_thaw
void update_queue_thaw(void)
Definition update_queue.c:224
update_queue_init
void update_queue_init(void)
Definition update_queue.c:169
uq_callback_t
void(* uq_callback_t)(void *data)
Definition update_queue.h:23
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)
Definition update_queue.c:378
update_queue_freeze
void update_queue_freeze(void)
Definition update_queue.c:216
update_queue_force_thaw
void update_queue_force_thaw(void)
Definition update_queue.c:242
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)
Definition update_queue.c:435
update_queue_processing_finished
void update_queue_processing_finished(int request_id)
Definition update_queue.c:288
units_report_dialog_update
void units_report_dialog_update(void)
Definition update_queue.c:690
update_queue_connect_processing_finished
void update_queue_connect_processing_finished(int request_id, uq_callback_t callback, void *data)
Definition update_queue.c:450
update_queue_add
void update_queue_add(uq_callback_t callback, void *data)
Definition update_queue.c:345
update_queue_processing_started
void update_queue_processing_started(int request_id)
Definition update_queue.c:279
update_queue_has_callback
bool update_queue_has_callback(uq_callback_t callback)
Definition update_queue.c:367
get_client_page
enum client_pages get_client_page(void)
Definition update_queue.c:520