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

Freeciv-3.1

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 typedef char * signal_deprecator;
26
27void luascript_signal_init(struct fc_lua *fcl);
28void luascript_signal_free(struct fc_lua *fcl);
29
30void luascript_signal_emit_valist(struct fc_lua *fcl,
31 const char *signal_name, va_list args);
32void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name, ...);
33 signal_deprecator *luascript_signal_create(struct fc_lua *fcl,
34 const char *signal_name,
35 int nargs, ...);
36void deprecate_signal(signal_deprecator *deprecator, char *signal_name,
37 char *replacement, char *deprecated_since);
38void luascript_signal_callback(struct fc_lua *fcl, const char *signal_name,
39 const char *callback_name, bool create);
40bool luascript_signal_callback_defined(struct fc_lua *fcl,
41 const char *signal_name,
42 const char *callback_name);
43
44const char *luascript_signal_by_index(struct fc_lua *fcl, int sindex);
45const char *luascript_signal_callback_by_index(struct fc_lua *fcl,
46 const char *signal_name,
47 int sindex);
48
49#ifdef __cplusplus
50}
51#endif /* __cplusplus */
52
53#endif /* FC__LUASCRIPT_SIGNAL_H */
luascript_signal_free
void luascript_signal_free(struct fc_lua *fcl)
Definition luascript_signal.c:389
luascript_signal_init
void luascript_signal_init(struct fc_lua *fcl)
Definition luascript_signal.c:376
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:343
luascript_signal_emit_valist
void luascript_signal_emit_valist(struct fc_lua *fcl, const char *signal_name, va_list args)
Definition luascript_signal.c:165
luascript_signal_by_index
const char * luascript_signal_by_index(struct fc_lua *fcl, int sindex)
Definition luascript_signal.c:403
deprecate_signal
void deprecate_signal(signal_deprecator *deprecator, char *signal_name, char *replacement, char *deprecated_since)
Definition luascript_signal.c:272
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:415
luascript_signal_emit
void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name,...)
Definition luascript_signal.c:195
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:298
signal_deprecator
char * signal_deprecator
Definition luascript_signal.h:25
luascript_signal_create
signal_deprecator * luascript_signal_create(struct fc_lua *fcl, const char *signal_name, int nargs,...)
Definition luascript_signal.c:251
fc_lua
Definition luascript.h:44
support.h