2015-12-02 22:10:18 -08:00
|
|
|
#ifndef ECTOR_BUFFER_H
|
|
|
|
#define ECTOR_BUFFER_H
|
|
|
|
|
2015-11-30 22:22:20 -08:00
|
|
|
#include <Ector.h>
|
|
|
|
|
|
|
|
#include "ector_generic_buffer.eo.h"
|
|
|
|
#include "software/ector_software_buffer_base.eo.h"
|
|
|
|
|
2015-12-07 22:11:57 -08:00
|
|
|
/**
|
|
|
|
* @typedef Ector_Buffer
|
|
|
|
* A generic pixel buffer type (2D). May be readable or writeable or both.
|
|
|
|
*/
|
|
|
|
typedef Ector_Generic_Buffer Ector_Buffer;
|
|
|
|
|
2015-11-30 22:22:20 -08:00
|
|
|
typedef struct _Ector_Generic_Buffer_Data
|
|
|
|
{
|
2015-12-07 22:11:57 -08:00
|
|
|
Ector_Buffer *eo;
|
2015-11-30 22:22:20 -08:00
|
|
|
unsigned int w, h;
|
|
|
|
unsigned char l, r, t, b;
|
|
|
|
Efl_Gfx_Colorspace cspace;
|
2015-12-08 00:29:54 -08:00
|
|
|
Eina_Bool immutable : 1; // pixels_set is forbidden
|
2015-11-30 22:22:20 -08:00
|
|
|
} Ector_Generic_Buffer_Data;
|
|
|
|
|
|
|
|
typedef struct _Ector_Software_Buffer_Base_Data
|
|
|
|
{
|
|
|
|
Ector_Generic_Buffer_Data *generic; /* ugly */
|
|
|
|
union {
|
|
|
|
unsigned int *u32;
|
|
|
|
unsigned char *u8;
|
|
|
|
} pixels;
|
|
|
|
unsigned int stride;
|
|
|
|
unsigned int pixel_size; // in bytes
|
|
|
|
unsigned int map_count;
|
2015-12-08 00:29:54 -08:00
|
|
|
Eina_Bool writable : 1; // pixels can be written to
|
2015-11-30 22:22:20 -08:00
|
|
|
Eina_Bool nofree : 1; // pixel data should not be free()'ed
|
2015-12-08 00:29:54 -08:00
|
|
|
Eina_Bool span_free : 1; // FIXME
|
2015-11-30 22:22:20 -08:00
|
|
|
} Ector_Software_Buffer_Base_Data;
|
2015-12-02 22:10:18 -08:00
|
|
|
|
|
|
|
#endif
|