#define EFL_ACCESS_PROTECTED
#define EFL_ACCESS_COMPONENT_PROTECTED
-#define EFL_ACCESS_WIDGET_ACTION_PROTECTED
+#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
#define EFL_INPUT_EVENT_PROTECTED
#define EFL_GFX_SIZE_HINT_PROTECTED
#define EFL_CANVAS_OBJECT_BETA
#define EFL_CANVAS_OBJECT_PROTECTED
-#define EFL_UI_TRANSLATABLE_PROTECTED
#define EFL_UI_WIN_INLINED_PROTECTED
-#define EFL_UI_FOCUS_OBJECT_PROTECTED
#define EFL_UI_WIN_BETA
-#define EFL_CANVAS_BETA
#include <Elementary.h>
#include <Elementary_Cursor.h>
#include "elm_part_helper.h"
#include "efl_ui_win_part.eo.h"
-#include "elm_plug.eo.h"
#define MY_CLASS EFL_UI_WIN_CLASS
#define MY_CLASS_NAME "Efl.Ui.Win"
static const Elm_Win_Trap *trap = NULL;
-static int _paused_windows = 0;
-
#define TRAP(sd, name, ...) \
do \
{ \
Evas_Object *img_obj, *frame_obj;
Eo /* wref */ *bg, *content;
Evas_Object *obj; /* The object itself */
- Evas_Object *indicator;
#ifdef HAVE_ELEMENTARY_X
struct
{
Efl_Ui_Win_Type type;
Efl_Ui_Win_Keyboard_Mode kbdmode;
Efl_Ui_Win_Indicator_Mode indimode;
+// TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+ Eina_Rectangle kbd;
+ Eina_Rectangle ind;
+//
struct
{
const char *info;
static const char SIG_AUX_HINT_ALLOWED[] = "aux,hint,allowed";
static const char SIG_AUX_MESSAGE_RECEIVED[] = "aux,msg,received";
//
-
+// TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+static const char SIG_CONFORMANT_CHANGED[] = "conformant,changed";
+//
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_DELETE_REQUEST, ""},
{SIG_WM_ROTATION_CHANGED, ""},
{SIG_WIDGET_FOCUSED, ""}, /**< handled by elm_widget */
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
+// TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+ {SIG_CONFORMANT_CHANGED, ""},
+//
{SIG_AUX_HINT_ALLOWED, ""},
{SIG_AUX_MESSAGE_RECEIVED, ""},
{SIG_EFFECT_STARTED, ""},
Eina_Bool ch_maximized = EINA_FALSE;
Eina_Bool ch_profile = EINA_FALSE;
Eina_Bool ch_wm_rotation = EINA_FALSE;
+// TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+ Eina_Bool ch_conformant = EINA_FALSE;
+//
Eina_Bool ch_visibility = EINA_FALSE;
Eina_Bool ch_aux_hint = EINA_FALSE;
Eina_List *aux_hints = NULL;
ch_aux_hint = EINA_TRUE;
}
//
+ // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+#ifdef HAVE_ELEMENTARY_WL2
+ int x = 0, y = 0, w = 0, h = 0;
+ if (sd->indmode != (Elm_Win_Indicator_Mode)ecore_wl2_window_indicator_state_get(sd->wl.win))
+ {
+ sd->indmode = (Elm_Win_Indicator_Mode)ecore_wl2_window_indicator_state_get(sd->wl.win);
+ ch_conformant = EINA_TRUE;
+
+ }
+ if (sd->kbdmode != (Elm_Win_Keyboard_Mode)ecore_wl2_window_keyboard_state_get(sd->wl.win))
+ {
+ sd->kbdmode = (Elm_Win_Keyboard_Mode)ecore_wl2_window_keyboard_state_get(sd->wl.win);
+ ch_conformant = EINA_TRUE;
+ }
+ if (ecore_wl2_window_indicator_geometry_get(sd->wl.win, &x, &y, &w, &h))
+ {
+ if ((sd->ind.x != x) || (sd->ind.y != y) || (sd->ind.w != w) || (sd->ind.h != h))
+ {
+ sd->ind.x = x;
+ sd->ind.y = y;
+ sd->ind.w = w;
+ sd->ind.h = h;
+ ch_conformant = EINA_TRUE;
+ }
+ }
+ if (ecore_wl2_window_keyboard_geometry_get(sd->wl.win, &x, &y, &w, &h))
+ {
+ if ((sd->kbd.x != x) || (sd->kbd.y != y) || (sd->kbd.w != w) || (sd->kbd.h != h))
+ {
+ sd->kbd.x = x;
+ sd->kbd.y = y;
+ sd->kbd.w = w;
+ sd->kbd.h = h;
+ ch_conformant = EINA_TRUE;
+ }
+ }
+#endif
+ // END of TIZEN_ONLY(20150707)
_elm_win_state_eval_queue();
if ((ch_withdrawn) || (ch_iconified))
(obj, EFL_UI_WIN_EVENT_WM_ROTATION_CHANGED, NULL);
}
+ // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+ if (ch_conformant)
+ {
+ evas_object_smart_callback_call(obj, SIG_CONFORMANT_CHANGED, NULL);
+ }
+ //
// TIZEN_ONLY(20150722): added signal for aux_hint(auxiliary hint)
if (ch_aux_hint)
{
if (!sd->wl.win) return ECORE_CALLBACK_PASS_ON;
- if ((ecore_wl2_window_id_get(sd->wl.win) != ev->win))
+ if ((ecore_wl2_window_id_get(sd->wl.win) != (int)ev->win))
return ECORE_CALLBACK_PASS_ON;
msg = calloc(1, sizeof(*msg));
if (!sd->wl.win) return ECORE_CALLBACK_PASS_ON;
- if (ecore_wl2_window_id_get(sd->wl.win) != e->win)
+ if (ecore_wl2_window_id_get(sd->wl.win) != (int)e->win)
return ECORE_CALLBACK_PASS_ON;
evas_object_smart_callback_call(data, SIG_EFFECT_STARTED, (void*)e->type);
if (!sd->wl.win) return ECORE_CALLBACK_PASS_ON;
- if (ecore_wl2_window_id_get(sd->wl.win) != e->win)
+ if (ecore_wl2_window_id_get(sd->wl.win) != (int)e->win)
return ECORE_CALLBACK_PASS_ON;
/* TIZEN_ONLY(20160704): added signal for launch */
Eina_Bool ret = EINA_FALSE, prev_alpha;
const char *s;
- int_ret = elm_widget_theme_object_set(obj, sd->legacy.edje, "win", "base",
- elm_widget_style_get(obj));
+ int_ret = _elm_theme_object_set(obj, sd->legacy.edje, "win", "base",
+ elm_widget_style_get(obj));
if (!int_ret) return EFL_UI_THEME_APPLY_FAILED;
edje_object_mirrored_set(sd->legacy.edje, efl_ui_mirrored_get(obj));
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
+#elif HAVE_ELEMENTARY_WL2
+ // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+ _elm_win_wlwindow_get(sd);
+ if (sd->wl.win)
+ ecore_wl2_window_conformant_set(sd->wl.win, conformant);
+ //
#else
(void)sd;
(void)conformant;
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_conformant_get(sd->x.xwin);
+#elif HAVE_ELEMENTARY_WL2
+ // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+ _elm_win_wlwindow_get(sd);
+ if (sd->wl.win)
+ return ecore_wl2_window_conformant_get(sd->wl.win);
+ //
#else
(void)sd;
#endif
{
#ifdef HAVE_ELEMENTARY_X
Ecore_X_Window zone = 0;
- Evas_Object *top;
Ecore_X_Window xwin;
#endif
+ // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+#ifdef HAVE_ELEMENTARY_WL2
+ Ecore_Wl2_Window *wlwin;
+#endif
+ //
+ Evas_Object *top;
int sx = -1, sy = -1, sw = -1, sh = -1;
ELM_CONFORMANT_DATA_GET(obj, sd);
sx = sy = sw = sh = 0;
}
#endif
+ // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+#ifdef HAVE_ELEMENTARY_WL2
+ wlwin = elm_win_wl_window_get(top);
+ if (wlwin)
+ ecore_wl2_window_indicator_geometry_get(wlwin, &sx, &sy, &sw, &sh);
+#endif
+ //
if (((sd->rot == 90) || (sd->rot == 270)) && sd->landscape_indicator)
_conformant_part_size_hints_set(obj, sd->landscape_indicator, sx, sy, sw, sh);
else if (((sd->rot == 0) || (sd->rot == 180)) && sd->portrait_indicator)
}
}
#endif
+// TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+#ifdef HAVE_ELEMENTARY_WL2
+ int tx = -1, ty = -1, tw = -1, th = -1;
+
+ wlwin = elm_win_wl_window_get(top);
+ if (wlwin)
+ ecore_wl2_window_keyboard_geometry_get(wlwin, &tx, &ty, &tw, &th);
+ Evas_Coord ww = 0, wh = 0;
+ elm_win_screen_size_get(top, NULL, NULL, &ww, &wh);
+
+ if (sd->rot == 90)
+ {
+ sx = wh - ty - th;
+ sy = tx;
+ sw = th;
+ sh = tw;
+ }
+ else if (sd->rot == 180)
+ {
+ sx = ww - tx - tw;
+ sy = wh - ty - th;
+ sw = tw;
+ sh = th;
+ }
+ else if (sd->rot == 270)
+ {
+ sx = ty;
+ sy = ww - tx - tw;
+ sw = th;
+ sh = tw;
+ }
+ else
+ {
+ sx = tx;
+ sy = ty;
+ sw = tw;
+ sh = th;
+ }
+#endif
+ // END of TIZEN_ONLY(20150707)
+
DBG("[KEYPAD]: size(%d,%d, %dx%d).", sx, sy, sw, sh);
_conformant_part_size_hints_set
- (obj, sd->virtualkeypad, sx, sy, sw, sh);
+ (obj, sd->virtualkeypad, sx, sy, sw, sh);
}
if (part_type & ELM_CONFORMANT_SOFTKEY_PART)
#endif
+// TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+static void
+_on_conformant_changed(void *data,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ Conformant_Part_Type part_type;
+
+ part_type = (ELM_CONFORMANT_INDICATOR_PART |
+ ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
+
+ _conformant_part_sizing_eval(data, part_type);
+}
+// END of TIZEN_ONLY(20150707)
+
EOLIAN static void
_elm_conformant_efl_canvas_group_group_add(Eo *obj, Elm_Conformant_Data *_pd EINA_UNUSED)
{
efl_event_callback_add(sd->win, EFL_UI_WIN_EVENT_INDICATOR_PROP_CHANGED, _on_indicator_mode_changed, obj);
efl_event_callback_add(sd->win, EFL_UI_WIN_EVENT_ROTATION_CHANGED, _on_rotation_changed, obj);
+ // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
+ evas_object_smart_callback_add
+ (sd->win, "conformant,changed", _on_conformant_changed, obj);
+ // END of TIZEN_ONLY(20150707)
+
return obj;
}