Ecore_Buffer_Lib_Group(3)

NAME
Ecore_Buffer_Lib_Group - Ecore Buffer Library Functions

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

SYNOPSIS

  Data Structures
struct _Ecore_Buffer_Backend
Structure used when initializing Ecore Buffer Backend.

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

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

  Functions
EAPI Eina_Bool ecore_buffer_init (void)
Initializes the Ecore_Buffer system.
EAPI Eina_Bool ecore_buffer_shutdown (void)
Shuts down the Ecore_Buffer system.
EAPI Eina_Bool ecore_buffer_register (Ecore_Buffer_Backend *be)
Registers the given buffer backend.
EAPI void ecore_buffer_unregister (Ecore_Buffer_Backend *be)
Unregisters the given buffer backend.
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.
EAPI void ecore_buffer_free (Ecore_Buffer *buf)
Frees the given Ecore_Buffer.
EAPI void ecore_buffer_free_callback_add (Ecore_Buffer *buf, Ecore_Buffer_Cb func, void *data)
Sets a callback for Ecore_Buffer free events.
EAPI void ecore_buffer_free_callback_remove (Ecore_Buffer *buf, Ecore_Buffer_Cb func, void *data)
Removes a callback for Ecore_Buffer free events.
EAPI void * ecore_buffer_data_get (Ecore_Buffer *buf)
Get a pointer to the raw data of the given Ecore_Buffer.
EAPI Ecore_Pixmap ecore_buffer_pixmap_get (Ecore_Buffer *buf)
Returns the Pixmap of given Ecore_Buffer.
EAPI void * ecore_buffer_tbm_surface_get (Ecore_Buffer *buf)
Returns the tbm surface handle of given Ecore_Buffer.
EAPI Eina_Bool ecore_buffer_size_get (Ecore_Buffer *buf, unsigned int *width, unsigned int *height)
Returns size of given Ecore_Buffer.
EAPI Ecore_Buffer_Format ecore_buffer_format_get (Ecore_Buffer *buf)
Returns format of given Ecore_Buffer.
EAPI unsigned int ecore_buffer_flags_get (Ecore_Buffer *buf)
Returns the flags of given Ecore_Buffer.

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_Pixmap

An Id of Pixmap.

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

Called whenever Ecore_Buffer is freed.

Since
    1.15

Enumeration Type Documentation

  enum _Ecore_Export_Type

Types for export buffer.

Since
    1.15

Function Documentation

  EAPI Eina_Bool ecore_buffer_init (void)

Initializes the Ecore_Buffer system.

Since
    1.15

Returns
    EINA_TRUE on success, EINA_FALSE otherwise.

See also
    ecore_buffer_shutdown()

References eina_array_count(), EINA_FALSE, eina_hash_free(), eina_hash_string_superfast_new(), eina_log_domain_register(), eina_log_domain_unregister(), EINA_LOG_ERR, eina_module_arch_list_get(), eina_module_list_get(), eina_module_list_load(), eina_module_symbol_path_get(), EINA_TRUE, and ERR.

  EAPI Eina_Bool ecore_buffer_shutdown (void)

Shuts 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.

  EAPI Eina_Bool ecore_buffer_register (Ecore_Buffer_Backend * be)

Registers the given buffer backend.

Since
    1.15

Parameters
    be The backend

Returns
    EINA_TRUE if backend has been correctly registered, EINA_FALSE otherwise.

References EINA_FALSE, eina_hash_add(), EINA_SAFETY_ON_NULL_RETURN_VAL, and _Ecore_Buffer_Backend::name.

  EAPI void ecore_buffer_unregister (Ecore_Buffer_Backend * be)

Unregisters the given buffer backend.

Since
    1.15

Parameters
    be The backend

References eina_hash_del(), eina_hash_find(), EINA_SAFETY_ON_NULL_RETURN, and _Ecore_Buffer_Backend::name.

  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
    engine The name of backend
    width Width for Ecore_Buffer
    height Height for Ecore_Buffer
    format Format for Ecore_Buffer
    flags Flags for Ecore_Buffer

Returns
    Newly allocated Ecore_Buffer instance, NULL otherwise.

References EINA_SAFETY_ON_NULL_RETURN_VAL, and ERR.

  EAPI void ecore_buffer_free (Ecore_Buffer * buf)

Frees the given Ecore_Buffer.

Since
    1.15

Parameters
    buf The Ecore_Buffer to free

References eina_hash_free(), EINA_INLIST_CONTAINER_GET, eina_inlist_remove(), and EINA_SAFETY_ON_NULL_RETURN.

Referenced by ecore_buffer_consumer_buffer_release().

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

Sets a callback for Ecore_Buffer free events.

Since
    1.15

Parameters
    buf The Ecore_Buffer to set callbacks on
    func The function to call
    data A 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()

References eina_inlist_append(), EINA_INLIST_GET, and EINA_SAFETY_ON_NULL_RETURN.

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

Removes a callback for Ecore_Buffer free events.

Since
    1.15

Parameters
    buf The Ecore_Buffer to remove callbacks on
    func The function to remove
    data A pointer to the user data to remove

See also
    ecore_buffer_free_callback_add()

References EINA_INLIST_FOREACH_SAFE, EINA_INLIST_GET, eina_inlist_remove(), and EINA_SAFETY_ON_NULL_RETURN.

  EAPI void* ecore_buffer_data_get (Ecore_Buffer * buf)

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

Parameters
    buf The Ecore_Buffer.

Returns
    The pointer of raw data.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

  EAPI Ecore_Pixmap ecore_buffer_pixmap_get (Ecore_Buffer * buf)

Returns the Pixmap of given Ecore_Buffer.

Since
    1.15

Parameters
    buf The Ecore_Buffer

Returns
    The Pixmap instance, 0 otherwise.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

  EAPI void* ecore_buffer_tbm_surface_get (Ecore_Buffer * buf)

Returns the tbm surface handle of given Ecore_Buffer.

Since
    1.15

Parameters
    buf The 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.

References EINA_SAFETY_ON_NULL_RETURN_VAL, and ERR.

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

Returns size of given Ecore_Buffer.

Since
    1.15

Parameters
    buf The Ecore_Buffer
    width Where to return the width value. May be NULL.
    height Where to return the height value. May be NULL.

Returns
    EINA_TRUE on success, EINA_FALSE otherwise.

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.

  EAPI Ecore_Buffer_Format ecore_buffer_format_get (Ecore_Buffer * buf)

Returns format of given Ecore_Buffer.

Since
    1.15

Parameters
    buf The 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.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

  EAPI unsigned int ecore_buffer_flags_get (Ecore_Buffer * buf)

Returns the flags of given Ecore_Buffer.

Since
    1.15

Parameters
    buf The Ecore_Buffer

Returns
    The flags of given Ecore_Buffer.

NOTE: Not Defined yet.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

Author

Generated automatically by Doxygen for EFL from the source code.