From 5f9084b7d74f10afa261df8c352c8001d73c932f Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Mon, 17 May 2010 23:15:00 +0000 Subject: [PATCH] make evrything handle mouse events. - double click on item runs action, right click runs action and keep evry open - same with selectors - mouse down and move 150px browses that item. and back. TODO needs an indicator - mouse wheel selects next/prev on plugin bar or selectors SVN revision: 48949 --- data/themes/default.edc | 1210 +++++++++++------------- src/modules/everything/e_mod_main.h | 10 +- src/modules/everything/evry.c | 195 +++- src/modules/everything/evry_plug_view_thumb.c | 163 +++- src/modules/everything/evry_util.c | 1 + src/modules/everything/evry_view_plugin_tabs.c | 59 +- 6 files changed, 952 insertions(+), 686 deletions(-) diff --git a/data/themes/default.edc b/data/themes/default.edc index c947222..42ec5d3 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -32800,473 +32800,481 @@ collections { data.item: "shaped" "1"; data.item: "shadow_offset" "50"; parts { + /*************** list ***************/ + part { + name: "list_win"; + type: RECT; + description { + state: "default" 0.0; + visible: 0; + min: 300 155; + rel1 { + to_y: "frame"; + offset: 10 -3; + relative: 0.0 1.0; + } + rel2 { + offset: -11 -1; + } + } + } + part { + name: "list_frame"; + type: RECT; + description { + state: "default" 0.0; + visible: 0; + rel1.to: "list_win"; + rel2.to: "list_win"; + } + description { + state: "composite" 0.0; + inherit: "default" 0.0; + rel1.offset: 50 0; + rel2.offset: -51 -40; + } + } + part { + name: "shadow_clip"; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "list_shadow"; + rel2.to: "list_shadow"; + color: 255 255 255 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + } + part { + name: "list_shadow"; + clip_to: "shadow_clip"; + description { + state: "default" 0.0; + visible: 0; + rel1.to: "list_win"; + rel1.offset: 0 -50; + rel2 { + relative: 1.0 1.0; + to: "base"; + offset: 47 40; + } + image { + normal: "everything_drop.png"; + middle: 0; + border: 50 50 50 50; + } + fill.smooth: 1; + } + description { + state: "composite" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "base"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + to_x: "list_frame"; + to_y: "input_base"; + } + rel2 { + to_x: "list_frame"; + to_y: "input_base"; + } + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + rel2 { + to: "list_frame"; + offset: -1 -1; + } + } + } + part { + name: "input_base"; + type: RECT; + description { + state: "default" 0.0; + rel1 { + to_y: "list_win"; + to_x: "base"; + } - /*************** list ***************/ - - part { - name: "list_win"; - type: RECT; - description { - state: "default" 0.0; - visible: 0; - min: 300 155; - rel1 { - to_y: "frame"; - offset: 10 -3; - relative: 0.0 1.0; - } - rel2 { - offset: -11 -1; - } - } - } - part { - name: "list_frame"; - type: RECT; - description { - state: "default" 0.0; - visible: 0; - rel1.to: "list_win"; - rel2.to: "list_win"; - } - description { - state: "composite" 0.0; - inherit: "default" 0.0; - rel1.offset: 50 0; - rel2.offset: -51 -40; - } - } - part { - name: "shadow_clip"; - type: RECT; - description { - state: "default" 0.0; - rel1.to: "list_shadow"; - rel2.to: "list_shadow"; - color: 255 255 255 0; - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - color: 255 255 255 255; - } - } - part { - name: "list_shadow"; - clip_to: "shadow_clip"; - description { - state: "default" 0.0; - visible: 0; - rel1.to: "list_win"; - rel1.offset: 0 -50; - rel2 { - relative: 1.0 1.0; - to: "base"; - offset: 47 47; - } - image { - normal: "everything_drop.png"; - middle: 0; - border: 50 50 50 50; - } - fill.smooth: 0; - } - description { - state: "composite" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { - name: "base"; - type: RECT; - description { - state: "default" 0.0; - rel1 { - relative: 0.0 1.0; - to_x: "list_frame"; - to_y: "input_base"; - } - rel2 { - to_x: "list_frame"; - to_y: "input_base"; - } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - rel2 { - to: "list_frame"; - offset: -1 -1; - } - } - } - part { - name: "input_base"; - type: RECT; - description { - state: "default" 0.0; - rel1 { - to_y: "list_win"; - to_x: "base"; - } - - rel2 { - relative: 1.0 0.0; - to_y: "list_win"; - to_x: "base"; - offset: -1 1; - } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - rel2.offset: -1 24; - } - } - part { - name: "list_win_bg"; - type: RECT; - description { - state: "default" 0.0; - rel1.to_x: "base"; - rel1.to_y: "input_base"; + rel2 { + relative: 1.0 0.0; + to_y: "list_win"; + to_x: "base"; + offset: -1 1; + } + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + rel2.offset: -1 24; + } + } + part { + name: "list_win_bg"; + type: RECT; + description { + state: "default" 0.0; + rel1.to_x: "base"; + rel1.to_y: "input_base"; - rel2.to: "base"; - rel2.offset: -1 -3; - color: 225 225 225 255; - } - } - part { - name: "bar_base"; - type: RECT; - description { - state: "default" 0.0; - visible: 0; - rel1 { - relative: 0.0 1.0; - to: "base"; - offset: 0 -26; - } - rel2 { - relative: 1.0 1.0; - to: "base"; - offset: -1 -2; - } - } - } - part { - name: "bar_clip"; - type: RECT; - description { - state: "default" 0.0; - rel1 { - to: "bar_base"; - offset: 2 2; - } - rel2 { - to: "bar_base"; - offset: -2 -2; - } - } - description { - state: "faded" 0.0; - inherit: "default" 0.0; - color: 255 255 255 0; - } - } - part { - name: "bar_bg"; - clip_to: "base"; - description { - state: "default" 0.0; - min: 32 25; - max: 9999 25; - fixed: 1 1; - rel1 { - offset: -1 2; - to: "bar_base"; - } - rel2 { - offset: -1 -5; - to: "bar_base"; - } - image { - normal: "everything_bar.png"; - border: 4 4 4 4; - } - color: 240 240 240 255; - } - } - part { - name: "e.swallow.bar"; - clip_to: "bar_clip"; - type: SWALLOW; - description { - state: "default" 0.0; - rel1.to: "bar_clip"; - rel1.offset: -1 0; - rel2.to: "bar_clip"; - rel2.offset: -1 -1; - } - } - part { - name: "bar_over2"; - clip_to: "base"; - description { - state: "default" 0.0; - rel1.to: "bar_bg"; - rel1.offset: -1 -2; - rel2.to: "bar_bg"; - rel2.offset: 1 1; - image { - normal: "bt_dis_shine.png"; - border: 4 4 4 4; - } - color: 255 255 255 235; - } - } - part { - name: "bar_over1"; - clip_to: "base"; - description { - state: "default" 0.0; - rel1.to: "bar_bg"; - rel1.offset: 0 -2; - rel2.to: "bar_bg"; - rel2.offset: 1 -1; - rel2.relative: 1.0 0.5; - image { - normal: "bt_dis_hilight.png"; - border: 4 4 4 0; - } - color: 255 255 255 128; - } - } - part { - name: "input_bg"; - clip_to: "input_base"; - description { - state: "default" 0.0; - fixed: 1 1; - min: 32 28; - max: 9999 28; - rel1 { - offset: -3 0; - to: "input_base"; - } - rel2 { - offset: 1 0; - to: "input_base"; - } - image { - normal: "bt_dis_base.png"; - border: 4 4 4 4; - } - color: 235 235 235 255; - } - } - part { - name: "e.text.label"; - type: TEXT; - effect: SHADOW; - scale: 1; - clip_to: "input_base"; - description { - state: "default" 0.0; - fixed: 0 1; - align: 0.0 0.5; - rel1 { - offset: 10 7; - to: "input_bg"; - } - rel2 { - relative: 0.0 1.0; - offset: 10 -5; - to: "input_bg"; - } - color: 0 0 0 255; - color3: 255 255 255 128; - text { - font: "Sans:style=Bold"; - size: 12; - align: 0.0 0.5; - min: 1 1; - } - } - } - part { - name: "input_over2"; - mouse_events: 0; - clip_to: "input_base"; - description { - state: "default" 0.0; - visible: 0; - rel1.to: "input_bg"; - rel2.to: "input_bg"; - image { - normal: "bt_dis_shine.png"; - border: 4 4 4 4; - } - color: 255 255 255 180; - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { - name: "input_over1"; - mouse_events: 0; - clip_to: "input_base"; - description { - state: "default" 0.0; - visible: 0; - rel1.to: "input_bg"; - rel1.offset: -1 0; - rel2.to: "input_bg"; - rel2.offset: -1 4; - rel2.relative: 1.0 0.5; - image { - normal: "bt_dis_hilight.png"; - border: 4 4 4 0; - } - color: 255 255 255 100; - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { - name: "list_clip"; - type: RECT; - clip_to: "base"; - description { - state: "default" 0.0; - color: 255 255 255 255; - fixed: 1 1; - rel1 { - relative: 0.0 0.0; - offset: 2 0; - to: "base"; - } - rel2 { - relative: 1.0 0.0; - offset: -3 0; - to_y: "bar_base"; - to_x: "base"; - } - } - } - part { - name: "list_bg"; - clip_to: "base"; - description { - state: "default" 0.0; - image.normal: "vgrad_dark.png"; - rel1 { - to: "list_clip"; - offset: 0 0; - } - rel2 { - to: "list_clip"; - offset: 0 0; - } - fill.smooth: 0; - } - } - part { - name: "e.swallow.list"; - type: SWALLOW; - clip_to: "list_clip"; - description { - state: "default" 0.0; - min: 32 170; - fixed: 1 1; - rel1 { - relative: 0.0 0.0; - offset: 0 3; - to: "list_clip"; - } - rel2 { - relative: 1.0 1.0; - offset: -1 -1; - to: "list_clip"; - } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - min: 32 150; - } - } - part { - name: "list_over"; - clip_to: "base"; - description { - state: "default" 0.0; - rel1 { - offset: -1 -1; - to: "list_bg"; - } - rel2 { - offset: -1 -1; - to: "list_bg"; - } - image { - normal: "inset_sunk.png"; - border: 7 7 7 7; - middle: 0; - } - fill.smooth : 0; - color: 200 200 200 255; - } - } - part { - name: "list_over2"; - clip_to: "base"; - description { - state: "default" 0.0; - rel1 { - offset: -1 -1; - to: "list_bg"; - } - rel2 { - offset: -1 -1; - to: "list_bg"; - } - image { - normal: "inset_sunk.png"; - border: 7 7 7 7; - middle: 0; - } - fill.smooth : 0; - color: 200 200 200 255; - } - } - part { - name: "box"; - description { - state: "default" 0.0; - rel1 { - to: "base"; - } - rel2 { - to: "base"; - offset: -1 -1; - } - image { - normal: "everything_box.png"; - border: 4 4 4 4; - middle: 0; - } - fill.smooth : 1; - color: 255 255 255 255; - } - } + rel2.to: "base"; + rel2.offset: -1 -3; + color: 225 225 225 255; + } + } + part { + name: "bar_base"; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.0 1.0; + to: "base"; + offset: 0 -26; + } + rel2 { + relative: 1.0 1.0; + to: "base"; + offset: -1 -2; + } + } + } + part { + name: "bar_clip"; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { + to: "bar_base"; + offset: 2 2; + } + rel2 { + to: "bar_base"; + offset: -2 -2; + } + } + description { + state: "faded" 0.0; + inherit: "default" 0.0; + color: 255 255 255 0; + } + } + part { + name: "bar_bg"; + clip_to: "base"; + mouse_events: 0; + description { + state: "default" 0.0; + min: 32 25; + max: 9999 25; + fixed: 1 1; + rel1 { + offset: -1 2; + to: "bar_base"; + } + rel2 { + offset: -1 -5; + to: "bar_base"; + } + image { + normal: "everything_bar.png"; + border: 4 4 4 4; + } + color: 240 240 240 255; + } + } + part { + name: "e.swallow.bar"; + clip_to: "bar_clip"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1.to: "bar_clip"; + rel1.offset: -1 0; + rel2.to: "bar_clip"; + rel2.offset: -1 -1; + } + } + part { + name: "bar_over2"; + clip_to: "base"; + mouse_events: 0; + description { + state: "default" 0.0; + rel1.to: "bar_bg"; + rel1.offset: -1 -2; + rel2.to: "bar_bg"; + rel2.offset: 1 1; + image { + normal: "bt_dis_shine.png"; + border: 4 4 4 4; + } + color: 255 255 255 235; + } + } + part { + name: "bar_over1"; + clip_to: "base"; + mouse_events: 0; + description { + state: "default" 0.0; + rel1.to: "bar_bg"; + rel1.offset: 0 -2; + rel2.to: "bar_bg"; + rel2.offset: 1 -1; + rel2.relative: 1.0 0.5; + image { + normal: "bt_dis_hilight.png"; + border: 4 4 4 0; + } + color: 255 255 255 128; + } + } + part { + name: "input_bg"; + clip_to: "input_base"; + description { + state: "default" 0.0; + fixed: 1 1; + min: 32 28; + max: 9999 28; + rel1 { + offset: -3 0; + to: "input_base"; + } + rel2 { + offset: 1 0; + to: "input_base"; + } + image { + normal: "bt_dis_base.png"; + border: 4 4 4 4; + } + color: 235 235 235 255; + } + } + part { + name: "e.text.label"; + type: TEXT; + effect: SHADOW; + scale: 1; + clip_to: "input_base"; + description { + state: "default" 0.0; + fixed: 0 1; + align: 0.0 0.5; + rel1 { + offset: 10 7; + to: "input_bg"; + } + rel2 { + relative: 0.0 1.0; + offset: 10 -5; + to: "input_bg"; + } + color: 0 0 0 255; + color3: 255 255 255 128; + text { + font: "Sans:style=Bold"; + size: 12; + align: 0.0 0.5; + min: 1 1; + } + } + } + part { + name: "input_over2"; + mouse_events: 0; + clip_to: "input_base"; + description { + state: "default" 0.0; + visible: 0; + rel1.to: "input_bg"; + rel2.to: "input_bg"; + image { + normal: "bt_dis_shine.png"; + border: 4 4 4 4; + } + color: 255 255 255 180; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "input_over1"; + mouse_events: 0; + clip_to: "input_base"; + description { + state: "default" 0.0; + visible: 0; + rel1.to: "input_bg"; + rel1.offset: -1 0; + rel2.to: "input_bg"; + rel2.offset: -1 4; + rel2.relative: 1.0 0.5; + image { + normal: "bt_dis_hilight.png"; + border: 4 4 4 0; + } + color: 255 255 255 100; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "list_clip"; + type: RECT; + clip_to: "base"; + description { + state: "default" 0.0; + color: 255 255 255 255; + fixed: 1 1; + rel1 { + relative: 0.0 0.0; + offset: 2 0; + to: "base"; + } + rel2 { + relative: 1.0 0.0; + offset: -3 0; + to_y: "bar_base"; + to_x: "base"; + } + } + } + part { + name: "list_bg"; + clip_to: "base"; + description { + state: "default" 0.0; + image.normal: "vgrad_dark.png"; + rel1 { + to: "list_clip"; + offset: 0 0; + } + rel2 { + to: "list_clip"; + offset: 0 0; + } + fill.smooth: 0; + } + } + part { + name: "e.swallow.list"; + type: SWALLOW; + clip_to: "list_clip"; + mouse_events: 1; + description { + state: "default" 0.0; + min: 32 170; + fixed: 1 1; + rel1 { + relative: 0.0 0.0; + offset: 0 3; + to: "list_clip"; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + to: "list_clip"; + } + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + min: 32 150; + } + } + part { + name: "list_over"; + clip_to: "base"; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { + offset: -1 -1; + to: "list_bg"; + } + rel2 { + offset: -1 -1; + to: "list_bg"; + } + image { + normal: "inset_sunk.png"; + border: 7 7 7 7; + middle: 0; + } + fill.smooth : 0; + color: 200 200 200 255; + } + } + part { + name: "list_over2"; + clip_to: "base"; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { + offset: -1 -1; + to: "list_bg"; + } + rel2 { + offset: -1 -1; + to: "list_bg"; + } + image { + normal: "inset_sunk.png"; + border: 7 7 7 7; + middle: 0; + } + fill.smooth : 0; + color: 200 200 200 255; + } + } + part { + name: "box"; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { + to: "base"; + } + rel2 { + to: "base"; + offset: -1 -1; + } + image { + normal: "everything_box.png"; + border: 4 4 4 4; + middle: 0; + } + fill.smooth : 1; + color: 255 255 255 255; + } + } + /*************** top ***************/ part { name: "win"; type: RECT; @@ -33292,42 +33300,42 @@ collections { visible: 0; rel1.to: "win"; rel2.to: "win"; - } - description { - state: "composite" 0.0; - inherit: "default" 0.0; - rel1.offset: 50 50; - rel2.offset: -50 -51; - } - } - part { - name: "shadow"; - description { - state: "default" 0.0; - visible: 0; - image { - normal: "everything_drop.png"; - middle: 0; - border: 50 50 50 50; - } - rel1.to: "win"; - rel2.to: "win"; +} + description { + state: "composite" 0.0; + inherit: "default" 0.0; + rel1.offset: 50 50; + rel2.offset: -50 -51; + } + } + part { + name: "shadow"; + description { + state: "default" 0.0; + visible: 0; + image { + normal: "everything_drop.png"; + middle: 0; + border: 50 50 50 50; + } + rel1.to: "win"; + rel2.to: "win"; - rel1.offset: 4 4; - rel2.offset: -5 -5; - fill.smooth: 1; - color: 255 255 255 255; - } - description { - state: "composite" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { - name: "bg"; - description { - state: "default" 0.0; + rel1.offset: 4 4; + rel2.offset: -5 -5; + fill.smooth: 0; + } + description { + state: "composite" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 200; + } + } + part { + name: "bg"; + description { + state: "default" 0.0; max: 999 118; rel1.to: "frame"; rel2.to: "frame"; @@ -33491,7 +33499,7 @@ collections { } } } - } + } programs { program { name: "object_selector_hide"; @@ -33639,6 +33647,7 @@ collections { name: "inner_clip"; type: RECT; clip_to: "clip"; + mouse_events: 0; description { state: "default" 0.0; rel1.offset: 10 10; @@ -33649,6 +33658,7 @@ collections { name: "icon_clip"; type: RECT; clip_to: "inner_clip"; + mouse_events: 0; description { state: "default" 0.0; color: 255 255 255 255; @@ -33662,6 +33672,7 @@ collections { name: "e.swallow.icons"; type: SWALLOW; clip_to: "icon_clip"; + mouse_events: 0; description { state: "default" 0.0; min: 64 64; @@ -33683,6 +33694,7 @@ collections { name: "e.swallow.thumb"; type: SWALLOW; clip_to: "icon_clip"; + mouse_events: 0; description { state: "default" 0.0; min: 86 64; @@ -33755,6 +33767,14 @@ collections { } } } + part { + name: "event"; + type: RECT; + description { + state: "default" 0.0; + color: 0 0 0 0; + } + } } programs { program { @@ -33831,7 +33851,8 @@ collections { type: TEXT; scale: 1; clip_to: "clip"; - description { + mouse_events: 0; + description { state: "default" 0.0; align: 0.5 0.5; fixed: 0 1; @@ -33877,6 +33898,7 @@ collections { mouse_events: 0; clip_to: "clip"; scale: 1; + mouse_events: 0; description { state: "default" 0.0; align: 0.5 0.5; @@ -33900,6 +33922,14 @@ collections { visible: 1; } } + part { + name: "event"; + type: RECT; + description { + state: "default" 0.0; + color: 0 0 0 0; + } + } } programs { program { @@ -33929,54 +33959,8 @@ collections { group { name: "e/modules/everything/thumbview/main/window"; - images { - image: "vgrad_dark.png" COMP; - image: "dia_botshad.png" COMP; - image: "big_arrow_up.png" COMP; - image: "busy-1.png" COMP; - image: "busy-2.png" COMP; - image: "busy-3.png" COMP; - image: "busy-4.png" COMP; - image: "busy-5.png" COMP; - image: "busy-6.png" COMP; - image: "busy-7.png" COMP; - image: "busy-8.png" COMP; - image: "busy-9.png" COMP; - } parts { part { - name: "base"; - mouse_events: 0; - type: RECT; - description { - state: "default" 0.0; - visible: 0; - rel1 { - relative: 0.0 0.0; - offset: 0 -3; - } - rel2 { - relative: 1.0 1.0; - offset: -1 6; - } - } - } - part { - name: "e.swallow.preview"; - type: SWALLOW; - description { - state: "default" 0.0; - } - } - part { - name: "events"; - type: RECT; - description { - state: "default" 0.0; - color: 0 0 0 0; - } - } - part { name: "e.swallow.list"; type: SWALLOW; description { @@ -33991,115 +33975,6 @@ collections { } } } - part { - name: "cover"; - type: RECT; - description { - state: "default" 0.0; - color: 0 0 0 0; - visible: 0; - } - description { - state: "out" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { - name: "shadow2"; - mouse_events: 0; - description { - state: "default" 0.0; - rel1.relative: 0.0 1.0; - rel1.offset: 0 -4; - image.normal: "dia_botshad.png"; - fill { - smooth: 0; - size { - relative: 0.0 1.0; - offset: 64 0; - } - } - } - } - part { - name: "busy_clip"; - type: RECT; - description { - state: "default" 0.0; - visible: 0; - color: 255 255 255 0; - } - description { - state: "visible" 0.0; - visible: 1; - color: 255 255 255 255; - } - } - part { - name: "busy"; - mouse_events: 0; - clip_to: "busy_clip"; - description { - state: "default" 0.0; - min: 32 32; - max: 32 32; - aspect: 1.0 1.0; - aspect_preference: BOTH; - rel1 { - relative: 0.5 0.5; - offset: 0 0; - } - rel2 { - relative: 0.5 0.5; - offset: -1 1; - } - image { - normal: "busy-9.png"; - tween: "busy-1.png"; - tween: "busy-2.png"; - tween: "busy-3.png"; - tween: "busy-4.png"; - tween: "busy-5.png"; - tween: "busy-6.png"; - tween: "busy-7.png"; - tween: "busy-8.png"; - } - } - } - } - programs { - program { - name: "busy1"; - signal: "e,state,busy,on"; - source: "e"; - action: STATE_SET "visible" 0.0; - transition: LINEAR 1.0; - target: "busy_clip"; - } - program { - name: "busy_anim"; - signal: "e,state,busy,on"; - source: "e"; - action: STATE_SET "default" 0.0; - transition: LINEAR 0.3333; - target: "busy"; - after: "busy_anim"; - } - program { - name: "busy2"; - signal: "e,state,busy,off"; - source: "e"; - action: STATE_SET "default" 0.0; - transition: LINEAR 1.0; - target: "busy_clip"; - after: "busy3"; - } - program { - name: "busy3"; - action: ACTION_STOP; - target: "busy_anim"; - } } } group { @@ -34207,6 +34082,7 @@ collections { name: "e.swallow.icon"; clip_to: "clip"; type: SWALLOW; + mouse_events: 0; description { state: "default" 0.0; rel1 { @@ -34225,6 +34101,7 @@ collections { name: "e.swallow.thumb"; clip_to: "clip"; type: SWALLOW; + mouse_events: 0; description { state: "default" 0.0; rel1 { @@ -34263,6 +34140,14 @@ collections { } } } + part { + name: "event"; + type: RECT; + description { + state: "default" 0.0; + color: 0 0 0 0; + } + } } programs { program { @@ -34452,6 +34337,7 @@ collections { name: "e.swallow.icon"; clip_to: "clip"; type: SWALLOW; + mouse_events: 0; description { state: "default" 0.0; rel1 { @@ -34466,6 +34352,7 @@ collections { name: "e.swallow.thumb"; clip_to: "clip"; type: SWALLOW; + mouse_events: 0; description { state: "default" 0.0; rel1 { @@ -34478,6 +34365,7 @@ collections { } part { name: "arrow"; + mouse_events: 0; description { state: "default" 0.0; align: 0.0 0.5; @@ -34604,6 +34492,14 @@ collections { visible: 1; } } + part { + name: "event"; + type: RECT; + description { + state: "default" 0.0; + color: 0 0 0 0; + } + } } programs { program { diff --git a/src/modules/everything/e_mod_main.h b/src/modules/everything/e_mod_main.h index 9132325..c1721c2 100644 --- a/src/modules/everything/e_mod_main.h +++ b/src/modules/everything/e_mod_main.h @@ -36,6 +36,8 @@ struct _Evry_Window Evry_Selector **sel_list; int level; + + int down_out; }; struct _Evry_Selector @@ -120,9 +122,11 @@ struct _Evry_View struct _Tab_View { - Evas *evas; const Evry_State *state; + Evry_View *view; + Evas *evas; + Evas_Object *o_tabs; Eina_List *tabs; @@ -259,7 +263,7 @@ Evry_Type evry_type_register(const char *type); const char *evry_type_get(Evry_Type type); -Tab_View *evry_tab_view_new(const Evry_State *s, Evas *e); +Tab_View *evry_tab_view_new(Evry_View *view, const Evry_State *s, Evas *e); void evry_tab_view_free(Tab_View *v); Eina_Bool view_thumb_init(void); @@ -295,6 +299,8 @@ void evry_history_free(void); int evry_browse_item(Evry_Selector *sel); int evry_browse_back(Evry_Selector *sel); +void evry_plugin_action(int finished); + extern Evry_History *evry_hist; extern Evry_Config *evry_conf; diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c index c203343..2e7d380 100644 --- a/src/modules/everything/evry.c +++ b/src/modules/everything/evry.c @@ -57,6 +57,7 @@ static void _evry_item_sel(Evry_State *s, Evry_Item *it); static int _evry_cb_key_down(void *data, int type, void *event); static int _evry_cb_selection_notify(void *data, int type, void *event); +static int _evry_cb_mouse(void *data, int type, void *event); /* local subsystem globals */ @@ -194,16 +195,39 @@ evry_show(E_Zone *zone, const char *params) win->handlers = eina_list_append (win->handlers, ecore_event_handler_add - (ECORE_EVENT_KEY_DOWN, _evry_cb_key_down, NULL)); + (ECORE_EVENT_KEY_DOWN, + _evry_cb_key_down, NULL)); + win->handlers = eina_list_append (win->handlers, ecore_event_handler_add (ECORE_X_EVENT_SELECTION_NOTIFY, _evry_cb_selection_notify, win)); + win->handlers = eina_list_append (win->handlers, ecore_event_handler_add (EVRY_EVENT_ITEM_CHANGED, _evry_cb_item_changed, NULL)); + win->handlers = eina_list_append + (win->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_BUTTON_DOWN, + _evry_cb_mouse, win)); + + win->handlers = eina_list_append + (win->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_BUTTON_UP, + _evry_cb_mouse, win)); + + win->handlers = eina_list_append + (win->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_MOVE, + _evry_cb_mouse, win)); + + win->handlers = eina_list_append + (win->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_WHEEL, + _evry_cb_mouse, win)); + e_popup_layer_set(win->popup, 255); e_popup_show(win->popup); @@ -376,7 +400,7 @@ _evry_selectors_shift(int dir) return 0; } -EAPI void +void evry_clear_input(Evry_Plugin *p) { Evry_Selector *sel = _evry_selector_for_plugin_get(p); @@ -402,7 +426,7 @@ evry_clear_input(Evry_Plugin *p) static int item_cnt = 0; #endif -EAPI Evry_Item * +Evry_Item * evry_item_new(Evry_Item *base, Evry_Plugin *p, const char *label, Evas_Object *(*icon_get) (Evry_Item *it, Evas *e), void (*cb_free) (Evry_Item *item)) @@ -437,7 +461,7 @@ evry_item_new(Evry_Item *base, Evry_Plugin *p, const char *label, return it; } -EAPI void +void evry_item_free(Evry_Item *it) { if (!it) return; @@ -520,7 +544,7 @@ _evry_selector_update_actions(Evry_Selector *sel) sel->update_timer = ecore_timer_add(0.1, _evry_timer_cb_actions_get, it); } -EAPI void +void evry_item_select(const Evry_State *state, Evry_Item *it) { Evry_State *s = (Evry_State *)state; @@ -546,7 +570,7 @@ evry_item_select(const Evry_State *state, Evry_Item *it) } } -EAPI void +void evry_item_mark(const Evry_State *state, Evry_Item *it, Eina_Bool mark) { Evry_State *s = (Evry_State *)state; @@ -563,13 +587,13 @@ evry_item_mark(const Evry_State *state, Evry_Item *it, Eina_Bool mark) } } -EAPI void +void evry_item_ref(Evry_Item *it) { it->ref++; } -EAPI int +int evry_list_win_show(void) { if (win->visible) return 0; @@ -578,13 +602,13 @@ evry_list_win_show(void) return 1; } -EAPI void +void evry_list_win_hide(void) { _evry_list_win_clear(1); } -EAPI void +void evry_plugin_update(Evry_Plugin *p, int action) { Evry_State *s; @@ -771,9 +795,76 @@ _evry_window_new(E_Zone *zone) ecore_x_netwm_window_type_set(popup->evas_win, ECORE_X_WINDOW_TYPE_UTILITY); + evas_event_feed_mouse_in(win->popup->evas, ecore_x_current_time_get(), NULL); + evas_event_feed_mouse_move(win->popup->evas, -1000000, -1000000, ecore_x_current_time_get(), NULL); + return win; } +static int +_evry_cb_mouse(void *data, int type, void *event) +{ + Ecore_Event_Mouse_Button *ev; + E_Popup *pop; + + ev = event; + if (ev->window != input_window) return 1; + + pop = win->popup; + + if (type == ECORE_EVENT_MOUSE_MOVE) + { + Ecore_Event_Mouse_Move *ev = event; + + evas_event_feed_mouse_move + (pop->evas, + ev->x - pop->x + pop->zone->x, + ev->y - pop->y + pop->zone->y, + ev->timestamp, NULL); + } + else if (type == ECORE_EVENT_MOUSE_BUTTON_DOWN) + { + win->down_out = 0; + + /* XXX shift triple click in flags when needed */ + if (!E_INSIDE(ev->x, ev->y, pop->x + pop->zone->x, + pop->y + pop->zone->y, pop->w, pop->h)) + { + win->down_out = 1; + return 1; + } + + evas_event_feed_mouse_down + (pop->evas, + ev->buttons, ev->double_click, + ev->timestamp, NULL); + } + else if (type == ECORE_EVENT_MOUSE_BUTTON_UP) + { + if (win->down_out && + !E_INSIDE(ev->x, ev->y, pop->x + pop->zone->x, + pop->y + pop->zone->y, pop->w, pop->h)) + { + evry_hide(0); + return 1; + } + + evas_event_feed_mouse_up + (pop->evas, + ev->buttons, ev->double_click, + ev->timestamp, NULL); + } + else if (type == ECORE_EVENT_MOUSE_WHEEL) + { + Ecore_Event_Mouse_Wheel *ev = event; + + evas_event_feed_mouse_wheel + (pop->evas, 0, ev->z, ev->timestamp, NULL); + } + + return 1; +} + static void _evry_window_free(Evry_Window *win) { @@ -785,6 +876,74 @@ _evry_window_free(Evry_Window *win) E_FREE(win); } +static void +_evry_selector_cb_down(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ev = event_info; + /* Evry_Selector *sel = data; */ + + if (ev->button == 1) + { + if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) + evry_plugin_action(1); + } +} + +static void +_evry_selector_cb_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Wheel *ev = event_info; + + if (ev->z > 0) + { + /* FIXME dont loose selector 2 state until state 0 changed: */ + if (win->selector != win->selectors[2]) + _evry_selectors_switch(1); + } + else if (ev->z < 0) + { + _evry_selectors_switch(-1); + } +} + +static void +_evry_selector_cb_up(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Up *ev = event_info; + Evry_Selector *sel = data; + + if (sel == win->selector) + return; + + if (ev->button == 3) + { + evry_plugin_action(0); + } + else if (ev->button == 1) + { + if (sel == win->selectors[0]) + { + if (win->selector == win->selectors[1]) + _evry_selectors_switch(-1); + else + _evry_selectors_switch(1); + } + + else if (sel == win->selectors[1]) + { + if (win->selector == win->selectors[0]) + _evry_selectors_switch(1); + else + _evry_selectors_switch(-1); + } + else if (sel == win->selectors[2]) + { + if (win->selector == win->selectors[1]) + _evry_selectors_switch(1); + } + } +} + static Evry_Selector * _evry_selector_new(Evry_Window *win, int type) { @@ -795,6 +954,13 @@ _evry_selector_new(Evry_Window *win, int type) sel->o_main = o; e_theme_edje_object_set(o, "base/theme/everything", "e/modules/everything/selector_item"); + + evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, + _evry_selector_cb_down, sel); + evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, + _evry_selector_cb_up, sel); + evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_WHEEL, + _evry_selector_cb_wheel, sel); evas_object_show(o); sel->aggregator = evry_aggregator_new(win, type); @@ -1352,9 +1518,10 @@ evry_browse_item(Evry_Selector *sel) return 1; } -EAPI int +int evry_browse_back(Evry_Selector *sel) { + if (!sel) sel = win->selector; Evry_State *s = sel->state; DBG("%p", sel); @@ -1870,6 +2037,12 @@ _evry_action_do(Evry_Action *act) return 0; } +void +evry_plugin_action(int finished) +{ + _evry_plugin_action(win->selector, finished); +} + static void _evry_plugin_action(Evry_Selector *sel, int finished) { diff --git a/src/modules/everything/evry_plug_view_thumb.c b/src/modules/everything/evry_plug_view_thumb.c index c35b3e8..198aa3b 100644 --- a/src/modules/everything/evry_plug_view_thumb.c +++ b/src/modules/everything/evry_plug_view_thumb.c @@ -56,6 +56,10 @@ struct _Smart_Data int sliding; int clearing; + + int mouse_act; + int mouse_down; + Item *it_down; }; struct _Item @@ -77,6 +81,8 @@ struct _Item static View *view = NULL; static void _view_clear(Evry_View *view, int slide); +static void _pan_item_select(Evas_Object *obj, Item *it, int scroll); + static void @@ -138,7 +144,7 @@ _thumb_idler(void *data) (it->item->icon && it->item->icon[0])))) { it->get_thumb = EINA_TRUE; - + it->thumb = e_thumb_icon_add(sd->view->evas); GET_FILE(file, it->item); @@ -149,7 +155,7 @@ _thumb_idler(void *data) e_thumb_icon_file_set(it->thumb, it->item->icon, NULL); else e_thumb_icon_file_set(it->thumb, file->path, NULL); - + e_thumb_icon_size_set(it->thumb, it->w, it->h); e_thumb_icon_begin(it->thumb); it->do_thumb = EINA_TRUE; @@ -165,6 +171,70 @@ _thumb_idler(void *data) } static void +_item_down(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ev = event_info; + Item *it = data; + Smart_Data *sd = evas_object_smart_data_get(it->obj); + + sd->mouse_act = 1; + + if (ev->button == 1) + { + if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) + { + evry_item_select(sd->view->state, it->item); + _pan_item_select(it->obj, it, 0); + + evry_plugin_action(1); + } + else + { + sd->mouse_down = ev->canvas.x; + sd->it_down = it; + + if (sd->selector && evas_object_visible_get(sd->selector)) + { + evas_object_hide(sd->selector); + } + } + } +} + +static void +_item_up(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Up *ev = event_info; + Item *it = data; + Smart_Data *sd = evas_object_smart_data_get(it->obj); + + sd->mouse_down = 0; + sd->it_down = NULL; + + if (ev->button == 1) + { + if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)) + { + if (sd->selector) + evas_object_hide(sd->selector); + + evry_item_select(sd->view->state, it->item); + _pan_item_select(it->obj, it, 0); + } + } + else if (ev->button == 3) + { + if (sd->selector) + evas_object_hide(sd->selector); + + evry_item_select(sd->view->state, it->item); + _pan_item_select(it->obj, it, 0); + + evry_plugin_action(0); + } +} + +static void _item_show(View *v, Item *it, Evas_Object *list) { @@ -185,6 +255,10 @@ _item_show(View *v, Item *it, Evas_Object *list) edje_object_signal_emit(it->frame, "e,state,detail,show", "e"); } + evas_object_event_callback_add(it->frame, EVAS_CALLBACK_MOUSE_DOWN, + _item_down, it); + evas_object_event_callback_add(it->frame, EVAS_CALLBACK_MOUSE_UP, + _item_up, it); evas_object_smart_member_add(it->frame, list); evas_object_clip_set(it->frame, evas_object_clip_get(list)); @@ -342,7 +416,7 @@ _e_smart_reconfigure_do(void *data) if (sd->selector) evas_object_hide(sd->selector); } - else + else if (!sd->mouse_act) { if (!sd->selector) { @@ -716,8 +790,16 @@ _pan_item_select(Evas_Object *obj, Item *it, int scroll) } else scroll = 0; - if (sd->view->mode == VIEW_MODE_LIST || - sd->view->mode == VIEW_MODE_DETAIL) + if (sd->mouse_act && + ((sd->view->mode == VIEW_MODE_LIST || + sd->view->mode == VIEW_MODE_DETAIL))) + { + edje_object_signal_emit(sd->cur_item->frame, + "e,state,selected", "e"); + return; + } + else if (sd->view->mode == VIEW_MODE_LIST || + sd->view->mode == VIEW_MODE_DETAIL) { int all = sd->ch / it->h; int rows = (it->h && sd->h < sd->ch) ? (sd->h / it->h) : all; @@ -769,8 +851,6 @@ _pan_item_select(Evas_Object *obj, Item *it, int scroll) } } - /* edje_object_signal_emit(sd->cur_item->frame, - * "e,state,selected", "e"); */ align *= it->h; } else @@ -847,7 +927,7 @@ _clear_items(Evas_Object *obj) sd->thumb_idler = NULL; if (sd->selector) - evas_object_del(sd->selector); + evas_object_del(sd->selector); sd->selector = NULL; } @@ -858,6 +938,10 @@ _view_clear(Evry_View *view, int slide) Smart_Data *sd = evas_object_smart_data_get(v->span); Item *it; + sd->mouse_down = 0; + sd->mouse_act = 0; + sd->it_down = NULL; + if (!sd->clearing && evry_conf->scroll_animate) { if (slide) @@ -879,7 +963,7 @@ _view_clear(Evry_View *view, int slide) sd->clearing = EINA_FALSE; _clear_items(v->span); - + EINA_LIST_FREE(sd->items, it) { evry_item_free(it->item); @@ -943,6 +1027,8 @@ _view_update(Evry_View *view, int slide) Evry_Plugin *p = v->state->plugin; sd->cur_item = NULL; + sd->mouse_act = 0; + sd->mouse_down = 0; if (!p) { @@ -1104,6 +1190,9 @@ _cb_key_down(Evry_View *view, const Ecore_Event_Key *ev) const char *key = ev->key; + sd->mouse_act = 0; + sd->mouse_down = 0; + if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(key, "2"))) { @@ -1148,7 +1237,7 @@ _cb_key_down(Evry_View *view, const Ecore_Event_Key *ev) { v->mode = VIEW_MODE_DETAIL; } - + _clear_items(v->span); _update_frame(v->span); goto end; @@ -1393,6 +1482,52 @@ _cb_item_changed(void *data, int type, void *event) return 1; } +static void +_view_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Wheel *ev = event_info; + Smart_Data *sd = evas_object_smart_data_get(obj); + if (ev->z) + { + evas_object_hide(sd->selector); + if (sd->cur_item) + edje_object_signal_emit(sd->cur_item->frame, "e,state,selected", "e"); + sd->mouse_act = 1; + } +} + +static void +_view_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Move *ev = event_info; + Smart_Data *sd = evas_object_smart_data_get(obj); + + if (!sd->mouse_down) + return ; + + if (!sd->it_down) + return; + + if ((sd->cur_item != sd->it_down) && + (abs(ev->cur.canvas.x - sd->mouse_down) > 15)) + { + evry_item_select(sd->view->state, sd->it_down->item); + _pan_item_select(obj, sd->it_down, 0); + return; + } + + if (ev->cur.canvas.x - sd->mouse_down > 150) + { + evry_browse_back(NULL); + sd->mouse_down = 0; + } + else if (sd->mouse_down - ev->cur.canvas.x > 150) + { + evry_browse_item(NULL); + sd->mouse_down = 0; + } +} + static Evry_View * _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow) { @@ -1424,11 +1559,17 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow) // scrolled thumbs v->span = _pan_add(v->evas); _pan_view_set(v->span, v); + evas_object_event_callback_add(v->span, EVAS_CALLBACK_MOUSE_WHEEL, + _view_cb_mouse_wheel, NULL); + evas_object_event_callback_add(v->span, EVAS_CALLBACK_MOUSE_MOVE, + _view_cb_mouse_move, NULL); // the scrollframe holding the scrolled thumbs v->sframe = e_scrollframe_add(v->evas); e_scrollframe_custom_theme_set(v->sframe, "base/theme/widgets", "e/modules/everything/thumbview/main/scrollframe"); + e_scrollframe_thumbscroll_force(v->sframe, 1); + e_scrollframe_extern_pan_set(v->sframe, v->span, _pan_set, _pan_get, _pan_max_get, _pan_child_size_get); @@ -1437,7 +1578,7 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow) evas_object_show(v->sframe); evas_object_show(v->span); - v->tabs = evry_tab_view_new(s, v->evas); + v->tabs = evry_tab_view_new(EVRY_VIEW(v), v->state, v->evas); EVRY_VIEW(v)->o_list = v->bg; EVRY_VIEW(v)->o_bar = v->tabs->o_tabs; diff --git a/src/modules/everything/evry_util.c b/src/modules/everything/evry_util.c index 8843e95..a21a608 100644 --- a/src/modules/everything/evry_util.c +++ b/src/modules/everything/evry_util.c @@ -416,6 +416,7 @@ _evry_icon_fdo_set(Evas_Object *obj, const char *icon) path = efreet_icon_path_find(e_config->icon_theme, icon, 128); if (!path) return 0; + e_icon_scale_size_set(obj, 128); e_icon_file_set(obj, path); E_FREE(path); return 1; diff --git a/src/modules/everything/evry_view_plugin_tabs.c b/src/modules/everything/evry_view_plugin_tabs.c index 3d637db..556b0e7 100644 --- a/src/modules/everything/evry_view_plugin_tabs.c +++ b/src/modules/everything/evry_view_plugin_tabs.c @@ -5,6 +5,7 @@ typedef struct _Tab Tab; struct _Tab { + Tab_View *tab_view; Evry_Plugin *plugin; Evas_Object *o_tab; @@ -13,6 +14,10 @@ struct _Tab static void _tabs_update(Tab_View *v); +static void _plugin_select(Tab_View *v, Evry_Plugin *p); +static void _plugin_next(Tab_View *v); +static void _plugin_prev(Tab_View *v); + #if 0 static int @@ -99,9 +104,45 @@ _timer_cb(void *data) } static void -_tabs_update(Tab_View *v) +_tab_cb_down(void *data, Evas *e, Evas_Object *obj, void *event_info) { + /* Evas_Event_Mouse_Down *ev = event_info; */ +} + +static void +_tab_cb_up(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Up *ev = event_info; + Tab *tab = data; + Tab_View *v = tab->tab_view; + + if (ev->button == 1) + { + _plugin_select(v, tab->plugin); + v->view->update(v->view, 0); + } +} +static void +_tabs_cb_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Wheel *ev = event_info; + Tab_View *v = data; + if (ev->z > 0) + { + _plugin_next(v); + v->view->update(v->view, 0); + } + else if (ev->z < 0) + { + _plugin_prev(v); + v->view->update(v->view, 0); + } +} + +static void +_tabs_update(Tab_View *v) +{ Eina_List *l, *ll, *plugins; Evry_Plugin *p; const Evry_State *s = v->state; @@ -118,7 +159,7 @@ _tabs_update(Tab_View *v) v->timer = ecore_timer_add(0.1, _timer_cb, v); return; } - + /* remove tabs for not active plugins */ e_box_freeze(v->o_tabs); @@ -153,12 +194,16 @@ _tabs_update(Tab_View *v) { tab = E_NEW(Tab, 1); tab->plugin = p; - + tab->tab_view = v; o = edje_object_add(v->evas); e_theme_edje_object_set(o, "base/theme/everything", "e/modules/everything/tab_item"); edje_object_part_text_set(o, "e.text.label", EVRY_ITEM(p)->label); + evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, + _tab_cb_down, tab); + evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, + _tab_cb_up, tab); tab->o_tab = o; edje_object_size_min_calc(o, &tab->cw, NULL); @@ -254,7 +299,7 @@ _plugin_next_by_name(Tab_View *v, const char *key) { /* FIXME how can this happen ? */ if (!p) continue; - + if (EVRY_ITEM(p)->label && (!strncasecmp(EVRY_ITEM(p)->label, key, 1))) { if (!first) first = p; @@ -340,7 +385,7 @@ _tabs_key_down(Tab_View *v, const Ecore_Event_Key *ev) EAPI Tab_View * -evry_tab_view_new(const Evry_State *s, Evas *e) +evry_tab_view_new(Evry_View *view, const Evry_State *s, Evas *e) { Tab_View *v; Evas_Object *o; @@ -349,12 +394,16 @@ evry_tab_view_new(const Evry_State *s, Evas *e) v->update = &_tabs_update; v->clear = &_tabs_clear; v->key_down = &_tabs_key_down; + v->view = view; v->state = s; v->evas = e; o = e_box_add(e); e_box_orientation_set(o, 1); e_box_homogenous_set(o, 1); + /* evas_object_propagate_events_set(o, 1); */ + evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_WHEEL, + _tabs_cb_wheel, v); v->o_tabs = o; return v; -- 2.7.4