be negative.
]]
params {
- @out length: uint @nonull; [[Accessible buffer size in bytes, should not be $null.]]
+ @out length: int @nonull; [[Accessible buffer size in bytes, should not be $null.]]
@in mode: Efl.Gfx.Buffer.Access_Mode; [[Specifies whether to map for read-only,
write-only or read-write access (OR combinaison of flags).]]
@in x: int @optional; [[X position of the top-left pixel to map, defaults to 0.]]
@in y: int @optional; [[Y position of the top-left pixel to map, defaults to 0.]]
- @in w: uint @optional; [[If 0, defaults to the buffer width.]]
- @in h: uint @optional; [[If 0, defaults to the buffer height.]]
+ @in w: int @optional; [[If 0, defaults to the buffer width.]]
+ @in h: int @optional; [[If 0, defaults to the buffer height.]]
@in cspace: Efl.Gfx.Colorspace @optional; [[Requested colorspace. If differen from the internal cspace,
map should try to convert the data into a new buffer.
argb8888 by default.]]
- @out stride: uint @optional; [[Returns the length in bytes of a mapped line]]
+ @out stride: int @optional; [[Returns the length in bytes of a mapped line]]
}
- return: ubyte* @warn_unused; [[Pointer to the top-left pixel data. Returns $null in case of failure]]
+ return: void* @warn_unused; [[Pointer to the top-left pixel data. Returns $null in case of failure]]
}
buffer_unmap {
[[Unmap a region of this buffer, and update the internal data if needed.
EFL will update the internal image if the map had write access.
]]
params {
- @in data: ubyte*; [[Data pointer returned by a previous call to map]]
- @in length: uint; [[Must be the same as returned by map.]]
+ @in data: void*; [[Data pointer returned by a previous call to map]]
+ @in length: int; [[Must be the same as returned by map.]]
}
}
typedef struct {
EINA_INLIST;
unsigned char *ptr;
- unsigned int size; // in bytes
+ int size; // in bytes
} Map_Data;
typedef struct {
return ENFN->image_data_direct(ENDT, o->engine_data, NULL);
}
-EOLIAN static unsigned char *
+EOLIAN static void *
_efl_canvas_image_efl_gfx_buffer_buffer_map(Eo *eo_obj, Efl_Canvas_Image_Data *pd,
- unsigned int *length,
+ int *length,
Efl_Gfx_Buffer_Access_Mode mode,
- int x, int y, unsigned int w, unsigned int h,
- Efl_Gfx_Colorspace cspace, unsigned int *stride)
+ int x, int y, int w, int h,
+ Efl_Gfx_Colorspace cspace, int *stride)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
- unsigned int len = 0, str = 0;
+ int len = 0, str = 0;
Map_Data *map = NULL;
void *data;
EOLIAN static void
_efl_canvas_image_efl_gfx_buffer_buffer_unmap(Eo *eo_obj, Efl_Canvas_Image_Data *pd,
- unsigned char *data, unsigned int length)
+ void *data, int length)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
struct _RGBA_Image_Data_Map {
EINA_INLIST;
- unsigned char *ptr;
- unsigned int size, stride; // in bytes
+ unsigned char *ptr, *baseptr;
+ int size, stride; // in bytes
int rx, ry, rw, rh; // actual map region
- unsigned char *baseptr;
- unsigned char plane;
+ int plane;
Evas_Colorspace cspace;
Eina_Bool allocated; // ptr is malloc() for cow or cspace conv
Efl_Gfx_Buffer_Access_Mode mode;
Evas_Colorspace (*image_file_colorspace_get)(void *data, void *image);
Eina_Bool (*image_can_region_get) (void *data, void *image);
- void *(*image_data_map) (void *data, void **image, unsigned int *length, unsigned int *stride, int x, int y, int w, int h, Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode);
- void *(*image_data_unmap) (void *data, void *image, void *map, unsigned int length);
+ void *(*image_data_map) (void *data, void **image, int *length, int *stride, int x, int y, int w, int h, Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode);
+ void *(*image_data_unmap) (void *data, void *image, void *map, int length);
int (*image_native_init) (void *data, Evas_Native_Surface_Type type);
void (*image_native_shutdown) (void *data, Evas_Native_Surface_Type type);
static void *
eng_image_data_map(void *engdata EINA_UNUSED, void **image,
- unsigned int *length, unsigned int *stride,
+ int *length, int *stride,
int x, int y, int w, int h,
Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode)
{
}
static void *
-eng_image_data_unmap(void *engdata EINA_UNUSED, void *image, void *memory, unsigned int length)
+eng_image_data_unmap(void *engdata EINA_UNUSED, void *image, void *memory, int length)
{
RGBA_Image_Data_Map *map;
RGBA_Image *im = image;