Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/citydlg_common.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
citydlg_common.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
14#ifndef FC__CITYDLG_COMMON_H
15#define FC__CITYDLG_COMMON_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21#include <stddef.h> /* size_t */
22
23/* utility */
24#include "support.h" /* bool type */
25
26/* common */
27#include "city.h"
28#include "fc_types.h"
29
30struct canvas;
31struct worklist;
32
33int get_citydlg_canvas_width(void);
34int get_citydlg_canvas_height(void);
35void generate_citydlg_dimensions(void);
36
37bool city_to_canvas_pos(float *canvas_x, float *canvas_y, int city_x,
38 int city_y, int city_radius_sq);
39bool canvas_to_city_pos(int *city_x, int *city_y, int city_radius_sq,
40 int canvas_x, int canvas_y);
41void city_dialog_redraw_map(struct city *pcity,
42 struct canvas *pcanvas);
43
44char *city_production_cost_str(const struct city *pcity);
45void get_city_dialog_production(struct city *pcity,
46 char *buffer, size_t buffer_len);
47void get_city_dialog_production_full(char *buffer, size_t buffer_len,
48 struct universal *target,
49 struct city *pcity);
50void get_city_dialog_production_row(char *buf[], size_t column_size,
51 struct universal *target,
52 struct city *pcity);
53
54void get_city_dialog_output_text(const struct city *pcity,
55 Output_type_id otype,
56 char *buffer, size_t bufsz);
57void get_city_dialog_pollution_text(const struct city *pcity,
58 char *buf, size_t bufsz);
59void get_city_dialog_culture_text(const struct city *pcity,
60 char *buf, size_t bufsz);
61void get_city_dialog_illness_text(const struct city *pcity,
62 char *buf, size_t bufsz);
63void get_city_dialog_airlift_text(const struct city *pcity,
64 char *buf, size_t bufsz);
65
66void get_city_dialog_airlift_value(const struct city *pcity,
67 char *buf, size_t bufsz);
68
69int get_city_citizen_types(struct city *pcity, enum citizen_feeling index,
70 enum citizen_category *categories);
71void city_rotate_specialist(struct city *pcity, int citizen_index);
72
73void activate_all_units(struct tile *ptile);
74
75int city_change_production(struct city *pcity, struct universal *target);
76int city_set_worklist(struct city *pcity, const struct worklist *pworklist);
77void city_worklist_commit(struct city *pcity, struct worklist *pwl);
78
79bool city_queue_insert(struct city *pcity, int position,
80 struct universal *target);
81bool city_queue_clear(struct city *pcity);
82bool city_queue_insert_worklist(struct city *pcity, int position,
83 const struct worklist *worklist);
84void city_get_queue(struct city *pcity, struct worklist *pqueue);
85bool city_set_queue(struct city *pcity, const struct worklist *pqueue);
86bool city_can_buy(const struct city *pcity);
87int city_sell_improvement(struct city *pcity, Impr_type_id sell_id);
88int city_buy_production(struct city *pcity);
89int city_change_specialist(struct city *pcity, Specialist_type_id from,
90 Specialist_type_id to);
91int city_toggle_worker(struct city *pcity, int city_x, int city_y);
92int city_rename(struct city *pcity, const char *name);
93
94#ifdef __cplusplus
95}
96#endif /* __cplusplus */
97
98#endif /* FC__CITYDLG_COMMON_H */
canvas_y
struct canvas int int canvas_y
Definition canvas_g.h:43
canvas_x
struct canvas int canvas_x
Definition canvas_g.h:43
pcanvas
struct canvas * pcanvas
Definition canvas_g.h:42
city.h
citizen_category
citizen_category
Definition city.h:259
citizen_feeling
citizen_feeling
Definition city.h:270
city_queue_insert
bool city_queue_insert(struct city *pcity, int position, struct universal *target)
Definition citydlg_common.c:1384
get_city_citizen_types
int get_city_citizen_types(struct city *pcity, enum citizen_feeling index, enum citizen_category *categories)
Definition citydlg_common.c:1175
get_city_dialog_production_row
void get_city_dialog_production_row(char *buf[], size_t column_size, struct universal *target, struct city *pcity)
Definition citydlg_common.c:364
get_city_dialog_production
void get_city_dialog_production(struct city *pcity, char *buffer, size_t buffer_len)
Definition citydlg_common.c:260
city_set_worklist
int city_set_worklist(struct city *pcity, const struct worklist *pworklist)
Definition citydlg_common.c:1273
city_rename
int city_rename(struct city *pcity, const char *name)
Definition citydlg_common.c:1577
city_worklist_commit
void city_worklist_commit(struct city *pcity, struct worklist *pwl)
Definition citydlg_common.c:1282
city_buy_production
int city_buy_production(struct city *pcity)
Definition citydlg_common.c:1525
city_production_cost_str
char * city_production_cost_str(const struct city *pcity)
Definition citydlg_common.c:224
city_queue_insert_worklist
bool city_queue_insert_worklist(struct city *pcity, int position, const struct worklist *worklist)
Definition citydlg_common.c:1412
city_toggle_worker
int city_toggle_worker(struct city *pcity, int city_x, int city_y)
Definition citydlg_common.c:1545
get_city_dialog_airlift_text
void get_city_dialog_airlift_text(const struct city *pcity, char *buf, size_t bufsz)
Definition citydlg_common.c:1043
city_set_queue
bool city_set_queue(struct city *pcity, const struct worklist *pqueue)
Definition citydlg_common.c:1459
city_change_production
int city_change_production(struct city *pcity, struct universal *target)
Definition citydlg_common.c:1261
get_city_dialog_production_full
void get_city_dialog_production_full(char *buffer, size_t buffer_len, struct universal *target, struct city *pcity)
Definition citydlg_common.c:324
city_rotate_specialist
void city_rotate_specialist(struct city *pcity, int citizen_index)
Definition citydlg_common.c:1212
get_citydlg_canvas_width
int get_citydlg_canvas_width(void)
Definition citydlg_common.c:51
canvas_to_city_pos
bool canvas_to_city_pos(int *city_x, int *city_y, int city_radius_sq, int canvas_x, int canvas_y)
Definition citydlg_common.c:115
activate_all_units
void activate_all_units(struct tile *ptile)
Definition citydlg_common.c:1240
city_queue_clear
bool city_queue_clear(struct city *pcity)
Definition citydlg_common.c:1400
get_city_dialog_airlift_value
void get_city_dialog_airlift_value(const struct city *pcity, char *buf, size_t bufsz)
Definition citydlg_common.c:1113
city_to_canvas_pos
bool city_to_canvas_pos(float *canvas_x, float *canvas_y, int city_x, int city_y, int city_radius_sq)
Definition citydlg_common.c:93
generate_citydlg_dimensions
void generate_citydlg_dimensions(void)
Definition citydlg_common.c:67
city_get_queue
void city_get_queue(struct city *pcity, struct worklist *pqueue)
Definition citydlg_common.c:1442
city_dialog_redraw_map
void city_dialog_redraw_map(struct city *pcity, struct canvas *pcanvas)
Definition citydlg_common.c:187
city_sell_improvement
int city_sell_improvement(struct city *pcity, Impr_type_id sell_id)
Definition citydlg_common.c:1517
get_city_dialog_pollution_text
void get_city_dialog_pollution_text(const struct city *pcity, char *buf, size_t bufsz)
Definition citydlg_common.c:967
city_change_specialist
int city_change_specialist(struct city *pcity, Specialist_type_id from, Specialist_type_id to)
Definition citydlg_common.c:1533
get_city_dialog_culture_text
void get_city_dialog_culture_text(const struct city *pcity, char *buf, size_t bufsz)
Definition citydlg_common.c:993
city_can_buy
bool city_can_buy(const struct city *pcity)
Definition citydlg_common.c:1497
get_citydlg_canvas_height
int get_citydlg_canvas_height(void)
Definition citydlg_common.c:59
get_city_dialog_illness_text
void get_city_dialog_illness_text(const struct city *pcity, char *buf, size_t bufsz)
Definition citydlg_common.c:895
get_city_dialog_output_text
void get_city_dialog_output_text(const struct city *pcity, Output_type_id otype, char *buffer, size_t bufsz)
Definition citydlg_common.c:733
fc_types.h
Impr_type_id
int Impr_type_id
Definition fc_types.h:346
Specialist_type_id
int Specialist_type_id
Definition fc_types.h:345
Output_type_id
enum output_type_id Output_type_id
Definition fc_types.h:348
bufsz
static const int bufsz
Definition helpdlg.c:70
name
const char * name
Definition inputfile.c:127
canvas
Definition canvas.h:21
city
Definition city.h:309
tile
Definition tile.h:49
universal
Definition fc_types.h:756
worklist
Definition worklist.h:28
support.h