diff options
author | scuri <scuri> | 2010-04-23 14:27:10 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-04-23 14:27:10 +0000 |
commit | 7baa004d4455a02826aee2aa460ea99030b294da (patch) | |
tree | 5ffd6facab10245715297d821cf7f4546c9cd534 /src/lua5/cdlua5ctx.c | |
parent | f97ac4b5898063b8befb17cd2c53394f99efcd21 (diff) |
Fixed: missed implementation for CD_DEBUG, CD_PICTURE and CD_DBUFFERRGB in Lua.
Diffstat (limited to 'src/lua5/cdlua5ctx.c')
-rw-r--r-- | src/lua5/cdlua5ctx.c | 63 |
1 files changed, 61 insertions, 2 deletions
diff --git a/src/lua5/cdlua5ctx.c b/src/lua5/cdlua5ctx.c index 4d97f3b..b4c899b 100644 --- a/src/lua5/cdlua5ctx.c +++ b/src/lua5/cdlua5ctx.c @@ -1,5 +1,5 @@ /***************************************************************************\ -* $Id: cdlua5ctx.c,v 1.2 2009/12/02 20:31:02 scuri Exp $ +* $Id: cdlua5ctx.c,v 1.3 2010/04/23 14:27:10 scuri Exp $ * * \***************************************************************************/ @@ -25,7 +25,9 @@ #include "cdps.h" #include "cdsvg.h" #include "cddbuf.h" -#include "cdgdiplus.h" +#include "cddebug.h" +#include "cdpicture.h" + #include <lua.h> #include <lauxlib.h> @@ -321,6 +323,24 @@ static cdluaContext cdluadbufctx = }; /***************************************************************************\ +* CD_DBUFFERRGB. * +\***************************************************************************/ +static void *cddbufrgb_checkdata(lua_State * L, int param) +{ + return cdlua_checkcanvas(L, param); +} + +static cdluaContext cdluadbufrgbctx = +{ + 0, + "DBUFFERRGB", + cdContextDBufferRGB, + cddbufrgb_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ * CD_IMAGE. * \***************************************************************************/ static void *cdimage_checkdata(lua_State *L, int param) @@ -620,6 +640,42 @@ static int emf_sizecb(cdCanvas *canvas, int w, int h, double mm_w, double mm_h) } /***************************************************************************\ +* CD_PICTURE. * +\***************************************************************************/ +static void *cdpicture_checkdata(lua_State *L,int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static cdluaContext cdluapicturectx = +{ + 0, + "PICTURE", + cdContextPicture, + cdpicture_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ +* CD_DEBUG. * +\***************************************************************************/ +static void *cddebug_checkdata(lua_State *L,int param) +{ + return (void *)luaL_checkstring(L,param); +} + +static cdluaContext cdluadebugctx = +{ + 0, + "DEBUG", + cdContextDebug, + cddebug_checkdata, + NULL, + 0 +}; + +/***************************************************************************\ * CD_METAFILE. * \***************************************************************************/ static void *cdmetafile_checkdata(lua_State *L,int param) @@ -811,6 +867,8 @@ void cdlua_initdrivers(lua_State * L, cdluaLuaState* cdL) cdlua_addcontext(L, cdL, &cdluadgnctx); cdlua_addcontext(L, cdL, &cdluacgmctx); cdlua_addcontext(L, cdL, &cdluamfctx); + cdlua_addcontext(L, cdL, &cdluadebugctx); + cdlua_addcontext(L, cdL, &cdluapicturectx); cdlua_addcontext(L, cdL, &cdluapsctx); cdlua_addcontext(L, cdL, &cdluasvgctx); cdlua_addcontext(L, cdL, &cdluaclipboardctx); @@ -819,4 +877,5 @@ void cdlua_initdrivers(lua_State * L, cdluaLuaState* cdL) cdlua_addcontext(L, cdL, &cdluawmfctx); cdlua_addcontext(L, cdL, &cdluaemfctx); cdlua_addcontext(L, cdL, &cdluadbufctx); + cdlua_addcontext(L, cdL, &cdluadbufrgbctx); } |