forked from enlightenment/efl
cxx: Fix examples compilation.
Summary: - Changed beta methods guards from CLASS_NAME_GUARD to EFL_BETA_API_SUPPORT to use the same scheme as C. - Removed some includes to Efl_Ui.h from the examples. These were causing C's efl_part_get to not be generated due to EFL_PART_PROTECTED not being yet defined (it is defined in Elementary.hh, included afterwards). This was leading to Efl.Part.impl.hh trying to use a non-existent method. Fixes T7716 partially (missing stringshare issue) Test Plan: make examples Reviewers: stefan_schmidt, felipealmeida, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7716 Differential Revision: https://phab.enlightenment.org/D8284
This commit is contained in:
parent
26f46f88c9
commit
ee7f843834
|
@ -1,4 +1,5 @@
|
|||
#define EFL_CXXPERIMENTAL // for background part
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
|
||||
#include <Elementary.hh>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` button_cxx_example_00.cc -o button_cxx_example_00
|
||||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` button_cxx_example_01.cc -o button_cxx_example_01
|
||||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#include <Efl_Ui.h>
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` radio_cxx_example_01.cc -o radio_cxx_example_01
|
||||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#include <Efl_Ui.h>
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` slider_cxx_example.cc -o slider_cxx_example
|
||||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
|
||||
#include <Efl_Ui.h>
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#warning This example requires yet unfinished EO APIs
|
||||
|
||||
#include <Efl_Ui.h>
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
|
||||
EAPI int
|
||||
|
|
|
@ -44,8 +44,8 @@ struct function_declaration_generator
|
|||
}
|
||||
|
||||
if(f.is_beta &&
|
||||
!as_generator("#ifdef " << *(string << "_") << string << "_BETA\n")
|
||||
.generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
|
||||
!as_generator(lit("#ifdef EFL_BETA_API_SUPPORT\n"))
|
||||
.generate(sink, attributes::unused, ctx))
|
||||
return false;
|
||||
if(f.is_protected &&
|
||||
!as_generator("#ifdef " << *(string << "_") << string << "_PROTECTED\n")
|
||||
|
|
|
@ -50,8 +50,8 @@ struct function_definition_generator
|
|||
}
|
||||
|
||||
if(f.is_beta &&
|
||||
!as_generator("#ifdef " << *(string << "_") << string << "_BETA\n")
|
||||
.generate(sink, std::make_tuple(_klass_name.namespaces, _klass_name.eolian_name), add_upper_case_context(ctx)))
|
||||
!as_generator(lit("#ifdef EFL_BETA_API_SUPPORT\n"))
|
||||
.generate(sink, attributes::unused, ctx))
|
||||
return false;
|
||||
if(f.is_protected &&
|
||||
!as_generator("#ifdef " << *(string << "_") << string << "_PROTECTED\n")
|
||||
|
|
Loading…
Reference in New Issue