summaryrefslogtreecommitdiff
path: root/src/examples/elementary/menu_cxx_example_01.cc
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-06 14:25:22 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-07 09:57:24 +0900
commit778c5afb3f29fe0763d875d31f6411b24cbb997d (patch)
treee253817b380f6b1ca8bafc032032c00fc2a95310 /src/examples/elementary/menu_cxx_example_01.cc
parent4f98b549159811d2f649a9e3eca6bbe20bc86740 (diff)
cxx: Fix some examples, disable or remove others
make examples now builds all c++ examples but some of them are in fact empty skeletons. Those either need some c++ love or the final eo api to be ready (eg. menu, popup, ...). I removed some examples that don't have an exact equivalent in EO since the widget is legacy only.
Diffstat (limited to 'src/examples/elementary/menu_cxx_example_01.cc')
-rw-r--r--src/examples/elementary/menu_cxx_example_01.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/examples/elementary/menu_cxx_example_01.cc b/src/examples/elementary/menu_cxx_example_01.cc
index 9aeb35e580..cf6cb5cedd 100644
--- a/src/examples/elementary/menu_cxx_example_01.cc
+++ b/src/examples/elementary/menu_cxx_example_01.cc
@@ -1,18 +1,19 @@
1#include <Elementary.hh> 1#include <Elementary.hh>
2#include <Eina.hh> 2
3#include <Evas.hh> 3#warning This example can't be implemented with EO APIs... FIXME
4 4
5EAPI_MAIN int 5EAPI_MAIN int
6elm_main (int argc, char *argv[]) 6elm_main (int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
7{ 7{
8 efl::eina::eina_init eina_init; 8 efl::eina::eina_init eina_init;
9 9
10 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 10 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
11 11
12 ::elm::win_standard win; 12 efl::ui::Win win(efl::eo::instantiate);
13 win.title_set("Menu"); 13 win.text_set("Menu Example");
14 win.autohide_set(true); 14 win.autohide_set(true);
15 15
16#if 0
16 evas::rectangle rect(efl::eo::parent = win); 17 evas::rectangle rect(efl::eo::parent = win);
17 win.resize_object_add(rect); 18 win.resize_object_add(rect);
18 rect.size_hint_min_set(0, 0); 19 rect.size_hint_min_set(0, 0);
@@ -60,8 +61,8 @@ elm_main (int argc, char *argv[])
60 rect.callback_mouse_down_add( show ); 61 rect.callback_mouse_down_add( show );
61 menu.visible_set(true); 62 menu.visible_set(true);
62 63
63 win.size_set(250, 350); 64#endif
64 win.visible_set(true); 65 win.size_set({250, 350});
65 66
66 elm_run(); 67 elm_run();
67 return 0; 68 return 0;