summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-05-20 14:49:51 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-05-20 14:58:31 -0400
commitb7c89d23252d34c1d9efecc27dc835aa8df3c50d (patch)
tree3c7cf3401d8c1ad6d89af3689cf130e41efa0254
parentc3f3c4eba80f0a7f388de608f2b1566213e73603 (diff)
evas: add keysym member to key event structs
@feature
-rw-r--r--src/lib/ecore_input_evas/ecore_input_evas.c10
-rw-r--r--src/lib/evas/Evas_Common.h2
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo42
-rw-r--r--src/lib/evas/canvas/evas_events.c30
4 files changed, 74 insertions, 10 deletions
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index 23e954320f..5de76a86ac 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -332,23 +332,25 @@ _ecore_event_evas_key(Ecore_Event_Key *e, Ecore_Event_Press press)
332 if (!lookup) return ECORE_CALLBACK_PASS_ON; 332 if (!lookup) return ECORE_CALLBACK_PASS_ON;
333 ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers); 333 ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
334 if (press == ECORE_DOWN) 334 if (press == ECORE_DOWN)
335 evas_event_feed_key_down_with_keycode(lookup->evas, 335 evas_event_feed_key_down_with_keycode_and_keysym(lookup->evas,
336 e->keyname, 336 e->keyname,
337 e->key, 337 e->key,
338 e->string, 338 e->string,
339 e->compose, 339 e->compose,
340 e->timestamp, 340 e->timestamp,
341 e->data, 341 e->data,
342 e->keycode); 342 e->keycode,
343 e->keysym);
343 else 344 else
344 evas_event_feed_key_up_with_keycode(lookup->evas, 345 evas_event_feed_key_up_with_keycode_and_keysym(lookup->evas,
345 e->keyname, 346 e->keyname,
346 e->key, 347 e->key,
347 e->string, 348 e->string,
348 e->compose, 349 e->compose,
349 e->timestamp, 350 e->timestamp,
350 e->data, 351 e->data,
351 e->keycode); 352 e->keycode,
353 e->keysym);
352 return ECORE_CALLBACK_PASS_ON; 354 return ECORE_CALLBACK_PASS_ON;
353} 355}
354 356
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index bc2e18428a..c3c33f1cc7 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -859,6 +859,7 @@ struct _Evas_Event_Key_Down /** Key press event */
859 Evas_Device *dev; 859 Evas_Device *dev;
860 860
861 unsigned int keycode; /**< Key scan code numeric value @since 1.10 */ 861 unsigned int keycode; /**< Key scan code numeric value @since 1.10 */
862 unsigned int keysym; /**< Encoding of key symbol @since 1.15 */
862}; 863};
863 864
864struct _Evas_Event_Key_Up /** Key release event */ 865struct _Evas_Event_Key_Up /** Key release event */
@@ -876,6 +877,7 @@ struct _Evas_Event_Key_Up /** Key release event */
876 Evas_Device *dev; 877 Evas_Device *dev;
877 878
878 unsigned int keycode; /**< Key scan code numeric value @since 1.10 */ 879 unsigned int keycode; /**< Key scan code numeric value @since 1.10 */
880 unsigned int keysym; /**< Encoding of key symbol @since 1.15 */
879}; 881};
880 882
881struct _Evas_Event_Render_Post /** Send when the frame rendering is done @since 1.8 */ 883struct _Evas_Event_Render_Post /** Send when the frame rendering is done @since 1.8 */
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index 130a083837..f27fda0a99 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -1781,6 +1781,48 @@ class Evas.Canvas (Eo.Base, Evas.Common_Interface)
1781 @in keycode: uint; /*@ Key scan code numeric value for canvas. */ 1781 @in keycode: uint; /*@ Key scan code numeric value for canvas. */
1782 } 1782 }
1783 } 1783 }
1784 event_feed_key_down_with_keycode_and_keysym {
1785 /*@
1786 Key down event feed with keycode and keysym
1787
1788 This function will set some evas properties that is necessary when
1789 a key is pressed. It prepares information to be treated by the
1790 callback function.
1791
1792 @since 1.15 */
1793
1794 params {
1795 @in keyname: const(char)*; /*@ Name of the key */
1796 @in key: const(char)*; /*@ The key pressed. */
1797 @in string: const(char)*; /*@ A String */
1798 @in compose: const(char)*; /*@ The compose string */
1799 @in timestamp: uint; /*@ Timestamp of the mouse up event */
1800 @in data: const(void)*; /*@ Data for canvas. */
1801 @in keycode: uint; /*@ Key scan code numeric value for canvas. */
1802 @in keysym: uint; /*@ Keysym for pressed key. */
1803 }
1804 }
1805 event_feed_key_up_with_keycode_and_keysym {
1806 /*@
1807 Key up event feed with keycode
1808
1809 This function will set some evas properties that is necessary when
1810 a key is released. It prepares information to be treated by the
1811 callback function.
1812
1813 @since 1.15 */
1814
1815 params {
1816 @in keyname: const(char)*; /*@ Name of the key */
1817 @in key: const(char)*; /*@ The key released. */
1818 @in string: const(char)*; /*@ string */
1819 @in compose: const(char)*; /*@ compose */
1820 @in timestamp: uint; /*@ Timestamp of the mouse up event */
1821 @in data: const(void)*; /*@ Data for canvas. */
1822 @in keycode: uint; /*@ Key scan code numeric value for canvas. */
1823 @in keysym: uint; /*@ Keysym for pressed key. */
1824 }
1825 }
1784 event_feed_axis_update { 1826 event_feed_axis_update {
1785 /*@ 1827 /*@
1786 Input device axis update event feed. 1828 Input device axis update event feed.
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index b357044748..b6ef1ef823 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -2451,7 +2451,8 @@ _canvas_event_feed_key_down_internal(Eo *eo_e,
2451 const char *compose, 2451 const char *compose,
2452 unsigned int timestamp, 2452 unsigned int timestamp,
2453 const void *data, 2453 const void *data,
2454 unsigned int keycode) 2454 unsigned int keycode,
2455 unsigned int keysym)
2455{ 2456{
2456 Evas_Public_Data *e = _pd; 2457 Evas_Public_Data *e = _pd;
2457 int event_id = 0; 2458 int event_id = 0;
@@ -2479,6 +2480,7 @@ _canvas_event_feed_key_down_internal(Eo *eo_e,
2479 ev.event_flags = e->default_event_flags; 2480 ev.event_flags = e->default_event_flags;
2480 ev.dev = _evas_device_top_get(eo_e); 2481 ev.dev = _evas_device_top_get(eo_e);
2481 ev.keycode = keycode; 2482 ev.keycode = keycode;
2483 ev.keysym = keysym;
2482 if (ev.dev) _evas_device_ref(ev.dev); 2484 if (ev.dev) _evas_device_ref(ev.dev);
2483 2485
2484 if (e->grabs) 2486 if (e->grabs)
@@ -2557,7 +2559,8 @@ _canvas_event_feed_key_up_internal(Eo *eo_e,
2557 const char *compose, 2559 const char *compose,
2558 unsigned int timestamp, 2560 unsigned int timestamp,
2559 const void *data, 2561 const void *data,
2560 unsigned int keycode) 2562 unsigned int keycode,
2563 unsigned int keysym)
2561{ 2564{
2562 Evas_Public_Data *e = _pd; 2565 Evas_Public_Data *e = _pd;
2563 int event_id = 0; 2566 int event_id = 0;
@@ -2584,6 +2587,7 @@ _canvas_event_feed_key_up_internal(Eo *eo_e,
2584 ev.event_flags = e->default_event_flags; 2587 ev.event_flags = e->default_event_flags;
2585 ev.dev = _evas_device_top_get(eo_e); 2588 ev.dev = _evas_device_top_get(eo_e);
2586 ev.keycode = keycode; 2589 ev.keycode = keycode;
2590 ev.keysym = keysym;
2587 if (ev.dev) _evas_device_ref(ev.dev); 2591 if (ev.dev) _evas_device_ref(ev.dev);
2588 2592
2589 if (e->grabs) 2593 if (e->grabs)
@@ -2657,28 +2661,42 @@ EOLIAN void
2657_evas_canvas_event_feed_key_down(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) 2661_evas_canvas_event_feed_key_down(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
2658{ 2662{
2659 _canvas_event_feed_key_down_internal(eo_e, e, keyname, key, string, 2663 _canvas_event_feed_key_down_internal(eo_e, e, keyname, key, string,
2660 compose, timestamp, data, 0); 2664 compose, timestamp, data, 0, 0);
2661} 2665}
2662 2666
2663EOLIAN void 2667EOLIAN void
2664_evas_canvas_event_feed_key_up(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) 2668_evas_canvas_event_feed_key_up(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
2665{ 2669{
2666 _canvas_event_feed_key_up_internal(eo_e, e, keyname, key, string, 2670 _canvas_event_feed_key_up_internal(eo_e, e, keyname, key, string,
2667 compose, timestamp, data, 0); 2671 compose, timestamp, data, 0, 0);
2668} 2672}
2669 2673
2670EOLIAN void 2674EOLIAN void
2671_evas_canvas_event_feed_key_down_with_keycode(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode) 2675_evas_canvas_event_feed_key_down_with_keycode(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode)
2672{ 2676{
2673 _canvas_event_feed_key_down_internal(eo_e, e, keyname, key, string, 2677 _canvas_event_feed_key_down_internal(eo_e, e, keyname, key, string,
2674 compose, timestamp, data, keycode); 2678 compose, timestamp, data, keycode, 0);
2675} 2679}
2676 2680
2677EOLIAN void 2681EOLIAN void
2678_evas_canvas_event_feed_key_up_with_keycode(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode) 2682_evas_canvas_event_feed_key_up_with_keycode(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode)
2679{ 2683{
2680 _canvas_event_feed_key_up_internal(eo_e, e, keyname, key, string, 2684 _canvas_event_feed_key_up_internal(eo_e, e, keyname, key, string,
2681 compose, timestamp, data, keycode); 2685 compose, timestamp, data, keycode, 0);
2686}
2687
2688EOLIAN void
2689_evas_canvas_event_feed_key_down_with_keycode_and_keysym(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode, unsigned int keysym)
2690{
2691 _canvas_event_feed_key_down_internal(eo_e, e, keyname, key, string,
2692 compose, timestamp, data, keycode, keysym);
2693}
2694
2695EOLIAN void
2696_evas_canvas_event_feed_key_up_with_keycode_and_keysym(Eo *eo_e, Evas_Public_Data *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode, unsigned int keysym)
2697{
2698 _canvas_event_feed_key_up_internal(eo_e, e, keyname, key, string,
2699 compose, timestamp, data, keycode, keysym);
2682} 2700}
2683 2701
2684EOLIAN void 2702EOLIAN void