#include <Ecore.h>
#include "ecore_private.h"
+#include "eo_internal.h"
#ifndef _WIN32
# include <sys/resource.h>
#define MY_CLASS EFL_APP_CLASS
+EFL_CLASS_SIMPLE_CLASS(efl_app, "Efl.App", EFL_APP_CLASS)
+
Efl_Version _app_efl_version = { 0, 0, 0, 0, NULL, NULL };
EOLIAN static Efl_App*
_efl_app_app_main_get(void)
{
if (_mainloop_singleton) return _mainloop_singleton;
- _mainloop_singleton = efl_add_ref(EFL_APP_CLASS, NULL);
+ _mainloop_singleton = efl_add_ref(efl_app_realized_class_get(), NULL);
_mainloop_singleton_data = efl_data_scope_get(_mainloop_singleton, EFL_LOOP_CLASS);
return _mainloop_singleton;
}
import efl_types;
-class @beta Efl.App extends Efl.Loop implements Efl.Core.Command_Line
+abstract @beta Efl.App extends Efl.Loop implements Efl.Core.Command_Line
{
[[Object representing the application itself]]
data: null;
initialization: bool; [[Set to $true when the program should initialize its internal state. This happen once per process instance.]]
}
-class @beta Efl.Loop extends Efl.Task
+abstract @beta Efl.Loop extends Efl.Task
{
[[The Efl Main Loop
EAPI int ___efl_ref2_count(const Eo *obj_id);
EAPI void ___efl_ref2_reset(const Eo *obj_id);
+#define EFL_CLASS_SIMPLE_CLASS(FUNC, NAME, ABSTRACT_CLASS) \
+static const Efl_Class_Description FUNC ##_realized_class_desc = { \
+ EO_VERSION, \
+ #NAME"_Realized", \
+ EFL_CLASS_TYPE_REGULAR, \
+ 0, NULL, NULL, NULL \
+}; \
+EFL_DEFINE_CLASS(FUNC ##_realized_class_get, &FUNC ##_realized_class_desc, ABSTRACT_CLASS, NULL)
+
#undef EAPI
#define EAPI
#include <stdio.h>
#include <unistd.h>
+#include "eo_internal.h"
#define EFL_NOLEGACY_API_SUPPORT
#include <Efl_Core.h>
#include "efl_app_suite.h"
efl_loop_iterate(data);
}
+EFL_CLASS_SIMPLE_CLASS(efl_loop, "Efl.Loop", EFL_LOOP_CLASS)
+
EFL_START_TEST(efl_app_test_efl_loop_concentric)
{
Eo *loop, *loop2, *timer, *timer2;
int exitcode;
loop = efl_main_loop_get();
- loop2 = efl_add(EFL_LOOP_CLASS, loop);
+ loop2 = efl_add(efl_loop_realized_class_get(), loop);
efl_event_callback_add(loop, EFL_LOOP_EVENT_IDLE, loop_idle, loop2);
efl_event_callback_add(loop, EFL_LOOP_EVENT_IDLE_ENTER, loop_idle_enter, NULL);
timer = efl_add(EFL_LOOP_TIMER_CLASS, loop2,
public static void idle_event()
{
- Efl.Loop loop = new Efl.Loop();
+ Efl.Loop loop = Efl.App.AppMain;
loop.SetName("loop");
TestEoEvents listener = new TestEoEvents();
listener.loop = loop;
#include <Elementary.h>
#include <Efl_Ui.h>
#include <check.h>
+#include "eo_internal.h"
#include "../efl_check.h"
#include "elm_widget.h"
efl_key_data_set(ev->object, "timer", NULL);
}
+EFL_CLASS_SIMPLE_CLASS(efl_loop, "Efl.Loop", EFL_LOOP_CLASS)
+
static Evas_Object *
_elm_suite_win_create()
{
else
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC));
if (!buffer) return win;
- loop = efl_add(EFL_LOOP_CLASS, win);
+ loop = efl_add(efl_loop_realized_class_get(), win);
timer = efl_add(EFL_LOOP_TIMER_CLASS, loop,
efl_loop_timer_interval_set(efl_added, BUFFER_RENDER_INTERVAL),
efl_event_freeze(efl_added),