lua.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. ** LUA - Linguagem para Usuarios de Aplicacao
  3. ** Grupo de Tecnologia em Computacao Grafica
  4. ** TeCGraf - PUC-Rio
  5. ** $Id: lua.h,v 1.3 1994/08/17 15:05:08 celes Exp celes $
  6. */
  7. #ifndef lua_h
  8. #define lua_h
  9. #ifdef __cplusplus
  10. extern "C"
  11. {
  12. #endif
  13. typedef void (*lua_CFunction) (void);
  14. typedef struct Object *lua_Object;
  15. #define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n))
  16. void lua_errorfunction (void (*fn) (char *s));
  17. void lua_error (char *s);
  18. int lua_dofile (char *filename);
  19. int lua_dostring (char *string);
  20. int lua_call (char *functionname, int nparam);
  21. int lua_callfunction (lua_Object function, int nparam);
  22. lua_Object lua_getparam (int number);
  23. float lua_getnumber (lua_Object object);
  24. char *lua_getstring (lua_Object object);
  25. char *lua_copystring (lua_Object object);
  26. lua_CFunction lua_getcfunction (lua_Object object);
  27. void *lua_getuserdata (lua_Object object);
  28. void *lua_gettable (lua_Object object);
  29. lua_Object lua_getfield (lua_Object object, char *field);
  30. lua_Object lua_getindexed (lua_Object object, float index);
  31. lua_Object lua_getglobal (char *name);
  32. lua_Object lua_pop (void);
  33. int lua_pushnil (void);
  34. int lua_pushnumber (float n);
  35. int lua_pushstring (char *s);
  36. int lua_pushcfunction (lua_CFunction fn);
  37. int lua_pushuserdata (void *u);
  38. int lua_pushtable (void *t);
  39. int lua_pushsubscript (void);
  40. int lua_pushobject (lua_Object object);
  41. int lua_storeglobal (char *name);
  42. int lua_storefield (lua_Object object, char *field);
  43. int lua_storeindexed (lua_Object object, float index);
  44. int lua_storesubscript (void);
  45. int lua_isnil (lua_Object object);
  46. int lua_isnumber (lua_Object object);
  47. int lua_isstring (lua_Object object);
  48. int lua_istable (lua_Object object);
  49. int lua_isfunction (lua_Object object);
  50. int lua_iscfunction (lua_Object object);
  51. int lua_isuserdata (lua_Object object);
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif