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
#ifdef _WIN32
# ifdef EFL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
# else
# define EAPI __declspec(dllimport)
# endif
# define EAPI_WEAK
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# define EAPI_WEAK __attribute__ ((weak))
# else
# define EAPI
# define EAPI_WEAK
# endif
# else
# define EAPI
# define EAPI_WEAK
# endif
#endif
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
27
28
29
30
31
32
33
34
35
36
use pEFL;
use pEFL::Elm;
pEFL::Elm::init($#ARGV, \@ARGV);
pEFL::Elm::policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
my $win = pEFL::Elm::Win->util_standard_add("hello", "Hello");
$win->smart_callback_add("delete,request",\&on_done, undef);
my $box = pEFL::Elm::Box->add($win);
$box->horizontal_set(1);
$win->resize_object_add($box);
$box->show();
my $lab = pEFL::Elm::Label->add($win);
$lab->text_set("Hello out there, World\n");
$box->pack_end($lab);
$lab->show();
my $btn = pEFL::Elm::Button->add($win);
$btn->text_set("OK");
$box->pack_end($btn);
$btn->show();
$btn->smart_callback_add("clicked", \&on_done, undef);
$win->show();
pEFL::Elm::run();
pEFL::Elm::shutdown();
sub on_done {
print "Exiting \n";
pEFL::Elm::exit();
}