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
25typedef char * signal_deprecator;
26
27void luascript_signal_init(struct fc_lua *fcl);
28void luascript_signal_free(struct fc_lua *fcl);
29
31 const char *signal_name, va_list args);
32void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name, ...);
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);
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 */
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 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)
void deprecate_signal(signal_deprecator *deprecator, char *signal_name, char *replacement, char *deprecated_since)
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)
char * signal_deprecator
signal_deprecator * luascript_signal_create(struct fc_lua *fcl, const char *signal_name, int nargs,...)