aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua/GuiLua.c
diff options
context:
space:
mode:
Diffstat (limited to 'ClientHamr/GuiLua/GuiLua.c')
-rw-r--r--ClientHamr/GuiLua/GuiLua.c81
1 files changed, 1 insertions, 80 deletions
diff --git a/ClientHamr/GuiLua/GuiLua.c b/ClientHamr/GuiLua/GuiLua.c
index e0efd00..2b5f161 100644
--- a/ClientHamr/GuiLua/GuiLua.c
+++ b/ClientHamr/GuiLua/GuiLua.c
@@ -160,86 +160,7 @@ database stuff for now, but should keep it in mind.
160 160
161/* skang package 161/* skang package
162 162
163In here should live all the internals of matrix-RAD that don't 163Currently this is in skang.lua, but should bring this in here later.
164specifically relate to widgets. This would include the "window" though.
165
166skang.module(Evas)
167skang.module(Elementary)
168skang.load('some/skang/file.skang')
169
170This package is also what "apps" that use the system should "inherit"
171from, in the same way matrix-RAD apps did. Skang "apps" could be Lua
172modules. They could also be C code, like the extantz modules are likely
173to be. Skang "apps" would automatically be associated with skang files
174of the same name. So a Lua skang "app" could look like this -
175
176local skang = require('skang')
177local result = {};
178result.author = 'onefang'
179result.version = '0.72 alpha 2004-11-19 16:28:00'
180local bar
181-- The first argument would be the name of a local variable / method. Which could be accessed via _G?
182-- Not sure if we could use a global bar, AND use it directly.
183result.bar = skang.newParam('bar', "Required", "Shortcut", "Default", "Help text")
184result.func = skang.newCommand('arg1_type,arg2_type', 'Help Text', function (arg1, arg2)
185... do something here ...
186end)
187
188... do something here ...
189
190return result;
191
192
193A basic skang file could look like this -
194
195#!skang myApp.skang
196-- There's an implied local this = require('myApp')
197-- There's an implied local skang = require('skang')
198local widget = require('EvasWidgets')
199local other = require('otherPackageName')
200skang.clear
201skang.window(200, 200, "G'day planet.")
202quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5)
203quitter:action('quit') -- 'quit' is looked up in ThingSpcae.commands, and translated into the Lua 'skang.quit()'.
204other.foo = 'stuff'
205this.bar = other.foo
206this.func(1, 'two')
207
208The skang command (written in C) would strip off the first line, add the
209two implied lines, then run it as Lua. The skang.load() command would
210do the same. So that skang C comand would just pass the file name to
211skang.load() in this library. B-)
212
213
214The old skang argument types are -
215
216 {"name", "java.lang.String"},
217 {"action", "java.lang.String"},
218 {"type", "java.lang.String"},
219 {"data", "java.lang.String"},
220 {"URL", "java.lang.String"},
221 {"file", "java.lang.String"},
222 {"method", "java.lang.String"},
223 {"lx", "java.lang.String"},
224 {"ly", "java.lang.String"},
225 {"lw", "java.lang.String"},
226 {"lh", "java.lang.String"},
227 {"normal", "java.lang.String"},
228 {"ghost", "java.lang.String"},
229 {"active", "java.lang.String"},
230 {"toggle", "java.lang.String"},
231 {"boolean","java.lang.Boolean"},
232 {"number", "java.lang.Integer"},
233 {"int", "java.lang.Integer"},
234 {"x", "java.lang.Integer"},
235 {"y", "java.lang.Integer"},
236 {"w", "java.lang.Integer"},
237 {"h", "java.lang.Integer"},
238 {"r", "java.lang.Integer"},
239 {"g", "java.lang.Integer"},
240 {"b", "java.lang.Integer"},
241 {"alpha", "java.lang.Integer"},
242 {"acl", "net.matrix_rad.security.ACL"},
243 164
244*/ 165*/
245 166