Stop sharing requirement_unit_state_ereq().
[freeciv.git] / client / citydlg_common.h
blobe6d3572bb10f334dce491a4cea3725baa29e1848
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.
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 ***********************************************************************/
14 #ifndef FC__CITYDLG_COMMON_H
15 #define FC__CITYDLG_COMMON_H
17 #ifdef __cplusplus
18 extern "C" {
19 #endif /* __cplusplus */
21 #include <stddef.h> /* size_t */
23 /* utility */
24 #include "support.h" /* bool type */
26 /* common */
27 #include "city.h"
28 #include "fc_types.h"
30 struct canvas;
31 struct worklist;
33 int get_citydlg_canvas_width(void);
34 int get_citydlg_canvas_height(void);
35 void generate_citydlg_dimensions(void);
37 bool city_to_canvas_pos(float *canvas_x, float *canvas_y, int city_x,
38 int city_y, int city_radius_sq);
39 bool canvas_to_city_pos(int *city_x, int *city_y, int city_radius_sq,
40 int canvas_x, int canvas_y);
41 void city_dialog_redraw_map(struct city *pcity,
42 struct canvas *pcanvas);
44 char *city_production_cost_str(const struct city *pcity);
45 void get_city_dialog_production(struct city *pcity,
46 char *buffer, size_t buffer_len);
47 void get_city_dialog_production_full(char *buffer, size_t buffer_len,
48 struct universal *target,
49 struct city *pcity);
50 void get_city_dialog_production_row(char *buf[], size_t column_size,
51 struct universal *target,
52 struct city *pcity);
54 void get_city_dialog_output_text(const struct city *pcity,
55 Output_type_id otype,
56 char *buffer, size_t bufsz);
57 void get_city_dialog_pollution_text(const struct city *pcity,
58 char *buf, size_t bufsz);
59 void get_city_dialog_culture_text(const struct city *pcity,
60 char *buf, size_t bufsz);
61 void get_city_dialog_illness_text(const struct city *pcity,
62 char *buf, size_t bufsz);
64 int get_city_citizen_types(struct city *pcity, enum citizen_feeling index,
65 enum citizen_category *categories);
66 void city_rotate_specialist(struct city *pcity, int citizen_index);
68 void activate_all_units(struct tile *ptile);
70 int city_change_production(struct city *pcity, struct universal *target);
71 int city_set_worklist(struct city *pcity, const struct worklist *pworklist);
72 void city_worklist_commit(struct city *pcity, struct worklist *pwl);
74 bool city_queue_insert(struct city *pcity, int position,
75 struct universal *target);
76 bool city_queue_clear(struct city *pcity);
77 bool city_queue_insert_worklist(struct city *pcity, int position,
78 const struct worklist *worklist);
79 void city_get_queue(struct city *pcity, struct worklist *pqueue);
80 bool city_set_queue(struct city *pcity, const struct worklist *pqueue);
81 bool city_can_buy(const struct city *pcity);
82 int city_sell_improvement(struct city *pcity, Impr_type_id sell_id);
83 int city_buy_production(struct city *pcity);
84 int city_change_specialist(struct city *pcity, Specialist_type_id from,
85 Specialist_type_id to);
86 int city_toggle_worker(struct city *pcity, int city_x, int city_y);
87 int city_rename(struct city *pcity, const char *name);
89 #ifdef __cplusplus
91 #endif /* __cplusplus */
93 #endif /* FC__CITYDLG_COMMON_H */