From bbdb7e98b6361ff2d76e6b31ac889daf7a05f1e0 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 19 Jun 2012 13:16:22 +0000 Subject: [PATCH] emit signal to cursor on key down. SVN revision: 72476 --- data/themes/default.edc | 46 +++++++++++++++++++++++++++++++++ data/themes/images/Makefile.am | 1 + data/themes/images/cr_key.png | Bin 0 -> 463 bytes src/bin/termio.c | 1 + 4 files changed, 48 insertions(+) create mode 100644 data/themes/images/cr_key.png diff --git a/data/themes/default.edc b/data/themes/default.edc index 7ca29b2f..f58f88aa 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc @@ -206,6 +206,7 @@ collections { group { name: "terminology/cursor"; images { image: "cr_fill.png" COMP; + image: "cr_key.png" COMP; image: "cr_out.png" COMP; image: "cr_pulse.png" COMP; } @@ -226,6 +227,34 @@ collections { color: 255 255 255 255; } } + part { name: "key"; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + to: "outline"; + offset: -5 -5; + } + rel2 { + to: "outline"; + offset: 4 4; + } + image { + normal: "cr_key.png"; + border: 4 4 4 4; + } + color: 255 255 255 0; + } + description { state: "on" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description { state: "out" 0.0; + inherit: "default" 0.0; + color: 160 100 255 0; + rel1.offset: -7 -15; + rel2.offset: 6 14; + } + } part { name: "pulse"; mouse_events: 0; description { state: "default" 0.0; @@ -317,6 +346,23 @@ collections { target: "fill"; target: "outline"; } + program { name: "key"; + signal: "key,down"; + source: "terminology"; + action: STATE_SET "default" 0.0; + target: "key"; + after: "key2"; + } + program { name: "key2"; + action: STATE_SET "on" 0.0; + target: "key"; + after: "key3"; + } + program { name: "key3"; + action: STATE_SET "out" 0.0; + transition: DECELERATE 0.3; + target: "key"; + } } } } diff --git a/data/themes/images/Makefile.am b/data/themes/images/Makefile.am index f62778bd..836ef94d 100644 --- a/data/themes/images/Makefile.am +++ b/data/themes/images/Makefile.am @@ -5,6 +5,7 @@ bg_shine.png \ bg_glint.png \ bg_shadow.png \ cr_fill.png \ +cr_key.png \ cr_out.png \ cr_pulse.png \ fn_shadow.png diff --git a/data/themes/images/cr_key.png b/data/themes/images/cr_key.png new file mode 100644 index 0000000000000000000000000000000000000000..980e9c7157b801bb7a885a891977646bde661ee5 GIT binary patch literal 463 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~wj^(N7a$D; zKb?2i11Zh|kH}&M25w;xW@MN(M*=9wUgGKN%6^AUn3q#qFliM?on(n?M2T~LZfp< zZ$$j|u$z#doSmDk+QDJAXp#21NgE54wABim`C0_t%{BgSJK4v}rGsPXlqRmDJ2*@P z1p|~8B{Z4lJkV{O-lV-MDg1ZkwFE0)^}7+RL|vB<@{barRlxr1yRvg zA~uI>vqR^~o%z@!E~D~N?V91yEUvxJ=B3-H-ORK*FQ~fr&%00QllQ%=eH|P4eOunb zfbc-(xIZ1+s^pIbOx%@UT>WI#s%b*MrWTyof3eAV+5eM=^=3`m*T3ca)<~asSpoMo z**K>!mAd*=Z_~o?tioGw9ta%2aXQiP%S+n_QtB4Rb)S{WRi`TcWSXwrcG#p?{q2^{ zJ!v~m-83t!IUDr&KYLE*tYxM@{P#DUuWRMk-ny{Wt9kP|V9+vny85}Sb4q9e0Q0%G AVgLXD literal 0 HcmV?d00001 diff --git a/src/bin/termio.c b/src/bin/termio.c index 1a9e69f7..a8b85fca 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -463,6 +463,7 @@ _smart_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, } } keyin_handle(sd->pty, ev); + edje_object_signal_emit(sd->cur.obj, "key,down", "terminology"); } static void