diff options
author | 2013-11-19 23:03:53 -0500 | |
---|---|---|
committer | 2013-11-19 23:03:53 -0500 | |
commit | d2a110761100b511cdc0c714f303a9a4dcb3f814 (patch) | |
tree | 5f1957f292d09206004a49998ae724e4736d1340 /src/textadept.c | |
parent | f75a88a3d3e0d1ecb403bbfa93062bf816c0f2a1 (diff) |
Experimental winapi extension for preventing the flashing black box on Windows.
Compile in a stripped version of Steve Donovan's winapi library and override
`io.popen` and `os.execute`.
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/textadept.c b/src/textadept.c index b1400cd9..096df7dd 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -140,6 +140,9 @@ static int tVOID = 0, tINT = 1, tLENGTH = 2, /*tPOSITION = 3, tCOLOUR = 4,*/ tBOOL = 5, tKEYMOD = 6, tSTRING = 7, tSTRINGRESULT = 8; static int lL_init(lua_State *, int, char **, int); LUALIB_API int luaopen_lpeg(lua_State *), luaopen_lfs(lua_State *); +#if _WIN32 +LUALIB_API int luaopen_winapi(lua_State *); +#endif #define l_setglobalview(l, v) (l_pushview(l, v), lua_setglobal(l, "view")) #define l_setglobaldoc(l, d) (l_pushdoc(l, d), lua_setglobal(l, "buffer")) @@ -1630,6 +1633,7 @@ static int lL_init(lua_State *L, int argc, char **argv, int reinit) { lua_pushstring(L, textadept_home), lua_setglobal(L, "_HOME"); #if _WIN32 lua_pushboolean(L, 1), lua_setglobal(L, "WIN32"); + lL_openlib(L, "winapi", luaopen_winapi); #elif (__APPLE__ && !CURSES) lua_pushboolean(L, 1), lua_setglobal(L, "OSX"); #endif |