2004-11-24 19:37:45 -08:00
|
|
|
#ifndef E_H
|
2011-07-25 02:40:18 -07:00
|
|
|
# define E_H
|
2004-11-24 19:37:45 -08:00
|
|
|
|
2017-07-14 15:44:23 -07:00
|
|
|
# define E_VERSION_MAJOR 22
|
2015-01-05 12:49:57 -08:00
|
|
|
|
2012-01-19 15:25:32 -08:00
|
|
|
/**
|
|
|
|
* @defgroup API Enlightenment API
|
|
|
|
*
|
|
|
|
* Application programming interface to be used by modules to extend
|
|
|
|
* Enlightenment.
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
# endif
|
2005-09-14 18:39:11 -07:00
|
|
|
|
2016-01-06 09:57:46 -08:00
|
|
|
#ifdef HAVE_WAYLAND
|
2020-04-17 12:20:50 -07:00
|
|
|
# ifndef EFL_EO_API_SUPPORT
|
|
|
|
# define EFL_EO_API_SUPPORT
|
|
|
|
# endif
|
|
|
|
# ifndef EFL_BETA_API_SUPPORT
|
|
|
|
# define EFL_BETA_API_SUPPORT
|
|
|
|
# endif
|
2016-01-06 09:57:46 -08:00
|
|
|
#endif
|
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# define USE_IPC
|
|
|
|
# if 0
|
|
|
|
# define OBJECT_PARANOIA_CHECK
|
|
|
|
# endif
|
2014-02-25 11:28:12 -08:00
|
|
|
# define OBJECT_CHECK
|
2006-03-09 21:48:46 -08:00
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# ifndef _FILE_OFFSET_BITS
|
2012-09-10 01:16:24 -07:00
|
|
|
# define _FILE_OFFSET_BITS 64
|
2011-07-25 02:40:18 -07:00
|
|
|
# endif
|
2007-06-02 09:35:10 -07:00
|
|
|
|
2012-11-18 05:42:48 -08:00
|
|
|
#ifdef STDC_HEADERS
|
|
|
|
# include <stdlib.h>
|
|
|
|
# include <stddef.h>
|
|
|
|
#else
|
|
|
|
# ifdef HAVE_STDLIB_H
|
|
|
|
# include <stdlib.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_ALLOCA_H
|
|
|
|
# include <alloca.h>
|
|
|
|
#elif !defined alloca
|
|
|
|
# ifdef __GNUC__
|
2011-07-25 02:40:18 -07:00
|
|
|
# define alloca __builtin_alloca
|
|
|
|
# elif defined _AIX
|
|
|
|
# define alloca __alloca
|
|
|
|
# elif defined _MSC_VER
|
|
|
|
# include <malloc.h>
|
|
|
|
# define alloca _alloca
|
2012-11-18 05:42:48 -08:00
|
|
|
# elif !defined HAVE_ALLOCA
|
2011-07-25 02:40:18 -07:00
|
|
|
# ifdef __cplusplus
|
2009-12-18 05:52:23 -08:00
|
|
|
extern "C"
|
2011-07-25 02:40:18 -07:00
|
|
|
# endif
|
2012-11-18 05:42:48 -08:00
|
|
|
void *alloca (size_t);
|
2011-07-25 02:40:18 -07:00
|
|
|
# endif
|
2012-11-18 05:42:48 -08:00
|
|
|
#endif
|
2009-12-18 05:52:23 -08:00
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# ifdef __linux__
|
|
|
|
# include <features.h>
|
|
|
|
# endif
|
2009-12-18 05:52:23 -08:00
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# include <stdio.h>
|
|
|
|
# include <stdlib.h>
|
|
|
|
# include <unistd.h>
|
|
|
|
# include <string.h>
|
|
|
|
# include <sys/types.h>
|
|
|
|
# include <sys/stat.h>
|
|
|
|
# include <sys/time.h>
|
|
|
|
# include <sys/param.h>
|
|
|
|
# include <sys/resource.h>
|
|
|
|
# include <utime.h>
|
|
|
|
# include <dlfcn.h>
|
|
|
|
# include <math.h>
|
|
|
|
# include <fcntl.h>
|
|
|
|
# include <fnmatch.h>
|
|
|
|
# include <limits.h>
|
|
|
|
# include <ctype.h>
|
|
|
|
# include <time.h>
|
|
|
|
# include <dirent.h>
|
|
|
|
# include <pwd.h>
|
|
|
|
# include <grp.h>
|
|
|
|
# include <glob.h>
|
|
|
|
# include <locale.h>
|
|
|
|
# include <errno.h>
|
|
|
|
# include <signal.h>
|
|
|
|
# include <inttypes.h>
|
2013-01-10 00:50:04 -08:00
|
|
|
# include <assert.h>
|
2011-07-25 02:40:18 -07:00
|
|
|
|
|
|
|
# ifdef HAVE_GETTEXT
|
|
|
|
# include <libintl.h>
|
|
|
|
# endif
|
2010-06-19 10:33:38 -07:00
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# ifndef _POSIX_HOST_NAME_MAX
|
|
|
|
# define _POSIX_HOST_NAME_MAX 255
|
|
|
|
# endif
|
2009-04-28 08:50:32 -07:00
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# ifdef HAVE_VALGRIND
|
|
|
|
# include <memcheck.h>
|
|
|
|
# endif
|
2006-01-09 20:23:43 -08:00
|
|
|
|
2013-01-06 17:14:25 -08:00
|
|
|
# ifdef HAVE_EXECINFO_H
|
2011-07-25 02:40:18 -07:00
|
|
|
# include <execinfo.h>
|
|
|
|
# endif
|
2004-11-24 19:37:45 -08:00
|
|
|
|
2020-01-17 16:33:21 -08:00
|
|
|
# if !defined (__FreeBSD__) && !defined (__OpenBSD__)
|
|
|
|
# ifdef HAVE_MALLOC_H
|
|
|
|
# include <malloc.h>
|
|
|
|
# endif
|
2020-01-16 07:33:37 -08:00
|
|
|
# endif
|
|
|
|
|
2017-03-27 21:50:23 -07:00
|
|
|
// XXX: FIXME: TMP solution for window stack until api is settled
|
2020-04-17 12:20:50 -07:00
|
|
|
# ifndef EFL_BETA_API_SUPPORT
|
|
|
|
# define EFL_BETA_API_SUPPORT
|
|
|
|
# endif
|
2017-03-27 21:50:23 -07:00
|
|
|
|
2014-10-24 02:17:32 -07:00
|
|
|
|
2011-08-02 06:22:08 -07:00
|
|
|
# include <setjmp.h>
|
2014-03-24 09:32:06 -07:00
|
|
|
# include <Eo.h>
|
2011-07-25 02:40:18 -07:00
|
|
|
# include <Eina.h>
|
|
|
|
# include <Eet.h>
|
|
|
|
# include <Evas.h>
|
|
|
|
# include <Evas_Engine_Buffer.h>
|
|
|
|
# include <Ecore.h>
|
2013-01-10 00:27:43 -08:00
|
|
|
# include <Ecore_Getopt.h>
|
2011-07-25 02:40:18 -07:00
|
|
|
# include <Ecore_Evas.h>
|
|
|
|
# include <Ecore_Input.h>
|
|
|
|
# include <Ecore_Input_Evas.h>
|
|
|
|
# include <Ecore_Con.h>
|
|
|
|
# include <Ecore_Ipc.h>
|
|
|
|
# include <Ecore_File.h>
|
|
|
|
# include <Efreet.h>
|
|
|
|
# include <Efreet_Mime.h>
|
|
|
|
# include <Edje.h>
|
2013-04-23 08:08:29 -07:00
|
|
|
# include <Eldbus.h>
|
2012-07-25 00:41:21 -07:00
|
|
|
# include <Eio.h>
|
2013-10-31 23:53:05 -07:00
|
|
|
# include <Emotion.h>
|
2014-03-24 09:32:06 -07:00
|
|
|
# include <Elementary.h>
|
2016-03-02 12:13:16 -08:00
|
|
|
# include "e_Efx.h"
|
2011-07-25 02:40:18 -07:00
|
|
|
|
2015-06-25 15:49:00 -07:00
|
|
|
# ifdef HAVE_WAYLAND
|
2015-10-22 08:54:35 -07:00
|
|
|
# include <Ecore_Wl2.h>
|
2014-03-11 04:24:41 -07:00
|
|
|
# endif
|
|
|
|
|
2010-01-22 12:00:07 -08:00
|
|
|
|
2004-11-24 19:37:45 -08:00
|
|
|
typedef struct _E_Before_Idler E_Before_Idler;
|
2012-09-10 01:16:24 -07:00
|
|
|
typedef struct _E_Rect E_Rect;
|
2005-01-12 08:03:09 -08:00
|
|
|
|
2017-07-14 15:44:23 -07:00
|
|
|
#include "e_macros.h"
|
2014-11-02 18:35:13 -08:00
|
|
|
|
2011-07-25 02:40:18 -07:00
|
|
|
# define E_REMOTE_OPTIONS 1
|
2012-09-10 01:16:24 -07:00
|
|
|
# define E_REMOTE_OUT 2
|
|
|
|
# define E_WM_IN 3
|
|
|
|
# define E_REMOTE_IN 4
|
|
|
|
# define E_ENUM 5
|
|
|
|
# define E_LIB_IN 6
|
2005-05-30 20:01:53 -07:00
|
|
|
|
2015-02-13 12:46:04 -08:00
|
|
|
|
|
|
|
/* if you see a deprecated warning for a YOLO function,
|
|
|
|
* you are attempting to use an extremely dangerous function.
|
|
|
|
*/
|
|
|
|
#ifdef EXECUTIVE_MODE_ENABLED
|
|
|
|
#define YOLO
|
|
|
|
#else
|
|
|
|
#define YOLO EINA_DEPRECATED
|
|
|
|
#endif
|
|
|
|
|
2012-09-10 01:16:24 -07:00
|
|
|
# define E_TYPEDEFS 1
|
2011-07-25 02:40:18 -07:00
|
|
|
# include "e_includes.h"
|
|
|
|
# undef E_TYPEDEFS
|
|
|
|
# include "e_includes.h"
|
2004-11-24 19:37:45 -08:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API double e_main_ts(const char *str);
|
2005-01-12 08:03:09 -08:00
|
|
|
|
2016-04-11 12:15:51 -07:00
|
|
|
#define E_EFL_VERSION_MINIMUM(MAJ, MIN, MIC) \
|
|
|
|
((eina_version->major > MAJ) || (eina_version->minor > MIN) ||\
|
|
|
|
((eina_version->minor == MIN) && (eina_version->micro >= MIC)))
|
|
|
|
|
2005-01-12 08:03:09 -08:00
|
|
|
struct _E_Rect
|
|
|
|
{
|
|
|
|
int x, y, w, h;
|
|
|
|
};
|
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
extern E_API E_Path *path_data;
|
|
|
|
extern E_API E_Path *path_images;
|
|
|
|
extern E_API E_Path *path_fonts;
|
|
|
|
extern E_API E_Path *path_themes;
|
|
|
|
extern E_API E_Path *path_icons;
|
|
|
|
extern E_API E_Path *path_modules;
|
|
|
|
extern E_API E_Path *path_backgrounds;
|
|
|
|
extern E_API E_Path *path_messages;
|
|
|
|
extern E_API Eina_Bool good;
|
|
|
|
extern E_API Eina_Bool evil;
|
|
|
|
extern E_API Eina_Bool starting;
|
|
|
|
extern E_API Eina_Bool stopping;
|
|
|
|
extern E_API Eina_Bool restart;
|
|
|
|
extern E_API Eina_Bool e_nopause;
|
|
|
|
|
|
|
|
extern E_API Eina_Bool e_precache_end;
|
|
|
|
extern E_API Eina_Bool x_fatal;
|
2011-02-15 21:20:13 -08:00
|
|
|
|
2017-02-24 11:15:42 -08:00
|
|
|
extern E_API Eina_Bool after_restart;
|
2020-09-04 05:58:14 -07:00
|
|
|
extern E_API Eina_Bool e_main_loop_running;
|
2017-02-24 11:15:42 -08:00
|
|
|
|
2013-08-01 01:22:55 -07:00
|
|
|
extern EINTERN const char *e_first_frame;
|
|
|
|
extern EINTERN double e_first_frame_start_time;
|
|
|
|
|
2011-12-31 06:35:05 -08:00
|
|
|
//#define SMARTERR(args...) abort()
|
|
|
|
#define SMARTERRNR() return
|
2012-09-10 01:16:24 -07:00
|
|
|
#define SMARTERR(x) return x
|
2011-12-31 06:35:05 -08:00
|
|
|
|
2012-01-19 15:25:32 -08:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup Optional_Modules Optional Modules
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @defgroup Optional_Conf Configurations
|
|
|
|
* @defgroup Optional_Control Controls
|
|
|
|
* @defgroup Optional_Devices Devices & Hardware
|
|
|
|
* @defgroup Optional_Fileman File Managers
|
|
|
|
* @defgroup Optional_Gadgets Gadgets
|
|
|
|
* @defgroup Optional_Launcher Launchers
|
|
|
|
* @defgroup Optional_Layouts Layout Managers
|
|
|
|
* @defgroup Optional_Look Look & Feel
|
|
|
|
* @defgroup Optional_Monitors Monitors & Notifications
|
|
|
|
* @defgroup Optional_Mobile Mobile Specific Extensions
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2015-06-15 04:27:25 -07:00
|
|
|
#if 0
|
|
|
|
#define REFD(obj, num) \
|
|
|
|
do { \
|
|
|
|
printf("%p <- %5i <- ref | %s-%i\n", \
|
|
|
|
obj, E_OBJECT(obj)->references, \
|
|
|
|
__FILE__, num); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define UNREFD(obj, num) \
|
|
|
|
do { \
|
|
|
|
printf("%p <- %5i <- unref | %s-%i\n", \
|
|
|
|
obj, E_OBJECT(obj)->references, \
|
|
|
|
__FILE__, num); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define DELD(obj, num) \
|
|
|
|
do { \
|
|
|
|
printf("%p <- %5i <- del | %s-%i\n", \
|
|
|
|
obj, E_OBJECT(obj)->references, \
|
|
|
|
__FILE__, num); \
|
|
|
|
} while (0)
|
|
|
|
#else
|
|
|
|
# define REFD(obj, num)
|
|
|
|
# define UNREFD(obj, num)
|
|
|
|
# define DELD(obj, num)
|
|
|
|
#endif
|
|
|
|
|
2017-01-06 09:56:22 -08:00
|
|
|
/* for disabling compiler warnings
|
|
|
|
* http://stackoverflow.com/questions/3378560/how-to-disable-gcc-warnings-for-a-few-lines-of-code
|
|
|
|
*/
|
|
|
|
#define DIAG_STR(s) #s
|
|
|
|
#define DIAG_JOINSTR(x,y) DIAG_STR(x ## y)
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define DIAG_DO_PRAGMA(x) __pragma (#x)
|
|
|
|
#define DIAG_PRAGMA(compiler,x) DIAG_DO_PRAGMA(warning(x))
|
|
|
|
#else
|
|
|
|
#define DIAG_DO_PRAGMA(x) _Pragma (#x)
|
|
|
|
#define DIAG_PRAGMA(compiler,x) DIAG_DO_PRAGMA(compiler diagnostic x)
|
|
|
|
#endif
|
|
|
|
#if defined(__clang__)
|
|
|
|
# define DISABLE_WARNING(gcc_unused,clang_option,msvc_unused) DIAG_PRAGMA(clang,push) DIAG_PRAGMA(clang,ignored DIAG_JOINSTR(-W,clang_option))
|
|
|
|
# define ENABLE_WARNING(gcc_unused,clang_option,msvc_unused) DIAG_PRAGMA(clang,pop)
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
# define DISABLE_WARNING(gcc_unused,clang_unused,msvc_errorcode) DIAG_PRAGMA(msvc,push) DIAG_DO_PRAGMA(warning(disable:##msvc_errorcode))
|
|
|
|
# define ENABLE_WARNING(gcc_unused,clang_unused,msvc_errorcode) DIAG_PRAGMA(msvc,pop)
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
|
|
|
|
# define DISABLE_WARNING(gcc_option,clang_unused,msvc_unused) DIAG_PRAGMA(GCC,push) DIAG_PRAGMA(GCC,ignored DIAG_JOINSTR(-W,gcc_option))
|
|
|
|
# define ENABLE_WARNING(gcc_option,clang_unused,msvc_unused) DIAG_PRAGMA(GCC,pop)
|
|
|
|
#else
|
|
|
|
# define DISABLE_WARNING(gcc_option,clang_unused,msvc_unused) DIAG_PRAGMA(GCC,ignored DIAG_JOINSTR(-W,gcc_option))
|
|
|
|
# define ENABLE_WARNING(gcc_option,clang_option,msvc_unused) DIAG_PRAGMA(GCC,warning DIAG_JOINSTR(-W,gcc_option))
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2004-11-24 19:37:45 -08:00
|
|
|
#endif
|