From d59543dbc27bb1bfded31e9f4e01ca7e02f58f82 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 12 Jul 2001 16:40:13 +0000 Subject: [PATCH] work on fixing up the desktop code...... :) SVN revision: 4939 --- .../default/selections/file.bits.db | Bin 159744 -> 57344 bytes data/icons/archive/default.db | Bin 0 -> 49152 bytes .../{application => archive}/gnu-zip-unix.db | Bin data/icons/document/pdf.db | Bin 0 -> 49152 bytes src/config.c | 3 + src/e.h | 166 +- src/fs.c | 10 +- src/icons.c | 556 ------ src/shelf.c | 316 --- src/util.c | 6 +- src/view.c | 1748 ++++++++++++----- 11 files changed, 1399 insertions(+), 1406 deletions(-) create mode 100644 data/icons/archive/default.db rename data/icons/{application => archive}/gnu-zip-unix.db (100%) create mode 100644 data/icons/document/pdf.db diff --git a/data/config/appearance/default/selections/file.bits.db b/data/config/appearance/default/selections/file.bits.db index 0b065b0b32380bc310f82a254768b5e2c70709e8..18f5aeed16e8ae2a03d5902e100553a7a1674fbf 100644 GIT binary patch literal 57344 zcmeHQ378bsoqsbJQ>#_=RJ@IbAo0LR&meM1pt-?=OGM=EVVaqNnVzA$2WI5H2E+@5 zAjS*tMDa|*vL+_PV}rz)b#=4G&FAMvH;MVOF`Hz+&;7n6?(g@yUQcyZHB1i~y6Nfq zzJFJBz2kqrSMUFSuj&cWenieVQGAYnPZ6SrbNfV`KM&ylO8|QSZ{1!y4<~gnU4wJ$ z*qzJ;ucVOm=yBE9X^QlR+8%l+|FCl9%C_zdg`k6c($JlCPu}w>`$E87(trN@;C$La zN&hAN7nTihoK%5vUC=QA_dodLGj*IkN{ADX>D^b`bMimOe;ib}FJ?dV*OkdzUO!T!x`Jd${@|W^``IdY` zeqX*QACr6JR@o+(%6d6NPLm_#P^tnO_HsLJ z&$DOQwO-~`T!FU`Z(6~6oL-&NyD+0ccJ0Sr|b&>cfRz&;ax}k|0&Z_e!koPr{B*Q0Oxre z|Gx|7Hwr;J`J^FVmf^=+wy3@_k}MOUs=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2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1))))) #define UN(_blah) _blah = 0 #define ACT_MOUSE_IN 0 @@ -328,22 +327,8 @@ struct _E_View struct { Evas_Render_Method render_method; int back_pixmap; - struct { - int method; - struct { - int dir; - int w, h; - int next_pos; - } grid; - } arrange; } options; - struct { - struct { - int left, right, top, bottom; - } inset, icon, spacing; - } spacing; - Evas evas; struct { Window base; @@ -353,22 +338,68 @@ struct _E_View struct { int w, h; } size; - struct { - int x, y; - } viewport; struct { int x, y; } location; struct { - Evas_Object obj_rect; - Evas_Object obj_l1; - Evas_Object obj_l2; - Evas_Object obj_l3; - Evas_Object obj_l4; - int on; - int start_x, start_y; - int x, y, w, h; - } selection; + /* +-----------------+ + * | Wt | + * | +-----------+ | + * |Wl| |Wr| + * | | [I] Is | | + * | | Ig | | + * | | [txt] | | + * | | Ib | | + * | +-----------+ | + * | Wb | + * +-----------------+ + */ + struct { + int l, r, t, b; + } window; + struct { + int s, g, b; + } icon; + } spacing; + struct { + int on; + int x, y, w, h; + struct { + int x, y; + } down; + struct { + struct { + int r, g, b, a; + } + edge_l, edge_r, edge_t, edge_b, + middle, + grad_l, grad_r, grad_t, grad_b; + struct { + int l, r, t, b; + } grad_size; + } config; + struct { + Evas_Object clip; + Evas_Object edge_l; + Evas_Object edge_r; + Evas_Object edge_t; + Evas_Object edge_b; + Evas_Object middle; + Evas_Object grad_l; + Evas_Object grad_r; + Evas_Object grad_t; + Evas_Object grad_b; + } obj; + } select; + struct { + int started; + Window win; + int x, y; + struct { + int x, y; + } offset; + int update; + } drag; Evas_Object obj_bg; @@ -380,7 +411,9 @@ struct _E_View E_FS_Restarter *restarter; Evas_List icons; - Evas_List shelves; + + int have_resort_queued; + int sel_count; int changed; }; @@ -393,56 +426,49 @@ struct _E_Icon E_View *view; - char *shelf_name; - E_Shelf *shelf; - struct { - struct { - char *base, *type; - } mime; - EfsdCmdId link_get_id; + char *icon; + char *custom_icon; char *link; - int is_exe; - int is_dir; struct { - char *normal; - char *selected; - char *clicked; - } icon; - struct { - int have; - int x, y; - } coord; - int ready; + char *base; + char *type; + } mime; } info; struct { - int x, y; - int ix, iy, tx, ty, iw, ih, tw, th, w, h; + Evas_Object icon; + Evas_Object text; + Evas_Object event1; + Evas_Object event2; struct { - int text_location; - int show_text; - int show_icon; - } options; - struct { - int clicked; - int selected; - int hilited; - } state; - char *icon; - int visible; - int viewable; - } current, previous; + struct { + Ebits_Object icon; + Ebits_Object text; + } over, under; + } sel; + } obj; struct { - Evas_Object icon; - Evas_Object filename; - Evas_Object sel1, sel2; - Ebits_Object sel_icon; - Ebits_Object sel_text; - Ebits_Object base_icon; - Ebits_Object base_text; - } obj; + int hilited; + int clicked; + int selected; + int running; + int disabled; + int visible; + int just_selected; + } state; + + struct { + int x, y, w, h; + struct { + int w, h; + } icon; + struct { + int w, h; + } text; + } geom; + int changed; }; diff --git a/src/fs.c b/src/fs.c index 1bf4b1a86..7ce227aa6 100644 --- a/src/fs.c +++ b/src/fs.c @@ -79,7 +79,7 @@ static void _e_fs_restarter(int val, void *data) { if (ec) return; - printf("%i\n", efsd_pid); + printf("_e_fs_restarter %i\n", efsd_pid); if (val > 0) { if (efsd_pid <= 0) @@ -92,6 +92,7 @@ _e_fs_restarter(int val, void *data) Evas_List l; printf("connect!\n"); + e_add_event_fd(efsd_get_connection_fd(ec), _e_fs_fd_handle); for (l = fs_restart_handlers; l; l = l->next) { E_FS_Restarter *rs; @@ -146,18 +147,23 @@ e_fs_init(void) e_event_filter_handler_add(EV_CHILD, e_fs_child_handle); /* already have an efsd around? */ + printf("try efsd initial open...\n"); ec = efsd_open(); /* no - efsd around */ if (!ec) { /* start efsd */ + printf("start efsd...\n"); efsd_pid = e_exec_run("efsd -f"); if (efsd_pid > 0) { - for (i = 0; (!ec) && (i < 4); i++) + ec = efsd_open(); + for (i = 0; (!ec) && (i < 15); i++) { sleep(1); + printf("try efsd open %i...\n", i, ec); ec = efsd_open(); + printf("(connection ptr: %p)\n", ec); } } } diff --git a/src/icons.c b/src/icons.c index e747079bd..1c816a6a0 100644 --- a/src/icons.c +++ b/src/icons.c @@ -1,557 +1 @@ #include "e.h" - -static void e_icon_in_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); -static void e_icon_out_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); -static void e_icon_down_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); -static void e_icon_up_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); - -static void -e_icon_in_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - E_Icon *icon; - - icon = _data; - icon->current.state.hilited = 1; - icon->changed = 1; - icon->view->changed = 1; -} - -static void -e_icon_out_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - E_Icon *icon; - - icon = _data; - icon->current.state.hilited = 0; - icon->changed = 1; - icon->view->changed = 1; -} - -static void -e_icon_down_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - E_Icon *icon; - Ev_Mouse_Down *ev; - Eevent *event; - - event = e_view_get_current_event(); - ev = event->event; - icon = _data; - if (ev->triple_click) - { - printf("triple\n"); - } - else if (ev->double_click) - { - printf("double\n"); - } - else - { - printf("up\n"); - } - if (icon->current.state.selected) - icon->current.state.selected = 0; - else - icon->current.state.selected = 1; - icon->current.state.clicked = 1; - icon->changed = 1; - icon->view->changed = 1; -} - -static void -e_icon_up_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - E_Icon *icon; - Ev_Mouse_Up *ev; - Eevent *event; - - event = e_view_get_current_event(); - ev = event->event; - icon = _data; - icon->current.state.clicked = 0; - icon->changed = 1; - icon->view->changed = 1; -} - -void -e_icon_free(E_Icon *icon) -{ - IF_FREE(icon->file); - IF_FREE(icon->info.icon.normal); - IF_FREE(icon->info.icon.selected); - IF_FREE(icon->info.icon.clicked); - IF_FREE(icon->info.link); - IF_FREE(icon->info.mime.base); - IF_FREE(icon->info.mime.type); - IF_FREE(icon->previous.icon); - FREE(icon); -} - -E_Icon * -e_icon_new(void) -{ - E_Icon *icon; - - icon = NEW(E_Icon, 1); - ZERO(icon, E_Icon, 1); - OBJ_INIT(icon, e_icon_free); - icon->info.icon.normal = strdup(PACKAGE_DATA_DIR"/data/icons/unknown/default.db:/icon/normal"); - icon->previous.state.clicked = -1; - return icon; -} - -void -e_icon_apply_mime(E_Icon *icon, char *mime) -{ - char m1[4096], m2[4096], *p; - - strcpy(m1, mime); - p = strchr(m1, '/'); - if (p) *p = 0; - p = strchr(mime, '/'); - if (p) strcpy(m2, &(p[1])); - else m2[0] = 0; - IF_FREE(icon->info.mime.base); - IF_FREE(icon->info.mime.type); - icon->info.mime.base = strdup(m1); - icon->info.mime.type = strdup(m2); -} - -void -e_icon_get_icon(E_Icon *icon) -{ - char m1[4096], m2[4096], *p; - int found = 0; - - /* errr.. hmm do something useful if its a symlink */ - if (icon->info.link) - { - } - sprintf(m1, "%s/data/icons/%s/%s.db",PACKAGE_DATA_DIR, - icon->info.mime.base, - icon->info.mime.type); - if (e_file_exists(m1)) found = 1; - if (!found) - { - strcpy(m2, icon->info.mime.type); - p = strrchr(m2, '/'); - while (p) - { - p[0] = 0; - sprintf(m1, "%s/data/icons/%s/%s.db",PACKAGE_DATA_DIR, - icon->info.mime.base, m2); - if (e_file_exists(m1)) - { - found = 1; - break; - } - p = strrchr(m2, '/'); - } - } - if (!found) - { - sprintf(m1, "%s/data/icons/%s/default.db",PACKAGE_DATA_DIR, - icon->info.mime.base); - if (e_file_exists(m1)) found = 1; - } - if (!found) - { - sprintf(m1, "%s/data/icons/unknown/unknown.db",PACKAGE_DATA_DIR); - if (e_file_exists(m1)) found = 1; - } - if (!found) - { - sprintf(m1, "%s/data/icons/unknown/default.db",PACKAGE_DATA_DIR); - found = 1; - } - printf("%s/%s: %s\n", icon->info.mime.base, icon->info.mime.type, m1); - IF_FREE(icon->info.icon.normal); - IF_FREE(icon->info.icon.selected); - IF_FREE(icon->info.icon.clicked); - sprintf(m2, "%s:/icon/normal", m1); - icon->info.icon.normal = strdup(m2); - sprintf(m2, "%s:/icon/selected", m1); - icon->info.icon.selected = strdup(m2); - sprintf(m2, "%s:/icon/clicked", m1); - icon->info.icon.clicked = strdup(m2); - icon->changed = 1; - icon->view->changed = 1; -} - -void -e_icon_place_grid(E_Icon *icon) -{ - int x, y; - - if (icon->view->options.arrange.grid.dir == 0) /* h */ - { - int gw; - int iw, ih; - - iw = icon->current.w + - icon->view->spacing.icon.left + - icon->view->spacing.icon.right + - icon->view->spacing.spacing.left + - icon->view->spacing.spacing.right; - ih = icon->current.h + - icon->view->spacing.icon.top + - icon->view->spacing.icon.bottom + - icon->view->spacing.spacing.top + - icon->view->spacing.spacing.bottom; - if (icon->view->options.arrange.grid.w > 0) - gw = (icon->view->size.w - - icon->view->spacing.inset.left - - icon->view->spacing.inset.right) / - icon->view->options.arrange.grid.w; - else gw = 1; - y = icon->view->options.arrange.grid.next_pos / gw; - x = icon->view->options.arrange.grid.next_pos - (y * gw); - x *= icon->view->options.arrange.grid.w; - y *= icon->view->options.arrange.grid.h; - x += (icon->view->options.arrange.grid.w - - icon->view->spacing.icon.left - - icon->view->spacing.icon.right - - icon->view->spacing.spacing.left - - icon->view->spacing.spacing.right - - icon->current.w) / 2; - y += (icon->view->options.arrange.grid.h - - icon->view->spacing.icon.top - - icon->view->spacing.icon.bottom - - icon->view->spacing.spacing.top - - icon->view->spacing.spacing.bottom - - icon->current.h); - x -= icon->view->viewport.x; - y -= icon->view->viewport.y; - x += icon->view->spacing.inset.left; - y += icon->view->spacing.inset.top; - x += icon->view->spacing.icon.left + icon->view->spacing.spacing.left; - y += icon->view->spacing.icon.top + icon->view->spacing.spacing.top; - e_icon_set_xy(icon, x, y); - icon->view->options.arrange.grid.next_pos++; - } - else /* v */ - { - } -} - -void -e_icon_pre_show(E_Icon *icon) -{ - int x, y; - - if (icon->info.ready) return; - e_icon_update(icon); - icon->info.ready = 1; - if (icon->info.coord.have) - { - x = icon->info.coord.x; - y = icon->info.coord.y; - e_icon_set_xy(icon, x, y); - } - else - { - if (icon->view->options.arrange.method == 0) /* grid */ - { - int iw, ih; - - iw = icon->current.w + - icon->view->spacing.icon.left + - icon->view->spacing.icon.right + - icon->view->spacing.spacing.left + - icon->view->spacing.spacing.right; - ih = icon->current.h + - icon->view->spacing.icon.top + - icon->view->spacing.icon.bottom + - icon->view->spacing.spacing.top + - icon->view->spacing.spacing.bottom; - /* need to redo whole grid... ??? */ - if ((iw > icon->view->options.arrange.grid.w) || - (ih > icon->view->options.arrange.grid.h)) - { - Evas_List l; - - icon->view->options.arrange.grid.next_pos = 0; - icon->view->options.arrange.grid.w = iw; - icon->view->options.arrange.grid.h = ih; - for (l = icon->view->icons; l; l = l->next) - { - E_Icon *ic; - - ic = l->data; - if (ic->info.ready) - e_icon_place_grid(ic); - } - } - else - e_icon_place_grid(icon); - } - } - e_icon_show(icon); -} - -void -e_icon_calulcate_geometry(E_Icon *icon) -{ - int iw, ih, tw, th; - double dtw, dth; - - if (!icon->view) return; - dtw = 0; dth = 0; iw = 0; ih = 0; - evas_get_geometry(icon->view->evas, icon->obj.filename, NULL, NULL, &dtw, &dth); - tw = (int)dtw; - th = (int)dth; - evas_get_image_size(icon->view->evas, icon->obj.icon, &iw, &ih); - if (tw < iw) - { - icon->current.ix = icon->current.x; - icon->current.iy = icon->current.y; - icon->current.tx = icon->current.x + ((iw - tw) / 2); - icon->current.ty = icon->current.y + icon->view->spacing.icon.top + icon->view->spacing.icon.bottom + ih; - icon->current.w = iw; - icon->current.h = ih + th; - icon->current.iw = iw; - icon->current.ih = ih; - icon->current.tw = tw; - icon->current.th = th; - } - else - { - icon->current.ix = icon->current.x + ((tw - iw) / 2); - icon->current.iy = icon->current.y; - icon->current.tx = icon->current.x; - icon->current.ty = icon->current.y + icon->view->spacing.icon.top + icon->view->spacing.icon.bottom + ih; - icon->current.w = tw; - icon->current.h = ih + th; - icon->current.iw = iw; - icon->current.ih = ih; - icon->current.tw = tw; - icon->current.th = th; - } - if (INTERSECTS(0, 0, icon->view->size.w, icon->view->size.h, - icon->current.x, icon->current.y, icon->current.w, icon->current.h)) - icon->current.viewable = 1; - else - icon->current.viewable = 0; -} - -void -e_icon_realize(E_Icon *icon) -{ - icon->obj.sel1 = evas_add_rectangle(icon->view->evas); - icon->obj.sel2 = evas_add_rectangle(icon->view->evas); - evas_set_color(icon->view->evas, icon->obj.sel1, 0, 0, 0, 0); - evas_set_color(icon->view->evas, icon->obj.sel2, 0, 0, 0, 0); - evas_set_layer(icon->view->evas, icon->obj.sel1, 11); - evas_set_layer(icon->view->evas, icon->obj.sel2, 11); - evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_IN, e_icon_in_cb, icon); - evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_OUT, e_icon_out_cb, icon); - evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_DOWN, e_icon_down_cb, icon); - evas_callback_add(icon->view->evas, icon->obj.sel1, CALLBACK_MOUSE_UP, e_icon_up_cb, icon); - evas_callback_add(icon->view->evas, icon->obj.sel2, CALLBACK_MOUSE_IN, e_icon_in_cb, icon); - evas_callback_add(icon->view->evas, icon->obj.sel2, CALLBACK_MOUSE_OUT, e_icon_out_cb, icon); - evas_callback_add(icon->view->evas, icon->obj.sel2, CALLBACK_MOUSE_DOWN, e_icon_down_cb, icon); - evas_callback_add(icon->view->evas, icon->obj.sel2, CALLBACK_MOUSE_UP, e_icon_up_cb, icon); -} - -void -e_icon_unrealize(E_Icon *icon) -{ - if (icon->obj.icon) evas_del_object(icon->view->evas, icon->obj.icon); - if (icon->obj.filename) evas_del_object(icon->view->evas, icon->obj.filename); - if (icon->obj.sel1) evas_del_object(icon->view->evas, icon->obj.sel1); - if (icon->obj.sel2) evas_del_object(icon->view->evas, icon->obj.sel2); - icon->obj.icon = NULL; - icon->obj.filename = NULL; - icon->obj.sel1 = NULL; - icon->obj.sel2 = NULL; - if (icon->view) icon->view->changed = 1; -} - -void -e_icon_set_icon(E_Icon *icon, char *file) -{ - IF_FREE(icon->current.icon); - icon->current.icon = strdup(file); - icon->changed = 1; - if (icon->view) icon->view->changed = 1; -} - -void -e_icon_show(E_Icon *icon) -{ - if (!icon->current.visible) - { - icon->current.visible = 1; - icon->changed = 1; - if (icon->view) icon->view->changed = 1; - } -} - -void -e_icon_hide(E_Icon *icon) -{ - if (icon->current.visible) - { - icon->current.visible = 0; - icon->changed = 1; - if (icon->view) icon->view->changed = 1; - } -} - -void -e_icon_set_xy(E_Icon *icon, int x, int y) -{ - icon->current.x = x; - icon->current.y = y; - icon->changed = 1; - if (icon->view) icon->view->changed = 1; -} - -void -e_icon_get_xy(E_Icon *icon, int *x, int *y) -{ - if (x) *x = icon->current.x; - if (y) *y = icon->current.y; -} - -void -e_icon_set_filename(E_Icon *icon, char *file) -{ - IF_FREE(icon->file); - icon->file = strdup(file); - icon->changed = 1; - if (icon->view) icon->view->changed = 1; -} - -void -e_icon_update(E_Icon *icon) -{ - int obj_new = 0; - - if (!icon->changed) return; - if (icon->current.state.clicked) - { - if (icon->info.icon.clicked) - icon->current.icon = icon->info.icon.clicked; - else if (icon->info.icon.selected) - icon->current.icon = icon->info.icon.selected; - else - icon->current.icon = icon->info.icon.normal; - } - else if (icon->current.state.selected) - { - if (icon->info.icon.selected) - icon->current.icon = icon->info.icon.selected; - else - icon->current.icon = icon->info.icon.normal; - } - else - { - icon->current.icon = icon->info.icon.normal; - } - if ((!icon->current.state.selected) && (icon->obj.sel_icon)) - { - ebits_hide(icon->obj.sel_icon); - ebits_free(icon->obj.sel_icon); - icon->obj.sel_icon = NULL; - } - if (!icon->obj.filename) - { - icon->obj.filename = evas_add_text(icon->view->evas, "borzoib", 8, icon->file); - evas_set_layer(icon->view->evas, icon->obj.filename, 10); - icon->previous.x = icon->current.x - 1; - icon->previous.visible = icon->current.visible - 1; - obj_new = 1; - } - if (((icon->previous.icon) && (icon->current.icon) && - (strcmp(icon->current.icon, icon->previous.icon))) || - ((!icon->previous.icon) && (icon->current.icon))) - { - int iw, ih; - - if (!icon->obj.icon) - { - icon->obj.icon = evas_add_image_from_file(icon->view->evas, icon->current.icon); - evas_set_layer(icon->view->evas, icon->obj.icon, 10); - obj_new = 1; - } - else - evas_set_image_file(icon->view->evas, icon->obj.icon, icon->current.icon); - evas_get_image_size(icon->view->evas, icon->obj.icon, &iw, &ih); - evas_set_image_fill(icon->view->evas, icon->obj.icon, 0, 0, iw, ih); - evas_resize(icon->view->evas, icon->obj.icon, iw, ih); - icon->previous.x = icon->current.x - 1; - } - if ((!icon->obj.sel_icon) && (icon->current.state.selected)) - { - icon->obj.sel_icon = ebits_load(PACKAGE_DATA_DIR"/data/config/appearance/default/selections/file.bits.db"); - if (icon->obj.sel_icon) - { - ebits_add_to_evas(icon->obj.sel_icon, icon->view->evas); - ebits_set_layer(icon->obj.sel_icon, 9); - ebits_set_color_class(icon->obj.sel_icon, "Selected BG", 100, 200, 255, 255); - obj_new = 1; - } - } - if (obj_new) - { - if (icon->shelf) - { - E_Shelf *sh; - - sh = icon->shelf; - e_shelf_del_icon(sh, icon); - e_shelf_add_icon(sh, icon); - } - } - if ((icon->previous.x != icon->current.x) || - (icon->previous.y != icon->current.y) || - (icon->current.visible != icon->previous.visible) || - (obj_new)) - { - e_icon_calulcate_geometry(icon); - if (icon->current.viewable) - { - evas_move(icon->view->evas, icon->obj.icon, icon->current.ix, icon->current.iy); - evas_move(icon->view->evas, icon->obj.filename, icon->current.tx, icon->current.ty); - evas_move(icon->view->evas, icon->obj.sel1, icon->current.ix, icon->current.iy); - evas_resize(icon->view->evas, icon->obj.sel1, icon->current.iw, icon->current.ih); - evas_move(icon->view->evas, icon->obj.sel2, icon->current.tx, icon->current.ty); - evas_resize(icon->view->evas, icon->obj.sel2, icon->current.tw, icon->current.th); - evas_set_color(icon->view->evas, icon->obj.filename, 0, 0, 0, 255); - if (icon->obj.sel_icon) - { - int pl, pr, pt, pb; - - pl = pr = pt = pb = 0; - ebits_get_insets(icon->obj.sel_icon, &pl, &pr, &pt, &pb); - ebits_move(icon->obj.sel_icon, icon->current.ix - pl, icon->current.iy - pt); - ebits_resize(icon->obj.sel_icon, icon->current.iw + pl + pr, icon->current.ih + pt + pb); - } - } - } - if ((icon->current.visible != icon->previous.visible) || (obj_new) || - (icon->current.viewable != icon->previous.viewable)) - { - if ((icon->current.visible) && (icon->current.viewable)) - { - evas_show(icon->view->evas, icon->obj.icon); - evas_show(icon->view->evas, icon->obj.filename); - evas_show(icon->view->evas, icon->obj.sel1); - evas_show(icon->view->evas, icon->obj.sel2); - if (icon->obj.sel_icon) ebits_show(icon->obj.sel_icon); - } - else - { - evas_hide(icon->view->evas, icon->obj.icon); - evas_hide(icon->view->evas, icon->obj.filename); - evas_hide(icon->view->evas, icon->obj.sel1); - evas_hide(icon->view->evas, icon->obj.sel2); - if (icon->obj.sel_icon) ebits_hide(icon->obj.sel_icon); - } - } - IF_FREE(icon->previous.icon); - icon->previous = icon->current; - icon->previous.icon = strdup(icon->current.icon); - icon->changed = 0; -} diff --git a/src/shelf.c b/src/shelf.c index b4754d9ab..1c816a6a0 100644 --- a/src/shelf.c +++ b/src/shelf.c @@ -1,317 +1 @@ #include "e.h" - -static void e_cb_mouse_in(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh); -static void e_cb_mouse_out(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh); -static void e_cb_mouse_down(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh); -static void e_cb_mouse_up(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh); -static void e_cb_mouse_move(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh); - -static int mv_prev_x, mv_prev_y; - -static void -e_cb_mouse_in(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh) -{ - E_Shelf *sh; - - sh = data; - return; - UN(o); - UN(bt); - UN(ox); - UN(oy); - UN(ow); - UN(oh); -} - -static void -e_cb_mouse_out(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh) -{ - E_Shelf *sh; - - sh = data; - return; - UN(o); - UN(bt); - UN(ox); - UN(oy); - UN(ow); - UN(oh); -} - -static void -e_cb_mouse_down(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh) -{ - E_Shelf *sh; - - sh = data; - if (!strcmp(class, "Title_Bar")) - { - mv_prev_x = x; - mv_prev_y = y; - sh->state.moving = 1; - } - if (!strcmp(class, "Resize")) - { - mv_prev_x = x; - mv_prev_y = y; - sh->state.resizing = 1; - } - if (!strcmp(class, "Resize_Horizontal")) - { - mv_prev_x = x; - mv_prev_y = y; - sh->state.resizing = 1; - } - if (!strcmp(class, "Resize_Vertical")) - { - mv_prev_x = x; - mv_prev_y = y; - sh->state.resizing = 1; - } - if (!strcmp(class, "Menu")) - { - } - if (!strcmp(class, "Close")) - { - } - return; - UN(o); - UN(bt); - UN(ox); - UN(oy); - UN(ow); - UN(oh); -} - -static void -e_cb_mouse_up(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh) -{ - E_Shelf *sh; - - sh = data; - if (sh->state.moving) sh->state.moving = 0; - if (sh->state.resizing) sh->state.resizing = 0; - return; - UN(o); - UN(bt); - UN(ox); - UN(oy); - UN(ow); - UN(oh); -} - -static void -e_cb_mouse_move(void *data, Ebits_Object o, char *class, int bt, int x, int y, int ox, int oy, int ow, int oh) -{ - E_Shelf *sh; - - sh = data; - if (sh->state.moving) - { - e_shelf_move_by(sh, x - mv_prev_x, y - mv_prev_y); - mv_prev_x = x; - mv_prev_y = y; - } - if (sh->state.resizing) - { - if (sh->state.resizing == 1) - { - e_shelf_resize_by(sh, x - mv_prev_x, y - mv_prev_y); - mv_prev_x = x; - mv_prev_y = y; - } - } - return; - UN(o); - UN(bt); - UN(ox); - UN(oy); - UN(ow); - UN(oh); -} - -void -e_shelf_free(E_Shelf *sh) -{ - IF_FREE(sh->name); - FREE(sh); -} - -E_Shelf * -e_shelf_new(void) -{ - E_Shelf *sh; - - sh = NEW(E_Shelf, 1); - ZERO(sh, E_Shelf, 1); - OBJ_INIT(sh, e_shelf_free); - return sh; -} - -void -e_shelf_set_name(E_Shelf *sh, char *name) -{ - IF_FREE(sh->name); - sh->name = strdup(name); -} - -void -e_shelf_set_view(E_Shelf *sh, E_View *v) -{ - sh->view = v; -} - -void -e_shelf_realize(E_Shelf *sh) -{ - int pl, pr, pt, pb; - - sh->bit.border = ebits_load(PACKAGE_DATA_DIR"/data/config/appearance/default/shelves/default.bits.db"); - if (sh->bit.border) - { - ebits_add_to_evas(sh->bit.border, sh->view->evas); - ebits_move(sh->bit.border, sh->x, sh->y); - ebits_resize(sh->bit.border, sh->w, sh->h); - ebits_set_layer(sh->bit.border, 5); - if (sh->visible) - ebits_show(sh->bit.border); - -#define HOOK_CB(_class) \ -ebits_set_bit_callback(sh->bit.border, _class, CALLBACK_MOUSE_IN, e_cb_mouse_in, sh); \ -ebits_set_bit_callback(sh->bit.border, _class, CALLBACK_MOUSE_OUT, e_cb_mouse_out, sh); \ -ebits_set_bit_callback(sh->bit.border, _class, CALLBACK_MOUSE_DOWN, e_cb_mouse_down, sh); \ -ebits_set_bit_callback(sh->bit.border, _class, CALLBACK_MOUSE_UP, e_cb_mouse_up, sh); \ -ebits_set_bit_callback(sh->bit.border, _class, CALLBACK_MOUSE_MOVE, e_cb_mouse_move, sh); - HOOK_CB("Title_Bar"); - HOOK_CB("Resize"); - HOOK_CB("Resize_Horizontal"); - HOOK_CB("Resize_Vertical"); - HOOK_CB("Close"); - HOOK_CB("Iconify"); - HOOK_CB("Max_Size"); - HOOK_CB("Menu"); - } - sh->obj.clipper = evas_add_rectangle(sh->view->evas); - evas_set_layer(sh->view->evas, sh->obj.clipper, 9); - evas_set_color(sh->view->evas, sh->obj.clipper, 255, 255, 255, 255); - - pl = pr = pt = pb = 0; - if (sh->bit.border) ebits_get_insets(sh->bit.border, &pl, &pr, &pt, &pb); - evas_move(sh->view->evas, sh->obj.clipper, sh->x + pl, sh->y + pt); - evas_resize(sh->view->evas, sh->obj.clipper, sh->w - pl - pr, sh->h - pt - pb); - - if ((sh->visible) && (sh->icon_count > 0)) - evas_show(sh->view->evas, sh->obj.clipper); -} - -void -e_shelf_show(E_Shelf *sh) -{ - if (sh->visible) return; - - sh->visible = 1; -} - -void -e_shelf_hide(E_Shelf *sh) -{ - if (!sh->visible) return; - - sh->visible = 0; -} - -void -e_shelf_move(E_Shelf *sh, int x, int y) -{ - int dx, dy; - - dx = x - sh->x; - dy = y - sh->y; - e_shelf_move_by(sh, dx, dy); -} - -void -e_shelf_move_by(E_Shelf *sh, int dx, int dy) -{ - Evas_List l; - - sh->x += dx; - sh->y += dy; - if (sh->bit.border) ebits_move(sh->bit.border, sh->x, sh->y); - if (sh->obj.clipper) - { - int pl, pr, pt, pb; - - pl = pr = pt = pb = 0; - if (sh->bit.border) ebits_get_insets(sh->bit.border, &pl, &pr, &pt, &pb); - evas_move(sh->view->evas, sh->obj.clipper, sh->x + pl, sh->y + pt); - printf("move to %i %i\n", sh->x + pl, sh->y + pt); - } - for (l = sh->view->icons; l; l = l->next) - { - E_Icon *icon; - int x, y; - - icon = l->data; - if (icon->shelf == sh) - { - e_icon_get_xy(icon, &x, &y); - e_icon_set_xy(icon, x + dx, y + dy); - } - } -} - -void -e_shelf_resize(E_Shelf *sh, int w, int h) -{ - sh->w = w; - sh->h = h; - if (sh->bit.border) ebits_resize(sh->bit.border, sh->w, sh->h); - if (sh->obj.clipper) - { - int pl, pr, pt, pb; - - pl = pr = pt = pb = 0; - if (sh->bit.border) ebits_get_insets(sh->bit.border, &pl, &pr, &pt, &pb); - evas_resize(sh->view->evas, sh->obj.clipper, sh->w - pl - pr, sh->h - pt - pb); - printf("resize to %i %i\n", sh->w - pl - pr, sh->h - pt - pb); - } -} - -void -e_shelf_resize_by(E_Shelf *sh, int dw, int dh) -{ - e_shelf_resize(sh, sh->w + dw, sh->h + dh); -} - -void -e_shelf_add_icon(E_Shelf *sh, E_Icon *icon) -{ - if (icon->shelf) - e_shelf_del_icon(icon->shelf, icon); - icon->shelf = sh; - sh->icon_count++; - if (sh->icon_count > 0) - evas_show(sh->view->evas, sh->obj.clipper); - evas_set_clip(sh->view->evas, icon->obj.icon, sh->obj.clipper); - evas_set_clip(sh->view->evas, icon->obj.filename, sh->obj.clipper); - evas_set_clip(sh->view->evas, icon->obj.sel1, sh->obj.clipper); - evas_set_clip(sh->view->evas, icon->obj.sel2, sh->obj.clipper); - if (icon->obj.sel_icon) - ebits_set_clip(icon->obj.sel_icon, sh->obj.clipper); -} - -void -e_shelf_del_icon(E_Shelf *sh, E_Icon *icon) -{ - if (icon->shelf != sh) return; - icon->shelf = NULL; - if (sh->icon_count <= 0) - evas_hide(sh->view->evas, sh->obj.clipper); - evas_unset_clip(sh->view->evas, icon->obj.icon); - evas_unset_clip(sh->view->evas, icon->obj.filename); - evas_unset_clip(sh->view->evas, icon->obj.sel1); - evas_unset_clip(sh->view->evas, icon->obj.sel2); - if (icon->obj.sel_icon) - ebits_unset_clip(icon->obj.sel_icon); -} diff --git a/src/util.c b/src/util.c index 92a65743b..ddedf60b2 100644 --- a/src/util.c +++ b/src/util.c @@ -133,14 +133,16 @@ e_glob_matches(char *str, char *glob) int e_file_can_exec(struct stat *st) { + static int have_uid = 0; static uid_t uid = -1; static gid_t gid = -1; int ok; if (!st) return 0; ok = 0; - if (uid < 0) uid = getuid(); - if (gid < 0) gid = getgid(); + if (!have_uid) uid = getuid(); + if (!have_uid) gid = getgid(); + have_uid = 1; if (st->st_uid == uid) { if (st->st_mode & S_IXUSR) ok = 1; diff --git a/src/view.c b/src/view.c index cef4ef126..d66951e08 100644 --- a/src/view.c +++ b/src/view.c @@ -3,8 +3,12 @@ static Evas_List views = NULL; static Eevent *current_ev = NULL; +static Ev_Key_Modifiers mulit_select_mod = EV_KEY_MODIFIER_SHIFT; +static Ev_Key_Modifiers range_select_mod = EV_KEY_MODIFIER_CTRL; + static void e_bg_down_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); static void e_bg_up_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); +static void e_bg_move_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); static void e_idle(void *data); static void e_wheel(Eevent * ev); static void e_key_down(Eevent * ev); @@ -18,8 +22,173 @@ static void e_window_expose(Eevent * ev); static void e_view_handle_fs(EfsdEvent *ev); static void e_view_handle_fs_restart(void *data); -/* FIXME: hack to test entry boxes */ -static E_Entry *entry = NULL; +void +e_view_selection_update(E_View *v) +{ + if ((v->select.on) && (!v->select.obj.middle)) + { + Evas_Gradient grad; + + /*create select objects */ + v->select.obj.middle = evas_add_rectangle(v->evas); + evas_set_color(v->evas, v->select.obj.middle, + v->select.config.middle.r, + v->select.config.middle.g, + v->select.config.middle.b, + v->select.config.middle.a); + evas_set_layer(v->evas, v->select.obj.middle, 300); + v->select.obj.edge_l = evas_add_rectangle(v->evas); + evas_set_color(v->evas, v->select.obj.edge_l, + v->select.config.edge_l.r, + v->select.config.edge_l.g, + v->select.config.edge_l.b, + v->select.config.edge_l.a); + evas_set_layer(v->evas, v->select.obj.edge_l, 300); + v->select.obj.edge_r = evas_add_rectangle(v->evas); + evas_set_color(v->evas, v->select.obj.edge_r, + v->select.config.edge_r.r, + v->select.config.edge_r.g, + v->select.config.edge_r.b, + v->select.config.edge_r.a); + evas_set_layer(v->evas, v->select.obj.edge_r, 300); + v->select.obj.edge_t = evas_add_rectangle(v->evas); + evas_set_color(v->evas, v->select.obj.edge_t, + v->select.config.edge_t.r, + v->select.config.edge_t.g, + v->select.config.edge_t.b, + v->select.config.edge_t.a); + evas_set_layer(v->evas, v->select.obj.edge_t, 300); + v->select.obj.edge_b = evas_add_rectangle(v->evas); + evas_set_color(v->evas, v->select.obj.edge_b, + v->select.config.edge_b.r, + v->select.config.edge_b.g, + v->select.config.edge_b.b, + v->select.config.edge_b.a); + evas_set_layer(v->evas, v->select.obj.edge_b, 300); + + v->select.obj.grad_l = evas_add_gradient_box(v->evas); + evas_set_angle(v->evas, v->select.obj.grad_l, 270); + grad = evas_gradient_new(); + evas_gradient_add_color(grad, + v->select.config.grad_l.r, + v->select.config.grad_l.g, + v->select.config.grad_l.b, + v->select.config.grad_l.a, 8); + evas_gradient_add_color(grad, + v->select.config.grad_l.r, + v->select.config.grad_l.g, + v->select.config.grad_l.b, + 0, 8); + evas_set_gradient(v->evas, v->select.obj.grad_l, grad); + evas_gradient_free(grad); + evas_set_layer(v->evas, v->select.obj.grad_l, 300); + v->select.obj.grad_r = evas_add_gradient_box(v->evas); + evas_set_angle(v->evas, v->select.obj.grad_r, 90); + grad = evas_gradient_new(); + evas_gradient_add_color(grad, + v->select.config.grad_r.r, + v->select.config.grad_r.g, + v->select.config.grad_r.b, + v->select.config.grad_r.a, 8); + evas_gradient_add_color(grad, + v->select.config.grad_r.r, + v->select.config.grad_r.g, + v->select.config.grad_r.b, + 0, 8); + evas_set_gradient(v->evas, v->select.obj.grad_r, grad); + evas_gradient_free(grad); + evas_set_layer(v->evas, v->select.obj.grad_r, 300); + v->select.obj.grad_t = evas_add_gradient_box(v->evas); + evas_set_angle(v->evas, v->select.obj.grad_t, 0); + grad = evas_gradient_new(); + evas_gradient_add_color(grad, + v->select.config.grad_t.r, + v->select.config.grad_t.g, + v->select.config.grad_t.b, + v->select.config.grad_t.a, 8); + evas_gradient_add_color(grad, + v->select.config.grad_t.r, + v->select.config.grad_t.g, + v->select.config.grad_t.b, + 0, 8); + evas_set_gradient(v->evas, v->select.obj.grad_t, grad); + evas_gradient_free(grad); + evas_set_layer(v->evas, v->select.obj.grad_t, 300); + v->select.obj.grad_b = evas_add_gradient_box(v->evas); + evas_set_angle(v->evas, v->select.obj.grad_b, 180); + grad = evas_gradient_new(); + evas_gradient_add_color(grad, + v->select.config.grad_b.r, + v->select.config.grad_b.g, + v->select.config.grad_b.b, + v->select.config.grad_b.a, 8); + evas_gradient_add_color(grad, + v->select.config.grad_b.r, + v->select.config.grad_b.g, + v->select.config.grad_b.b, + 0, 8); + evas_set_gradient(v->evas, v->select.obj.grad_b, grad); + evas_gradient_free(grad); + evas_set_layer(v->evas, v->select.obj.grad_b, 300); + v->select.obj.clip = evas_add_rectangle(v->evas); + evas_set_color(v->evas, v->select.obj.clip, 255, 255, 255, 255); + evas_set_clip(v->evas, v->select.obj.grad_l, v->select.obj.clip); + evas_set_clip(v->evas, v->select.obj.grad_r, v->select.obj.clip); + evas_set_clip(v->evas, v->select.obj.grad_t, v->select.obj.clip); + evas_set_clip(v->evas, v->select.obj.grad_b, v->select.obj.clip); + } + if ((!v->select.on) && (v->select.obj.middle)) + { + /* destroy select objects */ + evas_del_object(v->evas, v->select.obj.middle); + evas_del_object(v->evas, v->select.obj.edge_l); + evas_del_object(v->evas, v->select.obj.edge_r); + evas_del_object(v->evas, v->select.obj.edge_t); + evas_del_object(v->evas, v->select.obj.edge_b); + evas_del_object(v->evas, v->select.obj.grad_l); + evas_del_object(v->evas, v->select.obj.grad_r); + evas_del_object(v->evas, v->select.obj.grad_t); + evas_del_object(v->evas, v->select.obj.grad_b); + evas_del_object(v->evas, v->select.obj.clip); + v->select.obj.middle = NULL; + return; + } + if (!v->select.on) return; + /* move & resize select objects */ + { + evas_move(v->evas, v->select.obj.edge_l, v->select.x, v->select.y + 1); + evas_resize(v->evas, v->select.obj.edge_l, 1, v->select.h - 1); + evas_move(v->evas, v->select.obj.edge_r, v->select.x + v->select.w - 1, v->select.y); + evas_resize(v->evas, v->select.obj.edge_r, 1, v->select.h - 1); + evas_move(v->evas, v->select.obj.edge_t, v->select.x, v->select.y); + evas_resize(v->evas, v->select.obj.edge_t, v->select.w - 1, 1); + evas_move(v->evas, v->select.obj.edge_b, v->select.x + 1, v->select.y + v->select.h - 1); + evas_resize(v->evas, v->select.obj.edge_b, v->select.w - 1, 1); + evas_move(v->evas, v->select.obj.middle, v->select.x + 1, v->select.y + 1); + evas_resize(v->evas, v->select.obj.middle, v->select.w - 1 - 1, v->select.h - 1 - 1); + evas_move(v->evas, v->select.obj.grad_l, v->select.x + 1, v->select.y + 1); + evas_resize(v->evas, v->select.obj.grad_l, v->select.config.grad_size.l, v->select.h - 1 - 1); + evas_move(v->evas, v->select.obj.grad_r, v->select.x + v->select.w - 1 - v->select.config.grad_size.r, v->select.y + 1); + evas_resize(v->evas, v->select.obj.grad_r, v->select.config.grad_size.r, v->select.h - 1 - 1); + evas_move(v->evas, v->select.obj.grad_t, v->select.x + 1, v->select.y + 1); + evas_resize(v->evas, v->select.obj.grad_t, v->select.w - 1 - 1, v->select.config.grad_size.t); + evas_move(v->evas, v->select.obj.grad_b, v->select.x + 1, v->select.y + v->select.h - 1 - v->select.config.grad_size.b); + evas_resize(v->evas, v->select.obj.grad_b, v->select.w - 1 - 1, v->select.config.grad_size.b); + evas_move(v->evas, v->select.obj.clip, v->select.x + 1, v->select.y + 1); + evas_resize(v->evas, v->select.obj.clip, v->select.w - 1 - 1, v->select.h - 1 - 1); + } + + evas_show(v->evas, v->select.obj.middle); + evas_show(v->evas, v->select.obj.edge_l); + evas_show(v->evas, v->select.obj.edge_r); + evas_show(v->evas, v->select.obj.edge_t); + evas_show(v->evas, v->select.obj.edge_b); + evas_show(v->evas, v->select.obj.grad_l); + evas_show(v->evas, v->select.obj.grad_r); + evas_show(v->evas, v->select.obj.grad_t); + evas_show(v->evas, v->select.obj.grad_b); + evas_show(v->evas, v->select.obj.clip); +} static void e_bg_down_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) @@ -29,34 +198,36 @@ e_bg_down_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) ev = current_ev->event; v = _data; + if (!(ev->mods & mulit_select_mod)) + { + e_view_deselect_all(); + } if (_b == 1) { - v->selection.on = 1; - v->selection.start_x = _x; - v->selection.start_y = _y; - v->selection.x = _x; - v->selection.y = _y; - v->selection.w = 1; - v->selection.h = 1; - if (!v->selection.obj_rect) + v->select.down.x = _x; + v->select.down.y = _y; + v->select.on = 1; + if (_x < v->select.down.x) { - v->selection.obj_rect = evas_add_rectangle(v->evas); - v->selection.obj_l1 = evas_add_line(v->evas); - v->selection.obj_l2 = evas_add_line(v->evas); - v->selection.obj_l3 = evas_add_line(v->evas); - v->selection.obj_l4 = evas_add_line(v->evas); - evas_set_color(v->evas, v->selection.obj_rect, 255, 255, 255, 100); - evas_set_color(v->evas, v->selection.obj_l1, 0, 0, 0, 200); - evas_set_color(v->evas, v->selection.obj_l2, 0, 0, 0, 200); - evas_set_color(v->evas, v->selection.obj_l3, 0, 0, 0, 200); - evas_set_color(v->evas, v->selection.obj_l4, 0, 0, 0, 200); - evas_set_layer(v->evas, v->selection.obj_rect, 100); - evas_set_layer(v->evas, v->selection.obj_l1, 100); - evas_set_layer(v->evas, v->selection.obj_l2, 100); - evas_set_layer(v->evas, v->selection.obj_l3, 100); - evas_set_layer(v->evas, v->selection.obj_l4, 100); + v->select.x = _x; + v->select.w = v->select.down.x - v->select.x + 1; } - e_view_update_selection(v, _x, _y); + else + { + v->select.x = v->select.down.x; + v->select.w = _x - v->select.down.x + 1; + } + if (_y < v->select.down.y) + { + v->select.y = _y; + v->select.h = v->select.down.y - v->select.y + 1; + } + else + { + v->select.y = v->select.down.y; + v->select.h = _y - v->select.down.y + 1; + } + e_view_selection_update(v); } } @@ -65,29 +236,64 @@ e_bg_up_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) { Ev_Mouse_Up *ev; E_View *v; + int dx, dy; ev = current_ev->event; v = _data; - if (((v->selection.w < 6) && (v->selection.h < 6)) || - (!v->selection.on)) + dx = 0; + dy = 0; + if (v->select.on) + { + dx = v->select.down.x - _x; + dy = v->select.down.y - _y; + if (dx < 0) dx = -dx; + if (dy < 0) dy = -dy; + if (_b == 1) + v->select.on = 0; + e_view_selection_update(v); + } + if ((_b == 1) && ((dx > 3) || (dy > 3))) + { + Evas_List l; + + for (l = v->icons; l; l = l->next) + { + E_Icon *ic; + + ic = l->data; + if (INTERSECTS(v->select.x, v->select.y, v->select.w, v->select.h, + ic->geom.x, ic->geom.y, ic->geom.w, ic->geom.h)) + { + if (ic->state.visible) + { + e_view_icon_invert_selection(ic); + } + } + } + /* errr. select files in box */ + } + else { if (_b == 1) { - static E_Build_Menu *buildmenu = NULL; - - if (!buildmenu) + if (!(ev->mods & (mulit_select_mod | range_select_mod))) { - char *apps_menu_db; + static E_Build_Menu *buildmenu = NULL; - apps_menu_db = e_config_get("apps_menu"); - if (apps_menu_db) buildmenu = e_build_menu_new_from_db(apps_menu_db); - } - if (buildmenu) - { - static E_Menu *menu = NULL; - menu = buildmenu->menu; - if (menu) - e_menu_show_at_mouse(menu, ev->rx, ev->ry, ev->time); + if (!buildmenu) + { + char *apps_menu_db; + + apps_menu_db = e_config_get("apps_menu"); + if (apps_menu_db) buildmenu = e_build_menu_new_from_db(apps_menu_db); + } + if (buildmenu) + { + static E_Menu *menu = NULL; + menu = buildmenu->menu; + if (menu) + e_menu_show_at_mouse(menu, ev->rx, ev->ry, ev->time); + } } } else if (_b == 3) @@ -105,29 +311,458 @@ e_bg_up_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) if (menu) e_menu_show_at_mouse(menu, ev->rx, ev->ry, ev->time); } -/* - static E_Menu *menu = NULL; - - if (!menu) - { - E_Menu_Item *menuitem; - - menu = e_menu_new(); - e_menu_set_padding_icon(menu, 8); - e_menu_set_padding_state(menu, 8); - menuitem = e_menu_item_new("Enlightenment "VERSION); - e_menu_item_set_icon(menuitem, PACKAGE_DATA_DIR"/data/images/e_logo.png"); - e_menu_add_item(menu, menuitem); - } - if (menu) - e_menu_show_at_mouse(menu, ev->rx, ev->ry, ev->time); - */ } } - if (ev->button == 1) + if (_b == 1) { - v->selection.on = 0; - e_view_update_selection(v, _x, _y); + v->select.x = _x; + v->select.y = _y; + } +} + +static void +e_bg_move_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) +{ + Ev_Mouse_Down *ev; + E_View *v; + + ev = current_ev->event; + v = _data; + if (v->select.on) + { + if (_x < v->select.down.x) + { + v->select.x = _x; + v->select.w = v->select.down.x - v->select.x + 1; + } + else + { + v->select.x = v->select.down.x; + v->select.w = _x - v->select.down.x + 1; + } + if (_y < v->select.down.y) + { + v->select.y = _y; + v->select.h = v->select.down.y - v->select.y + 1; + } + else + { + v->select.y = v->select.down.y; + v->select.h = _y - v->select.down.y + 1; + } + e_view_selection_update(v); + } +} + +void +e_view_icon_update_state(E_Icon *ic) +{ + char icon[4096]; + int iw, ih; + int gw, gh; + + if (!ic->info.icon) + { + printf("EEEEEEEEEEK %s has no icon\n", ic->file); + return; + } + if (ic->state.clicked) + { + sprintf(icon, "%s:/icon/clicked", ic->info.icon); + } + else if (ic->state.selected) + { + sprintf(icon, "%s:/icon/selected", ic->info.icon); + } + else + { + sprintf(icon, "%s:/icon/normal", ic->info.icon); + } + if ((ic->state.selected) && (!ic->obj.sel.over.icon)) + { + char file[4096]; + + sprintf(file, "%s/file.bits.db", e_config_get("selections")); + ic->obj.sel.over.icon = ebits_load(file); + sprintf(file, "%s/text.bits.db", e_config_get("selections")); + ic->obj.sel.over.text = ebits_load(file); + if (ic->obj.sel.over.icon) + { + ebits_add_to_evas(ic->obj.sel.over.icon, ic->view->evas); + ebits_set_layer(ic->obj.sel.over.icon, 205); + } + if (ic->obj.sel.over.text) + { + ebits_add_to_evas(ic->obj.sel.over.text, ic->view->evas); + ebits_set_layer(ic->obj.sel.over.text, 205); + } + } + else if ((!ic->state.selected) && (ic->obj.sel.over.icon)) + { + if (ic->obj.sel.over.icon) ebits_free(ic->obj.sel.over.icon); + if (ic->obj.sel.over.text) ebits_free(ic->obj.sel.over.text); + ic->obj.sel.over.icon = NULL; + ic->obj.sel.over.text = NULL; + } + evas_set_image_file(ic->view->evas, ic->obj.icon, icon); + evas_get_image_size(ic->view->evas, ic->obj.icon, &iw, &ih); + gw = ic->geom.icon.w; + gh = ic->geom.icon.h; + e_view_icon_apply_xy(ic); + if ((iw == gw) && (ih == gh)) return; + e_view_queue_resort(ic->view); +} + +void +e_view_deselect_all(void) +{ + Evas_List ll; + + for (ll = views; ll; ll = ll->next) + { + Evas_List l; + E_View *v; + + v = ll->data; + for (l = v->icons; l; l = l->next) + { + E_Icon *ic; + + ic = l->data; + e_view_icon_deselect(ic); + } + } +} + +void +e_view_deselect_all_except(E_Icon *not_ic) +{ + Evas_List ll; + + for (ll = views; ll; ll = ll->next) + { + Evas_List l; + E_View *v; + + v = ll->data; + for (l = v->icons; l; l = l->next) + { + E_Icon *ic; + + ic = l->data; + if (ic != not_ic) + e_view_icon_deselect(ic); + } + } +} + +void +e_view_icon_invert_selection(E_Icon *ic) +{ + if (ic->state.selected) e_view_icon_deselect(ic); + else e_view_icon_select(ic); +} + +void +e_view_icon_select(E_Icon *ic) +{ + if (!ic->state.selected) + { + ic->state.selected = 1; + ic->view->sel_count++; + e_view_icon_update_state(ic); + } +} + +void +e_view_icon_deselect(E_Icon *ic) +{ + if (ic->state.selected) + { + ic->state.selected = 0; + ic->view->sel_count--; + e_view_icon_update_state(ic); + } +} + +static void +e_icon_down_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) +{ + E_Icon *ic; + Eevent *ev; + Ev_Mouse_Down *e; + + ev = e_view_get_current_event(); + e = ev->event; + ic = _data; + ic->view->select.down.x = _x; + ic->view->select.down.y = _y; + ic->state.clicked = 1; + e_view_icon_update_state(ic); + if (_b == 1) + { + if (e->double_click) + { + + } + else + { + if (!ic->state.selected) + { + if ((e->mods & mulit_select_mod)) + { + e_view_icon_select(ic); + } + else + { + e_view_deselect_all_except(ic); + e_view_icon_select(ic); + } + ic->state.just_selected = 1; + } + } + } + else if (_b == 2) + { + } + else if (_b == 3) + { + } +} + +static void +e_icon_up_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) +{ + E_Icon *ic; + Eevent *ev; + Ev_Mouse_Up *e; + + ev = e_view_get_current_event(); + e = ev->event; + ic = _data; + if (ic->view->drag.started) + { + ic->state.clicked = 0; + ic->state.just_selected = 0; + e_view_icon_update_state(ic); + e_window_destroy(ic->view->drag.win); + ic->view->drag.started = 0; + return; + } + if (_b == 1) + { + if ((e->mods & mulit_select_mod)) + { + if ((ic->state.selected) && (!ic->state.just_selected)) + e_view_icon_deselect(ic); +/* e_view_icon_invert_selection(ic);*/ + } + else + { + e_view_deselect_all_except(ic); + e_view_icon_select(ic); + } + ic->state.just_selected = 0; + } + ic->state.clicked = 0; + e_view_icon_update_state(ic); +} + +static void +e_icon_move_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) +{ + E_Icon *ic; + Eevent *ev; + Ev_Mouse_Move *e; + + ev = e_view_get_current_event(); + e = ev->event; + ic = _data; + if (!ic->state.clicked) return; + if (!ic->view->drag.started) + { + int dx, dy; + + dx = ic->view->select.down.x - _x; + dy = ic->view->select.down.y - _y; + if (dx < 0) dx = -dx; + if (dy < 0) dy = -dy; + if ((dx > 3) || (dy > 3)) + { + Pixmap pmap, mask; + Evas_List l; + int x, y, xx, yy, rw, rh, downx, downy, wx, wy, ww, wh; + + /* find extents of icons to be dragged */ + x = 999999999; + y = 999999999; + xx = -999999999; + yy = -999999999; + for (l = views; l; l = l->next) + { + E_View *v; + Evas_List ll; + + v = l->data; + printf("sel count %i\n", v->sel_count); + if (v->sel_count > 0) + { + for (ll = v->icons; ll; ll = ll->next) + { + E_Icon *ic; + + ic = ll->data; + if (ic->state.selected) + { + int ix, iy, iw, ih; + + ix = ic->geom.x + v->location.x; + iy = ic->geom.y + v->location.y; + iw = ic->geom.w; + ih = ic->geom.h; + if (ix < x) x = ix; + if (iy < y) y = iy; + if ((ix + iw) > xx) xx = ix + iw; + if ((iy + ih) > yy) yy = iy + ih; + } + } + } + } + e_window_get_geometry(0, NULL, NULL, &rw, &rh); + downx = ic->view->select.down.x + ic->view->location.x; + downy = ic->view->select.down.y + ic->view->location.y; + + wx = x; + ww = xx - x; + if (wx < - (rw - downx)) + { + wx = - (rw - downx); + ww -= (wx - x); + } + if ((wx + ww) > (rw + downx)) + ww = (rw + downx) - wx; + wy = y; + wh = yy - y; + if (wy < - (rh - downy)) + { + wy = - (rh - downy); + wh -= (wy - y); + } + if ((wy + wh) > (rh + downy)) + wh = (rh + downy) - wy; + + ic->view->drag.x = wx; + ic->view->drag.y = wy; + ic->view->drag.offset.x = downx - wx; + ic->view->drag.offset.y = downy - wy; + + if ((ww < 1) || (wh < 1)) return; + ic->view->drag.win = e_window_override_new(0, wx, wy, ww, wh); + pmap = e_pixmap_new(ic->view->drag.win, ww, wh, 0); + mask = e_pixmap_new(ic->view->drag.win, ww, wh, 1); + { + Imlib_Image im; + + im = imlib_create_image(ww, wh); + imlib_context_set_image(im); + imlib_image_set_has_alpha(1); + imlib_context_set_blend(1); + imlib_image_clear(); + for (l = views; l; l = l->next) + { + E_View *v; + Evas_List ll; + + v = l->data; + if (v->sel_count > 0) + { + for (ll = v->icons; ll; ll = ll->next) + { + E_Icon *ic; + + ic = ll->data; + if (ic->state.selected) + { + double ix, iy; + int icx, icy; + Imlib_Image im2; + char icon[4096]; + + evas_get_geometry(ic->view->evas, + ic->obj.icon, + &ix, &iy, NULL, NULL); + icx = ix + v->location.x - wx; + icy = iy + v->location.y - wy; + if (!ic->info.icon) + { + printf("EEEEEEEEEEK %s has no icon\n", ic->file); + return; + } + if (ic->state.clicked) + { + sprintf(icon, "%s:/icon/clicked", ic->info.icon); + } + else if (ic->state.selected) + { + sprintf(icon, "%s:/icon/selected", ic->info.icon); + } + else + { + sprintf(icon, "%s:/icon/normal", ic->info.icon); + } + im2 = imlib_load_image(icon); + if (im2) + { + int iw, ih; + + imlib_context_set_image(im2); + iw = imlib_image_get_width(); + ih = imlib_image_get_height(); + imlib_context_set_image(im); + imlib_blend_image_onto_image(im2, 1, + 0, 0, iw, ih, + icx, icy, iw, ih); + imlib_context_set_image(im2); + imlib_free_image(); + imlib_context_set_image(im); + } + else + { + printf("eek cant load\n"); + } + } + } + } + } + imlib_context_set_image(im); + imlib_context_set_dither_mask(0); + imlib_context_set_dither(1); + imlib_context_set_drawable(pmap); + imlib_context_set_mask(mask); + imlib_context_set_blend(0); + imlib_render_image_on_drawable(0, 0); + imlib_free_image(); + } + e_window_set_background_pixmap(ic->view->drag.win, pmap); + e_window_set_shape_mask(ic->view->drag.win, mask); + e_window_ignore(ic->view->drag.win); + e_window_raise(ic->view->drag.win); + e_window_show(ic->view->drag.win); + e_pixmap_free(pmap); + e_pixmap_free(mask); + ic->view->drag.started = 1; + } + } + if (ic->view->drag.started) + { + int x, y; + + x = _x - ic->view->drag.offset.x; + y = _y - ic->view->drag.offset.y; + ic->view->drag.x = x; + ic->view->drag.y = y; + ic->view->drag.update = 1; + ic->view->changed = 1; } } @@ -161,7 +796,6 @@ e_wheel(Eevent * ev) v = l->data; if (e->win == v->win.main) { - e_view_scroll(v, 0, - (e->z * 10)); } } } @@ -181,8 +815,6 @@ e_key_down(Eevent * ev) if ((e->win == v->win.base) || (e->win == v->win.main)) { - /* FIXME: hack to test enty boxes */ - if (entry) e_entry_handle_keypress(entry, e); if (!strcmp(e->key, "Up")) { } @@ -281,6 +913,7 @@ e_mouse_move(Eevent * ev) Evas_List l; e = ev->event; + current_ev = ev; for (l = views; l; l = l->next) { E_View *v; @@ -288,11 +921,11 @@ e_mouse_move(Eevent * ev) v = l->data; if (e->win == v->win.main) { - e_view_update_selection(v, e->x, e->y); evas_event_move(v->evas, e->x, e->y); return; } } + current_ev = NULL; } static void @@ -391,7 +1024,7 @@ e_view_handle_fs_restart(void *data) efsd_op_get_filetype() ) ); - printf("restarted monior id (connection = %p), %i for %s\n", e_fs_get_connection(), v->monitor_id, v->dir); + printf("restarted monitor id (connection = %p), %i for %s\n", e_fs_get_connection(), v->monitor_id, v->dir); v->is_listing = 1; } @@ -409,59 +1042,335 @@ e_view_filter_file(E_View *v, char *file) } void -e_view_update_selection(E_View *v, int x, int y) +e_view_icon_free(E_Icon *ic) { - if (v->selection.on) + FREE(ic); +} + +E_Icon * +e_view_icon_new(void) +{ + E_Icon *ic; + + ic = NEW(E_Icon, 1); + ZERO(ic, E_Icon, 1); + OBJ_INIT(ic, e_view_icon_free); + return ic; +} + +E_Icon * +e_view_find_icon_by_file(E_View *view, char *file) +{ + Evas_List l; + + for (l = view->icons; l; l = l->next) { - if (x < v->selection.start_x) - { - v->selection.w = (-(x - v->selection.start_x)) + 1; - v->selection.x = x; - } - else - { - v->selection.w = (x - v->selection.start_x) + 1; - v->selection.x = v->selection.start_x; - } - if (y < v->selection.start_y) - { - v->selection.h = (-(y - v->selection.start_y)) + 1; - v->selection.y = y; - } - else - { - v->selection.h = (y - v->selection.start_y) + 1; - v->selection.y = v->selection.start_y; - } - evas_move(v->evas, v->selection.obj_rect, v->selection.x, v->selection.y); - evas_resize(v->evas, v->selection.obj_rect, v->selection.w, v->selection.h); - evas_set_line_xy(v->evas, v->selection.obj_l1, v->selection.x, v->selection.y, v->selection.x + v->selection.w - 1, v->selection.y); - evas_set_line_xy(v->evas, v->selection.obj_l2, v->selection.x, v->selection.y, v->selection.x, v->selection.y + v->selection.h - 1); - evas_set_line_xy(v->evas, v->selection.obj_l3, v->selection.x, v->selection.y + v->selection.h - 1, v->selection.x + v->selection.w - 1, v->selection.y + v->selection.h - 1); - evas_set_line_xy(v->evas, v->selection.obj_l4, v->selection.x + v->selection.w - 1, v->selection.y, v->selection.x + v->selection.w - 1, v->selection.y + v->selection.h - 1); - evas_show(v->evas, v->selection.obj_rect); - evas_show(v->evas, v->selection.obj_l1); - evas_show(v->evas, v->selection.obj_l2); - evas_show(v->evas, v->selection.obj_l3); - evas_show(v->evas, v->selection.obj_l4); + E_Icon *ic; + + ic = l->data; + if ((ic) && (ic->file) && (file) && (!strcmp(ic->file, file))) + return ic; } - else + return NULL; +} + +void +e_view_icon_show(E_Icon *ic) +{ + if (ic->state.visible) return; + ic->state.visible = 1; + if (!ic->obj.event1) { - evas_hide(v->evas, v->selection.obj_rect); - evas_hide(v->evas, v->selection.obj_l1); - evas_hide(v->evas, v->selection.obj_l2); - evas_hide(v->evas, v->selection.obj_l3); - evas_hide(v->evas, v->selection.obj_l4); + ic->obj.event1 = evas_add_rectangle(ic->view->evas); + ic->obj.event2 = evas_add_rectangle(ic->view->evas); + evas_set_color(ic->view->evas, ic->obj.event1, 0, 0, 0, 0); + evas_set_color(ic->view->evas, ic->obj.event2, 0, 0, 0, 0); + evas_callback_add(ic->view->evas, ic->obj.event1, CALLBACK_MOUSE_DOWN, e_icon_down_cb, ic); + evas_callback_add(ic->view->evas, ic->obj.event1, CALLBACK_MOUSE_UP, e_icon_up_cb, ic); + evas_callback_add(ic->view->evas, ic->obj.event1, CALLBACK_MOUSE_MOVE, e_icon_move_cb, ic); + evas_callback_add(ic->view->evas, ic->obj.event2, CALLBACK_MOUSE_DOWN, e_icon_down_cb, ic); + evas_callback_add(ic->view->evas, ic->obj.event2, CALLBACK_MOUSE_UP, e_icon_up_cb, ic); + evas_callback_add(ic->view->evas, ic->obj.event2, CALLBACK_MOUSE_MOVE, e_icon_move_cb, ic); + } + evas_set_layer(ic->view->evas, ic->obj.icon, 200); + evas_set_layer(ic->view->evas, ic->obj.text, 200); + evas_set_layer(ic->view->evas, ic->obj.event1, 210); + evas_set_layer(ic->view->evas, ic->obj.event2, 210); + + evas_show(ic->view->evas, ic->obj.icon); + evas_show(ic->view->evas, ic->obj.text); + evas_show(ic->view->evas, ic->obj.event1); + evas_show(ic->view->evas, ic->obj.event2); +} + +void +e_view_icon_hide(E_Icon *ic) +{ + if (!ic->state.visible) return; + ic->state.visible = 0; + evas_hide(ic->view->evas, ic->obj.icon); + evas_hide(ic->view->evas, ic->obj.text); + evas_hide(ic->view->evas, ic->obj.event1); + evas_hide(ic->view->evas, ic->obj.event2); +} + +void +e_view_icon_apply_xy(E_Icon *ic) +{ + /* threse calc icon extents for: */ + /* [I] */ + /* Ig */ + /* [txt] */ + if (ic->geom.text.w > ic->geom.icon.w) ic->geom.w = ic->geom.text.w; + else ic->geom.w = ic->geom.icon.w; + ic->geom.h = ic->geom.icon.h + ic->geom.text.h + ic->view->spacing.icon.g; + + evas_resize(ic->view->evas, ic->obj.event1, + ic->geom.icon.w, ic->geom.icon.h); + evas_resize(ic->view->evas, ic->obj.event2, + ic->geom.text.w, ic->geom.text.h); + evas_move(ic->view->evas, ic->obj.event1, + ic->geom.x + ((ic->geom.w - ic->geom.icon.w) / 2), + ic->geom.y); + evas_move(ic->view->evas, ic->obj.event2, + ic->geom.x + ((ic->geom.w - ic->geom.text.w) / 2), + ic->geom.y + ic->geom.icon.h + ic->view->spacing.icon.g); + evas_move(ic->view->evas, ic->obj.icon, + ic->geom.x + ((ic->geom.w - ic->geom.icon.w) / 2), + ic->geom.y); + evas_move(ic->view->evas, ic->obj.text, + ic->geom.x + ((ic->geom.w - ic->geom.text.w) / 2), + ic->geom.y + ic->geom.icon.h + ic->view->spacing.icon.g); + if (ic->obj.sel.over.icon) + { + int pl, pr, pt, pb; + + ebits_get_insets(ic->obj.sel.over.icon, &pl, &pr, &pt, &pb); + ebits_move(ic->obj.sel.over.icon, + ic->geom.x + ((ic->geom.w - ic->geom.icon.w) / 2) - pl, + ic->geom.y - pt); + ebits_resize(ic->obj.sel.over.icon, + ic->geom.icon.w + pl + pr, ic->geom.icon.h + pt + pb); + ebits_show(ic->obj.sel.over.icon); + } + if (ic->obj.sel.over.text) + { + int pl, pr, pt, pb; + + ebits_get_insets(ic->obj.sel.over.text, &pl, &pr, &pt, &pb); + ebits_move(ic->obj.sel.over.text, + ic->geom.x + ((ic->geom.w - ic->geom.text.w) / 2) - pl, + ic->geom.y + ic->geom.icon.h + ic->view->spacing.icon.g - pt); + ebits_resize(ic->obj.sel.over.text, + ic->geom.text.w + pl + pr, ic->geom.text.h + pt + pb); + ebits_show(ic->obj.sel.over.text); + } +} + +static int +e_view_restart_alphabetical_qsort_cb(void *data1, void *data2) +{ + E_Icon *ic, *ic2; + + ic = *((E_Icon **)data1); + ic2 = *((E_Icon **)data2); + return (strcmp(ic->file, ic2->file)); +} + +void +e_view_resort_alphabetical(E_View *v) +{ + Evas_List icons = NULL, l; + E_Icon **array; + int i, count; + + if (!v->icons) return; + for (count = 0, l = v->icons; l; l = l->next) count++; + array = malloc(sizeof(E_Icon *) * count); + for (i = 0, l = v->icons; l; l = l->next) array[i++] = l->data; + printf("qsort %i elements...\n", count); + qsort(array, count, sizeof(E_Icon *), + e_view_restart_alphabetical_qsort_cb); + for (i = 0; i < count; i++) icons = evas_list_append(icons, array[i]); + free(array); + + evas_list_free(v->icons); + v->icons = icons; + + printf("done...\n"); +} + +void +e_view_arrange(E_View *v) +{ + Evas_List l; + int x, y; + + x = v->spacing.window.l; + y = v->spacing.window.t; + for (l = v->icons; l; l = l->next) + { + E_Icon *ic; + + ic = l->data; + if ((x != v->spacing.window.l) && ((x + ic->geom.w) > v->size.w)) + { + x = v->spacing.window.l; + y += ic->geom.h + v->spacing.icon.b; + } + ic->geom.x = x; + ic->geom.y = y; + e_view_icon_apply_xy(ic); + x += ic->geom.w + v->spacing.icon.s; + } +} + +void +e_view_resort(E_View *v) +{ + e_view_resort_alphabetical(v); + e_view_arrange(v); +} + +static void +e_view_resort_timeout(int val, void *data) +{ + E_View *v; + + v = data; + e_view_resort(v); + v->have_resort_queued = 0; +} + +void +e_view_queue_resort(E_View *v) +{ + char name[4096]; + + if (v->have_resort_queued) return; + v->have_resort_queued = 1; + sprintf(name, "resort_timer.%s", v->dir); + e_add_event_timer(name, 1.0, e_view_resort_timeout, 0, v); +} + +void +e_view_icon_initial_show(E_Icon *ic) +{ + /* check if we have enuf info and we havent been shown yet */ + if (!ic->info.icon) return; + if (ic->state.visible) return; + + /* first. lets figure out the size of the icon */ + evas_get_image_size(ic->view->evas, ic->obj.icon, + &(ic->geom.icon.w), &(ic->geom.icon.h)); + ic->geom.text.w = (int)evas_get_text_width(ic->view->evas, ic->obj.text); + ic->geom.text.h = (int)evas_get_text_height(ic->view->evas, ic->obj.text); + + /* now lets allocate space for it if we need to */ + ic->geom.x = 999999; + ic->geom.y = 999999; + + /* if needed queue a tiemout for a resort */ + e_view_queue_resort(ic->view); + + /* actually show the icon */ + e_view_icon_apply_xy(ic); + e_view_icon_show(ic); +} + +void +e_view_icon_set_mime(E_Icon *ic, char *base, char *mime) +{ + int diff = 0; + + if (!ic->info.mime.base) diff = 1; + if (!ic->info.mime.type) diff = 1; + if ((ic->info.mime.base) && (strcmp(ic->info.mime.base, base))) diff = 1; + if ((ic->info.mime.type) && (strcmp(ic->info.mime.base, mime))) diff = 1; + if (!diff) return; + if (ic->info.mime.base) free(ic->info.mime.base); + if (ic->info.mime.type) free(ic->info.mime.type); + ic->info.mime.base = NULL; + ic->info.mime.type = NULL; + ic->info.mime.base = strdup(base); + ic->info.mime.type = strdup(mime); + + printf("%40s: %s/%s\n", ic->file, base, mime); + + /* effect changes here */ + if (ic->info.custom_icon) + { + if (ic->info.icon) free(ic->info.icon); + ic->info.icon = NULL; + ic->info.icon = strdup(ic->info.custom_icon); + evas_set_image_file(ic->view->evas, ic->obj.icon, ic->info.custom_icon); + e_view_queue_resort(ic->view); + return; + } + /* find an icon */ + { + char icon[4096]; + char type[4096]; + char *p; + int done = 0; + + strcpy(type, ic->info.mime.type); + for (p = type; *p; p++) + { + if (*p == '/') *p = '-'; + } + do + { + sprintf(icon, "%s/data/icons/%s/%s.db", PACKAGE_DATA_DIR, + ic->info.mime.base, type); + if (e_file_exists(icon)) + { + done = 1; + break; + } + p = strrchr(type, '-'); + if (p) *p = 0; + } + while (p); + if (!done) + { + if (!e_file_exists(icon)) + { + sprintf(icon, "%s/data/icons/%s/default.db", PACKAGE_DATA_DIR, + ic->info.mime.base); + if (!e_file_exists(icon)) + sprintf(icon, "%s/data/icons/unknown/default.db", PACKAGE_DATA_DIR); + } + } + ic->info.icon = strdup(icon); + } + e_view_icon_update_state(ic); +} + +void +e_view_icon_set_link(E_Icon *ic, char *link) +{ + if ((!link) && (ic->info.link)) + { + free(ic->info.link); + ic->info.link = NULL; + /* effect changes here */ + } + else if (link) + { + if ((ic->info.link) && (!strcmp(ic->info.link, link))) + { + free(ic->info.link); + ic->info.link = strdup(link); + /* effect changes here */ + } } } void e_view_file_added(int id, char *file) { - E_Icon *icon; E_View *v; - /* char *realfile; */ - /* char buf[4096]; */ /* if we get a path - ignore it - its not a file in the a dir */ if (!file) return; @@ -470,257 +1379,85 @@ e_view_file_added(int id, char *file) if (!v) return; /* filter files here */ if (!e_view_filter_file(v, file)) return; - printf("e_view_file_added(%i, \"%s\");\n", id, file); - icon = e_icon_new(); - e_icon_set_filename(icon, file); - e_view_add_icon(v, icon); - - v->changed = 1; + if (!e_view_find_icon_by_file(v, file)) + { + E_Icon *ic; + + ic = e_view_icon_new(); + ic->view = v; + ic->file = strdup(file); + ic->changed = 1; + ic->obj.icon = evas_add_image_from_file(ic->view->evas, NULL); + ic->obj.text = evas_add_text(ic->view->evas, "borzoib", 8, ic->file); + evas_set_color(ic->view->evas, ic->obj.text, 0, 0, 0, 255); + v->icons = evas_list_append(v->icons, ic); + } } void e_view_file_deleted(int id, char *file) { - E_Icon *icon; E_View *v; - /* char *realfile; */ + if (!file) return; + if (file[0] == '/') return; v = e_view_find_by_monitor_id(id); if (!v) return; - icon = e_view_find_icon_by_file(v, file); - printf("%p %s\n", icon, file); - if (icon) - { - e_view_del_icon(v, icon); - printf("e_view_file_deleted(%i, \"%s\");\n", id, file); - } -} - -E_Icon * -e_view_find_icon_by_file(E_View *v, char *file) -{ - Evas_List l; - for (l = v->icons; l; l = l->next) { - E_Icon *icon; + E_Icon *ic; - icon = l->data; - if (!strcmp(file, icon->file)) return icon; + ic = e_view_find_icon_by_file(v, file); + if (ic) + { + e_view_icon_hide(ic); + OBJ_UNREF(ic); + v->icons = evas_list_remove(v->icons, ic); + v->changed = 1; + e_view_queue_resort(v); + } } - return NULL; } -E_Icon * -e_view_find_icon_by_path(char *path) +void +e_view_file_changed(int id, char *file) { - char *dir; - char *file; - Evas_List l; - - dir = e_file_get_dir(path); - file = e_file_get_file(path); - - for (l = views; l; l = l->next) + E_View *v; + + if (!file) return; + if (file[0] == '/') return; + v = e_view_find_by_monitor_id(id); + if (!v) return; + { - Evas_List ll; + E_Icon *ic; - E_View *v; - v = l->data; - if (!strcmp(v->dir, dir)) + ic = e_view_find_icon_by_file(v, file); + if (ic) { - for (ll = v->icons; ll; ll = ll->next) - { - E_Icon *icon; - - icon = ll->data; - if (!strcmp(file, icon->file)) - { - IF_FREE(dir); - IF_FREE(file); - return icon; - } - } } } - IF_FREE(dir); - IF_FREE(file); - return NULL; } -static void -e_view_handle_fs(EfsdEvent *ev) +void +e_view_file_moved(int id, char *file) { - switch (ev->type) - { - case EFSD_EVENT_FILECHANGE: - switch (ev->efsd_filechange_event.changetype) - { - case EFSD_FILE_CREATED: - e_view_file_added(efsd_reply_id(ev), efsd_reply_filename(ev)); - break; - case EFSD_FILE_EXISTS: - e_view_file_added(efsd_reply_id(ev), efsd_reply_filename(ev)); - break; - case EFSD_FILE_DELETED: - e_view_file_deleted(efsd_reply_id(ev), efsd_reply_filename(ev)); - break; - case EFSD_FILE_CHANGED: -/* printf("EFSD_CHANGE_CHANGED: %i %s\n", - ev->efsd_filechange_event.id, - ev->efsd_filechange_event.file); -*/ break; - case EFSD_FILE_MOVED: -/* printf("EFSD_CHANGE_MOVED: %i %s\n", - ev->efsd_filechange_event.id, - ev->efsd_filechange_event.file); -*/ break; - case EFSD_FILE_END_EXISTS: - { - E_View *v; - - v = e_view_find_by_monitor_id(efsd_reply_id(ev)); - if (v) v->is_listing = 0; - printf("EFSD_CHANGE_END_EXISTS: %i %s\n", - efsd_reply_id(ev), efsd_reply_filename(ev)); - } - break; - default: - break; - } - break; - case EFSD_EVENT_REPLY: - switch (ev->efsd_reply_event.command.type) - { - case EFSD_CMD_REMOVE: - break; - case EFSD_CMD_MOVE: - break; - case EFSD_CMD_SYMLINK: - break; - case EFSD_CMD_LISTDIR: - break; - case EFSD_CMD_MAKEDIR: - break; - case EFSD_CMD_CHMOD: - break; - case EFSD_CMD_GETFILETYPE: -/* printf("Getmime event %i\n", - ev->efsd_reply_event.command.efsd_file_cmd.id); -*/ if (ev->efsd_reply_event.status == SUCCESS) - { - E_Icon *icon; - - icon = e_view_find_icon_by_path(efsd_reply_filename(ev)); - if (icon) - { - /* figure out icons to use */ - e_icon_apply_mime(icon, (char*)ev->efsd_reply_event.data); - e_icon_get_icon(icon); - e_icon_pre_show(icon); - } - } - break; - case EFSD_CMD_STAT: -/* printf("Stat event %i stating file %s\n", - ev->efsd_reply_event.command.efsd_file_cmd.id, - ev->efsd_reply_event.command.efsd_file_cmd.file); -*/ { - struct stat *st; - E_Icon *icon; - - st = (struct stat*) ev->efsd_reply_event.data; - - icon = e_view_find_icon_by_path(efsd_reply_filename(ev)); - if (icon) - { - char f[4096]; + E_View *v; -/* - if (S_ISREG(st->st_mode)) - printf("%s is a regular file.\n", - ev->efsd_reply_event.command.efsd_file_cmd.file); - if (S_ISLNK(st->st_mode)) - printf("%s is a symlink.\n", - ev->efsd_reply_event.command.efsd_file_cmd.file); - if (S_ISDIR(st->st_mode)) - printf("%s is a directory.\n", - ev->efsd_reply_event.command.efsd_file_cmd.file); -*/ sprintf(f, "%s/%s", icon->view->dir, icon->file); - /* should get mime type here */ - /* perhaps this flag should be part of the mime? */ - if (S_ISDIR(st->st_mode)) icon->info.is_dir = 1; - /* this should be able to be returned by efsd */ - if (S_ISLNK(st->st_mode)) - { - icon->info.link_get_id = - efsd_readlink(e_fs_get_connection(), f); - } - if ((!icon->info.link_get_id) && (!icon->info.is_dir)) - icon->info.is_exe = e_file_can_exec(st); - icon->changed = 1; - icon->view->changed = 1; -/* if (!icon->info.link_get_id) - e_icon_pre_show(icon);*/ - } - } - break; - case EFSD_CMD_READLINK: - if (ev->efsd_reply_event.status == SUCCESS) - { - Evas_List l; - - for (l = views; l; l = l->next) - { - E_View *v; - Evas_List ll; - - v = l->data; - for (ll = v->icons; ll; ll = ll->next) - { - E_Icon *icon; - - icon = ll->data; - - if (icon->info.link_get_id == efsd_reply_id(ev)) - { - IF_FREE(icon->info.link); - icon->info.link = malloc(ev->efsd_reply_event.data_len + 1); - memcpy(icon->info.link, (char*)ev->efsd_reply_event.data, ev->efsd_reply_event.data_len); - icon->info.link[ev->efsd_reply_event.data_len] = 0; - icon->info.link_get_id = 0; - if (!icon->info.link_get_id) - e_icon_pre_show(icon); - icon->changed = 1; - icon->view->changed = 1; - printf("link_to = %s\n", icon->info.link); - goto done_readlink; - } - } - } - done_readlink: - } - break; - case EFSD_CMD_CLOSE: - break; - case EFSD_CMD_SETMETA: - break; - case EFSD_CMD_GETMETA: - break; - case EFSD_CMD_STARTMON_DIR: - printf("Startmon event %i\n", efsd_reply_id(ev)); - break; - case EFSD_CMD_STARTMON_FILE: - printf("Startmon file event %i\n", efsd_reply_id(ev)); - break; - case EFSD_CMD_STOPMON: - break; - default: - break; + /* never gets called ? */ + if (!file) return; + printf(".!WOW!. e_view_file_moved(%i, %s);\n", id, file); + if (file[0] == '/') return; + v = e_view_find_by_monitor_id(id); + if (!v) return; + + { + E_Icon *ic; + + ic = e_view_find_icon_by_file(v, file); + if (ic) + { } - break; - default: - break; } } @@ -742,6 +1479,11 @@ e_view_find_by_monitor_id(int id) void e_view_free(E_View *v) { + char name[4096]; + + sprintf(name, "resort_timer.%s", v->dir); + e_del_event_timer(name); + views = evas_list_remove(views, v); if (v->restarter) e_fs_del_restart_handler(v->restarter); @@ -774,45 +1516,30 @@ e_view_new(void) v->options.back_pixmap = 0; #endif #endif - { - Ebits_Object obj; - int pl, pr, pt, pb; - - pl = pr = pt = pb = 0; - v->spacing.inset.left = 2; - v->spacing.inset.right = 2; - v->spacing.inset.top = 2; - v->spacing.inset.bottom = 2; - obj = ebits_load(PACKAGE_DATA_DIR"/data/config/appearance/default/selections/file.bits.db"); - if (obj) - { - ebits_get_insets(obj, &pl, &pr, &pt, &pb); - ebits_free(obj); - } - v->spacing.icon.left = pl; - v->spacing.icon.right = pr; - v->spacing.icon.top = pt; - v->spacing.icon.bottom = pb; - v->spacing.spacing.left = 1; - v->spacing.spacing.right = 1; - v->spacing.spacing.top = 1; - v->spacing.spacing.bottom = 1; - } - views = evas_list_append(views, v); + v->select.config.grad_size.l = 8; + v->select.config.grad_size.r = 8; + v->select.config.grad_size.t = 8; + v->select.config.grad_size.b = 8; +#define SETCOL(_member, _r, _g, _b, _a) \ +_member.r = _r; _member.g = _g; _member.b = _b; _member.a = _a; + SETCOL(v->select.config.edge_l, 0, 0, 0, 255); + SETCOL(v->select.config.edge_r, 0, 0, 0, 255); + SETCOL(v->select.config.edge_t, 0, 0, 0, 255); + SETCOL(v->select.config.edge_b, 0, 0, 0, 255); + SETCOL(v->select.config.middle, 255, 255, 255, 100); + SETCOL(v->select.config.grad_l, 255, 255, 255, 100); + SETCOL(v->select.config.grad_r, 255, 255, 255, 100); + SETCOL(v->select.config.grad_t, 255, 255, 255, 100); + SETCOL(v->select.config.grad_b, 255, 255, 255, 100); - /* - { - E_Shelf *sh; - - sh = e_shelf_new(); - e_shelf_set_name(sh, "Test Shelf"); - e_shelf_set_view(sh, v); - e_shelf_show(sh); - e_shelf_move(sh, 10, 10); - e_shelf_resize(sh, 500, 350); - v->shelves = evas_list_append(v->shelves, sh); - } - */ + v->spacing.window.l = 3; + v->spacing.window.r = 3; + v->spacing.window.t = 3; + v->spacing.window.b = 3; + v->spacing.icon.s = 5; + v->spacing.icon.g = 5; + v->spacing.icon.b = 5; + views = evas_list_append(views, v); return v; } @@ -844,55 +1571,6 @@ e_view_set_dir(E_View *v, char *dir) } } -void -e_view_scroll(E_View *v, int dx, int dy) -{ - Evas_List l; - - v->viewport.x -= dx; - v->viewport.y -= dy; - for (l = v->icons; l; l = l->next) - { - E_Icon *icon; - int x, y; - - icon = l->data; - e_icon_get_xy(icon, &x, &y); - e_icon_set_xy(icon, x + dx, y + dy); - } - v->changed = 1; -} - -void -e_view_scroll_to(E_View *v, int x, int y) -{ - e_view_scroll(v, v->viewport.x - x, v->viewport.y - y); -} - -void -e_view_add_icon(E_View *v, E_Icon *icon) -{ - if (icon->view) return; - icon->view = v; - e_icon_realize(icon); - v->changed = 1; - v->icons = evas_list_append(v->icons, icon); -/* e_shelf_add_icon(v->shelves->data, icon); */ -} - -void -e_view_del_icon(E_View *v, E_Icon *icon) -{ - if (!icon->view) return; -/* e_shelf_del_icon(v->shelves->data, icon); */ - e_icon_unrealize(icon); - OBJ_UNREF(icon); - icon->view = NULL; - icon->changed = 1; - v->changed = 1; - v->icons = evas_list_remove(v->icons, icon); -} - void e_view_realize(E_View *v) { @@ -934,7 +1612,8 @@ e_view_realize(E_View *v) v->obj_bg = evas_add_rectangle(v->evas); evas_callback_add(v->evas, v->obj_bg, CALLBACK_MOUSE_DOWN, e_bg_down_cb, v); evas_callback_add(v->evas, v->obj_bg, CALLBACK_MOUSE_UP, e_bg_up_cb, v); - evas_set_layer(v->evas, v->obj_bg, 1); + evas_callback_add(v->evas, v->obj_bg, CALLBACK_MOUSE_MOVE, e_bg_move_cb, v); + evas_set_layer(v->evas, v->obj_bg, 100); evas_move(v->evas, v->obj_bg, 0, 0); evas_resize(v->evas, v->obj_bg, 999999, 999999); evas_set_color(v->evas, v->obj_bg, 0, 0, 0, 0); @@ -944,6 +1623,7 @@ e_view_realize(E_View *v) XEV_EXPOSE | XEV_MOUSE_MOVE | XEV_BUTTON | XEV_IN_OUT | XEV_KEY); e_window_show(v->win.main); + { char *dir; @@ -953,47 +1633,9 @@ e_view_realize(E_View *v) IF_FREE(dir); } - if (v->shelves) - { - Evas_List l; - - for (l = v->shelves; l; l = l->next) - { - E_Shelf *sh; - - sh = l->data; - e_shelf_realize(sh); - } - } - - /* FIXME: hack to test entry boxes */ -/* - { - entry = e_entry_new(); - e_entry_set_evas(entry, v->evas); - e_entry_set_layer(entry, 100); - e_entry_move(entry, 100, 100); - e_entry_resize(entry, 100, 24); - e_entry_set_focus(entry, 1); - e_entry_show(entry); - e_entry_set_text(entry, "Some Test Entry Text... Play with me!"); - { - int ew, eh; - - e_entry_query_max_size(entry, &ew, &eh); - e_entry_resize(entry, ew, eh); - } - } -*/ v->changed = 1; } -void -e_view_unrealize(E_View *v) -{ - if (!v->evas) return; -} - void e_view_update(E_View *v) { @@ -1006,7 +1648,11 @@ e_view_update(E_View *v) E_Icon *icon; icon = l->data; - e_icon_update(icon); + } + if (v->drag.update) + { + e_window_move(v->drag.win, v->drag.x, v->drag.y); + v->drag.update = 0; } } if (v->options.back_pixmap) @@ -1014,6 +1660,8 @@ e_view_update(E_View *v) Imlib_Updates up; up = evas_render_updates(v->evas); + /* special code to handle if we are double buffering to a pixmap */ + /* and clear sections of the window if they got updated */ if (up) { Imlib_Updates u; @@ -1033,6 +1681,186 @@ e_view_update(E_View *v) v->changed = 0; } + +static void +e_view_handle_fs(EfsdEvent *ev) +{ + switch (ev->type) + { + case EFSD_EVENT_FILECHANGE: + switch (ev->efsd_filechange_event.changetype) + { + case EFSD_FILE_CREATED: +/* printf("EFSD_FILE_CREATED: %i %s\n", + ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); +*/ e_view_file_added(ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); + break; + case EFSD_FILE_EXISTS: +/* printf("EFSD_FILE_EXISTS: %i %s\n", + ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); +*/ e_view_file_added(ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); + break; + case EFSD_FILE_DELETED: +/* printf("EFSD_FILE_DELETED: %i %s\n", + ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); +*/ e_view_file_deleted(ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); + break; + case EFSD_FILE_CHANGED: +/* printf("EFSD_CHANGE_CHANGED: %i %s\n", + ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); +*/ e_view_file_changed(ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); + break; + case EFSD_FILE_MOVED: +/* printf("EFSD_CHANGE_MOVED: %i %s\n", + ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); +*/ e_view_file_moved(ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); + break; + case EFSD_FILE_END_EXISTS: + { + E_View *v; + + v = e_view_find_by_monitor_id(ev->efsd_filechange_event.id); + if (v) v->is_listing = 0; +/* printf("EFSD_CHANGE_END_EXISTS: %i %s\n", + ev->efsd_filechange_event.id, + ev->efsd_filechange_event.file); +*/ } + break; + default: + break; + } + break; + case EFSD_EVENT_REPLY: + switch (ev->efsd_reply_event.command.type) + { + case EFSD_CMD_REMOVE: + break; + case EFSD_CMD_MOVE: + break; + case EFSD_CMD_SYMLINK: + break; + case EFSD_CMD_LISTDIR: + break; + case EFSD_CMD_MAKEDIR: + break; + case EFSD_CMD_CHMOD: + break; + case EFSD_CMD_GETFILETYPE: +/* printf("Getmime event %i\n", + ev->efsd_reply_event.command.efsd_file_cmd.id); +*/ if (ev->efsd_reply_event.status == SUCCESS) + { + E_Icon *ic; + E_View *v; + char *file, *file2; + + file = NULL; + if (ev->efsd_reply_event.command.efsd_file_cmd.files) + file = ev->efsd_reply_event.command.efsd_file_cmd.files[0]; + if (file) + { + file2 = strrchr(file, '/'); + if (file2) file = file2 + 1; + } + v = e_view_find_by_monitor_id(ev->efsd_reply_event.command.efsd_file_cmd.id); + if ((v) && (file)) + { + ic = e_view_find_icon_by_file(v, file); + if ((ic) && + (ev->efsd_reply_event.data)) + { + char *m, *p; + char mime[4096], base[4096]; + + m = ev->efsd_reply_event.data; + p = strchr(m, '/'); + if (p) + { + strcpy(base, m); + strcpy(mime, p + 1); + p = strchr(base, '/'); + *p = 0; + } + else + { + strcpy(base, m); + strcpy(mime, "unknown"); + } +/* printf("MIME: %s\n", m); +*/ e_view_icon_set_mime(ic, base, mime); + e_view_icon_initial_show(ic); + } + } + } + break; + case EFSD_CMD_STAT: +/* printf("Stat event %i\n", + ev->efsd_reply_event.command.efsd_file_cmd.id); +*/ { + } + break; + case EFSD_CMD_READLINK: + if (ev->efsd_reply_event.status == SUCCESS) + { + E_Icon *ic; + E_View *v; + + char *file, *file2; + + file = NULL; + if (ev->efsd_reply_event.command.efsd_file_cmd.files) + file = ev->efsd_reply_event.command.efsd_file_cmd.files[0]; + if (file) + { + file2 = strrchr(file, '/'); + if (file2) file = file2 + 1; + } + v = e_view_find_by_monitor_id(ev->efsd_reply_event.command.efsd_file_cmd.id); + if ((v) && (file)) + { + ic = e_view_find_icon_by_file(v, file); + if ((ic) && + (ev->efsd_reply_event.data)) + e_view_icon_set_link(ic, (char*)ev->efsd_reply_event.data); + e_view_icon_initial_show(ic); + } + } + break; + case EFSD_CMD_CLOSE: + break; + case EFSD_CMD_SETMETA: + break; + case EFSD_CMD_GETMETA: + break; + case EFSD_CMD_STARTMON_DIR: +/* printf("Startmon event %i\n", + ev->efsd_reply_event.command.efsd_file_cmd.id); +*/ break; + case EFSD_CMD_STARTMON_FILE: +/* printf("Startmon file event %i\n", + ev->efsd_reply_event.command.efsd_file_cmd.id); +*/ break; + case EFSD_CMD_STOPMON: + break; + default: + break; + } + break; + default: + break; + } +} + void e_view_init(void) {