summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 22:04:21 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 22:04:55 +0900
commit5555726fef16e8e1c5ec907e0fcdcadeecea694c (patch)
tree156b5d18ed873051c11fbae2052ce80b5da22b92
parentccf90aa0e4b02158705f3f0858b70aa5b16c53ed (diff)
examples: Show off usage of "background" part
See bg_cxx_example_01
-rw-r--r--src/examples/elementary/bg_cxx_example_01.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/examples/elementary/bg_cxx_example_01.cc b/src/examples/elementary/bg_cxx_example_01.cc
index c852b07c90..7e0724c3ca 100644
--- a/src/examples/elementary/bg_cxx_example_01.cc
+++ b/src/examples/elementary/bg_cxx_example_01.cc
@@ -1,3 +1,4 @@
1#define EFL_CXXPERIMENTAL // for background part
1#include <Elementary.hh> 2#include <Elementary.hh>
2 3
3using efl::eo::instantiate; 4using efl::eo::instantiate;
@@ -9,12 +10,7 @@ elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
9 win.text_set("Window Background"); 10 win.text_set("Window Background");
10 win.autohide_set(true); 11 win.autohide_set(true);
11 win.size_set({320,320}); 12 win.size_set({320,320});
12 try { 13 win.background().color_set(139, 69, 19, 255);
13 auto bg = efl::eo::downcast<efl::ui::win::Part>(win.part("background"));
14 bg.color_set(139, 69, 19, 255);
15 } catch (std::exception const&e) {
16 std::cerr << "Failed to set bg color: " << e.what() << std::endl;
17 }
18 14
19 // Clean exit 15 // Clean exit
20 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 16 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);