summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-09-16 19:10:40 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-16 19:10:40 -0300
commit996ad5b8b64faf63192d3e661b448f1cb5842470 (patch)
tree7e424c3485385ce44d417dcd48188f45b813220b
parent928d5dc0aa5349096088f1c30c427599be32b3d1 (diff)
examples: Add extern "C" guards to C++ example.
-rw-r--r--src/examples/box_cxx_example_02.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/examples/box_cxx_example_02.cc b/src/examples/box_cxx_example_02.cc
index 676a1546f..28950f4d6 100644
--- a/src/examples/box_cxx_example_02.cc
+++ b/src/examples/box_cxx_example_02.cc
@@ -1,6 +1,10 @@
1//Compile with: 1//Compile with:
2//gcc -g box_example_02.c -o box_example_02 `pkg-config --cflags --libs elementary` 2//gcc -g box_example_02.c -o box_example_02 `pkg-config --cflags --libs elementary`
3 3
4
5extern "C"
6{
7
4#ifdef HAVE_CONFIG_H 8#ifdef HAVE_CONFIG_H
5# include <elementary_config.h> 9# include <elementary_config.h>
6#endif 10#endif
@@ -16,8 +20,6 @@
16#define ELM_INTERFACE_ATSPI_IMAGE_PROTECTED 20#define ELM_INTERFACE_ATSPI_IMAGE_PROTECTED
17#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 21#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
18 22
19#include <iostream>
20
21#include <Elementary.h> 23#include <Elementary.h>
22 24
23#include <Eo.h> 25#include <Eo.h>
@@ -30,6 +32,9 @@
30 32
31#include "elm_interface_atspi_widget_action.h" 33#include "elm_interface_atspi_widget_action.h"
32#include "elm_interface_atspi_widget_action.eo.h" 34#include "elm_interface_atspi_widget_action.eo.h"
35}
36
37#include <iostream>
33 38
34#include <elm_win.eo.hh> 39#include <elm_win.eo.hh>
35#include <elm_box.eo.hh> 40#include <elm_box.eo.hh>
@@ -122,7 +127,7 @@ elm_main(int argc, char *argv[])
122 { 127 {
123 elm_button btn ( efl::eo::parent = *box ); 128 elm_button btn ( efl::eo::parent = *box );
124 btn.text_set("elm.text", "I do nothing"); 129 btn.text_set("elm.text", "I do nothing");
125 efl::eina::list<evas::object> childrens = box->children_get(); 130 efl::eina::list<evas::object> childrens(box->children_get());
126 if (!childrens.empty()) 131 if (!childrens.empty())
127 { 132 {
128 box->pack_after(btn, childrens.front()); 133 box->pack_after(btn, childrens.front());