summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuciana Magno de Almeida <luciana@expertisesolutions.com.br>2014-12-16 10:56:18 -0200
committerLarry Jr <larry.olj@gmail.com>2015-03-19 15:34:51 -0300
commit209cd09036d4e84ba71a61282c25eb1aba51c25b (patch)
treeb421f4075a39ad2f0d01300c536bfdcb289dc687
parentfcfc481eefadca7a098089d4857a60f62870cf48 (diff)
cxx: Added bg_cxx_example_01.cc C++ example
-rw-r--r--src/examples/Makefile.am14
-rw-r--r--src/examples/bg_cxx_example_01.cc49
2 files changed, 58 insertions, 5 deletions
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index dc100db38..23d09bee8 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -21,6 +21,10 @@ AM_CPPFLAGS = \
21-DPACKAGE_LIB_DIR=\"$(libdir)\" \ 21-DPACKAGE_LIB_DIR=\"$(libdir)\" \
22@ELEMENTARY_CFLAGS@ 22@ELEMENTARY_CFLAGS@
23 23
24AM_CXXFLAGS = \
25@ELEMENTARY_CFLAGS@ \
26@ELEMENTARY_CXX_CFLAGS@
27
24LDADD = \ 28LDADD = \
25@ELEMENTARY_LIBS@ \ 29@ELEMENTARY_LIBS@ \
26$(top_builddir)/src/lib/libelementary.la 30$(top_builddir)/src/lib/libelementary.la
@@ -144,7 +148,8 @@ track_example_01.c
144 148
145if HAVE_CXX11 149if HAVE_CXX11
146SRCS += \ 150SRCS += \
147box_cxx_example_02.cc 151box_cxx_example_02.cc \
152bg_cxx_example_01.cc
148endif 153endif
149 154
150.edc.edj: 155.edc.edj:
@@ -293,7 +298,8 @@ track_example_01
293 298
294if HAVE_CXX11 299if HAVE_CXX11
295examples_PROGRAMS += \ 300examples_PROGRAMS += \
296box_cxx_example_02 301box_cxx_example_02 \
302bg_cxx_example_01
297endif 303endif
298 304
299if ELEMENTARY_WINDOWS_BUILD 305if ELEMENTARY_WINDOWS_BUILD
@@ -310,9 +316,7 @@ endif
310 316
311if HAVE_CXX11 317if HAVE_CXX11
312box_cxx_example_02_SOURCES = box_cxx_example_02.cc 318box_cxx_example_02_SOURCES = box_cxx_example_02.cc
313box_cxx_example_02_CXXFLAGS = \ 319bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
314@ELEMENTARY_CFLAGS@ \
315@ELEMENTARY_CXX_CFLAGS@
316endif 320endif
317 321
318# This variable will hold the list of screenshots that will be made 322# This variable will hold the list of screenshots that will be made
diff --git a/src/examples/bg_cxx_example_01.cc b/src/examples/bg_cxx_example_01.cc
new file mode 100644
index 000000000..0ea455b36
--- /dev/null
+++ b/src/examples/bg_cxx_example_01.cc
@@ -0,0 +1,49 @@
1extern "C"
2{
3#ifdef HAVE_CONFIG_H
4# include <elementary_config.h>
5#endif
6
7#define ELM_INTERNAL_API_ARGESFSDFEFC
8#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
9#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
10#define ELM_INTERFACE_ATSPI_ACTION_PROTECTED
11#define ELM_INTERFACE_ATSPI_VALUE_PROTECTED
12#define ELM_INTERFACE_ATSPI_EDITABLE_TEXT_PROTECTED
13#define ELM_INTERFACE_ATSPI_TEXT_PROTECTED
14#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
15#define ELM_INTERFACE_ATSPI_IMAGE_PROTECTED
16#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
17
18#include <Eo.h>
19#include <Evas.h>
20#include <Elementary.h>
21#include <elm_widget.h>
22
23#include "elm_interface_atspi_accessible.h"
24#include "elm_interface_atspi_widget_action.h"
25#include "elm_interface_atspi_text.h"
26#include "elm_interface_scrollable.h"
27}
28
29#include <Elementary.hh>
30
31//#include <elm_win.eo.hh>
32
33#include <Eina.hh>
34
35EAPI_MAIN int
36elm_main (int argc, char *argv[])
37{
38 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
39 ::elm_win win(elm_win_util_standard_add("bg-plain", "Bg Plain"));
40 win.autohide_set(true);
41
42 win.size_set(320,320);
43 win.visibility_set(true);
44
45 elm_run();
46
47 return 0;
48}
49ELM_MAIN()