Freeciv-3.3: /fast/freeciv/nightly/main/common/scriptcore/luascript_signal.h Source File

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
25 struct signal_deprecator {
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
33void luascript_signal_emit_valist(struct fc_lua *fcl,
34 const char *signal_name, va_list args);
35void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name, ...);
36struct signal_deprecator *luascript_signal_create(struct fc_lua *fcl,
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);
44bool luascript_signal_callback_defined(struct fc_lua *fcl,
45 const char *signal_name,
46 const char *callback_name);
47
48const char *luascript_signal_by_index(struct fc_lua *fcl, int sindex);
49const char *luascript_signal_callback_by_index(struct fc_lua *fcl,
50 const char *signal_name,
51 int sindex);
52
53#ifdef __cplusplus
54}
55#endif /* __cplusplus */
56
57#endif /* FC__LUASCRIPT_SIGNAL_H */
incite_cost
char * incite_cost
Definition comments.c:74
luascript_signal_free
void luascript_signal_free(struct fc_lua *fcl)
Definition luascript_signal.c:415
luascript_signal_init
void luascript_signal_init(struct fc_lua *fcl)
Definition luascript_signal.c:402
luascript_signal_callback_defined
bool luascript_signal_callback_defined(struct fc_lua *fcl, const char *signal_name, const char *callback_name)
Definition luascript_signal.c:369
deprecate_signal
void deprecate_signal(struct signal_deprecator *deprecator, char *signal_name, char *replacement, char *deprecated_since, char *retired_since)
Definition luascript_signal.c:276
luascript_signal_create
struct signal_deprecator * luascript_signal_create(struct fc_lua *fcl, const char *signal_name, int nargs,...)
Definition luascript_signal.c:255
luascript_signal_emit_valist
void luascript_signal_emit_valist(struct fc_lua *fcl, const char *signal_name, va_list args)
Definition luascript_signal.c:169
luascript_signal_by_index
const char * luascript_signal_by_index(struct fc_lua *fcl, int sindex)
Definition luascript_signal.c:429
luascript_signal_callback_by_index
const char * luascript_signal_callback_by_index(struct fc_lua *fcl, const char *signal_name, int sindex)
Definition luascript_signal.c:441
luascript_signal_emit
void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name,...)
Definition luascript_signal.c:199
luascript_signal_callback
void luascript_signal_callback(struct fc_lua *fcl, const char *signal_name, const char *callback_name, bool create)
Definition luascript_signal.c:317
fc_lua
Definition luascript.h:44
signal_deprecator
Definition luascript_signal.h:25
signal_deprecator::depr_msg
char * depr_msg
Definition luascript_signal.h:26
signal_deprecator::retired
char * retired
Definition luascript_signal.h:27
support.h