diff --git a/data/themes/default.edc b/data/themes/default.edc index 5e9200d6..d2c2b894 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -600,9 +600,7 @@ collections { } description { state: "spin_done" 0.0; inherit: "default" 0.0; - visible: 0; - color: 255 255 255 0; - map.rotation.z: 684.0; + map.rotation.z: 720.0; } } program { @@ -2528,6 +2526,8 @@ target: "4.bottom" image: "inset_shadow.png" COMP; } parts { + //////////////////////////////////////////////////////////////////// + // background and shadows part { name: "shadow"; mouse_events: 0; description { state: "default" 0.0; @@ -2560,6 +2560,8 @@ target: "4.bottom" target: "fill"; } + //////////////////////////////////////////////////////////////////// + // content (where the grid of terms goes) part { name: "clip"; type: RECT; description { state: "default" 0.0; } @@ -2570,6 +2572,8 @@ target: "4.bottom" } } + //////////////////////////////////////////////////////////////////// + // fancy stuff on top part { name: "overlay"; mouse_events: 0; description { state: "default" 0.0; @@ -2619,8 +2623,14 @@ target: "4.bottom" image: "bg_glint.png" COMP; image: "pm_shadow.png" COMP; image: "cr_glow.png" COMP; + image: "bg_led_glow.png" COMP; + image: "bg_led_base.png" COMP; + image: "bg_led.png" COMP; + image: "bg_led_strobe.png" COMP; } parts { + //////////////////////////////////////////////////////////////////// + // base background and selection image part { name: "clip"; type: RECT; description { state: "default" 0.0; rel1.to: "terminology.content"; @@ -2672,6 +2682,9 @@ target: "4.bottom" color: 51 153 255 255; } } + + //////////////////////////////////////////////////////////////////// + // swallowed terminal content + bg inside it part { name: "base"; type: RECT; clip_to: "clip"; description { state: "default" 0.0; @@ -2722,6 +2735,8 @@ target: "4.bottom" target: "glow"; } + //////////////////////////////////////////////////////////////////// + // fancy stuff over the top of the terminal for shading and labelling part { name: "overlay"; mouse_events: 0; description { state: "default" 0.0; @@ -2772,6 +2787,9 @@ target: "4.bottom" rel2.to: "terminology.content"; } } + + //////////////////////////////////////////////////////////////////// + // fancy stuff on top part { name: "glint"; mouse_events: 0; clip_to: "clip2"; @@ -2806,6 +2824,137 @@ target: "4.bottom" aspect_preference: HORIZONTAL; } } + + //////////////////////////////////////////////////////////////////// + // visual bell - spinning red siren light + part { name: "bell_glow"; + mouse_events: 0; + description { state: "default" 0.0; + fixed: 1 1; + visible: 0; + color: 255 255 255 0; + rel1.to: "bell_base"; + rel2.to: "bell_base"; + min: 200 200; + fill.smooth: 0; + image.normal: "bg_led_glow.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "bell_base"; + mouse_events: 0; + description { state: "default" 0.0; + fixed: 1 1; + visible: 0; + color: 255 255 255 0; + min: 32 32; + max: 32 32; + rel1.to: "terminology.content"; + rel2.to: "terminology.content"; + align: 1.0 1.0; + image.normal: "bg_led_base.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "bell"; + mouse_events: 0; + description { state: "default" 0.0; + fixed: 1 1; + visible: 0; + color: 255 255 255 0; + rel1.to: "bell_base"; + rel2.to: "bell_base"; + image.normal: "bg_led.png"; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { name: "bell_strobe"; + mouse_events: 0; + description { state: "default" 0.0; + fixed: 1 1; + visible: 0; + color: 255 255 255 0; + rel1.to: "bell"; + rel2.to: "bell"; + image.normal: "bg_led_strobe.png"; + map { + on: 1; + smooth: 1; + rotation.center: "bell"; + } + } + description { state: "spin" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + map.rotation.z: 36.0; + } + description { state: "spin_done" 0.0; + inherit: "spin" 0.0; + map.rotation.z: 720.0; + } + description { state: "spin_done2" 0.0; + inherit: "spin" 0.0; + map.rotation.z: 1440.0; + } + } + program { + signal: "bell"; source: "terminology"; + action: STATE_SET "default" 0.0; + target: "bell_base"; + target: "bell"; + target: "bell_strobe"; + target: "bell_glow"; + after: "bell"; + } + program { name: "bell"; + action: STATE_SET "visible" 0.0; + target: "bell_base"; + target: "bell_glow"; + after: "bell2"; + } + program { name: "bell2"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.1; + target: "bell"; + target: "bell_glow"; + after: "bell3"; + } + program { name: "bell3"; + action: STATE_SET "spin" 0.0; + transition: LINEAR 0.1; + target: "bell_strobe"; + after: "bell4.2"; + } + program { name: "bell4.2"; + action: STATE_SET "spin_done" 0.0; + transition: LINEAR 0.9; + target: "bell_strobe"; + after: "bell4.3"; + } + program { name: "bell4.3"; + action: STATE_SET "spin_done2" 0.0; + transition: LINEAR 1.0; + target: "bell_strobe"; + after: "bell4.4"; + } + program { name: "bell4.4"; + action: STATE_SET "spin_done" 0.0; + target: "bell_strobe"; + after: "bell4.3"; + } } } diff --git a/src/bin/main.c b/src/bin/main.c index 15ff61f2..f2a69177 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -1259,7 +1259,8 @@ _sel_go(Split *sp, Term *term) evas_object_data_set(img, "termio", tm->term); tm->sel = img; - sel_entry_add(sp->sel, tm->sel, (tm == sp->term), tm->config); + sel_entry_add(sp->sel, tm->sel, (tm == sp->term), + tm->missed_bell, tm->config); } edje_object_part_swallow(sp->sel_bg, "terminology.content", sp->sel); evas_object_show(sp->sel); diff --git a/src/bin/sel.c b/src/bin/sel.c index 50cff2a2..444c865e 100644 --- a/src/bin/sel.c +++ b/src/bin/sel.c @@ -655,7 +655,7 @@ sel_add(Evas_Object *parent) } void -sel_entry_add(Evas_Object *obj, Evas_Object *entry, Eina_Bool selected, Config *config) +sel_entry_add(Evas_Object *obj, Evas_Object *entry, Eina_Bool selected, Eina_Bool bell, Config *config) { Sel *sd = evas_object_smart_data_get(obj); Entry *en = calloc(1, sizeof(Entry)); @@ -678,6 +678,11 @@ sel_entry_add(Evas_Object *obj, Evas_Object *entry, Eina_Bool selected, Config * edje_object_signal_emit(en->bg, "selected,start", "terminology"); edje_object_message_signal_process(en->bg); } + if (bell) + { + edje_object_signal_emit(en->bg, "bell", "terminology"); + edje_object_message_signal_process(en->bg); + } sd->interp = 1.0; en->termio = evas_object_data_get(en->obj, "termio"); if (en->termio) diff --git a/src/bin/sel.h b/src/bin/sel.h index 573a16a0..724674dd 100644 --- a/src/bin/sel.h +++ b/src/bin/sel.h @@ -4,7 +4,7 @@ #include "config.h" Evas_Object *sel_add(Evas_Object *parent); -void sel_entry_add(Evas_Object *obj, Evas_Object *entry, Eina_Bool selected, Config *config); +void sel_entry_add(Evas_Object *obj, Evas_Object *entry, Eina_Bool selected, Eina_Bool bell, Config *config); void sel_go(Evas_Object *obj); void sel_entry_selected_set(Evas_Object *obj, Evas_Object *entry, Eina_Bool keep_before); void sel_zoom(Evas_Object *obj, double zoom);