* ecore: Move ecore_job inside ecore.

Patch from Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>.


SVN revision: 45570
This commit is contained in:
Cedric BAIL 2010-01-25 21:59:21 +00:00
parent 0e0534c564
commit 44193541f7
21 changed files with 38 additions and 217 deletions

View File

@ -72,7 +72,6 @@ EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN \
ecore-imf.pc.in \
ecore-imf-evas.pc.in \
ecore-ipc.pc.in \
ecore-job.pc.in \
ecore-txt.pc.in \
ecore-x.pc.in \
ecore-win32.pc.in \
@ -129,10 +128,6 @@ if BUILD_ECORE_IPC
pkgconfig_DATA += ecore-ipc.pc
endif
if BUILD_ECORE_JOB
pkgconfig_DATA += ecore-job.pc
endif
if BUILD_ECORE_TXT
pkgconfig_DATA += ecore-txt.pc
endif

View File

@ -47,7 +47,6 @@ case "$host_os" in
ecore_input_release_info="-release $release"
ecore_input_evas_release_info="-release $release"
ecore_ipc_release_info="-release $release"
ecore_job_release_info="-release $release"
ecore_quartz_release_info="-release $release"
ecore_release_info="-release $release"
ecore_sdl_release_info="-release $release"
@ -67,7 +66,6 @@ AC_SUBST(ecore_imf_release_info)
AC_SUBST(ecore_input_release_info)
AC_SUBST(ecore_input_evas_release_info)
AC_SUBST(ecore_ipc_release_info)
AC_SUBST(ecore_job_release_info)
AC_SUBST(ecore_quartz_release_info)
AC_SUBST(ecore_release_info)
AC_SUBST(ecore_sdl_release_info)
@ -96,7 +94,6 @@ want_tslib="no"
want_glib="no"
# core modules
want_ecore_job="yes"
want_ecore_txt="yes"
want_ecore_con="no"
want_ecore_ipc="no"
@ -206,7 +203,6 @@ requirements_ecore_imf_evas=""
requirements_ecore_input=""
requirements_ecore_input_evas=""
requirements_ecore_ipc=""
requirements_ecore_job=""
requirements_ecore_quartz=""
requirements_ecore_sdl=""
requirements_ecore_txt=""
@ -302,10 +298,8 @@ case "$host_os" in
requirements_ecore_file="evil ${requirements_ecore_file}"
requirements_ecore_imf="evil ${requirements_ecore_imf}"
requirements_ecore_imf_evas="evil ${requirements_ecore_imf_evas}"
requirements_ecore_job="evil ${requirements_ecore_job}"
requirements_ecore_txt="evil ${requirements_ecore_txt}"
EFL_ECORE_BUILD="-DEFL_ECORE_BUILD"
EFL_ECORE_JOB_BUILD="-DEFL_ECORE_JOB_BUILD"
EFL_ECORE_TXT_BUILD="-DEFL_ECORE_TXT_BUILD"
EFL_ECORE_FILE_BUILD="-DEFL_ECORE_FILE_BUILD"
EFL_ECORE_EVAS_BUILD="-DEFL_ECORE_EVAS_BUILD"
@ -332,7 +326,6 @@ case "$host_os" in
esac
AC_SUBST(EFL_ECORE_BUILD)
AC_SUBST(EFL_ECORE_JOB_BUILD)
AC_SUBST(EFL_ECORE_TXT_BUILD)
AC_SUBST(EFL_ECORE_FILE_BUILD)
AC_SUBST(EFL_ECORE_EVAS_BUILD)
@ -378,7 +371,6 @@ requirements_ecore_imf_evas="ecore eina-0 ${requirements_ecore_imf_evas}"
requirements_ecore_input="ecore eina-0 ${requirements_ecore_input}"
requirements_ecore_input_evas="ecore eina-0 ${requirements_ecore_input_evas}"
requirements_ecore_ipc="ecore eina-0 ${requirements_ecore_ipc}"
requirements_ecore_job="ecore eina-0 ${requirements_ecore_job}"
requirements_ecore_quartz="ecore eina-0 ${requirements_ecore_quartz}"
requirements_ecore_sdl="ecore eina-0 ${requirements_ecore_sdl}"
requirements_ecore_win32="ecore eina-0 ${requirements_ecore_win32}"
@ -799,9 +791,6 @@ fi
## Core modules
# ecore_job
ECORE_CHECK_MODULE([Job], [${want_ecore_job}])
# ecore_txt
ECORE_CHECK_MODULE([Txt], [${want_ecore_txt}], [$have_iconv])
@ -1139,7 +1128,6 @@ AC_SUBST(requirements_ecore_imf_evas)
AC_SUBST(requirements_ecore_input)
AC_SUBST(requirements_ecore_input_evas)
AC_SUBST(requirements_ecore_ipc)
AC_SUBST(requirements_ecore_job)
AC_SUBST(requirements_ecore_quartz)
AC_SUBST(requirements_ecore_sdl)
AC_SUBST(requirements_ecore_txt)
@ -1158,7 +1146,6 @@ ecore-file.pc
ecore-imf.pc
ecore-imf-evas.pc
ecore-ipc.pc
ecore-job.pc
ecore-txt.pc
ecore-x.pc
ecore-input.pc
@ -1174,7 +1161,6 @@ src/Makefile
src/bin/Makefile
src/lib/Makefile
src/lib/ecore/Makefile
src/lib/ecore_job/Makefile
src/lib/ecore_x/Makefile
src/lib/ecore_x/xlib/Makefile
src/lib/ecore_x/xcb/Makefile
@ -1209,7 +1195,6 @@ echo
echo " Ecore........................: always"
echo " Thread support.............: $have_pthread"
echo " GLib support...............: $have_glib"
echo " Ecore_Job....................: $have_ecore_job"
echo " Ecore_Txt....................: $have_ecore_txt"
echo " Ecore_Con....................: $have_ecore_con"
if test "x$have_ecore_con" = "xyes" ; then

View File

@ -119,18 +119,6 @@ Description: Ecore inter-process communication functions
.
This package contains the Ecore inter-process communication functions.
Package: libecore-job-svn-01
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Ecore job dealing functions
This is the core event abstraction layer and X abstraction layer that makes
doing selections, Xdnd, general X stuff, and event loops, timeouts and idle
handlers fast, optimized, and convenient. It's a separate library so anyone
can make use of the work put into Ecore to make this job easy for
applications.
.
This package contains functions for dealing with Ecore jobs.
Package: libecore-txt-svn-01
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
@ -169,7 +157,6 @@ Depends: ${misc:Depends}, libecore-svn-01 (= ${binary:Version}),
libecore-imf-svn-01 (= ${binary:Version}),
libecore-input-svn-01 (= ${binary:Version}),
libecore-ipc-svn-01 (= ${binary:Version}),
libecore-job-svn-01 (= ${binary:Version}),
libecore-txt-svn-01 (= ${binary:Version}),
libecore-x-svn-01 (= ${binary:Version}),
libeet-dev, libevas-dev (>= 0.9.9.060), libeina-dev, pkg-config,

View File

@ -10,7 +10,6 @@ debian/tmp/usr/lib/libecore_imf_evas.so
debian/tmp/usr/lib/libecore_imf.so
debian/tmp/usr/lib/libecore_input.so
debian/tmp/usr/lib/libecore_ipc.so
debian/tmp/usr/lib/libecore_job.so
debian/tmp/usr/lib/libecore_txt.so
debian/tmp/usr/lib/libecore_x.so
debian/tmp/usr/lib/pkgconfig/ecore*.pc

View File

@ -1 +0,0 @@
debian/tmp/usr/lib/libecore_job-*.so.*

View File

@ -1 +0,0 @@
libecore_job-ver-pre-svn-01 0 libecore-job-svn-01 (>= 0.9.9.060+svnYYYYMMDD)

View File

@ -4,7 +4,6 @@ SUBDIRS = \
ecore \
ecore_input \
ecore_input_evas \
ecore_job \
ecore_txt \
ecore_fb \
ecore_directfb \

View File

@ -145,6 +145,8 @@ extern "C" {
typedef struct _Ecore_Exe_Event_Data Ecore_Exe_Event_Data; /**< Data from a child process */
typedef struct _Ecore_Thread Ecore_Thread;
typedef struct _Ecore_Job Ecore_Job; /**< A job handle */
struct _Ecore_Event_Signal_User /** User signal event */
{
int number; /**< The signal number. Either 1 or 2 */
@ -336,6 +338,8 @@ extern "C" {
EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, int (*func) (void *data), const void *data);
EAPI void *ecore_poller_del(Ecore_Poller *poller);
EAPI Ecore_Job *ecore_job_add(void (*func) (void *data), const void *data);
EAPI void *ecore_job_del(Ecore_Job *job);
#ifdef __cplusplus
}

View File

@ -20,6 +20,7 @@ ecore_hash.c \
ecore_idle_enterer.c \
ecore_idle_exiter.c \
ecore_idler.c \
ecore_job.c \
ecore_list.c \
ecore_main.c \
ecore_path.c \

View File

@ -99,6 +99,7 @@ ecore_init(void)
_ecore_exe_init();
_ecore_thread_init();
_ecore_glib_init();
_ecore_job_init();
_ecore_loop_time = ecore_time_get();
return _ecore_init_count;
@ -132,6 +133,7 @@ ecore_shutdown(void)
_ecore_poller_shutdown();
_ecore_animator_shutdown();
_ecore_glib_shutdown();
_ecore_job_shutdown();
_ecore_thread_shutdown();
_ecore_exe_shutdown();
_ecore_idle_enterer_shutdown();

View File

@ -10,50 +10,33 @@
#include "Ecore.h"
#include "ecore_private.h"
#include "ecore_job_private.h"
#include "Ecore_Job.h"
int _ecore_job_log_dom = -1;
static int _ecore_job_event_handler(void *data, int type, void *ev);
static void _ecore_job_event_free(void *data, void *ev);
static int ecore_event_job_type = 0;
static int _ecore_job_init_count = 0;
static Ecore_Event_Handler* _ecore_job_handler = NULL;
EAPI int
ecore_job_init(void)
struct _Ecore_Job
{
if (++_ecore_job_init_count != 1)
return _ecore_job_init_count;
_ecore_job_log_dom = eina_log_domain_register("EcoreJob", ECORE_JOB_DEFAULT_LOG_COLOR);
if(_ecore_job_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the Ecore Job module.");
return _ecore_job_init_count--;
}
if (!ecore_init())
return --_ecore_job_init_count;
ECORE_MAGIC;
Ecore_Event *event;
void (*func) (void *data);
void *data;
};
void
_ecore_job_init(void)
{
ecore_event_job_type = ecore_event_type_new();
_ecore_job_handler = ecore_event_handler_add(ecore_event_job_type, _ecore_job_event_handler, NULL);
return _ecore_job_init_count;
}
EAPI int
ecore_job_shutdown(void)
void
_ecore_job_shutdown(void)
{
if (--_ecore_job_init_count != 0)
return _ecore_job_init_count;
ecore_event_handler_del(_ecore_job_handler);
_ecore_job_handler = NULL;
eina_log_domain_unregister(_ecore_job_log_dom);
_ecore_job_log_dom = -1;
ecore_shutdown();
return _ecore_job_init_count;
}
/**

View File

@ -73,6 +73,7 @@ extern int _ecore_log_dom ;
#define ECORE_MAGIC_POLLER 0xf7568127
#define ECORE_MAGIC_PIPE 0xf7458226
#define ECORE_MAGIC_WIN32_HANDLER 0xf7e8f1a3
#define ECORE_MAGIC_JOB 0x76543210
#define ECORE_MAGIC Ecore_Magic __magic
@ -190,6 +191,9 @@ void _ecore_thread_shutdown(void);
void _ecore_glib_init(void);
void _ecore_glib_shutdown(void);
void _ecore_job_init(void);
void _ecore_job_shutdown(void);
extern int _ecore_fps_debug;
extern double _ecore_loop_time;

View File

@ -1,56 +0,0 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifndef _ECORE_JOB_H
#define _ECORE_JOB_H
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef EFL_ECORE_JOB_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif /* ! EFL_ECORE_JOB_BUILD */
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif /* ! _WIN32 */
/**
* @file
* @brief Functions for dealing with Ecore jobs.
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ECORE_JOB_PRIVATE_H
typedef void Ecore_Job; /**< A job handle */
#endif
EAPI int ecore_job_init(void);
EAPI int ecore_job_shutdown(void);
EAPI Ecore_Job *ecore_job_add(void (*func) (void *data), const void *data);
EAPI void *ecore_job_del(Ecore_Job *job);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,30 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib/ecore \
-I$(top_builddir)/src/lib/ecore \
@EFL_ECORE_JOB_BUILD@ \
@EVIL_CFLAGS@ \
@EINA_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
if BUILD_ECORE_JOB
lib_LTLIBRARIES = libecore_job.la
include_HEADERS = \
Ecore_Job.h
libecore_job_la_SOURCES = \
ecore_job.c
libecore_job_la_LIBADD = \
$(top_builddir)/src/lib/ecore/libecore.la \
@EINA_LIBS@ \
@EVIL_LIBS@
libecore_job_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_job_release_info@
endif
EXTRA_DIST = ecore_job_private.h

View File

@ -1,47 +0,0 @@
#ifndef _ECORE_JOB_PRIVATE_H
#define _ECORE_JOB_PRIVATE_H
#define ECORE_MAGIC_JOB 0x76543210
extern int _ecore_job_log_dom;
#ifdef ECORE_JOB_DEFAULT_LOG_COLOR
# undef ECORE_JOB_DEFAULT_LOG_COLOR
#endif
#define ECORE_JOB_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
#ifdef ERR
# undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_ecore_job_log_dom, __VA_ARGS__)
#ifdef DBG
# undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_ecore_job_log_dom, __VA_ARGS__)
#ifdef INF
# undef INF
#endif
#define INF(...) EINA_LOG_DOM_INFO(_ecore_job_log_dom, __VA_ARGS__)
#ifdef WRN
# undef WRN
#endif
#define WRN(...) EINA_LOG_DOM_WARN(_ecore_job_log_dom, __VA_ARGS__)
#ifdef CRIT
# undef CRIT
#endif
#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_job_log_dom, __VA_ARGS__)
typedef struct _Ecore_Job Ecore_Job;
struct _Ecore_Job
{
ECORE_MAGIC;
Ecore_Event *event;
void (*func) (void *data);
void *data;
};
#endif

View File

@ -216,7 +216,6 @@ PKG_CHECK_MODULES([EDJE],
eet >= 1.2.3
evas >= 0.9.9
ecore >= 0.9.9
ecore-job >= 0.9.9
ecore-file >= 0.9.9
embryo >= 0.9.1
])
@ -224,7 +223,7 @@ PKG_CHECK_MODULES([EDJE],
EDJE_LIBS="$EDJE_LIBS $LUA_LIBS"
EDJE_CFLAGS="$EDJE_CFLAGS $LUA_CFLAGS"
requirement_edje="embryo ecore-job ecore evas eet eina-0 ${requirement_edje}"
requirement_edje="embryo ecore evas eet eina-0 ${requirement_edje}"
requirement_edje="${requirement_lua} ${requirement_edje}"
have_ecore_imf="no"

View File

@ -34,13 +34,13 @@ Eina_Mempool *_edje_real_part_state_mp = NULL;
*
* This function initializes the ejde library, making the propers
* calls to initialization functions. It makes calls to functions
* eina_init(), ecore_job_init(), embryo_init() and eet_init() so
* eina_init(), ecore_init(), embryo_init() and eet_init() so
* there is no need to call those functions again in your code. To
* shutdown edje there is a function edje_shutdown().
*
* @see edje_shutdown()
* @see eina_init()
* @see ecore_job_init()
* @see ecore_init()
* @see embryo_init()
* @see eet_init()
*
@ -67,16 +67,16 @@ edje_init(void)
goto shutdown_eina;
}
if (!ecore_job_init())
if (!ecore_init())
{
ERR("Edje: Ecore_Job init failed");
ERR("Edje: Ecore init failed");
goto unregister_log_domain;
}
if (!embryo_init())
{
ERR("Edje: Embryo init failed");
goto shutdown_ecore_job;
goto shutdown_ecore;
}
if (!eet_init())
@ -131,8 +131,8 @@ edje_init(void)
eet_shutdown();
shutdown_embryo:
embryo_shutdown();
shutdown_ecore_job:
ecore_job_shutdown();
shutdown_ecore:
ecore_shutdown();
unregister_log_domain:
eina_log_domain_unregister(_edje_default_log_dom);
_edje_default_log_dom = -1;
@ -148,13 +148,13 @@ edje_init(void)
* shutdown.
*
* This function shuts down the edje library. It calls the functions
* eina_shutdown(), ecore_job_shutdown(), embryo_shutdown() and
* eina_shutdown(), ecore_shutdown(), embryo_shutdown() and
* eet_shutdown(), so there is no need to call these functions again
* in your code.
*
* @see edje_init()
* @see eina_shutdown()
* @see ecore_job_shutdown()
* @see ecore_shutdown()
* @see embryo_shutdown()
* @see eet_shutdown()
*
@ -190,7 +190,7 @@ edje_shutdown(void)
eet_shutdown();
embryo_shutdown();
ecore_job_shutdown();
ecore_shutdown();
eina_log_domain_unregister(_edje_default_log_dom);
_edje_default_log_dom = -1;
eina_shutdown();

View File

@ -13,7 +13,6 @@
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Str.h>
#include <Ecore_Job.h>
#ifdef HAVE_ECORE_IMF
# include <Ecore_IMF.h>
#endif

View File

@ -79,8 +79,8 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
### Checks for libraries
PKG_CHECK_MODULES(EMOTION, [eina-0 evas >= 0.9.9 ecore >= 0.9.9 ecore-job >= 0.9.9])
requirement_emotion="ecore-job ecore evas eina-0"
PKG_CHECK_MODULES(EMOTION, [eina-0 evas >= 0.9.9 ecore >= 0.9.9])
requirement_emotion="ecore evas eina-0"
PKG_CHECK_MODULES(EMOTION_BIN, [evas >= 0.9.9 ecore >= 0.9.9 ecore-evas >= 0.9.9 edje >= 0.5.0])

View File

@ -11,7 +11,6 @@
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Job.h>
#include <Ecore_Str.h>
#include <Emotion.h>

View File

@ -227,7 +227,7 @@ emotion_object_init(Evas_Object *obj, const char *module_filename)
sd->seek_pos = 0;
sd->len = 0;
ecore_job_init();
ecore_init();
if ((!sd->module) || (!sd->video))
{
@ -1313,7 +1313,7 @@ _smart_del(Evas_Object * obj)
free(sd->ref.file);
free(sd);
ecore_job_shutdown();
ecore_shutdown();
}
static void