summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-10-30 16:17:57 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-10-30 16:24:38 +0900
commitcbd7446f0bf413ad821ac40703d2a2ca728758ef (patch)
tree34d358dda110a8f25c6d301447754dc61da3afe3
parente1dd6e12fce6813b5faf6352ce569e76ed4e4a0c (diff)
elm_conform.c: Added "virtualkeypad,size,changed" smart callback.
When the virtualkeypad size is changed, applications get the notice. Applications can do internal object calculation according to the exact virtualkeypad size. This is useful when the exact size is important such as webkit usecase.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/elm_conform.c7
-rw-r--r--src/lib/elm_conform.h3
4 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fbeecc719..e99d3fd09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1727,3 +1727,7 @@
17272013-10-30 Amitesh Singh (_ami_) 17272013-10-30 Amitesh Singh (_ami_)
1728 1728
1729 * image: Add support for "clicked" callback on Return/space/KP_Enter key press. 1729 * image: Add support for "clicked" callback on Return/space/KP_Enter key press.
1730
17312013-10-30 Daniel Juyung Seo (SeoZ)
1732
1733 * conform: Added "virtualkeypad,size,changed" callback on virtualkeypad min size change.
diff --git a/NEWS b/NEWS
index 8481107a4..6876073e5 100644
--- a/NEWS
+++ b/NEWS
@@ -101,6 +101,7 @@ Additions:
101 * Add elm_fileselector_hidden_visible_set/get() to show or hide hidden files/directories. 101 * Add elm_fileselector_hidden_visible_set/get() to show or hide hidden files/directories.
102 * Add signals "spinner,drag,start" and "spinner,drag,stop" to the spinner widget. 102 * Add signals "spinner,drag,start" and "spinner,drag,stop" to the spinner widget.
103 * Add support for "clicked" callback on Return/space/KP_Enter key press for image. 103 * Add support for "clicked" callback on Return/space/KP_Enter key press for image.
104 * Add "virtualkeypad,size,changed" callback on virtualkeypad min size change for conformant.
104 105
105Improvements: 106Improvements:
106 107
diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 9636ab8ae..cb00888e3 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -36,12 +36,14 @@ static const char SOFTKEY_PART[] = "elm.swallow.softkey";
36 36
37static const char SIG_VIRTUALKEYPAD_STATE_ON[] = "virtualkeypad,state,on"; 37static const char SIG_VIRTUALKEYPAD_STATE_ON[] = "virtualkeypad,state,on";
38static const char SIG_VIRTUALKEYPAD_STATE_OFF[] = "virtualkeypad,state,off"; 38static const char SIG_VIRTUALKEYPAD_STATE_OFF[] = "virtualkeypad,state,off";
39static const char SIG_VIRTUALKEYPAD_SIZE_CHANGED[] = "virtualkeypad,size,changed";
39static const char SIG_CLIPBOARD_STATE_ON[] = "clipboard,state,on"; 40static const char SIG_CLIPBOARD_STATE_ON[] = "clipboard,state,on";
40static const char SIG_CLIPBOARD_STATE_OFF[] = "clipboard,state,off"; 41static const char SIG_CLIPBOARD_STATE_OFF[] = "clipboard,state,off";
41 42
42static const Evas_Smart_Cb_Description _smart_callbacks[] = { 43static const Evas_Smart_Cb_Description _smart_callbacks[] = {
43 {SIG_VIRTUALKEYPAD_STATE_ON, ""}, 44 {SIG_VIRTUALKEYPAD_STATE_ON, ""},
44 {SIG_VIRTUALKEYPAD_STATE_OFF, ""}, 45 {SIG_VIRTUALKEYPAD_STATE_OFF, ""},
46 {SIG_VIRTUALKEYPAD_SIZE_CHANGED, ""},
45 {SIG_CLIPBOARD_STATE_ON, ""}, 47 {SIG_CLIPBOARD_STATE_ON, ""},
46 {SIG_CLIPBOARD_STATE_OFF, ""}, 48 {SIG_CLIPBOARD_STATE_OFF, ""},
47 {NULL, NULL} 49 {NULL, NULL}
@@ -166,6 +168,8 @@ _conformant_part_sizing_eval(Evas_Object *obj,
166 168
167 if (part_type & ELM_CONFORMANT_VIRTUAL_KEYPAD_PART) 169 if (part_type & ELM_CONFORMANT_VIRTUAL_KEYPAD_PART)
168 { 170 {
171 Evas_Coord_Rectangle rect;
172
169#ifdef HAVE_ELEMENTARY_X 173#ifdef HAVE_ELEMENTARY_X
170 if ((!_conformant_part_geometry_get_from_env 174 if ((!_conformant_part_geometry_get_from_env
171 ("ILLUME_KBD", &sx, &sy, &sw, &sh)) && (xwin)) 175 ("ILLUME_KBD", &sx, &sy, &sw, &sh)) && (xwin))
@@ -189,6 +193,9 @@ _conformant_part_sizing_eval(Evas_Object *obj,
189 DBG("[KEYPAD]: size(%d,%d, %dx%d).", sx, sy, sw, sh); 193 DBG("[KEYPAD]: size(%d,%d, %dx%d).", sx, sy, sw, sh);
190 _conformant_part_size_hints_set 194 _conformant_part_size_hints_set
191 (obj, sd->virtualkeypad, sx, sy, sw, sh); 195 (obj, sd->virtualkeypad, sx, sy, sw, sh);
196
197 rect.x = sx; rect.y = sy; rect.w = sw; rect.h = sh;
198 evas_object_smart_callback_call(obj, SIG_VIRTUALKEYPAD_SIZE_CHANGED, (void *)&rect);
192 } 199 }
193 200
194 if (part_type & ELM_CONFORMANT_SOFTKEY_PART) 201 if (part_type & ELM_CONFORMANT_SOFTKEY_PART)
diff --git a/src/lib/elm_conform.h b/src/lib/elm_conform.h
index a491b951b..e1187b510 100644
--- a/src/lib/elm_conform.h
+++ b/src/lib/elm_conform.h
@@ -28,6 +28,9 @@
28 * (@since 1.8) 28 * (@since 1.8)
29 * @li "virtualkeypad,state,off": if virtualkeypad state is switched to "off". 29 * @li "virtualkeypad,state,off": if virtualkeypad state is switched to "off".
30 * (@since 1.8) 30 * (@since 1.8)
31 * @li "virtualkeypad,size,changed": this is called when virtualkeypad size is
32 * changed. @c event_info parameter is the virtualkeypad size in
33 * Evas_Coord_Rectangle structure. (@since 1.8)
31 * @li "clipboard,state,on": if clipboard state is switched to "on". 34 * @li "clipboard,state,on": if clipboard state is switched to "on".
32 * (@since 1.8) 35 * (@since 1.8)
33 * @li "clipboard,state,off": if clipboard state is switched to "off". 36 * @li "clipboard,state,off": if clipboard state is switched to "off".