examples: Add extern "C" guards to C++ example.

This commit is contained in:
Savio Sena 2014-09-16 19:10:40 -03:00
parent 10c7b71435
commit 08275af33f
1 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,10 @@
//Compile with:
//gcc -g box_example_02.c -o box_example_02 `pkg-config --cflags --libs elementary`
extern "C"
{
#ifdef HAVE_CONFIG_H
# include <elementary_config.h>
#endif
@ -16,8 +20,6 @@
#define ELM_INTERFACE_ATSPI_IMAGE_PROTECTED
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#include <iostream>
#include <Elementary.h>
#include <Eo.h>
@ -30,6 +32,9 @@
#include "elm_interface_atspi_widget_action.h"
#include "elm_interface_atspi_widget_action.eo.h"
}
#include <iostream>
#include <elm_win.eo.hh>
#include <elm_box.eo.hh>
@ -122,7 +127,7 @@ elm_main(int argc, char *argv[])
{
elm_button btn ( efl::eo::parent = *box );
btn.text_set("elm.text", "I do nothing");
efl::eina::list<evas::object> childrens = box->children_get();
efl::eina::list<evas::object> childrens(box->children_get());
if (!childrens.empty())
{
box->pack_after(btn, childrens.front());