diff options
author | David Walter Seikel | 2014-04-09 13:41:38 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-09 13:41:38 +1000 |
commit | e4e750b9a749899f1eaa3b666381c39e9dc4bd7b (patch) | |
tree | 53559782b479e88b697a4b2ba4691ab269428367 /ClientHamr/GuiLua | |
parent | More notes! (diff) | |
download | SledjHamr-e4e750b9a749899f1eaa3b666381c39e9dc4bd7b.zip SledjHamr-e4e750b9a749899f1eaa3b666381c39e9dc4bd7b.tar.gz SledjHamr-e4e750b9a749899f1eaa3b666381c39e9dc4bd7b.tar.bz2 SledjHamr-e4e750b9a749899f1eaa3b666381c39e9dc4bd7b.tar.xz |
Make GuiLua an actual shared library, plus some minor clean ups.
Diffstat (limited to 'ClientHamr/GuiLua')
-rw-r--r-- | ClientHamr/GuiLua/GuiLua.c | 89 | ||||
-rw-r--r-- | ClientHamr/GuiLua/GuiLua.h | 70 | ||||
-rwxr-xr-x | ClientHamr/GuiLua/build.sh | 12 | ||||
-rw-r--r-- | ClientHamr/GuiLua/skang.c | 11 | ||||
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 12 | ||||
-rw-r--r-- | ClientHamr/GuiLua/test.lua | 1 | ||||
-rw-r--r-- | ClientHamr/GuiLua/test.properties | 2 | ||||
-rwxr-xr-x | ClientHamr/GuiLua/test.sh | 3 | ||||
-rw-r--r-- | ClientHamr/GuiLua/test_c.c | 9 |
9 files changed, 108 insertions, 101 deletions
diff --git a/ClientHamr/GuiLua/GuiLua.c b/ClientHamr/GuiLua/GuiLua.c index 47b46ca..47f63d5 100644 --- a/ClientHamr/GuiLua/GuiLua.c +++ b/ClientHamr/GuiLua/GuiLua.c | |||
@@ -2,10 +2,8 @@ | |||
2 | 2 | ||
3 | Provides the skang and widget Lua packages. | 3 | Provides the skang and widget Lua packages. |
4 | 4 | ||
5 | This should be a library in the end, but for now it's just an | 5 | In the initial intended use case, several applications will be using |
6 | application that is a test bed for what goes into the library. In the | 6 | this all at once, with one central app hosting all the GUIs. |
7 | initial intended use case, several applications will be using this all at | ||
8 | once, with one central app hosting all the GUIs. | ||
9 | 7 | ||
10 | Basically this should deal with "windows" and their contents. A | 8 | Basically this should deal with "windows" and their contents. A |
11 | "window" in this case is hosted in the central app as some sort of | 9 | "window" in this case is hosted in the central app as some sort of |
@@ -43,10 +41,7 @@ Lua scripts do - | |||
43 | Seems simplest. | 41 | Seems simplest. |
44 | 42 | ||
45 | Also - | 43 | Also - |
46 | Most of what is in here becomes a library for dynamic linking to C code. | ||
47 | Pretty much just leaving main(), though most of what is in there right now should become another function. | ||
48 | Some of this gets shared with LuaSL, since it came from there anyway. | 44 | Some of this gets shared with LuaSL, since it came from there anyway. |
49 | Perhaps GuiLua.so will work, and I don't have to think of another name. lol | ||
50 | 45 | ||
51 | Finally - | 46 | Finally - |
52 | Add a --gui command line option, that runs foo.skang. | 47 | Add a --gui command line option, that runs foo.skang. |
@@ -144,68 +139,15 @@ and ordinary elementary widgets. Proper introspection can come later. | |||
144 | 139 | ||
145 | 140 | ||
146 | 141 | ||
147 | #include <Eet.h> | 142 | #include "GuiLua.h" |
148 | #include <Ecore.h> | ||
149 | #include <Ecore_Evas.h> | ||
150 | #include <Edje.h> | ||
151 | #include <stdio.h> | ||
152 | #include <ctype.h> | ||
153 | |||
154 | #include <lua.h> | ||
155 | #include <luajit.h> | ||
156 | #include <lualib.h> | ||
157 | #include <lauxlib.h> | ||
158 | |||
159 | typedef struct _globals globals; | ||
160 | |||
161 | |||
162 | #define WIDTH (300) | ||
163 | #define HEIGHT (300) | ||
164 | |||
165 | #define PC(...) EINA_LOG_DOM_CRIT(ourGlobals->logDom, __VA_ARGS__) | ||
166 | #define PE(...) EINA_LOG_DOM_ERR(ourGlobals->logDom, __VA_ARGS__) | ||
167 | #define PW(...) EINA_LOG_DOM_WARN(ourGlobals->logDom, __VA_ARGS__) | ||
168 | #define PD(...) EINA_LOG_DOM_DBG(ourGlobals->logDom, __VA_ARGS__) | ||
169 | #define PI(...) EINA_LOG_DOM_INFO(ourGlobals->logDom, __VA_ARGS__) | ||
170 | |||
171 | #define PCm(...) EINA_LOG_DOM_CRIT(ourGlobals.logDom, __VA_ARGS__) | ||
172 | #define PEm(...) EINA_LOG_DOM_ERR(ourGlobals.logDom, __VA_ARGS__) | ||
173 | #define PWm(...) EINA_LOG_DOM_WARN(ourGlobals.logDom, __VA_ARGS__) | ||
174 | #define PDm(...) EINA_LOG_DOM_DBG(ourGlobals.logDom, __VA_ARGS__) | ||
175 | #define PIm(...) EINA_LOG_DOM_INFO(ourGlobals.logDom, __VA_ARGS__) | ||
176 | |||
177 | #define D() PD("DEBUG") | ||
178 | |||
179 | // "01:03:52 01-01-1973\n\0" | ||
180 | #define DATE_TIME_LEN 21 | ||
181 | |||
182 | |||
183 | #ifndef FALSE | ||
184 | // NEVER change this | ||
185 | typedef enum | ||
186 | { | ||
187 | FALSE = 0, | ||
188 | TRUE = 1 | ||
189 | } boolean; | ||
190 | #endif | ||
191 | |||
192 | struct _globals | ||
193 | { | ||
194 | Ecore_Evas *ee; // Our window. | ||
195 | Evas *canvas; // The canvas for drawing directly onto. | ||
196 | Evas_Object *bg; // Our background edje. | ||
197 | lua_State *L; // Our Lua state. | ||
198 | int eina, logDom, ecore_evas, edje; | ||
199 | }; | ||
200 | |||
201 | globals ourGlobals; | ||
202 | 143 | ||
144 | globals ourGlobals; | ||
203 | 145 | ||
204 | static const char *ourName = "widget"; | 146 | static const char *ourName = "widget"; |
205 | int skang, _M; | 147 | static int skang, _M; |
148 | |||
206 | 149 | ||
207 | /* | 150 | void dumpStack(lua_State *L, int i) |
208 | static void dumpStack(lua_State *L, int i) | ||
209 | { | 151 | { |
210 | int type = lua_type(L, i); | 152 | int type = lua_type(L, i); |
211 | 153 | ||
@@ -224,15 +166,8 @@ static void dumpStack(lua_State *L, int i) | |||
224 | default : printf("Stack %d is unknown\n", i); break; | 166 | default : printf("Stack %d is unknown\n", i); break; |
225 | } | 167 | } |
226 | } | 168 | } |
227 | */ | ||
228 | |||
229 | |||
230 | 169 | ||
231 | char *getDateTime(struct tm **nowOut, char *dateOut, time_t *tiemOut); | 170 | static char dateTime[DATE_TIME_LEN]; |
232 | |||
233 | # define DATE_TIME_LEN 21 | ||
234 | |||
235 | char dateTime[DATE_TIME_LEN]; | ||
236 | 171 | ||
237 | static void _ggg_log_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args) | 172 | static void _ggg_log_print_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args) |
238 | { | 173 | { |
@@ -307,13 +242,11 @@ char *getDateTime(struct tm **nowOut, char *dateOut, time_t *timeOut) | |||
307 | } | 242 | } |
308 | 243 | ||
309 | 244 | ||
310 | |||
311 | static void _on_delete(Ecore_Evas *ee /*__UNUSED__*/) | 245 | static void _on_delete(Ecore_Evas *ee /*__UNUSED__*/) |
312 | { | 246 | { |
313 | ecore_main_loop_quit(); | 247 | ecore_main_loop_quit(); |
314 | } | 248 | } |
315 | 249 | ||
316 | |||
317 | static int openWindow(lua_State *L) | 250 | static int openWindow(lua_State *L) |
318 | { | 251 | { |
319 | globals *ourGlobals; | 252 | globals *ourGlobals; |
@@ -487,10 +420,8 @@ int luaopen_widget(lua_State *L) | |||
487 | return 1; | 420 | return 1; |
488 | } | 421 | } |
489 | 422 | ||
490 | 423 | void GuiLuaDo(int argc, char **argv) | |
491 | int main(int argc, char **argv) | ||
492 | { | 424 | { |
493 | int result = EXIT_FAILURE; | ||
494 | lua_Number i; | 425 | lua_Number i; |
495 | 426 | ||
496 | memset(&ourGlobals, 0, sizeof(globals)); | 427 | memset(&ourGlobals, 0, sizeof(globals)); |
@@ -532,6 +463,4 @@ int main(int argc, char **argv) | |||
532 | } | 463 | } |
533 | else | 464 | else |
534 | fprintf(stderr, "Failed to start Lua!\n"); | 465 | fprintf(stderr, "Failed to start Lua!\n"); |
535 | |||
536 | return result; | ||
537 | } | 466 | } |
diff --git a/ClientHamr/GuiLua/GuiLua.h b/ClientHamr/GuiLua/GuiLua.h new file mode 100644 index 0000000..1813966 --- /dev/null +++ b/ClientHamr/GuiLua/GuiLua.h | |||
@@ -0,0 +1,70 @@ | |||
1 | |||
2 | #include <Eet.h> | ||
3 | #include <Ecore.h> | ||
4 | #include <Ecore_Evas.h> | ||
5 | #include <Edje.h> | ||
6 | #include <stdio.h> | ||
7 | #include <ctype.h> | ||
8 | |||
9 | #include <lua.h> | ||
10 | #include <luajit.h> | ||
11 | #include <lualib.h> | ||
12 | #include <lauxlib.h> | ||
13 | |||
14 | typedef struct _globals globals; | ||
15 | |||
16 | |||
17 | #define WIDTH (300) | ||
18 | #define HEIGHT (300) | ||
19 | |||
20 | #define PC(...) EINA_LOG_DOM_CRIT(ourGlobals->logDom, __VA_ARGS__) | ||
21 | #define PE(...) EINA_LOG_DOM_ERR(ourGlobals->logDom, __VA_ARGS__) | ||
22 | #define PW(...) EINA_LOG_DOM_WARN(ourGlobals->logDom, __VA_ARGS__) | ||
23 | #define PD(...) EINA_LOG_DOM_DBG(ourGlobals->logDom, __VA_ARGS__) | ||
24 | #define PI(...) EINA_LOG_DOM_INFO(ourGlobals->logDom, __VA_ARGS__) | ||
25 | |||
26 | #define PCm(...) EINA_LOG_DOM_CRIT(ourGlobals.logDom, __VA_ARGS__) | ||
27 | #define PEm(...) EINA_LOG_DOM_ERR(ourGlobals.logDom, __VA_ARGS__) | ||
28 | #define PWm(...) EINA_LOG_DOM_WARN(ourGlobals.logDom, __VA_ARGS__) | ||
29 | #define PDm(...) EINA_LOG_DOM_DBG(ourGlobals.logDom, __VA_ARGS__) | ||
30 | #define PIm(...) EINA_LOG_DOM_INFO(ourGlobals.logDom, __VA_ARGS__) | ||
31 | |||
32 | #define D() PD("DEBUG") | ||
33 | |||
34 | // "01:03:52 01-01-1973\n\0" | ||
35 | #define DATE_TIME_LEN 21 | ||
36 | |||
37 | |||
38 | #ifndef FALSE | ||
39 | // NEVER change this | ||
40 | typedef enum | ||
41 | { | ||
42 | FALSE = 0, | ||
43 | TRUE = 1 | ||
44 | } boolean; | ||
45 | #endif | ||
46 | |||
47 | struct _globals | ||
48 | { | ||
49 | Ecore_Evas *ee; // Our window. | ||
50 | Evas *canvas; // The canvas for drawing directly onto. | ||
51 | Evas_Object *bg; // Our background edje. | ||
52 | lua_State *L; // Our Lua state. | ||
53 | int eina, logDom, ecore_evas, edje; | ||
54 | }; | ||
55 | |||
56 | // globals ourGlobals; | ||
57 | |||
58 | |||
59 | void dumpStack(lua_State *L, int i); | ||
60 | |||
61 | |||
62 | # define DATE_TIME_LEN 21 | ||
63 | |||
64 | //char dateTime[DATE_TIME_LEN]; | ||
65 | |||
66 | void loggingStartup(globals *ourGlobals); | ||
67 | char *getDateTime(struct tm **nowOut, char *dateOut, time_t *tiemOut); | ||
68 | |||
69 | int luaopen_widget(lua_State *L); | ||
70 | void GuiLuaDo(int argc, char **argv); | ||
diff --git a/ClientHamr/GuiLua/build.sh b/ClientHamr/GuiLua/build.sh index 5c111e4..0ef46b9 100755 --- a/ClientHamr/GuiLua/build.sh +++ b/ClientHamr/GuiLua/build.sh | |||
@@ -12,7 +12,7 @@ else | |||
12 | export E17DIR="/usr" | 12 | export E17DIR="/usr" |
13 | fi | 13 | fi |
14 | 14 | ||
15 | CFLAGS="-g -Wall -Wunreachable-code -I include -I $LOCALDIR" | 15 | CFLAGS="-g -Wall -I include -I $LOCALDIR" |
16 | CFLAGS="$CFLAGS -I ../../libraries" | 16 | CFLAGS="$CFLAGS -I ../../libraries" |
17 | #CFLAGS="$CFLAGS -I ../../libraries/LuaJIT-2.0.2/src" | 17 | #CFLAGS="$CFLAGS -I ../../libraries/LuaJIT-2.0.2/src" |
18 | CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" | 18 | CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" |
@@ -34,7 +34,7 @@ CFLAGS="$CFLAGS -DPACKAGE_DATA_DIR=\"$LOCALDIR\" $CFLAGOPTS" | |||
34 | 34 | ||
35 | #LDFLAGS="-L ../../libraries/LuaJIT-2.0.2/src -L lib -L /usr/lib -L /lib -L $E17DIR/lib" | 35 | #LDFLAGS="-L ../../libraries/LuaJIT-2.0.2/src -L lib -L /usr/lib -L /lib -L $E17DIR/lib" |
36 | #libs="-leo -lecore -levas -ledje -lembryo -leet -leina -lluajit -lpthread -lm" | 36 | #libs="-leo -lecore -levas -ledje -lembryo -leet -leina -lluajit -lpthread -lm" |
37 | LDFLAGS="$(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib -L $E17DIR/lib" | 37 | LDFLAGS="-L $LOCALDIR $(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib -L $E17DIR/lib" |
38 | libs="-leo -lecore -levas -ledje -lembryo -leet -leina $(pkg-config --libs luajit) -lpthread -lm -ldl" | 38 | libs="-leo -lecore -levas -ledje -lembryo -leet -leina $(pkg-config --libs luajit) -lpthread -lm -ldl" |
39 | #LDFLAGS="-L /usr/lib/lua/5.1 -L lib -L /usr/lib -L /lib -L $E17DIR/lib" | 39 | #LDFLAGS="-L /usr/lib/lua/5.1 -L lib -L /usr/lib -L /lib -L $E17DIR/lib" |
40 | #libs="-lecore -levas -ledje -lembryo -leet -leina -llua5.1 -lpthread -lm" | 40 | #libs="-lecore -levas -ledje -lembryo -leet -leina -llua5.1 -lpthread -lm" |
@@ -49,7 +49,11 @@ libs="-leo -lecore -levas -ledje -lembryo -leet -leina $(pkg-config --libs luaji | |||
49 | #-lz | 49 | #-lz |
50 | 50 | ||
51 | echo "clean" | 51 | echo "clean" |
52 | rm -f test_c.so test_c.o | 52 | rm -f test_c.so GuiLua.o libGuiLua.so skang |
53 | echo "C modules" | 53 | echo "C modules" |
54 | gcc $CFLAGS -fPIC -shared -o test_c.so test_c.c | 54 | gcc $CFLAGS -fPIC -shared -o test_c.so test_c.c |
55 | gcc $CFLAGS -o GuiLua GuiLua.c $LDFLAGS $libs | 55 | gcc $CFLAGS -fPIC -c GuiLua.c |
56 | echo "C libraries" | ||
57 | gcc $CFLAGS -shared -Wl,-soname,libGuiLua.so -o libGuiLua.so GuiLua.o | ||
58 | echo "C apps" | ||
59 | gcc $CFLAGS -Wl,-export-dynamic -o skang skang.c $LDFLAGS -lGuiLua $libs | ||
diff --git a/ClientHamr/GuiLua/skang.c b/ClientHamr/GuiLua/skang.c new file mode 100644 index 0000000..ed92ff9 --- /dev/null +++ b/ClientHamr/GuiLua/skang.c | |||
@@ -0,0 +1,11 @@ | |||
1 | #include "GuiLua.h" | ||
2 | |||
3 | |||
4 | int main(int argc, char **argv) | ||
5 | { | ||
6 | int result = EXIT_FAILURE; | ||
7 | |||
8 | GuiLuaDo(argc, argv); | ||
9 | |||
10 | return result; | ||
11 | } | ||
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index e738a50..dec8983 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -1,7 +1,7 @@ | |||
1 | --[[ TODO - This should be in C, but so far development has been quite rapid doing it in Lua. | 1 | --[[ TODO - This should be in C, but so far development has been quite rapid doing it in Lua. |
2 | |||
2 | C will let us - | 3 | C will let us - |
3 | Actually do the widget stuff. | 4 | Actually do the widget stuff. |
4 | Use Ecore's main loop. | ||
5 | Slap meta tables on all value types. | 5 | Slap meta tables on all value types. |
6 | Which lets us put the meta table on the variable, instead of on the table, which I think is cleaner. | 6 | Which lets us put the meta table on the variable, instead of on the table, which I think is cleaner. |
7 | Figure out the directory separator. | 7 | Figure out the directory separator. |
@@ -907,6 +907,9 @@ copy = function (parent, name) | |||
907 | return result | 907 | return result |
908 | end | 908 | end |
909 | 909 | ||
910 | module = function (name) | ||
911 | return require(name) | ||
912 | end | ||
910 | 913 | ||
911 | stuff = function (aThingy, aStuff) | 914 | stuff = function (aThingy, aStuff) |
912 | return getmetatable(aThingy).__self.stuff[aStuff] | 915 | return getmetatable(aThingy).__self.stuff[aStuff] |
@@ -954,11 +957,11 @@ set = function (stuff, key, name, value) | |||
954 | end | 957 | end |
955 | end | 958 | end |
956 | 959 | ||
960 | thingasm('module,l', 'Load a module.', module, 'file') | ||
957 | thingasm('get', 'Get the current value of an existing Thing or metadata.', get, 'thing,key,name') | 961 | thingasm('get', 'Get the current value of an existing Thing or metadata.', get, 'thing,key,name') |
958 | thingasm('reset', 'Reset the current value of an existing Thing or metadata.', reset, 'thing,key,name') | 962 | thingasm('reset', 'Reset the current value of an existing Thing or metadata.', reset, 'thing,key,name') |
959 | thingasm('set', 'Set the current value of an existing Thing or metadata.', set, 'thing,key,name,data') | 963 | thingasm('set', 'Set the current value of an existing Thing or metadata.', set, 'thing,key,name,data') |
960 | 964 | ||
961 | |||
962 | thingasm('nada', 'Do nothing.', function () --[[ This function intentionally left blank. ]] end) | 965 | thingasm('nada', 'Do nothing.', function () --[[ This function intentionally left blank. ]] end) |
963 | 966 | ||
964 | 967 | ||
@@ -968,10 +971,6 @@ end | |||
968 | window = function (width, height, title) | 971 | window = function (width, height, title) |
969 | end | 972 | end |
970 | 973 | ||
971 | module = function (name) | ||
972 | return require(name) | ||
973 | end | ||
974 | |||
975 | skang = function (name) | 974 | skang = function (name) |
976 | end | 975 | end |
977 | quit = function () | 976 | quit = function () |
@@ -979,7 +978,6 @@ end | |||
979 | 978 | ||
980 | thingasm('clear', 'The current skin is cleared of all widgets.', clear) | 979 | thingasm('clear', 'The current skin is cleared of all widgets.', clear) |
981 | thingasm{'window', 'The size and title of the application Frame.', window, 'x,y,name', acl='GGG'} | 980 | thingasm{'window', 'The size and title of the application Frame.', window, 'x,y,name', acl='GGG'} |
982 | thingasm('module,l', 'Load a module.', module, 'file') | ||
983 | thingasm('skang', 'Parse the contents of a skang file or URL.', skang, 'URL') | 981 | thingasm('skang', 'Parse the contents of a skang file or URL.', skang, 'URL') |
984 | thingasm('quit', 'Quit, exit, remove thyself.', quit) | 982 | thingasm('quit', 'Quit, exit, remove thyself.', quit) |
985 | 983 | ||
diff --git a/ClientHamr/GuiLua/test.lua b/ClientHamr/GuiLua/test.lua index f45aff9..d484cf2 100644 --- a/ClientHamr/GuiLua/test.lua +++ b/ClientHamr/GuiLua/test.lua | |||
@@ -46,6 +46,7 @@ print(test.DEFAULT_SKANG) | |||
46 | print('') | 46 | print('') |
47 | 47 | ||
48 | print('foo = ' .. test.foo .. ' ->> ' .. skang.get(test, 'foo', 'help')) | 48 | print('foo = ' .. test.foo .. ' ->> ' .. skang.get(test, 'foo', 'help')) |
49 | print('fooble = ' .. test.fooble) | ||
49 | print('cfooble = ' .. test_c.cfooble .. ' ->> ' .. skang.get(test_c, 'cfooble', 'help') .. '[' .. skang.get(test_c, 'cfooble', 'widget') .. ']') | 50 | print('cfooble = ' .. test_c.cfooble .. ' ->> ' .. skang.get(test_c, 'cfooble', 'help') .. '[' .. skang.get(test_c, 'cfooble', 'widget') .. ']') |
50 | print('cfunc ->> ' .. skang.get(test_c, 'cfunc', 'help')) | 51 | print('cfunc ->> ' .. skang.get(test_c, 'cfunc', 'help')) |
51 | test.ffunc('one', 2) | 52 | test.ffunc('one', 2) |
diff --git a/ClientHamr/GuiLua/test.properties b/ClientHamr/GuiLua/test.properties index d6d29cb..71a371d 100644 --- a/ClientHamr/GuiLua/test.properties +++ b/ClientHamr/GuiLua/test.properties | |||
@@ -1 +1 @@ | |||
foo = 'forty two' | fooble = 'forty two' | ||
diff --git a/ClientHamr/GuiLua/test.sh b/ClientHamr/GuiLua/test.sh new file mode 100755 index 0000000..4f72c52 --- /dev/null +++ b/ClientHamr/GuiLua/test.sh | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | export LD_LIBRARY_PATH="."; ./skang -l test -foo "argy bargy" | ||
diff --git a/ClientHamr/GuiLua/test_c.c b/ClientHamr/GuiLua/test_c.c index e4ca278..6faf928 100644 --- a/ClientHamr/GuiLua/test_c.c +++ b/ClientHamr/GuiLua/test_c.c | |||
@@ -1,14 +1,5 @@ | |||
1 | /* Should be a Lua skang module, roughly the same as test.lua | 1 | /* Should be a Lua skang module, roughly the same as test.lua |
2 | 2 | ||
3 | TODO - See if this still works if it's an app instead of a library. | ||
4 | I think the problem will be duplicate Lua library names. | ||
5 | The C app will be linked to one copy, the lua executable that require() this is linked to another, even if it's the same one. | ||
6 | Much hilarity ensues. | ||
7 | Not to mention linker flags being different. | ||
8 | |||
9 | Plan B - | ||
10 | Widget skang module runs the window app, and sends stuff to it. | ||
11 | |||
12 | Seems to be several problems with linking in various OSes, here's some | 3 | Seems to be several problems with linking in various OSes, here's some |
13 | possibly helpful links - | 4 | possibly helpful links - |
14 | 5 | ||