Stop sharing requirement_unit_state_ereq().
[freeciv.git] / common / fc_interface.h
blobefb9ef0d2cfb0763a9f6105c46911899f406713c
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 ***********************************************************************/
13 #ifndef FC__FC_INTERFACE_H
14 #define FC__FC_INTERFACE_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 /* utility */
21 #include "support.h"
23 /* common */
24 #include "vision.h"
26 struct player;
27 struct tile;
28 struct color;
29 struct extra_type;
31 /* The existence of each function should be checked in interface_init()! */
32 struct functions {
33 void (*create_extra)(struct tile *ptile, struct extra_type *pextra,
34 struct player *pplayer);
35 void (*destroy_extra)(struct tile *ptile, struct extra_type *pextra);
36 /* Returns iff the player 'pplayer' has the vision in the layer
37 'vision' at tile given by 'ptile'. */
38 bool (*player_tile_vision_get)(const struct tile *ptile,
39 const struct player *pplayer,
40 enum vision_layer vision);
41 /* Returns the id of the city 'pplayer' believes exists at 'ptile' or
42 * IDENTITY_NUMBER_ZERO when the player is unaware of a city at that
43 * location. */
44 int (*player_tile_city_id_get)(const struct tile *ptile,
45 const struct player *pplayer);
46 void (*gui_color_free)(struct color *pcolor);
49 const extern struct functions *fc_funcs;
51 struct functions *fc_interface_funcs(void);
52 void fc_interface_init(void);
53 void free_libfreeciv(void);
55 #ifdef __cplusplus
57 #endif /* __cplusplus */
59 #endif /* FC__FC_INTERFACE_H */