summaryrefslogtreecommitdiff
path: root/src/examples/elementary/bg_cxx_example_01.cc
blob: 4c1368a9b988d778e685cc479ee514ce38dbb3a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#define EFL_CXXPERIMENTAL // for background part
#ifndef EFL_BETA_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Efl_Ui.hh>

using efl::eo::instantiate;

EAPI_MAIN int
elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   efl::ui::Win win(instantiate);
   win.text_set("Window Background");
   win.autohide_set(true);
   win.size_set({320,320});
   //win.background().color_set(139, 69, 19, 255);

   // Clean exit
   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
   efl::eolian::event_add(efl::ui::Win::delete_request_event, win,
                          std::bind([&](){ win = nullptr; }));

   elm_run();
   return 0;
}
ELM_MAIN()