return strdup(p);
}
-static int
-axtoi(char *arg)
-{
- int n, val, pwr=1, m, rc = 0;
- char hex[9], c;
-
- for (n = 0, m = 0; n < strlen(arg); n++)
- {
- if (arg[n] != ' ')
- {
- hex[m++] = c = toupper(arg[n]);
- if ((m == sizeof(hex)) || (c < '0') || (c > 'F'))
- return 0; /* overflow or invalid */
- }
- }
- hex[m] = 0; /* terminate string */
-
- for (n = 0; n < m; n++)
- {
- c = hex[m-n-1];
- if ((c >= 'A') && (c <= 'F'))
- val = c -'A' + 10;
- else
- val = c - '0';
- rc = rc + val * pwr;
- pwr *= 16;
- }
- return rc;
-}
-
-
-
-
-
#ifdef __FreeBSD__
#define BATTERY_STATE_NONE 0
static int
linux_acpi_cb_acpid_data(void *data, int type, void *event)
{
- Ecore_Con_Event_Server_Data *ev;
-
- ev = event;
if (delay_check) ecore_timer_del(delay_check);
delay_check = ecore_timer_add(0.2, linux_acpi_cb_delay_check, NULL);
return 1;
Eina_List *bats;
char *name;
int ac = 0;
- int flags = 0;
int charge = 0;
int max_charge = 0;
- int voltage = 0;
int seconds = 0;
int curcharge = 0;
int curmax = 0;
if ((token = strtok(buf, ":")))
{
- if (!strncmp("flags", token, 5))
- flags = axtoi(strtok (0, ": "));
- else if (!strncmp("charge", token, 6))
+ if (!strncmp("charge", token, 6))
charge = atoi(strtok(0, ": "));
else if (!strncmp("max_charge", token, 9))
max_charge = atoi(strtok(0, ": "));
current = atoi(strtok(0, ": "));
else if (!strncmp("time rem", token, 8))
timeleft = atoi(strtok(0, ": "));
- else if (!strncmp("voltage", token, 7))
- voltage = atoi(strtok(0, ": "));
else
strtok(0, ": ");
}
hrs = (time_left / 3600);
mins = ((time_left) / 60 - (hrs * 60));
- snprintf(buf, sizeof(buf), "%i:%02i", hrs, mins);
if (hrs < 0) hrs = 0;
if (mins < 0) mins = 0;
+ snprintf(buf, sizeof(buf), "%i:%02i", hrs, mins);
edje_object_part_text_set(battery, "e.text.time", buf);
}
menu = efreet_menu_new("Favorites");
for (i = 0, l = e_widget_ilist_items_get(cfdata->o_sel); l; l = l->next, i++)
{
- E_Ilist_Item *item = NULL;
Efreet_Desktop *desk = NULL;
const char *lbl;
- if (!(item = l->data)) continue;
+ if (!l->data) continue;
lbl = e_widget_ilist_nth_label_get(cfdata->o_sel, i);
if (!lbl) continue;
desk = efreet_util_desktop_name_find(lbl);
e_order_clear(order);
for (i = 0, l = e_widget_ilist_items_get(cfdata->o_sel); l; l = l->next, i++)
{
- E_Ilist_Item *item = NULL;
Efreet_Desktop *desk = NULL;
const char *lbl;
- if (!(item = l->data)) continue;
+ if (!l->data) continue;
lbl = e_widget_ilist_nth_label_get(cfdata->o_sel, i);
if (!lbl) continue;
desk = efreet_util_desktop_name_find(lbl);
if ((cfdata->can_rotate) || (cfdata->can_flip))
{
- int rot;
-
cfdata->flip = cfdata->rotation;
if (cfdata->flip_x)
cfdata->flip = (cfdata->flip | ECORE_X_RANDR_FLIP_X);
if (cfdata->flip_y)
cfdata->flip = (cfdata->flip | ECORE_X_RANDR_FLIP_Y);
- rot = ecore_x_randr_screen_rotation_get(man->root);
ecore_x_randr_screen_rotation_set(man->root,
(cfdata->rotation | cfdata->flip));
cfdata->orig_rotation = cfdata->rotation;
{
ob = e_icon_add(evas);
e_util_icon_theme_set(ob, "dialog-ok-apply");
- sel = res->id;
}
e_widget_ilist_nth_icon_set(cfdata->res_list, res->id, ob);
}
/* Basic Callbacks */
static int _basic_list_sort_cb (const void *d1, const void *d2);
-static void _e_imc_disable_change_cb (void *data, Evas_Object *obj);
static void _e_imc_list_change_cb (void *data, Evas_Object *obj);
static void _e_imc_setup_cb (void *data, void *data2);
static void _cb_files_changed (void *data, Evas_Object *obj, void *event_info);
static void _cb_files_selection_change(void *data, Evas_Object *obj, void *event_info);
static void _cb_files_files_changed (void *data, Evas_Object *obj, void *event_info);
-static void _cb_files_selected (void *data, Evas_Object *obj, void *event_info);
static void _cb_files_files_deleted (void *data, Evas_Object *obj, void *event_info);
static void _e_imc_adv_setup_cb (void *data, void *data2);
return (strcmp((const char*)d1, (const char*)d2));
}
-static void
-_e_imc_disable_change_cb(void *data, Evas_Object *obj)
-{
- E_Config_Dialog_Data *cfdata;
-
- cfdata = data;
-}
-
void
_e_imc_setup_button_toggle(Evas_Object *button, E_Input_Method_Config *imc)
{
e_widget_change(cfdata->o_frame);
}
-static void
-_cb_files_selected(void *data, Evas_Object *obj, void *event_info)
-{
- E_Config_Dialog_Data *cfdata;
-
- cfdata = data;
-}
-
static void
_cb_files_files_changed(void *data, Evas_Object *obj, void *event_info)
{
_cb_files_changed, cfdata);
evas_object_smart_callback_add(o, "selection_change",
_cb_files_selection_change, cfdata);
- evas_object_smart_callback_add(o, "selected",
- _cb_files_selected, cfdata);
evas_object_smart_callback_add(o, "changed",
_cb_files_files_changed, cfdata);
evas_object_smart_callback_add(o, "files_deleted",
il = e_widget_list_add(evas, 0, 1);
o = e_widget_check_add(evas, _("Use No Input Method"), &(cfdata->imc_disable));
- e_widget_on_change_hook_set(o, _e_imc_disable_change_cb, cfdata);
cfdata->gui.imc_advanced_disable = o;
e_widget_list_object_append(il, o, 1, 0, 0.5);
evas_object_key_grab(o, "Return", mask, ~mask, 0);
mask = 0;
evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
- mask = 0;
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
_imc_import_cb_key_down, import);
if (i < j) return -1;
else if (i > j) return 1;
- i = strcmp(bi->key, bi2->key);
+ i = e_util_strcmp(bi->key, bi2->key);
if (i < 0) return -1;
else if (i > 0) return 1;
params = &(bw->params);
}
- eina_stringshare_del(*action);
- eina_stringshare_del(*params);
+ if (*action) eina_stringshare_del(*action);
+ if (*params) eina_stringshare_del(*params);
*action = NULL;
*params = NULL;
static char *
_helper_modifier_name_get(int mod)
{
- char mods[1024]="";
+ char mods[1024] = "";
if (mod & E_BINDING_MODIFIER_SHIFT)
snprintf(mods, sizeof(mods), "SHIFT");
{
Evas *evas;
Eina_List *l, *profiles;
- const char *cur_profile;
int selected = -1, i;
if (!cfdata) return;
e_widget_ilist_clear(cfdata->o_list);
e_widget_ilist_go(cfdata->o_list);
- cur_profile = e_config_profile_get();
profiles = e_config_profile_list();
for (i = 0, l = profiles; l; l = l->next, i++)
{
e_widget_change(cfdata->o_frame);
}
-static void
-_cb_files_selected(void *data, Evas_Object *obj, void *event_info)
-{
- E_Config_Dialog_Data *cfdata;
-
- cfdata = data;
-}
-
static void
_cb_files_files_changed(void *data, Evas_Object *obj, void *event_info)
{
_cb_files_changed, cfdata);
evas_object_smart_callback_add(o, "selection_change",
_cb_files_selection_change, cfdata);
- evas_object_smart_callback_add(o, "selected",
- _cb_files_selected, cfdata);
evas_object_smart_callback_add(o, "changed",
_cb_files_files_changed, cfdata);
e_fm2_path_set(o, path, "/");
ret = e_widget_preview_edje_set(cfdata->o_preview, theme,
parts_list[i] + strlen(c_label));
if (!ret)
- ret = e_widget_preview_edje_set(cfdata->o_preview, theme,
- "e/desktop/background");
+ e_widget_preview_edje_set(cfdata->o_preview, theme,
+ "e/desktop/background");
eina_stringshare_del(theme);
}
}
kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
if (!kg)
fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
- mask = 0;
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
_theme_import_cb_key_down, import);
edje_freeze();
e_widget_ilist_freeze(il);
e_widget_ilist_append(il, NULL, _("None"), _trans_cb_changed, cfdata, NULL);
- l = e_theme_transition_list();
for (l = e_theme_transition_list(); l; l = l->next)
{
t = l->data;
static void
_import_edj_gen(Import *import)
{
- Evas *evas;
int fd, num = 1;
const char *file;
char buf[4096], cmd[4096], tmpn[4096];
FILE *f;
size_t len, off;
- evas = e_win_evas_get(import->dia->win);
-
file = import->cfdata->name;
fstrip = ecore_file_strip_ext(file);
if (!fstrip) return;
int quality;
};
-static void _import_opt_disabled_set(Import *import, int disabled);
static void _fsel_path_save(FSel *fsel);
static void _import_edj_gen(Import *import);
static int _import_cb_edje_cc_exit(void *data, int type, void *event);
static void _fsel_cb_ok(void *data, void *data2);
static void _import_cb_wid_on_focus(void *data, Evas_Object *obj);
static void _import_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event);
-static void _fsel_cb_wid_on_focus(void *data, Evas_Object *obj);
static void _fsel_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event);
E_Win *
kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
if (!kg)
fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
- mask = 0;
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
_import_cb_key_down, import);
kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
if (!kg)
fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
- mask = 0;
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
_fsel_cb_key_down, fsel);
win = data;
if (!(fsel = win->data)) return;
path = e_widget_fsel_selection_path_get(fsel->fsel_obj);
+ if (!path) return;
- if (path) p = strrchr(path, '.');
+ p = strrchr(path, '.');
if ((!p) || (!strcasecmp(p, ".edj")))
{
int r;
e_widget_focused_object_clear(import->content_obj);
}
-static void
-_fsel_cb_wid_on_focus(void *data, Evas_Object *obj)
-{
- FSel *fsel;
-
- fsel = data;
- if (obj == fsel->content_obj)
- e_widget_focused_object_clear(fsel->box_obj);
- else if (fsel->content_obj)
- e_widget_focused_object_clear(fsel->content_obj);
-}
-
static void
_import_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event)
{
sd->sx = it->x + (it->w / 2);
sd->sy = it->y + (it->h / 2);
}
- if ((x + ww) > mw)mw = x + ww;
+ if ((x + ww) > mw) mw = x + ww;
if ((y + hh) > mh) mh = y + hh;
x += ww;
}
a = M_PI - atan(-(double)dy / (double)dx);
}
d = sqrt((double)(dx * dx) + (double)(dy * dy));
- dx = dy = 0;
sum = 0;
if (it->file)
}
else
{
- int shw, shh, bsz, shx, shy;
+ int bsz, shx, shy;
_ds_shadow_obj_init(sh);
sh->square = 1;
shx = sh->ds->conf->shadow_x;
shy = sh->ds->conf->shadow_y;
- shw = sh->w;
- shh = sh->h;
bsz = sh->ds->conf->blur_size;
- if (shw > ((bsz * 2) + 2)) shw = (bsz * 2) + 2;
- if (shh > ((bsz * 2) + 2)) shh = (bsz * 2) + 2;
if (sh->use_shared)
{
{
char common[EXEBUFLEN], *exe = NULL;
Eina_List *l;
- int orig_len = 0, common_len = 0, exe_len, next_char, val, pos, matches;
+ int orig_len = 0, common_len = 0, exe_len, next_char, val, matches;
int clear_hist = 0;
if (!(strlen(cmd_buf)))
if (exe_len > common_len)
{
val = 0;
- pos = evas_string_char_next_get(exe, common_len, &val);
if (!next_char)
next_char = val;
else if (next_char != val)
if (hist_matches)
{
_e_exebuf_hist_update(hist_matches);
- hist_matches = eina_list_free(hist_matches);
+ eina_list_free(hist_matches);
exe_sel = eaps->data;
if (exe_sel)
{
static void
_ibar_cb_icon_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- Evas_Event_Mouse_In *ev;
IBar_Icon *ic;
- ev = event_info;
ic = data;
_ibar_icon_signal_emit(ic, "e,state,focused", "e");
if (ic->ibar->inst->ci->show_label)
static void
_ibar_cb_icon_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- Evas_Event_Mouse_Out *ev;
IBar_Icon *ic;
- ev = event_info;
ic = data;
_ibar_icon_signal_emit(ic, "e,state,unfocused", "e");
if (ic->ibar->inst->ci->show_label)
static void
_ibar_inst_cb_leave(void *data, const char *type, void *event_info)
{
- E_Event_Dnd_Leave *ev;
Instance *inst;
- ev = event_info;
inst = data;
inst->ibar->ic_drop_before = NULL;
evas_object_del(inst->ibar->o_drop);
static void
_ibox_cb_icon_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- Evas_Event_Mouse_In *ev;
IBox_Icon *ic;
- ev = event_info;
ic = data;
_ibox_icon_signal_emit(ic, "e,state,focused", "e");
if (ic->ibox->inst->ci->show_label)
static void
_ibox_inst_cb_leave(void *data, const char *type, void *event_info)
{
- E_Event_Dnd_Leave *ev;
Instance *inst;
- ev = event_info;
inst = data;
inst->ibox->ic_drop_before = NULL;
evas_object_del(inst->ibox->o_drop);
/* local variables */
static Eina_List *instances = NULL;
static Eina_List *desks = NULL;
-static Eina_List *sels = NULL;
static Eina_List *handlers = NULL;
static Eina_List *exes = NULL;
static Ecore_Timer *defer = NULL;
if (menu)
{
Eina_List *l, *ll;
- Efreet_Desktop *desktop;
char buff[PATH_MAX];
Efreet_Menu *entry, *subentry;
Eina_List *settings, *sys, *kbd;
EINA_LIST_FOREACH(menu->entries, l, entry)
{
if (entry->type != EFREET_MENU_ENTRY_MENU) continue;
- desktop = entry->desktop;
EINA_LIST_FOREACH(entry->entries, ll, subentry)
{
+ Efreet_Desktop *desktop;
if (subentry->type != EFREET_MENU_ENTRY_DESKTOP) continue;
if (!(desktop = subentry->desktop)) continue;
if ((settings) && (sys) &&
static void
_e_mod_win_cb_mouse_wheel(void *data, Evas *evas, Evas_Object *obj, void *event)
{
- Il_Ind_Win *iwin;
Evas_Event_Mouse_Wheel *ev;
Ecore_X_Illume_Quickpanel_State state;
- if (!(iwin = data)) return;
+ if (!data) return;
ev = event;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if (ev->direction != 0) return;
s[eol - p] = 0;
p2 = evas_string_char_next_get(s, 0, &(glyphs[0]));
if ((p2 > 0) && (glyphs[0] > 0))
- p2 = evas_string_char_next_get(s, p2, &(glyphs[1]));
+ evas_string_char_next_get(s, p2, &(glyphs[1]));
}
static void
_e_kbd_dict_matches_lookup_iter(E_Kbd_Dict *kd, Eina_List *word,
Eina_List *more)
{
- Eina_List *l, *l2, *list;
- const char *p, *pn;
+ Eina_List *l, *list;
+ const char *p;
char *base, *buf, *wd, *bufapp;
E_Kbd_Dict_Letter *kl;
int len = 0, dist = 0, d, baselen, maxdist = 0, md;
- static int level = 0, lv;
+ static int level = 0;
level++;
for (l = word; l; l = l->next)
if (kw)
{
int accuracy;
- int w, b, w2, b2, wc, bc, upper;
+ int w, b, w2, b2, wc, bc;
// match any capitalisation
for (w = 0, b = 0; wd[w] && buf[b];)
static const char *
_string_to_keysym(const char *str)
{
- int glyph, ok;
+ int glyph;
/* utf8 -> glyph id (unicode - ucs4) */
glyph = 0;
- ok = evas_string_char_next_get(str, 0, &glyph);
+ evas_string_char_next_get(str, 0, &glyph);
if (glyph <= 0) return NULL;
/* glyph id -> keysym */
if (glyph > 0xff) glyph |= 0x1000000;
kbds = efreet_util_desktop_category_list("Keyboard");
EINA_LIST_FOREACH(kbds, l, desktop)
{
- const char *dname;
-
- dname = ecore_file_file_get(desktop->orig_path);
ow = e_widget_radio_add(evas, desktop->name, nn, rg);
e_widget_framelist_object_append(of, ow);
evas_object_smart_callback_add(ow, "changed",
static void
_il_sk_win_cb_back_click(void *data, void *data2)
{
- Il_Sk_Win *swin;
E_Border *bd, *fbd;
Eina_List *focused, *l;
- if (!(swin = data)) return;
+ if (!data) return;
if (!(bd = e_border_focused_get())) return;
focused = e_border_focus_stack_get();
EINA_LIST_REVERSE_FOREACH(focused, l, fbd)
static void
_il_sk_win_cb_close_click(void *data, void *data2)
{
- Il_Sk_Win *swin;
E_Border *bd;
- if (!(swin = data)) return;
+ if (!data) return;
if (!(bd = e_border_focused_get())) return;
e_border_act_close_begin(bd);
}
kbds = efreet_util_desktop_category_list("Keyboard");
EINA_LIST_FOREACH(kbds, l, desktop)
{
- const char *dname;
-
- dname = ecore_file_file_get(desktop->orig_path);
o = e_widget_radio_add(e, desktop->name, nn, rg);
e_widget_framelist_object_append(frame, o);
evas_object_smart_callback_add(o, "changed", _e_cfg_keyboard_change, NULL);
return 1;
}
-static int
-_e_kbd_cb_border_add(void *data, int type, void *event)
-{
- E_Event_Border_Add *ev;
-
- ev = event;
- // nothing - border hooks do this
- return 1;
-}
-
static int
_e_kbd_cb_border_remove(void *data, int type, void *event)
{
ecore_event_handler_add
(ECORE_X_EVENT_CLIENT_MESSAGE,
_e_kbd_cb_client_message, NULL));
- handlers = eina_list_append(handlers,
- ecore_event_handler_add
- (E_EVENT_BORDER_ADD,
- _e_kbd_cb_border_add, NULL));
handlers = eina_list_append(handlers,
ecore_event_handler_add
(E_EVENT_BORDER_REMOVE,
s[eol - p] = 0;
p2 = evas_string_char_next_get(s, 0, &(glyphs[0]));
if ((p2 > 0) && (glyphs[0] > 0))
- p2 = evas_string_char_next_get(s, p2, &(glyphs[1]));
+ evas_string_char_next_get(s, p2, &(glyphs[1]));
}
static void
if (cmp < 0)
{
fprintf(f, "%s %i\n", kw->word, kw->usage);
- writeline = 1;
eina_stringshare_del(kw->word);
free(kw);
kd->changed.writes = eina_list_remove_list(kd->changed.writes, kd->changed.writes);
static const char *
_string_to_keysym(const char *str)
{
- int glyph, ok;
+ int glyph;
/* utf8 -> glyph id (unicode - ucs4) */
glyph = 0;
- ok = evas_string_char_next_get(str, 0, &glyph);
+ evas_string_char_next_get(str, 0, &glyph);
if (glyph <= 0) return NULL;
/* glyph id -> keysym */
if (glyph > 0xff) glyph |= 0x1000000;
static int
_cb_event_zone_move_resize(void *data, int type, void *event)
{
- E_Event_Zone_Move_Resize *ev;
-
- ev = event;
_e_mod_layout_apply_all();
return 1;
}
static void _cb_slipshelf_app_next(const void *data, E_Slipshelf *ess, E_Slipshelf_Action action);
static void _cb_slipshelf_app_prev(const void *data, E_Slipshelf *ess, E_Slipshelf_Action action);
static void _cb_slipwin_border_select(void *data, E_Slipwin *esw, E_Border *bd);
-static void _cb_slipshelf_select(const void *data, E_Slipshelf *ess, E_Slipshelf_Action action);
static void _cb_slipshelf_border_select(void *data, E_Slipshelf *ess, E_Border *bd);
static void _cb_slipshelf_border_home2(void *data, E_Slipshelf *ess, E_Border *pbd);
static void _cb_selected(void *data, Evas_Object *obj, void *event_info);
_cb_event_border_add(void *data, int type, void *event)
{
E_Event_Border_Add *ev;
- Efreet_Desktop *desktop;
Instance *ins;
Eina_List *l;
e_slipshelf_action_enabled_set(slipshelf, E_SLIPSHELF_ACTION_APP_NEXT, 1);
e_slipshelf_action_enabled_set(slipshelf, E_SLIPSHELF_ACTION_APP_PREV, 1);
}
- desktop = e_exec_startup_id_pid_find(ev->border->client.netwm.pid,
- ev->border->client.netwm.startup_id);
EINA_LIST_FOREACH(instances, l, ins)
if (!ins->border)
{
{
Efreet_Menu *menu, *entry, *subentry;
- Efreet_Desktop *desktop;
char *label, *icon, *plabel;
Eina_List *settings_desktops, *system_desktops, *keyboard_desktops;
Eina_List *l, *ll;
{
if (entry->type != EFREET_MENU_ENTRY_MENU) continue;
- desktop = entry->desktop;
-
plabel = NULL;
if (entry->name) plabel = strdup(entry->name);
EINA_LIST_FOREACH(entry->entries, ll, subentry)
{
+ Efreet_Desktop *desktop;
if (subentry->type != EFREET_MENU_ENTRY_DESKTOP) continue;
label = icon = NULL;
static void _e_slipshelf_slide(E_Slipshelf *ess, int out, double len);
static int _e_slipshelf_cb_mouse_up(void *data, int type, void *event);
static int _e_slipshelf_cb_zone_move_resize(void *data, int type, void *event);
-static int _e_slipshelf_cb_zone_del(void *data, int type, void *event);
static void _e_slipshelf_event_simple_free(void *data, void *ev);
static void _e_slipshelf_object_del_attach(void *o);
static int _e_slipshelf_cb_border_focus_in(void *data, int type, void *event);
static int _e_slipshelf_cb_border_property(void *data, int type, void *event);
static void _e_slipshelf_title_update(E_Slipshelf *ess);
static void _e_slipshelf_cb_gadcon_min_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
-static void _e_slipshelf_cb_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
static Evas_Object *_e_slipshelf_cb_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *style);
static void _e_winilist_cb_item_sel(void *data, void *data2);
EAPI int
e_slipshelf_shutdown(void)
{
- E_Config_Dialog *cfd;
-
e_winilist_shutdown();
return 1;
}
e_slipshelf_new(E_Zone *zone, const char *themedir)
{
E_Slipshelf *ess;
- Evas_Coord mw, mh, vx, vy, vw, vh, w, h;
+ Evas_Coord mw, mh, vx, vy, vw, vh;
int x, y;
Evas_Object *o;
edje_object_part_swallow(ess->base_obj, "e.swallow.extra", ess->gadcon_extra->o_container);
e_gadcon_min_size_request_callback_set(ess->gadcon_extra, _e_slipshelf_cb_gadcon_min_size_request, ess);
- e_gadcon_size_request_callback_set(ess->gadcon_extra, _e_slipshelf_cb_gadcon_size_request, ess);
e_gadcon_frame_request_callback_set(ess->gadcon_extra, _e_slipshelf_cb_gadcon_frame_request, ess);
e_gadcon_orient(ess->gadcon_extra, E_GADCON_ORIENT_TOP);
e_gadcon_zone_set(ess->gadcon_extra, ess->zone);
edje_object_part_swallow(ess->base_obj, "e.swallow.content", ess->gadcon->o_container);
e_gadcon_min_size_request_callback_set(ess->gadcon, _e_slipshelf_cb_gadcon_min_size_request, ess);
- e_gadcon_size_request_callback_set(ess->gadcon, _e_slipshelf_cb_gadcon_size_request, ess);
e_gadcon_frame_request_callback_set(ess->gadcon, _e_slipshelf_cb_gadcon_frame_request, ess);
e_gadcon_orient(ess->gadcon, E_GADCON_ORIENT_TOP);
e_gadcon_zone_set(ess->gadcon, ess->zone);
static void
_e_slipshelf_applist_update(E_Slipshelf *ess)
{
- Evas_Coord mw, mh, vx, vy, vw, vh, w, h, sfmw, sfmh, cmw, cmh, smw, smh;
- int i, selnum, x, y;
- int pw, ph;
+ Evas_Coord vx, vy, vw, vh, sfmw, sfmh, cmw, cmh, smw, smh;
+ int x, y;
- i = 0;
-
- pw = ess->popup->w;
- ph = ess->popup->h;
ess->bsel = e_border_focused_get();
e_winilist_optimial_size_get(ess->scrollframe_obj, &sfmw, &sfmh);
_e_slipshelf_object_del_attach(void *o)
{
E_Slipshelf *ess;
- E_Event_Slipshelf_Del *ev;
if (e_object_is_del(E_OBJECT(o))) return;
ess = o;
ev = event;
ess = data;
ess->focused_border = ev->border;
- _e_slipshelf_title_update(ess);
+ _e_slipshelf_title_update(ess);
+ return 1;
}
static int
ess = data;
if (ess->focused_border == ev->border)
ess->focused_border = NULL;
- _e_slipshelf_title_update(ess);
+ _e_slipshelf_title_update(ess);
+ return 1;
}
static int
ess = data;
if (ess->focused_border == ev->border)
_e_slipshelf_title_update(ess);
+ return 1;
}
static void
return;
}
-static void
-_e_slipshelf_cb_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h)
-{
- E_Slipshelf *ess;
-
- ess = data;
- return;
-}
-
static Evas_Object *
_e_slipshelf_cb_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *style)
{
static int
_cb_border_add(void *data, int ev_type, void *event)
{
- E_Event_Border_Add *ev;
-
- ev = event;
- {
- Eina_List *l;
+ Eina_List *l;
- for (l = winilists; l; l = l->next) _refill(l->data);
- }
+ for (l = winilists; l; l = l->next) _refill(l->data);
return 1;
}
static int
_cb_border_remove(void *data, int ev_type, void *event)
{
- E_Event_Border_Remove *ev;
-
- ev = event;
- {
- Eina_List *l;
+ Eina_List *l;
- for (l = winilists; l; l = l->next) _refill(l->data);
- }
+ for (l = winilists; l; l = l->next) _refill(l->data);
return 1;
}
static int
_cb_border_show(void *data, int ev_type, void *event)
{
- E_Event_Border_Show *ev;
-
- ev = event;
- {
- Eina_List *l;
+ Eina_List *l;
- for (l = winilists; l; l = l->next) _refill(l->data);
- }
+ for (l = winilists; l; l = l->next) _refill(l->data);
return 1;
}
static int
_cb_border_hide(void *data, int ev_type, void *event)
{
- E_Event_Border_Hide *ev;
-
- ev = event;
- {
- Eina_List *l;
+ Eina_List *l;
- for (l = winilists; l; l = l->next) _refill(l->data);
- }
+ for (l = winilists; l; l = l->next) _refill(l->data);
return 1;
}
static int
_cb_border_property(void *data, int ev_type, void *event)
{
- E_Event_Border_Property *ev;
-
- ev = event;
- /* FIXME: should really be optimal on what properties warrant a refill */
- {
- Eina_List *l;
+ Eina_List *l;
- for (l = winilists; l; l = l->next) _refill(l->data);
- }
+ for (l = winilists; l; l = l->next) _refill(l->data);
return 1;
}
static int
_cb_desk_show(void *data, int ev_type, void *event)
{
- E_Event_Desk_Show *ev;
-
- ev = event;
- /* FIXME: should really be optimal on what properties warrant a refill */
- {
- Eina_List *l;
+ Eina_List *l;
- for (l = winilists; l; l = l->next) _refill(l->data);
- }
+ for (l = winilists; l; l = l->next) _refill(l->data);
return 1;
}
{
DBusError err;
char *udi;
- int ret;
dbus_error_init(&err);
dbus_message_get_args(msg, &err, DBUS_TYPE_STRING, &udi, DBUS_TYPE_INVALID);
- ret = e_hal_device_query_capability(dbus_conn, udi, "input.keyboard",
- _e_kbd_dbus_cb_input_kbd_is, udi);
+ e_hal_device_query_capability(dbus_conn, udi, "input.keyboard",
+ _e_kbd_dbus_cb_input_kbd_is, udi);
}
static void
static int _pager_cb_event_desk_show(void *data, int type, void *event);
static int _pager_cb_event_desk_name_change(void *data, int type, void *event);
static int _pager_cb_event_container_resize(void *data, int type, void *event);
-static void _pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static void _pager_window_cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _pager_window_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _pager_window_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _pager_window_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
e_layout_pack(pd->o_layout, pw->o_window);
e_layout_child_raise(pw->o_window);
- evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_IN,
- _pager_window_cb_mouse_in, pw);
- evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_OUT,
- _pager_window_cb_mouse_out, pw);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
_pager_window_cb_mouse_down, pw);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP,
return 1;
}
-static void
-_pager_window_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- Evas_Event_Mouse_In *ev;
- Pager_Win *pw;
-
- ev = event_info;
- pw = data;
- /* FIXME: display window title in some tooltip thing */
-}
-
-static void
-_pager_window_cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- Evas_Event_Mouse_Out *ev;
- Pager_Win *pw;
-
- ev = event_info;
- pw = data;
- /* FIXME: close tooltip */
-}
-
static void
_pager_window_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
static void
_pager_drop_cb_leave(void *data, const char *type, void *event_info)
{
- E_Event_Dnd_Leave *ev;
Pager *p;
Eina_List *l;
- ev = event_info;
p = data;
if (act_popup) p = act_popup->pager;
e_menu_post_deactivate_callback_set(inst->main_menu,
_menu_cb_post,
inst);
- dir = E_MENU_POP_DIRECTION_AUTO;
switch (inst->gcc->gadcon->orient)
{
case E_GADCON_ORIENT_TOP:
static void
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
{
- Config_Face *inst;
-
- inst = gcc->data;
e_gadcon_client_aspect_set(gcc, 16, 16);
e_gadcon_client_min_size_set(gcc, 16, 16);
}
sensor_type = SENSOR_TYPE_LINUX_ACPI;
sensor_name = strdup(name);
- therms = eina_list_free(therms);
+ eina_list_free(therms);
}
else
{
- therms = eina_list_free(therms);
+ eina_list_free(therms);
if (ecore_file_exists("/proc/omnibook/temperature"))
{
sensor_type = SENSOR_TYPE_OMNIBOOK;
sensor_path, sensor_name);
}
}
- therms = eina_list_free(therms);
+ eina_list_free(therms);
}
if (!sensor_path)
{
sensor_path, sensor_name);
}
}
- therms = eina_list_free(therms);
+ eina_list_free(therms);
}
}
}
{
bind = l->data;
- if (bind->action && strcmp(bind->action,"winlist")) continue;
+ if (bind->action && strcmp(bind->action, "winlist")) continue;
mod = 0;
if (bind->key && (!strcmp(bind->key, ev->keyname)) &&
((bind->modifiers == mod) || (bind->any_mod)))
{
- if (!(act = e_action_find(bind->action)));
+ if (!(act = e_action_find(bind->action))) continue;
if (act->func.go_key)
act->func.go_key(E_OBJECT(winlist->zone), bind->params, ev);
else if (act->func.go)
_e_wizard_main_new(E_Zone *zone)
{
E_Popup *pop;
- Evas_Object *o, *o_ev;
+ Evas_Object *o;
Evas_Modifier_Mask mask;
Eina_Bool kg;
fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
_e_wizard_cb_key_down, pop);
- o_ev = o;
/* set up next/prev buttons */
edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment"));
_e_wizard_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event)
{
Evas_Event_Key_Down *ev;
- E_Popup *pop;
ev = event;
- pop = (E_Popup *)data;
if (!o_content) return;
if (!strcmp(ev->keyname, "Tab"))
{