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.
devs/felipealmeida/promises
Daniel Juyung Seo 10 years ago
parent 60296c9317
commit 256a4c4524
  1. 4
      legacy/elementary/ChangeLog
  2. 1
      legacy/elementary/NEWS
  3. 7
      legacy/elementary/src/lib/elm_conform.c
  4. 3
      legacy/elementary/src/lib/elm_conform.h

@ -1727,3 +1727,7 @@
2013-10-30 Amitesh Singh (_ami_)
* image: Add support for "clicked" callback on Return/space/KP_Enter key press.
2013-10-30 Daniel Juyung Seo (SeoZ)
* conform: Added "virtualkeypad,size,changed" callback on virtualkeypad min size change.

@ -101,6 +101,7 @@ Additions:
* Add elm_fileselector_hidden_visible_set/get() to show or hide hidden files/directories.
* Add signals "spinner,drag,start" and "spinner,drag,stop" to the spinner widget.
* Add support for "clicked" callback on Return/space/KP_Enter key press for image.
* Add "virtualkeypad,size,changed" callback on virtualkeypad min size change for conformant.
Improvements:

@ -36,12 +36,14 @@ static const char SOFTKEY_PART[] = "elm.swallow.softkey";
static const char SIG_VIRTUALKEYPAD_STATE_ON[] = "virtualkeypad,state,on";
static const char SIG_VIRTUALKEYPAD_STATE_OFF[] = "virtualkeypad,state,off";
static const char SIG_VIRTUALKEYPAD_SIZE_CHANGED[] = "virtualkeypad,size,changed";
static const char SIG_CLIPBOARD_STATE_ON[] = "clipboard,state,on";
static const char SIG_CLIPBOARD_STATE_OFF[] = "clipboard,state,off";
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_VIRTUALKEYPAD_STATE_ON, ""},
{SIG_VIRTUALKEYPAD_STATE_OFF, ""},
{SIG_VIRTUALKEYPAD_SIZE_CHANGED, ""},
{SIG_CLIPBOARD_STATE_ON, ""},
{SIG_CLIPBOARD_STATE_OFF, ""},
{NULL, NULL}
@ -166,6 +168,8 @@ _conformant_part_sizing_eval(Evas_Object *obj,
if (part_type & ELM_CONFORMANT_VIRTUAL_KEYPAD_PART)
{
Evas_Coord_Rectangle rect;
#ifdef HAVE_ELEMENTARY_X
if ((!_conformant_part_geometry_get_from_env
("ILLUME_KBD", &sx, &sy, &sw, &sh)) && (xwin))
@ -189,6 +193,9 @@ _conformant_part_sizing_eval(Evas_Object *obj,
DBG("[KEYPAD]: size(%d,%d, %dx%d).", sx, sy, sw, sh);
_conformant_part_size_hints_set
(obj, sd->virtualkeypad, sx, sy, sw, sh);
rect.x = sx; rect.y = sy; rect.w = sw; rect.h = sh;
evas_object_smart_callback_call(obj, SIG_VIRTUALKEYPAD_SIZE_CHANGED, (void *)&rect);
}
if (part_type & ELM_CONFORMANT_SOFTKEY_PART)

@ -28,6 +28,9 @@
* (@since 1.8)
* @li "virtualkeypad,state,off": if virtualkeypad state is switched to "off".
* (@since 1.8)
* @li "virtualkeypad,size,changed": this is called when virtualkeypad size is
* changed. @c event_info parameter is the virtualkeypad size in
* Evas_Coord_Rectangle structure. (@since 1.8)
* @li "clipboard,state,on": if clipboard state is switched to "on".
* (@since 1.8)
* @li "clipboard,state,off": if clipboard state is switched to "off".

Loading…
Cancel
Save