summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-09 15:28:49 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-09 15:28:49 +0200
commit2d874e2201201bb2b9577da7aea6d6235338d428 (patch)
treee40d4e56f6dc4433c4434c2b2711c9c88f846418
TEST TEST TEST
-rw-r--r--meson.build13
-rw-r--r--src/gui_main.c46
-rw-r--r--src/meson.build12
3 files changed, 71 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..18eb9f8
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,13 @@
1project(
2 'efl-example-gui', 'c',
3 version : '0.0.1',
4 default_options: [ 'c_std=gnu99', 'warning_level=2' ],
5 meson_version : '>= 0.38.0')
6
7eina = dependency('eina', version : '>=1.20.99')
8efl = dependency('efl-ui', version : '>=1.20.99')
9elm = dependency('elementary', version : '>=1.20.99')
10
11inc = include_directories('.')
12subdir('src')
13
diff --git a/src/gui_main.c b/src/gui_main.c
new file mode 100644
index 0000000..06e2286
--- /dev/null
+++ b/src/gui_main.c
@@ -0,0 +1,46 @@
1#include <Eina.h>
2#include <Elementary.h>
3
4static void
5_etui_doc_key_down_cb(void *data,
6 Evas *_e EINA_UNUSED,
7 Evas_Object *_obj EINA_UNUSED,
8 void *event)
9{
10 exit(0);
11}
12
13EAPI_MAIN int
14elm_main(int argc, char *argv[])
15{
16 Eo *win, *sc, *o;
17
18 win = elm_win_util_standard_add("bla", "foo");
19 evas_object_show(win);
20
21 /*sc = elm_scroller_add(win);
22 evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
23 evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
24 evas_object_show(sc);*/
25
26
27 o = elm_button_add(win);
28 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
29 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
30 elm_object_text_set(o, "Test");
31 elm_object_content_set(sc, o);
32 evas_object_show(o);
33
34 elm_win_resize_object_add(win, o);
35
36 evas_object_event_callback_add(win, EVAS_CALLBACK_KEY_DOWN,
37 _etui_doc_key_down_cb, NULL);
38
39 evas_object_resize(win, 400, 400);
40
41 elm_run();
42
43 return 1;
44}
45
46ELM_MAIN()
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..4addb69
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,12 @@
1src = files([
2 'gui_main.c',
3])
4
5deps = [eina, efl, elm]
6
7executable('efl_example_gui', src,
8 dependencies : deps,
9 include_directories : inc,
10 install : true
11)
12