summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-05-26 16:48:02 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-05-26 16:48:02 +0830
commitbc6eb250a0be82f6d83d05f22468cc67dd1c5e50 (patch)
tree85dc8458820a26540979c7006358419a021a2f19
parent927fd22e8950630794d8a4b7398d0aba51a49527 (diff)
downloadefl-bc6eb250a0be82f6d83d05f22468cc67dd1c5e50.tar.gz
elm_win: remove elm_win_conformant_set/get from eo
conformant set api give information to enlighten ment, this window need to know the change of conformant size. but in the future, window have to section background and forground. if user set layout as content of background part, the layout size is not changed by clipborad or keybord. if user set layout as content of forground part of window, the layout size is changed by clipboard or keyboard state. and the window notify to the enlightenment it has interest soft input's state automatically, without users api call
-rw-r--r--src/lib/elementary/elm_win.c231
-rw-r--r--src/lib/elementary/elm_win.eo11
-rw-r--r--src/lib/elementary/elm_win_legacy.h17
3 files changed, 135 insertions, 124 deletions
diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index 43ccb76509..cc379617c4 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -5157,33 +5157,6 @@ _elm_win_screen_dpi_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int *xdpi, int *y
}
EOLIAN static void
-_elm_win_conformant_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool conformant)
-{
-#ifdef HAVE_ELEMENTARY_X
- _internal_elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
-#else
- (void)sd;
- (void)conformant;
-#endif
-}
-
-EOLIAN static Eina_Bool
-_elm_win_conformant_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
-{
-#ifdef HAVE_ELEMENTARY_X
- _internal_elm_win_xwindow_get(sd);
- if (sd->x.xwin)
- return ecore_x_e_illume_conformant_get(sd->x.xwin);
-#else
- (void)sd;
-#endif
-
- return EINA_FALSE;
-}
-
-EOLIAN static void
_elm_win_prop_focus_skip_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool skip)
{
sd->skip_focus = skip;
@@ -5660,6 +5633,105 @@ _elm_win_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_Win_Data *sd EINA_
return name ? strdup(name) : NULL;
}
+#ifndef EFL_TEAMWORK_VERSION
+# define EFL_TEAMWORK_VERSION 2
+#endif
+
+static EOLIAN void
+_elm_win_teamwork_uri_preload(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
+{
+#ifdef HAVE_ELEMENTARY_X
+ if (sd->x.xwin)
+ {
+ ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
+ ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PRELOAD,
+ ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
+ }
+#endif
+#ifdef HAVE_ELEMENTARY_WL2
+ if (sd->wl.win)
+ {
+ Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
+ if (ewd->wl.teamwork)
+ zwp_teamwork_preload_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), uri);
+ }
+#endif
+ eina_stringshare_replace(&sd->teamwork_uri, uri);
+}
+
+static EOLIAN void
+_elm_win_teamwork_uri_show(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
+{
+ int x, y;
+
+ EINA_SAFETY_ON_NULL_RETURN(uri);
+ if (eina_streq(uri, sd->teamwork_uri)) return;
+
+ evas_pointer_canvas_xy_get(sd->evas, &x, &y);
+#ifdef HAVE_ELEMENTARY_X
+ if (sd->x.xwin)
+ {
+ ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
+ ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_ACTIVATE,
+ ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, x, y, 0, 0);
+ }
+#endif
+#ifdef HAVE_ELEMENTARY_WL2
+ if (sd->wl.win)
+ {
+ Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
+ if (ewd->wl.teamwork)
+ zwp_teamwork_activate_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win),
+ uri, wl_fixed_from_int(x), wl_fixed_from_int(y));
+ }
+#endif
+ eina_stringshare_replace(&sd->teamwork_uri, uri);
+}
+
+static EOLIAN void
+_elm_win_teamwork_uri_hide(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
+{
+ if (!sd->teamwork_uri) return;
+#ifdef HAVE_ELEMENTARY_X
+ if (sd->x.xwin)
+ {
+ ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, sd->teamwork_uri);
+ ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_DEACTIVATE,
+ ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
+ }
+#endif
+#ifdef HAVE_ELEMENTARY_WL2
+ if (sd->wl.win)
+ {
+ Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
+ if (ewd->wl.teamwork)
+ zwp_teamwork_deactivate_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), sd->teamwork_uri);
+ }
+#endif
+ eina_stringshare_replace(&sd->teamwork_uri, NULL);
+}
+
+static EOLIAN void
+_elm_win_teamwork_uri_open(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
+{
+ EINA_SAFETY_ON_NULL_RETURN(uri);
+#ifdef HAVE_ELEMENTARY_X
+ if (sd->x.xwin)
+ {
+ ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
+ ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_OPEN,
+ ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
+ }
+#endif
+#ifdef HAVE_ELEMENTARY_WL2
+ if (sd->wl.win)
+ {
+ Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
+ if (ewd->wl.teamwork)
+ zwp_teamwork_open_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), uri);
+ }
+#endif
+}
/* legacy APIs */
@@ -6047,104 +6119,37 @@ elm_win_keyboard_win_get(const Evas_Object *obj)
return EINA_FALSE;
}
-#ifndef EFL_TEAMWORK_VERSION
-# define EFL_TEAMWORK_VERSION 2
-#endif
-
-static EOLIAN void
-_elm_win_teamwork_uri_preload(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
-{
-#ifdef HAVE_ELEMENTARY_X
- if (sd->x.xwin)
- {
- ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
- ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PRELOAD,
- ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
- }
-#endif
-#ifdef HAVE_ELEMENTARY_WL2
- if (sd->wl.win)
- {
- Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
- if (ewd->wl.teamwork)
- zwp_teamwork_preload_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), uri);
- }
-#endif
- eina_stringshare_replace(&sd->teamwork_uri, uri);
-}
-
-static EOLIAN void
-_elm_win_teamwork_uri_show(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
+EAPI void
+elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant)
{
- int x, y;
-
- EINA_SAFETY_ON_NULL_RETURN(uri);
- if (eina_streq(uri, sd->teamwork_uri)) return;
+ ELM_WIN_CHECK(obj);
+ ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
- evas_pointer_canvas_xy_get(sd->evas, &x, &y);
#ifdef HAVE_ELEMENTARY_X
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
- {
- ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
- ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_ACTIVATE,
- ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, x, y, 0, 0);
- }
-#endif
-#ifdef HAVE_ELEMENTARY_WL2
- if (sd->wl.win)
- {
- Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
- if (ewd->wl.teamwork)
- zwp_teamwork_activate_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win),
- uri, wl_fixed_from_int(x), wl_fixed_from_int(y));
- }
+ ecore_x_e_illume_conformant_set(sd->x.xwin, conformant);
+#else
+ (void)sd;
+ (void)conformant;
#endif
- eina_stringshare_replace(&sd->teamwork_uri, uri);
}
-static EOLIAN void
-_elm_win_teamwork_uri_hide(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
+EAPI Eina_Bool
+elm_win_conformant_get(const Evas_Object *obj)
{
- if (!sd->teamwork_uri) return;
-#ifdef HAVE_ELEMENTARY_X
- if (sd->x.xwin)
- {
- ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, sd->teamwork_uri);
- ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_DEACTIVATE,
- ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
- }
-#endif
-#ifdef HAVE_ELEMENTARY_WL2
- if (sd->wl.win)
- {
- Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
- if (ewd->wl.teamwork)
- zwp_teamwork_deactivate_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), sd->teamwork_uri);
- }
-#endif
- eina_stringshare_replace(&sd->teamwork_uri, NULL);
-}
+ ELM_WIN_CHECK(obj) EINA_FALSE;
+ ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
-static EOLIAN void
-_elm_win_teamwork_uri_open(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
-{
- EINA_SAFETY_ON_NULL_RETURN(uri);
#ifdef HAVE_ELEMENTARY_X
+ _internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
- {
- ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
- ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_OPEN,
- ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
- }
-#endif
-#ifdef HAVE_ELEMENTARY_WL2
- if (sd->wl.win)
- {
- Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
- if (ewd->wl.teamwork)
- zwp_teamwork_open_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), uri);
- }
+ return ecore_x_e_illume_conformant_get(sd->x.xwin);
+#else
+ (void)sd;
#endif
+
+ return EINA_FALSE;
}
#include "elm_win.eo.c"
diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo
index 83b5ef17e0..e7519b0fd9 100644
--- a/src/lib/elementary/elm_win.eo
+++ b/src/lib/elementary/elm_win.eo
@@ -755,17 +755,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
set: bool; [[$true to set manual rotation done mode, $false otherwise.]]
}
}
- @property conformant {
- set {
- [[Set if this window is an illume conformant window.]]
- }
- get {
- [[Get if this window is an illume conformant window.]]
- }
- values {
- conformant: bool; [[The conformant flag.]]
- }
- }
@property size_base {
set {
[[Set the base window size used with stepping calculation
diff --git a/src/lib/elementary/elm_win_legacy.h b/src/lib/elementary/elm_win_legacy.h
index 2bc03049c7..0de904c383 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -548,4 +548,21 @@ EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard);
*/
EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj);
+/**
+ * @brief Set if this window is an illume conformant window.
+ *
+ * @param[in] conformant The conformant flag.
+ *
+ * @ingroup Elm_Win
+ */
+EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant);
+
+/**
+ * @brief Get if this window is an illume conformant window.
+ *
+ * @return The conformant flag.
+ *
+ * @ingroup Elm_Win
+ */
+EAPI Eina_Bool elm_win_conformant_get(const Evas_Object *obj);