Data Structures | Typedefs | Enumerations | Functions
Ecore Buffer Library Functions

Utility functions that set up and shut down the Ecore Buffer library. More...

Data Structures

struct  _Ecore_Buffer_Backend
 Structure used when initializing Ecore Buffer Backend. More...
 

Typedefs

typedef struct _Ecore_Buffer Ecore_Buffer
 An object representing a graphic buffer. More...
 
typedef struct _Ecore_Buffer_Backend Ecore_Buffer_Backend
 The interfaces for backend of buffer. More...
 
typedef enum _Ecore_Export_Type Ecore_Export_Type
 Types for export buffer. More...
 
typedef unsigned int Ecore_Buffer_Format
 The format of Ecore_Buffer. More...
 
typedef unsigned long Ecore_Pixmap
 
typedef void * Ecore_Buffer_Module_Data
 The data of module. More...
 
typedef void * Ecore_Buffer_Data
 The data of Ecore_Buffer. More...
 
typedef void(* Ecore_Buffer_Cb) (Ecore_Buffer *buf, void *data)
 Called whenever Ecore_Buffer is freed. More...
 

Enumerations

enum  _Ecore_Export_Type {
  EXPORT_TYPE_INVALID,
  EXPORT_TYPE_ID,
  EXPORT_TYPE_FD
}
 Types for export buffer. More...
 

Functions

EAPI Eina_Bool ecore_buffer_init (void)
 Initialize the Ecore_Buffer system. More...
 
EAPI Eina_Bool ecore_buffer_shutdown (void)
 Shut down the Ecore_Buffer system. More...
 
EAPI Eina_Bool ecore_buffer_register (Ecore_Buffer_Backend *be)
 Registers the given buffer backend. More...
 
EAPI void ecore_buffer_unregister (Ecore_Buffer_Backend *be)
 Unregisters the given buffer backend. More...
 
EAPI Ecore_Bufferecore_buffer_new (const char *engine, unsigned int width, unsigned int height, Ecore_Buffer_Format format, unsigned int flags)
 Creates a new Ecore_Buffer given type. More...
 
EAPI void ecore_buffer_free (Ecore_Buffer *buf)
 Free the given Ecore_Buffer. More...
 
EAPI void ecore_buffer_free_callback_add (Ecore_Buffer *buf, Ecore_Buffer_Cb func, void *data)
 Set a callback for Ecore_Buffer free events. More...
 
EAPI void ecore_buffer_free_callback_remove (Ecore_Buffer *buf, Ecore_Buffer_Cb func, void *data)
 Remove a callback for Ecore_Buffer free events. More...
 
EAPI void * ecore_buffer_data_get (Ecore_Buffer *buf)
 Get a pointer to the raw data of the given Ecore_Buffer. More...
 
EAPI Ecore_Pixmap ecore_buffer_pixmap_get (Ecore_Buffer *buf)
 Return the Pixmap of given Ecore_Buffer. More...
 
EAPI void * ecore_buffer_tbm_surface_get (Ecore_Buffer *buf)
 Return the tbm surface handle of given Ecore_Buffer. More...
 
EAPI Eina_Bool ecore_buffer_size_get (Ecore_Buffer *buf, unsigned int *width, unsigned int *height)
 Return size of given Ecore_Buffer. More...
 
EAPI Ecore_Buffer_Format ecore_buffer_format_get (Ecore_Buffer *buf)
 Return format of given Ecore_Buffer. More...
 
EAPI unsigned int ecore_buffer_flags_get (Ecore_Buffer *buf)
 Return flags of given Ecore_Buffer. More...
 

Detailed Description

Utility functions that set up and shut down the Ecore Buffer library.

This group of functions is applied to an Ecore_Buffer object.

Typedef Documentation

◆ Ecore_Buffer

An object representing a graphic buffer.

Since
1.15

◆ Ecore_Buffer_Backend

The interfaces for backend of buffer.

Since
1.15

◆ Ecore_Export_Type

Types for export buffer.

Since
1.15

◆ Ecore_Buffer_Format

The format of Ecore_Buffer.

Since
1.15

◆ Ecore_Buffer_Module_Data

The data of module.

Since
1.15

◆ Ecore_Buffer_Data

The data of Ecore_Buffer.

Since
1.15

◆ Ecore_Buffer_Cb

Ecore_Buffer_Cb

Called whenever Ecore_Buffer is freed.

Since
1.15

Enumeration Type Documentation

◆ _Ecore_Export_Type

Types for export buffer.

Since
1.15

Function Documentation

◆ ecore_buffer_init()

EAPI Eina_Bool ecore_buffer_init ( void  )

◆ ecore_buffer_shutdown()

EAPI Eina_Bool ecore_buffer_shutdown ( void  )

Shut down the Ecore_Buffer system.

Since
1.15
Returns
EINA_TRUE on success, EINA_FALSE otherwise.
See also
ecore_buffer_init()

References eina_array_free(), EINA_FALSE, eina_hash_foreach(), eina_hash_free(), eina_log_domain_unregister(), eina_module_list_free(), and EINA_TRUE.

◆ ecore_buffer_register()

EAPI Eina_Bool ecore_buffer_register ( Ecore_Buffer_Backend be)

Registers the given buffer backend.

Since
1.15
Parameters
[in]beThe backend
Returns
EINA_TRUE if backend has been correctly registered, EINA_FALSE otherwise.

◆ ecore_buffer_unregister()

EAPI void ecore_buffer_unregister ( Ecore_Buffer_Backend be)

Unregisters the given buffer backend.

Since
1.15
Parameters
[in]beThe backend

◆ ecore_buffer_new()

EAPI Ecore_Buffer* ecore_buffer_new ( const char *  engine,
unsigned int  width,
unsigned int  height,
Ecore_Buffer_Format  format,
unsigned int  flags 
)

Creates a new Ecore_Buffer given type.

Since
1.15
Parameters
[in]enginethe name of backend
[in]widthwidth for Ecore_Buffer
[in]heightheight for Ecore_Buffer
[in]formatformat for Ecore_Buffer
[in]flagsflags for Ecore_Buffer
Returns
Newly allocated Ecore_Buffer instance, NULL otherwise.

References ERR.

◆ ecore_buffer_free()

EAPI void ecore_buffer_free ( Ecore_Buffer buf)

Free the given Ecore_Buffer.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer to free

◆ ecore_buffer_free_callback_add()

EAPI void ecore_buffer_free_callback_add ( Ecore_Buffer buf,
Ecore_Buffer_Cb  func,
void *  data 
)

Set a callback for Ecore_Buffer free events.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer to set callbacks on
[in]funcThe function to call
[in]dataA pointer to the user data to store.

A call to this function will set a callback on an Ecore_Buffer, causing func to be called whenever buf is freed.

See also
ecore_buffer_free_callback_remove()

◆ ecore_buffer_free_callback_remove()

EAPI void ecore_buffer_free_callback_remove ( Ecore_Buffer buf,
Ecore_Buffer_Cb  func,
void *  data 
)

Remove a callback for Ecore_Buffer free events.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer to remove callbacks on
[in]funcThe function to remove
[in]dataA pointer to the user data to remove
See also
ecore_buffer_free_callback_add()

◆ ecore_buffer_data_get()

EAPI void* ecore_buffer_data_get ( Ecore_Buffer buf)

Get a pointer to the raw data of the given Ecore_Buffer.

Parameters
[in]bufThe Ecore_Buffer.
Returns
The pointer of raw data.

◆ ecore_buffer_pixmap_get()

EAPI Ecore_Pixmap ecore_buffer_pixmap_get ( Ecore_Buffer buf)

Return the Pixmap of given Ecore_Buffer.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer
Returns
The Pixmap instance, 0 otherwise.

◆ ecore_buffer_tbm_surface_get()

EAPI void* ecore_buffer_tbm_surface_get ( Ecore_Buffer buf)

Return the tbm surface handle of given Ecore_Buffer.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer
Returns
The tbm surface handle, NULL otherwise.

The tbm surface handle will be used for the API of libtbm. The API is described in tbm_surface.h in libtbm.

◆ ecore_buffer_size_get()

EAPI Eina_Bool ecore_buffer_size_get ( Ecore_Buffer buf,
unsigned int *  width,
unsigned int *  height 
)

Return size of given Ecore_Buffer.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer
[out]widthwhere to return the width value. May be NULL.
[out]heightwhere to return the height value. May be NULL.
Returns
EINA_TRUE on success, EINA_FALSE otherwise.

◆ ecore_buffer_format_get()

EAPI Ecore_Buffer_Format ecore_buffer_format_get ( Ecore_Buffer buf)

Return format of given Ecore_Buffer.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer
Returns
The format of given Ecore_Buffer.

return value can be one of those pre-defined value such as ECORE_BUFFER_FORMAT_XRGB8888.

◆ ecore_buffer_flags_get()

EAPI unsigned int ecore_buffer_flags_get ( Ecore_Buffer buf)

Return flags of given Ecore_Buffer.

Since
1.15
Parameters
[in]bufThe Ecore_Buffer
Returns
The flags of given Ecore_Buffer.

NOTE: Not Defined yet.