Freeciv-3.3
Loading...
Searching...
No Matches
luascript_signal.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_SIGNAL_H
14#define FC__LUASCRIPT_SIGNAL_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "support.h"
22
23struct fc_lua;
24
26 char *depr_msg; /* Deprecation message to show if handler added */
27 char *retired; /* Signal no longer available in current freeciv */
28};
29
30void luascript_signal_init(struct fc_lua *fcl);
31void luascript_signal_free(struct fc_lua *fcl);
32
34 const char *signal_name, va_list args);
35void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name, ...);
37 const char *signal_name,
38 int nargs, ...);
39void deprecate_signal(struct signal_deprecator *deprecator, char *signal_name,
40 char *replacement, char *deprecated_since,
41 char *retired_since);
42void luascript_signal_callback(struct fc_lua *fcl, const char *signal_name,
43 const char *callback_name, bool create);
45 const char *signal_name,
46 const char *callback_name);
47
48const char *luascript_signal_by_index(struct fc_lua *fcl, int sindex);
50 const char *signal_name,
51 int sindex);
52
53#ifdef __cplusplus
54}
55#endif /* __cplusplus */
56
57#endif /* FC__LUASCRIPT_SIGNAL_H */
char * incite_cost
Definition comments.c:76
void luascript_signal_free(struct fc_lua *fcl)
void luascript_signal_init(struct fc_lua *fcl)
bool luascript_signal_callback_defined(struct fc_lua *fcl, const char *signal_name, const char *callback_name)
void deprecate_signal(struct signal_deprecator *deprecator, char *signal_name, char *replacement, char *deprecated_since, char *retired_since)
struct signal_deprecator * luascript_signal_create(struct fc_lua *fcl, const char *signal_name, int nargs,...)
void luascript_signal_emit_valist(struct fc_lua *fcl, const char *signal_name, va_list args)
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_emit(struct fc_lua *fcl, const char *signal_name,...)
void luascript_signal_callback(struct fc_lua *fcl, const char *signal_name, const char *callback_name, bool create)