00001
00012 #ifndef _DISPLAY_DRIVER_H_
00013 #define _DISPLAY_DRIVER_H_
00014
00025 #include <stdio.h>
00026 #include "lua.h"
00027 #include "any_driver.h"
00028 #include "display_list.h"
00029
00033 extern int dl_list_tag;
00034 extern any_driver_t display_driver;
00035
00036 #define DRIVER_NAME "display"
00037
00038 #define DL_FUNCTION_DECLARE(name) int lua_##name(lua_State * L)
00039
00040 #define DL_FUNCTION_START(name) \
00041 int lua_##name(lua_State * L) \
00042 { \
00043 dl_list_t * dl; \
00044 if (lua_tag(L, 1) != dl_list_tag) { \
00045 printf("dl_" #name " : first parameter is not a list\n"); \
00046 return 0; \
00047 } \
00048 dl = lua_touserdata(L, 1);
00049
00050 #define DL_FUNCTION_END() }
00051
00054 #endif