2015-04-03 07:14:56 -07:00
# ifndef ECTOR_H_
# define ECTOR_H_
# include <Eina.h>
# include <Eo.h>
2019-03-07 14:42:01 -08:00
# ifdef EFL_BETA_API_SUPPORT
2015-04-03 07:21:57 -07:00
# include <Efl.h>
2019-03-07 14:42:01 -08:00
# endif
2015-04-03 07:14:56 -07:00
# ifdef EAPI
# undef EAPI
# endif
# ifdef _WIN32
2018-01-18 01:04:03 -08:00
# ifdef EFL_BUILD
2015-04-03 07:14:56 -07:00
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
2018-01-18 01:04:03 -08:00
# endif
2015-04-03 07:14:56 -07:00
# else
# define EAPI __declspec(dllimport)
2018-01-18 01:04:03 -08:00
# endif
2015-04-03 07:14:56 -07:00
# else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
2018-01-18 01:04:03 -08:00
# endif
2015-04-03 07:14:56 -07:00
# ifdef __cplusplus
extern " C " {
# endif
/**
* @ page ector_main Ector
*
* @ date 2014 ( created )
*
* @ section toc Table of Contents
*
* @ li @ ref ector_main_intro
* @ li @ ref ector_main_compiling
* @ li @ ref ector_main_next_steps
* @ li @ ref ector_main_intro_example
*
* @ section ector_main_intro Introduction
*
2017-09-12 00:07:13 -07:00
* Ector is a retained mode drawing library designed to work
* for and with a scenegraph such as Evas , which supports several
2019-09-10 21:12:08 -07:00
* types of rendering surface including software and gl .
2015-04-03 07:14:56 -07:00
*
2017-09-12 00:07:13 -07:00
* @ section ector_main_compiling How to compile the library
2015-04-03 07:14:56 -07:00
*
2017-09-12 00:07:13 -07:00
* Ector compiles automatically within EFL ' s build system , and is
* automatically linked with other components that need it . But it can
* also be built and used standalone , by compiling and linking your
* application with the compiler flags indicated by @ c pkg - config . For
2015-04-03 07:14:56 -07:00
* example :
*
* @ verbatim
2017-09-12 00:07:13 -07:00
* gcc - c - o my_main . o my_main . c ` pkg - config - - cflags ector `
2015-04-03 07:14:56 -07:00
*
2017-09-12 00:07:13 -07:00
* gcc - o my_application my_main . o ` pkg - config - - libs ector `
* @ endverbatim
2015-04-03 07:14:56 -07:00
*
* See @ ref pkgconfig
*
2017-09-12 00:07:13 -07:00
* @ section ector_main_next_steps Recommended reading :
2015-04-03 07:14:56 -07:00
*
* @ li @ ref Ector_Surface
* @ li @ ref Ector_Renderer
*
* @ section ector_main_intro_example Introductory Example
*
* @ ref Ector_Tutorial
*
*
* @ addtogroup Ector
* @ {
*/
2015-04-03 07:57:55 -07:00
# ifdef EFL_BETA_API_SUPPORT
2015-04-03 07:14:56 -07:00
/**
* @ typedef Ector_Surface
* The base type to render content into .
*/
typedef Eo Ector_Surface ;
/**
* @ typedef Ector_Renderer
* The base type describing what to render .
*/
typedef Eo Ector_Renderer ;
2015-04-03 07:14:58 -07:00
/**
* @ typedef Ector_Colorspace
2019-04-02 04:28:48 -07:00
* The definition of colorspace .
2015-04-03 07:14:58 -07:00
*/
2017-09-12 00:07:13 -07:00
// FIXME: Enable this when we have merged Emile
2015-04-03 07:21:57 -07:00
/* typedef Evas_Colorspace Ector_Colorspace; */
2015-04-03 07:14:58 -07:00
/**
* Priorities
*/
typedef enum _Ector_Priority
{
ECTOR_PRIORITY_NONE = 0 ,
ECTOR_PRIORITY_MARGINAL = 64 ,
ECTOR_PRIORITY_SECONDARY = 128 ,
ECTOR_PRIORITY_PRIMARY = 256 ,
} Ector_Priority ;
/**
* What kind of update is being pushed
*/
typedef enum _Ector_Update_Type
{
ECTOR_UPDATE_BACKGROUND = 1 , /* All the previous state in that area is reset to the new updated profile */
ECTOR_UPDATE_EMPTY = 2 , /* Pushing empty area (no visible pixels at all, no need to read this surface to render it) */
2017-09-12 00:07:13 -07:00
ECTOR_UPDATE_ALPHA = 4 , /* Pushing some transparent pixels (this impacts the under layer and will require reading back the surface where this surface is blitted) */
ECTOR_UPDATE_OPAQUE = 8 /* Pushing some opaque pixels (this means that there is no need to read the under layer when blitting this surface) */
2015-04-03 07:14:58 -07:00
} Ector_Update_Type ;
2015-04-03 07:14:56 -07:00
/**
* @ brief Init the ector subsystem
* @ return @ c EINA_TRUE on success .
*
* @ see ector_shutfown ( )
*/
EAPI int ector_init ( void ) ;
/**
* @ brief Shutdown the ector subsystem
* @ return @ c EINA_TRUE on success .
*
* @ see ector_init ( )
*/
EAPI int ector_shutdown ( void ) ;
2017-06-14 14:27:15 -07:00
/**
* @ brief Registers OpenGL API calls with the internal Ector_GL_API .
*
* @ param glsym Function to use for looking up dynamically loaded symbols
* @ param lib Dynamically loaded shared object , or RTLD_DEFAULT or RTLD_NEXT
* @ return EINA_TRUE if call succeeded , EINA_FALSE if glsym was undefined or an error occurred
*
* The RTLD_DEFAULT and RTLD_NEXT pseudo - handles can be passed as lib to
2017-09-12 00:07:13 -07:00
* look up the first or next occurrence of the desired symbol in the dynamic
2017-06-14 14:27:15 -07:00
* library search order .
*
* @ see dlsym ( )
*/
2015-12-16 15:18:23 -08:00
EAPI Eina_Bool ector_glsym_set ( void * ( * glsym ) ( void * lib , const char * name ) , void * lib ) ;
2016-05-28 13:15:00 -07:00
/* Avoid redefinition of types */
# define _ECTOR_SURFACE_EO_CLASS_TYPE
# define _ECTOR_RENDERER_EO_CLASS_TYPE
2015-04-03 07:14:58 -07:00
# include "ector_surface.h"
# include "ector_renderer.h"
2015-04-03 07:33:01 -07:00
# include "ector_util.h"
2015-04-03 07:14:58 -07:00
2015-04-03 07:14:56 -07:00
# endif
/**
* @ }
*/
# ifdef __cplusplus
}
# endif
2017-08-15 07:42:13 -07:00
# undef EAPI
# define EAPI
2015-04-03 07:14:56 -07:00
# endif