Freeciv-3.1: /fast/freeciv/nightly/S3_1/common/scriptcore/luascript_types.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
luascript_types.h
Go to the documentation of this file.
1/*****************************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
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__LUASCRIPT_TYPES_H
14#define FC__LUASCRIPT_TYPES_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "genlist.h"
22
23/* common */
24#include "achievements.h"
25#include "actions.h"
26#include "city.h"
27#include "connection.h"
28#include "events.h"
29#include "fc_types.h"
30#include "game.h"
31#include "government.h"
32#include "improvement.h"
33#include "nation.h"
34#include "player.h"
35#include "tech.h"
36#include "terrain.h"
37#include "tile.h"
38#include "unit.h"
39#include "unittype.h"
40
41/* Classes. */
42/* If a new class is defined, an entry should be added to the enum api_types
43 * below and the class name should be added to the api_types list in
44 * tolua_common_z.pkg. */
45 typedef struct player Player;
46 typedef struct player_ai Player_ai;
47 typedef struct city City;
48 typedef struct unit Unit;
49 typedef struct tile Tile;
50 typedef struct government Government;
51 typedef struct nation_type Nation_Type;
52 typedef struct impr_type Building_Type;
53 typedef struct unit_type Unit_Type;
54 typedef struct advance Tech_Type;
55 typedef struct terrain Terrain;
56 typedef struct connection Connection;
57 typedef enum direction8 Direction;
58 typedef struct disaster_type Disaster;
59 typedef struct achievement Achievement;
60 typedef struct action Action;
61
62 typedef void Nonexistent;
63
64/* List Classes.
65 * NOTE: These should not to be exposed since the pointers are not safe. They
66 * are only used by the API internally.
67 * Separate types makes use from lua type safe. */
68 typedef const struct unit_list_link Unit_List_Link;
69 typedef const struct city_list_link City_List_Link;
70
71#define SPECENUM_NAME api_types
72#define SPECENUM_VALUE0 API_TYPE_INT
73#define SPECENUM_VALUE0NAME "Int"
74#define SPECENUM_VALUE1 API_TYPE_BOOL
75#define SPECENUM_VALUE1NAME "Bool"
76#define SPECENUM_VALUE2 API_TYPE_STRING
77#define SPECENUM_VALUE2NAME "String"
78#define SPECENUM_VALUE3 API_TYPE_PLAYER
79#define SPECENUM_VALUE3NAME "Player"
80#define SPECENUM_VALUE4 API_TYPE_CITY
81#define SPECENUM_VALUE4NAME "City"
82#define SPECENUM_VALUE5 API_TYPE_UNIT
83#define SPECENUM_VALUE5NAME "Unit"
84#define SPECENUM_VALUE6 API_TYPE_TILE
85#define SPECENUM_VALUE6NAME "Tile"
86#define SPECENUM_VALUE7 API_TYPE_GOVERNMENT
87#define SPECENUM_VALUE7NAME "Government"
88#define SPECENUM_VALUE8 API_TYPE_BUILDING_TYPE
89#define SPECENUM_VALUE8NAME "Building_Type"
90#define SPECENUM_VALUE9 API_TYPE_NATION_TYPE
91#define SPECENUM_VALUE9NAME "Nation_Type"
92#define SPECENUM_VALUE10 API_TYPE_UNIT_TYPE
93#define SPECENUM_VALUE10NAME "Unit_Type"
94#define SPECENUM_VALUE11 API_TYPE_TECH_TYPE
95#define SPECENUM_VALUE11NAME "Tech_Type"
96#define SPECENUM_VALUE12 API_TYPE_TERRAIN
97#define SPECENUM_VALUE12NAME "Terrain"
98#define SPECENUM_VALUE13 API_TYPE_CONNECTION
99#define SPECENUM_VALUE13NAME "Connection"
100#define SPECENUM_VALUE14 API_TYPE_DIRECTION
101#define SPECENUM_VALUE14NAME "Direction"
102#define SPECENUM_VALUE15 API_TYPE_DISASTER
103#define SPECENUM_VALUE15NAME "Disaster"
104#define SPECENUM_VALUE16 API_TYPE_ACHIEVEMENT
105#define SPECENUM_VALUE16NAME "Achievement"
106#define SPECENUM_VALUE17 API_TYPE_ACTION
107#define SPECENUM_VALUE17NAME "Action"
108#include "specenum_gen.h"
109
110#ifdef __cplusplus
111}
112#endif /* __cplusplus */
113
114#endif /* FC__LUASCRIPT_TYPES_H */
achievements.h
actions.h
city.h
connection.h
events.h
fc_types.h
game.h
genlist.h
government.h
improvement.h
City_List_Link
const struct city_list_link City_List_Link
Definition luascript_types.h:69
Direction
enum direction8 Direction
Definition luascript_types.h:57
Nonexistent
void Nonexistent
Definition luascript_types.h:62
Unit_List_Link
const struct unit_list_link Unit_List_Link
Definition luascript_types.h:68
nation.h
player.h
specenum_gen.h
achievement
Definition achievements.h:26
action
Definition actions.h:379
advance
Definition tech.h:124
city
Definition city.h:309
connection
Definition connection.h:141
disaster_type
Definition disaster.h:46
government
Definition government.h:52
impr_type
Definition improvement.h:68
nation_type
Definition nation.h:97
player_ai
Definition player.h:119
player
Definition player.h:249
terrain
Definition terrain.h:176
tile
Definition tile.h:49
unit_type
Definition unittype.h:481
unit
Definition unit.h:138
tech.h
terrain.h
tile.h
unit.h
unittype.h