summaryrefslogtreecommitdiff
path: root/src/examples/elua
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-10-10 13:04:15 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-10-10 13:04:35 +0100
commit8528d937e8c2e7d797c34b654b503101a467d13c (patch)
treebf443168f818a02bab8df63fc30df7b326936542 /src/examples/elua
parent5db7a7060333ec21fa5da266701bf24c71b88091 (diff)
elua: remove testing elementary bindings
Diffstat (limited to 'src/examples/elua')
-rw-r--r--src/examples/elua/Makefile.am16
-rw-r--r--src/examples/elua/elm_test.lua65
2 files changed, 8 insertions, 73 deletions
diff --git a/src/examples/elua/Makefile.am b/src/examples/elua/Makefile.am
index 5be255e..ebf088a 100644
--- a/src/examples/elua/Makefile.am
+++ b/src/examples/elua/Makefile.am
@@ -2,20 +2,20 @@ if HAVE_ELUA
2 2
3MAINTAINERCLEANFILES = Makefile.in 3MAINTAINERCLEANFILES = Makefile.in
4 4
5DATA_FILES = elm_test.lua 5DATA_FILES =
6EXTRA_DIST = $(DATA_FILES) 6EXTRA_DIST = $(DATA_FILES)
7 7
8examples: ; 8examples: ;
9 9
10clean-local: ; 10clean-local: ;
11 11
12install-examples: 12#install-examples:
13 mkdir -p $(datadir)/elua/examples 13# mkdir -p $(datadir)/elua/examples
14 cd $(srcdir) && $(install_sh_DATA) -c $(DATA_FILES) $(datadir)/elua/examples 14# cd $(srcdir) && $(install_sh_DATA) -c $(DATA_FILES) $(datadir)/elua/examples
15 15
16uninstall-local: 16#uninstall-local:
17 for f in $(DATA_FILES); do \ 17# for f in $(DATA_FILES); do \
18 rm -f $(datadir)/elua/examples/$$f ; \ 18# rm -f $(datadir)/elua/examples/$$f ; \
19 done 19# done
20 20
21endif 21endif
diff --git a/src/examples/elua/elm_test.lua b/src/examples/elua/elm_test.lua
deleted file mode 100644
index 35a3aeb..0000000
--- a/src/examples/elua/elm_test.lua
+++ /dev/null
@@ -1,65 +0,0 @@
1local log = require("eina.log")
2
3local dom = log.Domain("elm_test", log.color.LIGHTRED)
4
5local win = elm.Window("test", "Hello World")
6
7dom:log(log.level.INFO, "created window")
8dom:log(log.level.ERR, "error test!")
9
10log.log_err("test with default log domain")
11
12local foo = function()
13 for i = 1, 4 do
14 log.err("testing: " .. i)
15 end
16end
17
18foo()
19log.set_default_domain(dom)
20foo()
21
22win:smart_callback_add("delete,request", function()
23 elm.exit()
24end)
25
26local bg = elm.Background(win)
27bg:size_hint_weight_set(1.0, 1.0)
28win:resize_object_add(bg)
29bg:show()
30
31local bx = elm.Box(win)
32bx:size_hint_weight_set(1.0, 1.0)
33win:resize_object_add(bx)
34bx:show()
35
36local lbl = elm.Label(win)
37lbl:text_set("Lua runtime test")
38bx:pack_end(lbl)
39lbl:show()
40
41local entry
42
43local btn = elm.Button(win)
44btn:text_set("Reset counter")
45bx:pack_end(btn)
46btn:smart_callback_add("clicked", function()
47 lbl:text_set(entry:entry_get())
48end)
49btn:show()
50
51entry = elm.Entry(win)
52entry:single_line_set(true)
53entry:scrollable_set(true)
54entry:focus_set(true)
55entry:entry_set("Hello world")
56entry:size_hint_weight_set(1.0, 1.0)
57entry:size_hint_align_set(-1.0, -1.0)
58entry:show()
59bx:pack_end(entry)
60
61win:resize(360, 360)
62win:show()
63
64dom:log(log.level.INFO, "done initing")
65dom:unregister()