1994-11-07 13:20:56 -02:00
|
|
|
/*
|
1997-04-02 20:04:12 -03:00
|
|
|
** $Id: fallback.h,v 1.20 1997/04/02 22:52:42 roberto Exp roberto $
|
1994-11-07 13:20:56 -02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef fallback_h
|
|
|
|
#define fallback_h
|
|
|
|
|
1996-04-22 15:00:37 -03:00
|
|
|
#include "lua.h"
|
1994-11-08 17:56:39 -02:00
|
|
|
#include "opcode.h"
|
|
|
|
|
1997-03-20 16:20:43 -03:00
|
|
|
/*
|
|
|
|
* WARNING: if you change the order of this enumeration,
|
|
|
|
* grep "ORDER IM"
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
IM_GETTABLE = 0,
|
|
|
|
IM_SETTABLE,
|
|
|
|
IM_INDEX,
|
1997-03-31 17:59:09 -03:00
|
|
|
IM_GETGLOBAL,
|
|
|
|
IM_SETGLOBAL,
|
1997-03-20 16:20:43 -03:00
|
|
|
IM_ADD,
|
|
|
|
IM_SUB,
|
|
|
|
IM_MUL,
|
|
|
|
IM_DIV,
|
|
|
|
IM_POW,
|
|
|
|
IM_UNM,
|
|
|
|
IM_LT,
|
|
|
|
IM_LE,
|
|
|
|
IM_GT,
|
|
|
|
IM_GE,
|
|
|
|
IM_CONCAT,
|
|
|
|
IM_GC,
|
|
|
|
IM_FUNCTION
|
|
|
|
} IMS;
|
|
|
|
|
1997-03-31 17:59:09 -03:00
|
|
|
#define IM_N 18
|
1997-03-20 16:20:43 -03:00
|
|
|
|
|
|
|
extern char *luaI_eventname[];
|
|
|
|
|
|
|
|
|
1994-11-10 15:11:52 -02:00
|
|
|
void luaI_setfallback (void);
|
1997-03-31 11:02:58 -03:00
|
|
|
int luaI_ref (TObject *object, int lock);
|
|
|
|
TObject *luaI_getref (int ref);
|
|
|
|
void luaI_travlock (int (*fn)(TObject *));
|
1996-04-22 15:00:37 -03:00
|
|
|
void luaI_invalidaterefs (void);
|
1997-03-31 11:02:58 -03:00
|
|
|
char *luaI_travfallbacks (int (*fn)(TObject *));
|
1994-11-07 13:20:56 -02:00
|
|
|
|
1997-03-31 11:02:58 -03:00
|
|
|
void luaI_settag (int tag, TObject *o);
|
1997-04-02 19:52:42 -03:00
|
|
|
int luaI_userdatatag (int tag);
|
1997-03-31 11:02:58 -03:00
|
|
|
TObject *luaI_getim (int tag, IMS event);
|
1997-03-24 14:13:22 -03:00
|
|
|
#define luaI_getimbyObj(o,e) (luaI_getim(luaI_tag(o),(e)))
|
1997-03-31 17:59:09 -03:00
|
|
|
TObject *luaI_geterrorim (void);
|
1997-03-31 11:02:58 -03:00
|
|
|
int luaI_tag (TObject *o);
|
1997-02-26 14:38:41 -03:00
|
|
|
void luaI_setintmethod (void);
|
1997-04-02 20:04:12 -03:00
|
|
|
void luaI_getintmethod (void);
|
1997-03-31 17:59:09 -03:00
|
|
|
void luaI_seterrormethod (void);
|
1997-03-19 16:41:10 -03:00
|
|
|
void luaI_initfallbacks (void);
|
1997-02-26 14:38:41 -03:00
|
|
|
|
1994-11-07 13:20:56 -02:00
|
|
|
#endif
|
|
|
|
|