ecore >= 0.9.9
ecore-evas >= 0.9.9
ecore-file >= 0.9.9
+ ecore-imf >= 0.9.9
edje >= 0.9.9
]
)
evas_object_show(win);
}
-static int
+static Eina_Bool
_exit_timer(void *data)
{
elm_exit();
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
/* this is your elementary main function - it MUSt be called IMMEDIATELY
ecore_animator_del(ani);
}
-static int
+static Eina_Bool
anim(void *data)
{
Evas_Object *win = data;
evas_object_move(sh, x, y);
evas_object_resize(sh, w, h);
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
void
printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", data, obj, event_info);
}
-static int
+static Eina_Bool
anim(void *data)
{
Evas_Object *gl = data;
y = 0;
x = (sin(ecore_loop_time_get()) * 500);
evas_object_move(gl, x, y);
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
static Progressbar _test_progressbar;
-static int
+static Eina_Bool
_my_progressbar_value_set (void *data)
{
double progress;
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <Ecore_File.h>
+#include <Ecore_IMF.h>
#include <Edje.h>
#ifdef ELM_EDBUS
}
/*** PRIVATES ***/
-static int
+static Eina_Bool
_sel_do(void *data)
{
struct sel_data *sd;
}
}
-static int
+static Eina_Bool
_delay_write(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
_save(data);
wd->delay_write = NULL;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
_signal_unpressed(data, obj, emission, source); /* safe guard when the theme does not emit the 'unpress' signal */
}
-static int
+static Eina_Bool
_autorepeat_send(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
return ECORE_CALLBACK_RENEW;
}
-static int
+static Eina_Bool
_autorepeat_initial_send(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
static const char *widtype = NULL;
static void _del_hook(Evas_Object *obj);
static void _theme_hook(Evas_Object *obj);
-static int _ticker(void *data);
-static int _signal_clock_val_up(void *data);
-static int _signal_clock_val_down(void *data);
+static Eina_Bool _ticker(void *data);
+static Eina_Bool _signal_clock_val_up(void *data);
+static Eina_Bool _signal_clock_val_down(void *data);
static void _time_update(Evas_Object *obj);
static void
edje_object_signal_emit(wd->clk, "elm,action,unfocus", "elm");
}
-static int
+static Eina_Bool
_ticker(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
struct timeval timev;
struct tm *tm;
time_t tt;
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
gettimeofday(&timev, NULL);
t = ((double)(1000000 - timev.tv_usec)) / 1000000.0;
wd->ticker = ecore_timer_add(t, _ticker, data);
_time_update(data);
}
}
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
-static int
+static Eina_Bool
_signal_clock_val_up(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
return ECORE_CALLBACK_CANCEL;
}
-static int
+static Eina_Bool
_signal_clock_val_down(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
static Eina_Bool _elm_cnp_init(void);
-static int selection_clear(void *udata __UNUSED__, int type, void *event);
-static int selection_notify(void *udata __UNUSED__, int type, void *event);
+static Eina_Bool selection_clear(void *udata __UNUSED__, int type, void *event);
+static Eina_Bool selection_notify(void *udata __UNUSED__, int type, void *event);
static char *remove_tags(const char *p, int *len);
static char *mark_up(const char *start, int *lenp);
return true;
}
-static int
+static Eina_Bool
selection_clear(void *udata __UNUSED__, int type, void *event){
Ecore_X_Event_Selection_Clear *ev = event;
struct _elm_cnp_selection *sel;
if (selections[i].ecore_sel == ev->selection) break;
}
/* Not me... Don't care */
- if (i == ELM_SEL_MAX) return true;
+ if (i == ELM_SEL_MAX) return ECORE_CALLBACK_PASS_ON;
sel = selections + i;
sel->active = 0;
sel->widget = NULL;
sel->selbuf = NULL;
- return true;
+ return ECORE_CALLBACK_PASS_ON;
}
/**
* Response to a selection notify
*/
-static int
+static Eina_Bool
selection_notify(void *udata __UNUSED__, int type, void *event){
Ecore_X_Event_Selection_Notify *ev = event;
struct _elm_cnp_selection *sel;
sel = selections + ELM_SEL_SECONDARY;
break;
default:
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
for (i = 0 ; i < CNP_N_ATOMS ; i ++)
}
}
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
#define ATOM_E_CONFIG 4
static Eina_Bool _prop_config_get(void);
-static int _prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev);
+static Eina_Bool _prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev);
static Eina_Bool
_prop_config_get(void)
int size = 0;
Ecore_X_Atom atom;
char buf[512];
- unsigned char *data = NULL, *config_data;
-
+ unsigned char *data = NULL;
+ Elm_Config *config_data;
+
snprintf(buf, sizeof(buf), "ENLIGHTENMENT_CONFIG_%s", _elm_profile);
atom = ecore_x_atom_get(buf);
_atom_config = atom;
return EINA_TRUE;
}
-static int
+static Eina_Bool
_prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
{
Ecore_X_Event_Window_Property *event = ev;
_prop_config_get();
}
}
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
#endif
static void _del_hook(Evas_Object *obj);
static void _theme_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
-static int _prop_change(void *data, int type, void *event);
+static Eina_Bool _prop_change(void *data, int type, void *event);
/* local functions */
static void
}
*/
-static int
+static Eina_Bool
_prop_change(void *data, int type __UNUSED__, void *event)
{
#ifdef HAVE_ELEMENTARY_X
Ecore_X_Event_Window_Property *ev;
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 1;
+ if (!wd) return ECORE_CALLBACK_PASS_ON;
ev = event;
if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE)
{
}
#endif
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
/**
if (it->func) it->func(it->data, obj2, NULL);
}
-static int
+static Eina_Bool
_long_press(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
Evas_Object *top;
const Eina_List *l;
const Elm_Entry_Context_Menu_Item *it;
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
if ((wd->api) && (wd->api->obj_longpress))
{
wd->api->obj_longpress(data);
}
wd->longpress_timer = NULL;
evas_object_smart_callback_call(data, SIG_LONGPRESSED, NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
}
#ifdef HAVE_ELEMENTARY_X
-static int
+static Eina_Bool
_event_selection_notify(void *data, int type __UNUSED__, void *event)
{
Widget_Data *wd = elm_widget_data_get(data);
Ecore_X_Event_Selection_Notify *ev = event;
- if (!wd) return 1;
- if (!wd->selection_asked) return 1;
+ if (!wd) return ECORE_CALLBACK_PASS_ON;
+ if (!wd->selection_asked) return ECORE_CALLBACK_PASS_ON;
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
}
wd->selection_asked = EINA_FALSE;
}
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
-static int
+static Eina_Bool
_event_selection_clear(void *data, int type __UNUSED__, void *event)
{
Widget_Data *wd = elm_widget_data_get(data);
elm_entry_select_none(data);
}
return 1;*/
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
#endif
}
}
-static int
+static Eina_Bool
_flip(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Map *mf, *mb;
Evas_Coord cx, cy, px, py, foc;
int lx, ly, lz, lr, lg, lb, lar, lag, lab;
- if (!wd->animator) return 0;
+ if (!wd->animator) return ECORE_CALLBACK_CANCEL;
t = t / wd->len;
if (t > 1.0) t = 1.0;
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
evas_object_geometry_get(obj, &x, &y, &w, &h);
mf = evas_map_new(4);
wd->state = !wd->state;
_configure(obj);
evas_object_smart_callback_call(obj, "animate,done", NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
_configure(obj);
}
-static int
+static Eina_Bool
_animate(void *data)
{
return _flip(data);
}
}
-static int
+static Eina_Bool
_long_press(void *data)
{
Elm_Gengrid_Item *item = data;
item->long_timer = NULL;
- if ((item->disabled) || (item->dragging)) return 0;
+ if ((item->disabled) || (item->dragging)) return ECORE_CALLBACK_CANCEL;
item->wd->longpressed = EINA_TRUE;
evas_object_smart_callback_call(item->wd->self, "longpressed", item);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
}
}
-static int
+static Eina_Bool
_long_press(void *data)
{
Elm_Genlist_Item *it = data;
it->long_timer = NULL;
- if ((it->disabled) || (it->dragging)) return 0;
+ if ((it->disabled) || (it->dragging)) return ECORE_CALLBACK_CANCEL;
it->wd->longpressed = EINA_TRUE;
evas_object_smart_callback_call(it->wd->obj, "longpressed", it);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
return n;
}
-static int
+static Eina_Bool
_item_idler(void *data)
{
Widget_Data *wd = data;
if (!wd->queue)
{
wd->queue_idler = NULL;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
wd->level_active[level] = 0;
}
-static int
+static Eina_Bool
_delay_change(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
void *d;
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->delay = NULL;
d = (void *)elm_index_item_selected_get(data, wd->level);
if (d) evas_object_smart_callback_call(data, "delay,changed", d);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
}
}
-static int
+static Eina_Bool
_long_press(void *data)
{
Elm_List_Item *it = data;
Widget_Data *wd = elm_widget_data_get(it->obj);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
it->long_timer = NULL;
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, 0);
wd->longpressed = EINA_TRUE;
evas_object_smart_callback_call(it->obj, "longpressed", it);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
*
*/
-static int _elm_signal_exit(void *data, int ev_type, void *ev);
+static Eina_Bool _elm_signal_exit(void *data, int ev_type, void *ev);
char *_elm_appname = NULL;
const char *_elm_data_dir = NULL;
static int _elm_policies[ELM_POLICY_LAST];
static Ecore_Event_Handler *_elm_exit_handler = NULL;
-static int
+static Eina_Bool
_elm_signal_exit(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __UNUSED__)
{
elm_exit();
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
void
eina_iterator_free(it);
}
-static int
+static Eina_Bool
_scr_timeout(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->nosmooth--;
if (wd->nosmooth == 0) _smooth_update(data);
wd->scr_timer = NULL;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
wd->scr_timer = ecore_timer_add(0.5, _scr_timeout, data);
}
-static int
+static Eina_Bool
zoom_do(Evas_Object *obj, double t)
{
Widget_Data *wd = elm_widget_data_get(obj);
wd->calc_job = ecore_job_add(_calc_job, wd);
if (t >= 1.0)
{
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
-static int
+static Eina_Bool
_zoom_anim(void *data)
{
Evas_Object *obj = data;
double t;
int go;
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
t = ecore_loop_time_get();
if (t >= wd->t_end)
t = 1.0;
return go;
}
-static int
+static Eina_Bool
_long_press(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->long_timer = NULL;
wd->longpressed = EINA_TRUE;
evas_object_smart_callback_call(data, SIG_LONGPRESSED, NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
_sizing_eval(obj);
}
-static int
+static Eina_Bool
_timer_cb(void *data)
{
Evas_Object *obj = data;
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->timer = NULL;
evas_object_hide(obj);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
}
}
-static int
+static Eina_Bool
_scr_timeout(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->nosmooth--;
if (wd->nosmooth == 0) _smooth_update(data);
wd->scr_timer = NULL;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
}
}
-static int
+static Eina_Bool
zoom_do(Evas_Object *obj, double t)
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord xx, yy, ow, oh;
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->size.w = (wd->size.ow * (1.0 - t)) + (wd->size.nw * t);
wd->size.h = (wd->size.oh * (1.0 - t)) + (wd->size.nh * t);
elm_smart_scroller_child_viewport_size_get(wd->scr, &ow, &oh);
free(g);
}
}
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
-static int
+static Eina_Bool
_zoom_anim(void *data)
{
Evas_Object *obj = data;
Widget_Data *wd = elm_widget_data_get(obj);
double t;
- int go;
- if (!wd) return 0;
+ Eina_Bool go;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
t = ecore_loop_time_get();
if (t >= wd->t_end)
t = 1.0;
if (!wd) return;
}
-static int
+static Eina_Bool
_long_press(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->long_timer = NULL;
wd->longpressed = EINA_TRUE;
evas_object_smart_callback_call(data, "longpressed", NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
}
}
-static int
+static Eina_Bool
_delay_change(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->delay = NULL;
evas_object_smart_callback_call(data, SIG_DELAY_CHANGED, NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
static void _theme_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static int _timer_cb(void *data);
+static Eina_Bool _timer_cb(void *data);
static void
_del_hook(Evas_Object *obj)
}
-static int
+static Eina_Bool
_timer_cb(void *data)
{
Evas_Object *obj = data;
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->timer = NULL;
elm_slideshow_next(obj);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
edje_object_signal_emit(wd->spinner, "elm,action,unfocus", "elm");
}
-static int
+static Eina_Bool
_delay_change(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
- if (!wd) return 0;
+ if (!wd) return ECORE_CALLBACK_CANCEL;
wd->delay = NULL;
evas_object_smart_callback_call(data, "delay,changed", NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
}
}
-static int
+static Eina_Bool
_spin_value(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
wd->is_generating = EINA_FALSE;
}
-static int
+static Eina_Bool
_thumb_apply_cb(void *data, int type __UNUSED__, void *ev __UNUSED__)
{
_thumb_apply(data);
}
#ifdef HAVE_ELEMENTARY_X
-static int
+static Eina_Bool
_elm_win_client_message(void *data, int type __UNUSED__, void *event)
{
Elm_Win *win = data;
Ecore_X_Event_Client_Message *e = event;
- if (e->format != 32) return 1;
+ if (e->format != 32) return ECORE_CALLBACK_PASS_ON;
if (e->message_type == ECORE_X_ATOM_E_COMP_FLUSH)
{
if (e->data.l[0] == win->xwin)
}
}
}
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
#endif
static void _smart_pan_pan_changed_hook(void *data, Evas_Object *obj, void *event_info);
static void _smart_event_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _smart_event_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static int _smart_hold_animator(void *data);
-static int _smart_momentum_animator(void *data);
+static Eina_Bool _smart_hold_animator(void *data);
+static Eina_Bool _smart_momentum_animator(void *data);
static void _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static int _smart_onhold_animator(void *data);
+static Eina_Bool _smart_onhold_animator(void *data);
static void _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _smart_event_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _smart_edje_drag_v_start(void *data, Evas_Object *obj, const char *emission, const char *source);
evas_object_smart_callback_call(obj, "drag,stop", NULL);
}
-static int
+static Eina_Bool
_smart_scrollto_x_animator(void *data)
{
Smart_Data *sd = data;
sd->scrollto.x.animator = NULL;
if (!sd->scrollto.y.animator)
_smart_anim_stop(sd->smart_obj);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
sd->bouncemex = 0;
}
-static int
+static Eina_Bool
_smart_scrollto_y_animator(void *data)
{
Smart_Data *sd = data;
sd->scrollto.y.animator = NULL;
if (!sd->scrollto.x.animator)
_smart_anim_stop(sd->smart_obj);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
elm_smart_scroller_child_region_show(sd->smart_obj, x, y, w, h);
}
-static int
+static Eina_Bool
_smart_bounce_x_animator(void *data)
{
Smart_Data *sd;
sd->down.bounce_x_hold = 1;
sd->down.bounce_x_animator = NULL;
sd->bouncemex = 0;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
-static int
+static Eina_Bool
_smart_bounce_y_animator(void *data)
{
Smart_Data *sd;
sd->down.bounce_y_hold = 1;
sd->down.bounce_y_animator = NULL;
sd->bouncemey = 0;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
#define LEFT 0
return EINA_FALSE;
}
-static int
+static Eina_Bool
_smart_momentum_animator(void *data)
{
Smart_Data *sd;
sd->down.bounce_y_hold = 0;
sd->down.ax = 0;
sd->down.ay = 0;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
}
}
-static int
+static Eina_Bool
_smart_hold_animator(void *data)
{
Smart_Data *sd = data;
}
}
elm_smart_scroller_child_pos_set(sd->smart_obj, ox, oy);
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
}
}
-static int
+static Eina_Bool
_smart_onhold_animator(void *data)
{
Smart_Data *sd;
// printf("scroll %i %i\n", sd->down.hold_x, sd->down.hold_y);
}
sd->down.onhold_tlast = t;
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static Eina_Bool