#define MY_CLASS_NAME "Elm_Conformant"
#define MY_CLASS_NAME_LEGACY "elm_conformant"
+//TIZEN_ONLY(20160330): add processing properties of window
+#define SWAP(x, y, t) ((t) = (x), (x) = (y), (y) = (t))
+//
+
static char CONFORMANT_KEY[] = "_elm_conform_key";
#define ELM_CONFORM_INDICATOR_TIME 1.0
wlwin = elm_win_wl_window_get(top);
if (wlwin)
ecore_wl_window_keyboard_geometry_get(wlwin, &sx, &sy, &sw, &sh);
+ Evas_Coord tmp = 0;
+ Evas_Coord ww = 0, wh = 0;
+ elm_win_screen_size_get(top, NULL, NULL, &ww, &wh);
+ if (sd->rot == 90)
+ {
+ SWAP(sx, sy, tmp);
+ SWAP(sw, sh, tmp);
+ }
+ if (sd->rot == 180)
+ {
+ sy = wh - sh;
+ }
+ if (sd->rot == 270)
+ {
+ sy = ww - sw;
+ SWAP(sw, sh, tmp);
+ }
#endif
//
DBG("[KEYPAD]: size(%d,%d, %dx%d).", sx, sy, sw, sh);
}
// showing the focused/important region.
-#ifdef HAVE_ELEMENTARY_X
static void
_on_content_resize(void *data,
Evas *e EINA_UNUSED,
{
ELM_CONFORMANT_DATA_GET(data, sd);
+#ifdef HAVE_ELEMENTARY_X
if ((sd->vkb_state == ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF) &&
(sd->clipboard_state == ECORE_X_ILLUME_CLIPBOARD_STATE_OFF))
return;
+#endif
ecore_job_del(sd->show_region_job);
sd->show_region_job = ecore_job_add(_show_region_job, data);
}
-#endif
-
-#ifdef HAVE_ELEMENTARY_X
static void
_autoscroll_objects_update(void *data)
{
}
}
+#ifdef HAVE_ELEMENTARY_X
static void
_virtualkeypad_state_change(Evas_Object *obj, Ecore_X_Event_Window_Property *ev)
{
static void
_on_conformant_changed(void *data,
Evas_Object *obj,
- void *event_info EINA_UNUSED)
+ void *event_info)
{
Conformant_Part_Type part_type;
+ Conformant_Property property = (Conformant_Property) event_info;
+ Elm_Win_Keyboard_Mode mode;
part_type = (ELM_CONFORMANT_INDICATOR_PART |
ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
/* object is already freed */
if (!sd) return;
- _conformant_part_sizing_eval(data, part_type);
+ if (property & CONFORMANT_KEYBOARD_STATE)
+ {
+ mode = elm_win_keyboard_mode_get(obj);
+
+ if (mode == ELM_WIN_KEYBOARD_ON)
+ {
+ _conformant_part_sizing_eval(data, ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
+ elm_widget_display_mode_set(data, EVAS_DISPLAY_MODE_COMPRESS);
+ _autoscroll_objects_update(data);
+ eo_do(data, eo_event_callback_call(
+ ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_ON, NULL));
+ }
+ else if (mode == ELM_WIN_KEYBOARD_OFF)
+ {
+ evas_object_size_hint_min_set(sd->virtualkeypad, -1, 0);
+ evas_object_size_hint_max_set(sd->virtualkeypad, -1, 0);
+ _conformant_part_sizing_eval(data, ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
+ elm_widget_display_mode_set(data, EVAS_DISPLAY_MODE_NONE);
+ eo_do(data, eo_event_callback_call(
+ ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_OFF, NULL));
+ }
+ }
+ if (property & CONFORMANT_KEYBOARD_GEOMETRY)
+ {
+ _conformant_part_sizing_eval(data, ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
+ }
}
//
void tizen_vg_check_state_set(Elm_Check *obj);
#endif
-
+//TIZEN_ONLY(20160330): add processing properties of window
+#ifdef HAVE_ELEMENTARY_WAYLAND
+typedef enum _Conformant_Property
+{
+ CONFORMANT_DEFAULT = 0,
+ CONFORMANT_INDICATOR_STATE = 1 << 0,
+ CONFORMANT_INDICATOR_GEOMETRY = 1 << 1,
+ CONFORMANT_KEYBOARD_STATE = 1 << 2,
+ CONFORMANT_KEYBOARD_GEOMETRY = 1 << 3,
+ CONFORMANT_CLIPBOARD_STATE = 1 << 4,
+ CONFORMANT_CLIPBOARD_GEOMETRY = 1 << 5
+} Conformant_Property;
+#endif
+//
#endif
Eina_Bool ch_aux_hint = EINA_FALSE;
Eina_List *aux_hints = NULL;
const char *profile;
+ Conformant_Property property = CONFORMANT_DEFAULT; //TIZEN_ONLY(20160330): add processing properties of window
if (!sd) return;
{
sd->indmode = (Elm_Win_Indicator_Mode)ecore_wl_window_indicator_state_get(sd->wl.win);
ch_conformant = EINA_TRUE;
+ property |= CONFORMANT_INDICATOR_STATE; //TIZEN_ONLY(20160330): add processing properties of window
+
}
if (sd->kbdmode != (Elm_Win_Keyboard_Mode)ecore_wl_window_keyboard_state_get(sd->wl.win))
{
sd->kbdmode = (Elm_Win_Keyboard_Mode)ecore_wl_window_keyboard_state_get(sd->wl.win);
ch_conformant = EINA_TRUE;
+ property |= CONFORMANT_KEYBOARD_STATE; //TIZEN_ONLY(20160330): add processing properties of window
+
}
if (ecore_wl_window_indicator_geometry_get(sd->wl.win, &x, &y, &w, &h))
{
sd->ind.w = w;
sd->ind.h = h;
ch_conformant = EINA_TRUE;
+ property |= CONFORMANT_INDICATOR_GEOMETRY; //TIZEN_ONLY(20160330): add processing properties of window
+
}
}
if (ecore_wl_window_keyboard_geometry_get(sd->wl.win, &x, &y, &w, &h))
sd->kbd.w = w;
sd->kbd.h = h;
ch_conformant = EINA_TRUE;
+ property |= CONFORMANT_KEYBOARD_GEOMETRY; //TIZEN_ONLY(20160330): add processing properties of window
+
}
}
#endif
}
if (ch_conformant)
{
- evas_object_smart_callback_call(obj, SIG_CONFORMANT_CHANGED, NULL);
+ evas_object_smart_callback_call(obj, SIG_CONFORMANT_CHANGED, (void *)property); //TIZEN_ONLY(20160330): add processing properties of window
+
}
if (ch_aux_hint)
{