From bd5c1f72407c23f87f72556f5a3fe1b2cdcc079d Mon Sep 17 00:00:00 2001 From: Felipe Magno de Almeida Date: Thu, 21 Apr 2016 14:58:40 -0300 Subject: [PATCH] eolian-cxx: Remove deprecated examples Removed deprecated and non-compilable examples for C++ using Evas. Users should look into C++ Elementary's examples instead. --- src/examples/eolian_cxx/Makefile.am | 10 +- .../eolian_cxx/eolian_cxx_complex_types_01.cc | 126 ------------------ .../eolian_cxx/eolian_cxx_eo_events_01.cc | 109 --------------- 3 files changed, 1 insertion(+), 244 deletions(-) delete mode 100644 src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc delete mode 100644 src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc diff --git a/src/examples/eolian_cxx/Makefile.am b/src/examples/eolian_cxx/Makefile.am index ebc13c28dd..26e3e4b0de 100644 --- a/src/examples/eolian_cxx/Makefile.am +++ b/src/examples/eolian_cxx/Makefile.am @@ -97,17 +97,13 @@ SRCS = \ eolian_cxx_simple_01.cc \ eolian_cxx_inherit_01.cc \ eolian_cxx_callbacks_01.cc \ - eolian_cxx_eo_events_01.cc \ - eolian_cxx_complex_types_01.cc \ $(IMPL) EXTRA_PROGRAMS = \ eolian_cxx_simple_01 \ eolian_cxx_simple_01_cxx_impl \ eolian_cxx_inherit_01 \ - eolian_cxx_callbacks_01 \ - eolian_cxx_eo_events_01 \ - eolian_cxx_complex_types_01 + eolian_cxx_callbacks_01 DATA_FILES = Makefile.examples $(ECXX_EXAMPLE_EOS) EXTRA_DIST = $(DATA_FILES) @@ -136,10 +132,6 @@ eolian_cxx_inherit_01.$(OBJEXT): $(GENERATED) eolian_cxx_callbacks_01_SOURCES = eolian_cxx_callbacks_01.cc -eolian_cxx_eo_events_01_SOURCES = eolian_cxx_eo_events_01.cc - -eolian_cxx_complex_types_01_SOURCES = eolian_cxx_complex_types_01.cc - %.eo.hh: %.eo $(AM_V_EOLCXX)$(EOLIAN_CXX) $(EOLIAN_FLAGS) -I${abs_srcdir} -o $@ $< diff --git a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc deleted file mode 100644 index 04ed7fe62f..0000000000 --- a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc +++ /dev/null @@ -1,126 +0,0 @@ -#include -#include -#include -#include - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include - -#warning TEST CASE DISABLED: EVAS TYPES NO MORE IN EO API - -#if 0 -#include -#include -#include -#include -#include - -namespace efl { namespace evas { // XXX only while we don't have namespaces in EFL -using ::evas::canvas; -using ::evas::object; -using ::evas::text; -using ::evas::grid; -using ::evas::rectangle; -using ::evas::common_interface; -using ::evas::zoomable_interface; -} } - -namespace { - -// EFL Ecore-Evas doesn't have C++ bindings yet. -Ecore_Evas *ee; -void -_ecore_evas_init() -{ - if (!ee) - { - ::ecore_evas_init(); - ::evas_init(); - ee = ::ecore_evas_new(NULL, 0, 0, 500, 380, NULL); - ::ecore_evas_show(ee); - } -} -void -_ecore_evas_shutdown() -{ - if (ee) - { - ::ecore_evas_free(ee); - ::ecore_evas_shutdown(); - ee = NULL; - } -} - -} - -void -example_complex_types() -{ - _ecore_evas_init(); - efl::evas::canvas canvas(::eo_ref(::ecore_evas_get(ee))); - - efl::evas::rectangle bg(efl::eo::parent = canvas); - bg.color_set(255, 255, 255, 255); - bg.position_set(0, 0); - bg.size_set(500, 250); - bg.visible_set(true); - - efl::evas::grid grid(efl::eo::parent = canvas); - grid.position_set(0, 0); - grid.object_smart::color_set(0, 0, 0, 255); - grid.size_set(5, 5); - grid.visible_set(true); - - efl::evas::text text1(efl::eo::parent = canvas); - text1.style_set(EVAS_TEXT_STYLE_OUTLINE); - text1.color_set(255, 0, 0, 255); - text1.font_set("DejaVu", 32); - text1.text_set("EFL++ Examples"); - text1.visible_set(true); - int t1w, t1h; - text1.size_get(&t1w, &t1h); - grid.pack(text1, 1, 1, t1w, t1h); - - efl::evas::text text2(efl::eo::parent = canvas); - text2.style_set(EVAS_TEXT_STYLE_PLAIN); - text2.color_set(0, 120, 0, 255); - text2.position_set(t1w+50, t1h+50); - text2.font_set("Courier", 16); - std::stringstream ss; - ss << "version " << EFL_VERSION_MAJOR << "." << EFL_VERSION_MINOR; - text2.text_set(ss.str().c_str()); - text2.visible_set(true); - int t2w, t2h; - text2.size_get(&t2w, &t2h); - - canvas.render(); - ::ecore_main_loop_begin(); - _ecore_evas_shutdown(); -} - -int main() -{ - efl::eina::eina_init eina_; - efl::eo::eo_init eo_; - efl::ecore::ecore_init ecore_; - - std::cerr << "[+] Running ELF++ example: Complex Types" << std::endl; - example_complex_types(); - - return 0; -} -#else -int main() { abort(); } -#endif - diff --git a/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc b/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc deleted file mode 100644 index 2ecdb03628..0000000000 --- a/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc +++ /dev/null @@ -1,109 +0,0 @@ -#include -#include -#include -#include - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include - -#warning TEST CASE DISABLED: EVAS TYPES NO MORE IN EO API - -#if 0 -#include -#include -#include -#include - -namespace efl { namespace evas { -using ::evas::canvas; -using ::evas::object; -using ::evas::text; -using ::evas::grid; -using ::evas::rectangle; -using ::evas::common_interface; -using ::evas::zoomable_interface; -} } - -namespace { - -// XXX Ecore-Evas is not binded yet. -Ecore_Evas *ee; -void -_ecore_evas_init() -{ - if (!ee) - { - ::ecore_evas_init(); - ::evas_init(); - ee = ::ecore_evas_new(NULL, 0, 0, 500, 380, NULL); - ::ecore_evas_show(ee); - } -} -void -_ecore_evas_shutdown() -{ - if (ee) - { - ::ecore_evas_free(ee); - ::ecore_evas_shutdown(); - ee = NULL; - } -} - -} - -void -example_complex_types() -{ - _ecore_evas_init(); - - { - efl::evas::canvas canvas(::eo_ref(::ecore_evas_get(ee))); - - efl::evas::rectangle bg(efl::eo::parent = canvas); - bg.color_set(255, 255, 255, 255); - bg.position_set(0, 0); - bg.size_set(500, 250); - bg.visible_set(true); - - efl::eo::signal_connection conn = - bg.callback_mouse_down_add - ([] (efl::evas::object obj EINA_UNUSED, Eo_Event_Description const& desc EINA_UNUSED, void* info EINA_UNUSED) - { - std::cout << "evas::box::mouse_down" << std::endl; - return EO_CALLBACK_CONTINUE; - }); - - canvas.render(); - } - - ::ecore_main_loop_begin(); - _ecore_evas_shutdown(); -} - -int main() -{ - efl::eina::eina_init eina_; - efl::eo::eo_init eo_; - efl::ecore::ecore_init ecore_; - - std::cerr << "[+] Running ELF++ example: Eo Events" << std::endl; - example_complex_types(); - - return 0; -} -#else -int main() { abort(); } -#endif -