*
* @see evas_object_image_load_region_get()
*/
-EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
+eAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
/**
* Define if the orientation information in the image file should be honored.
EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
/**
+ * Get the support state of a given image
+ *
+ * @param obj The given image object pointer
+ * @return The region support state
+ * @since 1.2.0
+ *
+ * This function returns the state of the region support of given image
+ */
+EAPI Eina_Bool evas_object_image_region_support_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
+
+/**
* Set the native surface of a given image of the canvas
*
* @param obj The given canvas pointer.
return o->content_hint;
}
+EAPI Eina_Bool
+evas_object_image_region_support_get(const Evas_Object *obj)
+{
+ Evas_Object_Image *o;
+
+ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+ return EINA_FALSE;
+ MAGIC_CHECK_END();
+ o = (Evas_Object_Image *) (obj->object_data);
+ MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
+ return EINA_FALSE;
+ MAGIC_CHECK_END();
+
+ return obj->layer->evas->engine.func->image_can_region_get(
+ obj->layer->evas->engine.data.output,
+ o->engine_data);
+}
+
/* animated feature */
EAPI Eina_Bool
evas_object_image_animated_get(const Evas_Object *obj)
char *(*image_format_get) (void *data, void *image);
void (*image_colorspace_set) (void *data, void *image, int cspace);
int (*image_colorspace_get) (void *data, void *image);
+ Eina_Bool (*image_can_region_get) (void *data, void *image);
void (*image_mask_create) (void *data, void *image);
void *(*image_native_set) (void *data, void *image, void *native);
void *(*image_native_get) (void *data, void *image);
Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error);
Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num);
+ Eina_Bool do_region;
};
struct _Evas_Image_Save_Func
return EINA_TRUE;
}
+static Eina_Bool
+eng_image_can_region_get(void *data__UNUSED__, void *image)
+{
+ Evas_GL_Image *gim = image;
+ Image_Entry *im;
+ if (!gim) return EINA_FALSE;
+ im = (Image_Entry *)gim->im;
+ if (!im) return EINA_FALSE;
+ return ((Evas_Image_Load_Func*) im->info.loader)->do_region;
+}
+
+
static void
eng_image_max_size_get(void *data, int *maxw, int *maxh)
{
return im->space;
}
+static Eina_Bool
+eng_image_can_region_get(void *data__UNUSED__, void *image)
+{
+ Image_Entry *im;
+ if (!image) return EINA_FALSE;
+ im = image;
+ return ((Evas_Image_Load_Func*) im->info.loader)->do_region;
+}
+
static void
eng_image_mask_create(void *data __UNUSED__, void *image)
{
eng_image_format_get,
eng_image_colorspace_set,
eng_image_colorspace_get,
+ eng_image_can_region_get,
eng_image_mask_create,
eng_image_native_set,
eng_image_native_get,
EINA_TRUE,
evas_image_load_file_head_bmp,
evas_image_load_file_data_bmp,
- NULL
+ NULL,
+ EINA_FALSE
};
static Eina_Bool
EINA_TRUE,
evas_image_load_file_head_edb,
evas_image_load_file_data_edb,
- NULL
+ NULL,
+ EINA_FALSE
};
static Eina_Bool
EINA_TRUE,
evas_image_load_file_head_eet,
evas_image_load_file_data_eet,
- NULL
+ NULL,
+ EINA_FALSE
};
EINA_TRUE,
evas_image_load_file_head_generic,
evas_image_load_file_data_generic,
- NULL
+ NULL,
+ EINA_FALSE
};
static Eina_Bool
EINA_TRUE,
evas_image_load_file_head_gif,
evas_image_load_file_data_gif,
- evas_image_load_frame_duration_gif
+ evas_image_load_frame_duration_gif,
+ EINA_FALSE
};
#define byte2_to_int(a,b) (((b)<<8)|(a))
EINA_TRUE,
evas_image_load_file_head_ico,
evas_image_load_file_data_ico,
- NULL
+ NULL,
+ EINA_FALSE
};
static Eina_Bool
EINA_TRUE,
evas_image_load_file_head_jpeg,
evas_image_load_file_data_jpeg,
- NULL
+ NULL,
+ EINA_TRUE
};
EINA_TRUE,
evas_image_load_file_head_pmaps,
evas_image_load_file_data_pmaps,
- NULL
+ NULL,
+ EINA_FALSE
};
/* The buffer to load pmaps images */
EINA_TRUE,
evas_image_load_file_head_png,
evas_image_load_file_data_png,
- NULL
+ NULL,
+ EINA_FALSE
};
static Eina_Bool
EINA_TRUE,
evas_image_load_file_head_psd,
evas_image_load_file_data_psd,
- NULL
+ NULL,
+ EINA_FALSE
};
static int
EINA_FALSE,
evas_image_load_file_head_svg,
evas_image_load_file_data_svg,
- NULL
+ NULL,
+ EINA_FALSE
};
static int rsvg_initialized = 0;
EINA_TRUE,
evas_image_load_file_head_tga,
evas_image_load_file_data_tga,
- NULL
+ NULL,
+ EINA_FALSE
};
static Eina_Bool
EINA_TRUE,
evas_image_load_file_head_tiff,
evas_image_load_file_data_tiff,
- NULL
+ NULL,
+ EINA_FALSE
};
typedef struct TIFFRGBAImage_Extra TIFFRGBAImage_Extra;
EINA_TRUE,
evas_image_load_file_head_wbmp,
evas_image_load_file_data_wbmp,
- NULL
+ NULL,
+ EINA_FALSE
};
EINA_FALSE,
evas_image_load_file_head_xpm,
evas_image_load_file_data_xpm,
- NULL
+ NULL,
+ EINA_FALSE
};
// TODO: REWRITE THIS WITH THREAD SAFE VERSION NOT USING THIS HANDLE!!!!