argh, another case of someone making callbacks with the data param last! fix fix! ABI borked again!

SVN revision: 76663
devs/princeamd/enlightenment-0.17-elive
Mike Blumenkrantz 11 years ago
parent e5a75c2b6d
commit baed804727
  1. 13
      src/bin/e_bg.c
  2. 2
      src/bin/e_bg.h
  3. 15
      src/bin/e_fm_mime.c
  4. 6
      src/bin/e_fm_mime.h
  5. 12
      src/bin/e_theme.c
  6. 3
      src/bin/e_theme.h

@ -3,7 +3,8 @@
/* local subsystem functions */
static void _e_bg_signal(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _e_bg_event_bg_update_free(void *data, void *event);
static void e_bg_handler_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path);
static int e_bg_handler_test(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path);
static void _e_bg_handler_image_imported(const char *image_path, void *data);
/* local subsystem globals */
@ -439,12 +440,13 @@ e_bg_update(void)
}
}
/* local subsystem functions */
/**
* Set background to image, as required in e_fm2_mime_handler_new()
*/
EAPI void
e_bg_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
static void
e_bg_handler_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path)
{
E_Container *con;
char buf[4096];
@ -511,8 +513,8 @@ e_bg_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __UNU
*
* Just edje files with "e/desktop/background" group are used.
*/
EAPI int
e_bg_handler_test(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
static int
e_bg_handler_test(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path)
{
if (!path) return 0;
@ -526,7 +528,6 @@ e_bg_handler_test(Evas_Object *obj __UNUSED__, const char *path, void *data __UN
return 1;
}
/* local subsystem functions */
static void
_e_bg_signal(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{

@ -35,8 +35,6 @@ EAPI void e_bg_add(int container, int zone, int desk_x, int desk_y, const char *
EAPI void e_bg_del(int container, int zone, int desk_x, int desk_y);
EAPI void e_bg_default_set(const char *file);
EAPI void e_bg_update(void);
EAPI void e_bg_handler_set(Evas_Object *obj, const char *path, void *data);
EAPI int e_bg_handler_test(Evas_Object *obj, const char *path, void *data);
EAPI E_Bg_Image_Import_Handle *e_bg_image_import_new(const char *image_file, void (*cb)(void *data, const char *edje_file), const void *data);
EAPI void e_bg_image_import_cancel(E_Bg_Image_Import_Handle *handle);

@ -137,12 +137,7 @@ e_fm_mime_icon_cache_flush(void)
}
/* create (allocate), set properties, and return a new mime handler */
EAPI E_Fm2_Mime_Handler *
e_fm2_mime_handler_new(const char *label, const char *icon_group,
void (*action_func)(Evas_Object *obj, const char *path, void *data),
void *action_data,
int(test_func) (Evas_Object * obj, const char *path, void *data),
void *test_data)
EAPI E_Fm2_Mime_Handler *e_fm2_mime_handler_new(const char *label, const char *icon_group, void (*action_func) (void *data, Evas_Object *obj, const char *path), void *action_data, int (test_func) (void *data, Evas_Object *obj, const char *path), void *test_data)
{
E_Fm2_Mime_Handler *handler;
@ -308,16 +303,16 @@ e_fm2_mime_handler_call(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const cha
if (handler->test_func)
{
if (handler->test_func(obj, path, handler->test_data))
if (handler->test_func(handler->test_data, obj, path))
{
handler->action_func(obj, path, handler->action_data);
handler->action_func(handler->action_data, obj, path);
return 1;
}
else
return 0;
}
handler->action_func(obj, path, handler->action_data);
handler->action_func(handler->action_data, obj, path);
return 1;
}
@ -369,7 +364,7 @@ e_fm2_mime_handler_test(E_Fm2_Mime_Handler *handler, Evas_Object *obj, const cha
if ((!handler) || (!obj) || (!path)) return 0;
if (!handler->test_func) return 1;
return handler->test_func(obj, path, handler->test_data);
return handler->test_func(handler->test_data, obj, path);
}
/* local subsystem functions */

@ -9,8 +9,8 @@ typedef struct _E_Fm2_Mime_Handler E_Fm2_Mime_Handler;
struct _E_Fm2_Mime_Handler
{
const char *label, *icon_group;
void (*action_func) (Evas_Object *obj, const char *path, void *data);
int (*test_func) (Evas_Object *obj, const char *path, void *data);
void (*action_func) (void *data, Evas_Object *obj, const char *path);
int (*test_func) (void *data, Evas_Object *obj, const char *path);
void *action_data;
void *test_data;
};
@ -19,7 +19,7 @@ EAPI const char *e_fm_mime_filename_get(const char *fname);
EAPI const char *e_fm_mime_icon_get(const char *mime);
EAPI void e_fm_mime_icon_cache_flush(void);
EAPI E_Fm2_Mime_Handler *e_fm2_mime_handler_new(const char *label, const char *icon_group, void (*action_func) (Evas_Object *obj, const char *path, void *data), void *action_data, int (test_func) (Evas_Object *obj, const char *path, void *data), void *test_data);
EAPI E_Fm2_Mime_Handler *e_fm2_mime_handler_new(const char *label, const char *icon_group, void (*action_func) (void *data, Evas_Object *obj, const char *path), void *action_data, int (test_func) (void *data, Evas_Object *obj, const char *path), void *test_data);
EAPI void e_fm2_mime_handler_free(E_Fm2_Mime_Handler *handler);
EAPI Eina_Bool e_fm2_mime_handler_mime_add(E_Fm2_Mime_Handler *handler, const char *mime);
EAPI Eina_Bool e_fm2_mime_handler_glob_add(E_Fm2_Mime_Handler *handler, const char *glob);

@ -15,6 +15,8 @@ static Eina_Bool _e_theme_mappings_quickfind_free_cb(const Eina_Hash *hash, con
static void _e_theme_category_register(const char *category);
static Eina_List *_e_theme_collection_item_register(Eina_List *list, const char *name);
static Eina_List *_e_theme_collection_items_find(const char *base, const char *collname);
static void e_theme_handler_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path);
static int e_theme_handler_test(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path);
/* local subsystem globals */
static Eina_Hash *mappings = NULL;
@ -515,8 +517,9 @@ e_theme_comp_list(void)
return _e_theme_collection_items_find("base/theme/borders", "e/comp");
}
EAPI void
e_theme_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
/* local subsystem functions */
static void
e_theme_handler_set(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path)
{
E_Action *a;
char buf[PATH_MAX];
@ -561,8 +564,8 @@ e_theme_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
}
EAPI int
e_theme_handler_test(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
static int
e_theme_handler_test(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *path)
{
if (!path) return 0;
if (!edje_file_group_exists(path, "e/widgets/border/default/border"))
@ -570,7 +573,6 @@ e_theme_handler_test(Evas_Object *obj __UNUSED__, const char *path, void *data _
return 1;
}
/* local subsystem functions */
static Eina_Bool
_e_theme_mappings_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
{

@ -27,8 +27,5 @@ EAPI Eina_List *e_theme_shelf_list(void);
EAPI int e_theme_comp_find(const char *shelf);
EAPI Eina_List *e_theme_comp_list(void);
EAPI void e_theme_handler_set(Evas_Object *obj, const char *path, void *data);
EAPI int e_theme_handler_test(Evas_Object *obj, const char *path, void *data);
#endif
#endif

Loading…
Cancel
Save