Freeciv-3.2
Loading...
Searching...
No Matches
api_signal_base.c
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
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* common/scriptcore */
19#include "luascript_signal.h"
20#include "luascript.h"
21
22#include "api_signal_base.h"
23
24/**********************************************************************/
28 const char *callback_name)
29{
30 struct fc_lua *fcl;
31
35
37
38 LUASCRIPT_CHECK(L, fcl != NULL, "Undefined Freeciv lua state!");
39
41}
42
43/**********************************************************************/
47 const char *callback_name)
48{
49 struct fc_lua *fcl;
50
54
56
57 LUASCRIPT_CHECK(L, fcl != NULL, "Undefined Freeciv lua state!");
58
60}
61
62/**********************************************************************/
66 const char *callback_name)
67{
68 struct fc_lua *fcl;
69
73
75
76 LUASCRIPT_CHECK(L, fcl != NULL, "Undefined Freeciv lua state!", FALSE);
77
79}
80
81/**********************************************************************/
85 const char *signal_name,
86 int sindex)
87{
88 struct fc_lua *fcl;
89
92
94
95 LUASCRIPT_CHECK(L, fcl != NULL, "Undefined Freeciv lua state!", NULL);
96
98}
99
100/**********************************************************************/
105{
106 struct fc_lua *fcl;
107
109
111
112 LUASCRIPT_CHECK(L, fcl != NULL, "Undefined Freeciv lua state!", NULL);
113
115}
const char * api_signal_callback_by_index(lua_State *L, const char *signal_name, int sindex)
bool api_signal_defined(lua_State *L, const char *signal_name, const char *callback_name)
const char * api_signal_by_index(lua_State *L, int sindex)
void api_signal_connect(lua_State *L, const char *signal_name, const char *callback_name)
void api_signal_remove(lua_State *L, const char *signal_name, const char *callback_name)
char * incite_cost
Definition comments.c:75
struct fc_lua * luascript_get_fcl(lua_State *L)
Definition luascript.c:366
#define LUASCRIPT_CHECK_STATE(L,...)
Definition luascript.h:117
#define LUASCRIPT_CHECK_ARG_NIL(L, value, narg, type,...)
Definition luascript.h:138
#define LUASCRIPT_CHECK(L, check, msg,...)
Definition luascript.h:124
bool luascript_signal_callback_defined(struct fc_lua *fcl, const char *signal_name, const char *callback_name)
const char * luascript_signal_by_index(struct fc_lua *fcl, int sindex)
const char * luascript_signal_callback_by_index(struct fc_lua *fcl, const char *signal_name, int sindex)
void luascript_signal_callback(struct fc_lua *fcl, const char *signal_name, const char *callback_name, bool create)
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47