return EINA_FALSE;
MAGIC_CHECK_END();
- if (mode != EVAS_FILTER_MODE_OBJECT && mode != EVAS_FILTER_MODE_BELOW)
+ if ((mode != EVAS_FILTER_MODE_OBJECT) && (mode != EVAS_FILTER_MODE_BELOW))
return EINA_FALSE;
if (!o->filter)
}
info->datalen = finfo->datasize;
if (finfo->datasize)
- // FIXME: hande calloc fail
- info->data = calloc(1,finfo->datasize);
+ {
+ info->data = calloc(1, finfo->datasize);
+ if (!info->data)
+ {
+ }
+ }
else
info->data = NULL;
info->data_free = NULL;
rv = EINA_TRUE;
}
}
-
return rv;
}
+
+
+
+
/*
* Internal call
*/
int *outw, int *outh, Eina_Bool inv)
{
if (!info) return -1;
- if (!outw && !outh) return 0;
+ if ((!outw) && (!outh)) return 0;
if (filterinfo[info->filter].sizefn)
return filterinfo[info->filter].sizefn(info, inw, inh, outw, outh, inv);
return key;
}
+Evas_Software_Filter_Fn
+evas_filter_software_get(Evas_Filter_Info *info)
+{
+ return filterinfo[info->filter].filter;
+}
+
+void
+evas_filter_free(Evas_Object *o)
+{
+ if (!o->filter) return;
+ free(o->filter);
+ o->filter = NULL;
+}
+
+
+
+
+/*
+ * Private calls
+ */
+static Evas_Filter_Info *
+filter_alloc(Evas_Object *o)
+{
+ Evas_Filter_Info *info;
+
+ if (!o) return NULL;
+ info = calloc(1,sizeof(struct Evas_Filter_Info));
+ if (!info) return NULL;
+ info->dirty = 1;
+ info->filter = EVAS_FILTER_NONE;
+ info->mode = EVAS_FILTER_MODE_OBJECT;
+ info->datalen = 0;
+
+ o->filter = info;
+
+ return info;
+}
static int
blur_size_get(Evas_Filter_Info *info, int inw, int inh, int *outw, int *outh,
return 0;
}
-/**
+/*
* Generate a key for the Gaussian generator.
*
* The size is:
return key;
}
-Evas_Software_Filter_Fn
-evas_filter_software_get(Evas_Filter_Info *info)
-{
- return filterinfo[info->filter].filter;
-}
-/*
- * Private calls
- */
-static Evas_Filter_Info *
-filter_alloc(Evas_Object *o)
-{
- Evas_Filter_Info *info;
- if (!o) return NULL;
- // FIXME: handle alloc failure
- info = calloc(1,sizeof(struct Evas_Filter_Info));
- info->dirty = 1;
- info->filter = EVAS_FILTER_NONE;
- info->mode = EVAS_FILTER_MODE_OBJECT;
- info->datalen = 0;
- o->filter = info;
- return info;
-}
+
+
+
+
+
+
+
+
+
+
+
+
+
/**
* Software implementations
typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *);
-EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
int *outw, int *outh, Eina_Bool inv);
Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info);
+uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp);
+// expose for use in engines
+EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
+void evas_filter_free(Evas_Object *o);
struct _Evas_Object
{
void _evas_walk(Evas *e);
void _evas_unwalk(Evas *e);
+// expose for use in engines
EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
void evas_render_invalidate(Evas *e);
Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
-
+
/****************************************************************************/
/*****************************************/
/********************/