Freeciv-3.3
Loading...
Searching...
No Matches
Functions
api_signal_base.c File Reference
#include "luascript_signal.h"
#include "luascript.h"
#include "api_signal_base.h"

Go to the source code of this file.

Functions

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)
 
bool api_signal_defined (lua_State *L, const char *signal_name, const char *callback_name)
 
const charapi_signal_callback_by_index (lua_State *L, const char *signal_name, int sindex)
 
const charapi_signal_by_index (lua_State *L, int sindex)
 

Function Documentation

◆ api_signal_by_index()

const char * api_signal_by_index ( lua_State L,
int  sindex 
)

Return the name of the 'index' callback function of the signal with the name 'signal_name'.

Definition at line 104 of file api_signal_base.c.

Referenced by tolua_signal_find_signal00().

◆ api_signal_callback_by_index()

const char * api_signal_callback_by_index ( lua_State L,
const char signal_name,
int  sindex 
)

Return the name of the signal with the given index.

Definition at line 84 of file api_signal_base.c.

Referenced by tolua_signal_find_signal_callback00().

◆ api_signal_connect()

void api_signal_connect ( lua_State L,
const char signal_name,
const char callback_name 
)

Connects a callback function to a certain signal.

Definition at line 27 of file api_signal_base.c.

Referenced by tolua_signal_signal_connect00().

◆ api_signal_defined()

bool api_signal_defined ( lua_State L,
const char signal_name,
const char callback_name 
)

Returns if a callback function to a certain signal is defined.

Definition at line 65 of file api_signal_base.c.

Referenced by tolua_signal_signal_defined00().

◆ api_signal_remove()

void api_signal_remove ( lua_State L,
const char signal_name,
const char callback_name 
)

Removes a callback function to a certain signal.

Definition at line 46 of file api_signal_base.c.

Referenced by tolua_signal_signal_remove00().