EFL_ENABLE_EO_API_SUPPORT
EFL_ENABLE_BETA_API_SUPPORT
+# To probe Tizen profile at runtime
+PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
+AC_SUBST(CAPI_SYSTEM_INFO_CFLAGS)
+AC_SUBST(CAPI_SYSTEM_INFO_LIBS)
+
if test "x${HAVE_CXX11}" = "x1" -a "x${want_cxx11}" = "xyes"; then
PKG_CHECK_MODULES([ELEMENTARY_CXX],
#TINEN ONLY(20160425) : Support Mobile target language.
BuildRequires: pkgconfig(icu-i18n)
#
+# Workaround2: Distinguish Tizen Profile at Runtime.
+BuildRequires: pkgconfig(capi-system-info)
+# Please remove this workaround after refactoring.
Recommends: %{name}-locale = %{version}
-DICON_DIR=\"$(datadir)/icons\" \
-DELM_TOP_BUILD_DIR=\"$(top_builddir)\" \
-DELEMENTARY_BUILD \
+@CAPI_SYSTEM_INFO_CFLAGS@ \
@ELEMENTARY_CFLAGS@
AM_CPPFLAGS += $(DEFAULT_CFLAGS) $(TTRACE_CPPFLAGS)
libelementary_la_CFLAGS = @ELEMENTARY_CFLAGS@
libelementary_la_LIBADD = \
+@CAPI_SYSTEM_INFO_LIBS@ \
@ELEMENTARY_LIBS@ \
@LTLIBINTL@ \
$(TTRACE_LIBS)
static void _magnifier_show(void *data);
static void _magnifier_hide(void *data);
static void _magnifier_move(void *data, Evas_Coord x, Evas_Coord y);
-#ifndef TIZEN_PROFILE_WEARABLE
static void _menu_call(Evas_Object *obj);
-#endif
static void _hover_cancel_cb(void *data, Evas_Object *obj, void *event_info);
static void _copy_cb(void *data, Evas_Object *obj, void *event_info);
static void _cut_cb(void *data, Evas_Object *obj, void *event_info);
static Eina_Bool _action_activate(Evas_Object *obj, const char *params);
//
+/* For Tizen Profile (wearable) Recognition */
+#include <system_info.h>
+static char tizen_profile_wearable = -1; /* Unknown */
+static char probe_tizen_profile_wearable()
+{
+ char *profileName;
+ if (tizen_profile_wearable != -1)
+ return tizen_profile_wearable;
+
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ switch (*profileName) {
+ case 'w':
+ case 'W':
+ tizen_profile_wearable = 1;
+ break;
+ default: // common or unknown ==> ALL ARE COMMON.
+ tizen_profile_wearable = 0;
+ }
+ free(profileName);
+
+ return tizen_profile_wearable;
+}
+#define TIZEN_PROFILE_WEARABLE (__builtin_expect(tizen_profile_wearable != -1, 1)?tizen_profile_wearable:probe_tizen_profile_wearable())
+
//TIZEN ONLY (20160926): cbhm client for multi entry
#ifdef HAVE_ELEMENTARY_WAYLAND
static void
sd->cursor_handler_down = EINA_FALSE;
if (_elm_config->magnifier_enable)
_magnifier_hide(data);
-#ifndef TIZEN_PROFILE_WEARABLE
- if ((!_elm_config->context_menu_disabled) &&
+ if (!TIZEN_PROFILE_WEARABLE &&
+ (!_elm_config->context_menu_disabled) &&
(!_elm_config->desktop_entry))
_menu_call(data);
-#endif
}
static void
edje_object_part_text_select_extend(sd->entry_edje, "elm.text");
}
sd->have_selection = EINA_TRUE;
-#ifndef TIZEN_PROFILE_WEARABLE
- _menu_call(data);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ _menu_call(data);
}
-#ifndef TIZEN_PROFILE_WEARABLE
static void
_adjust_eol_cursor(Evas_Object *obj)
{
evas_textblock_cursor_free(cp);
}
}
-#endif
static Eina_Bool
_cursor_coordinate_check(Evas_Object *obj, Evas_Coord canvasx)
static void
_select_word(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
-#ifdef TIZEN_PROFILE_WEARABLE
- return;
-#else
+ if (TIZEN_PROFILE_WEARABLE)
+ return;
+
ELM_ENTRY_DATA_GET(data, sd);
const Evas_Object *tb = NULL;
if (!_elm_config->desktop_entry)
edje_object_part_text_select_allow_set(sd->entry_edje, "elm.text",
EINA_FALSE);
-#endif
}
static void
/////////////////////////////////////////////////////////////////
-#ifndef TIZEN_PROFILE_WEARABLE
static Mod_Api *
_module_find(Evas_Object *obj EINA_UNUSED)
{
ok: // ok - return api
return m->api;
}
-#endif
static char *
_file_load(const char *file)
evas_object_resize(sd->hoversel, cw, ch);
}
-#ifndef TIZEN_PROFILE_WEARABLE
static void
_hover_del_job(void *data)
{
if (!_elm_config->desktop_entry)
elm_widget_scroll_hold_push(data);
}
-#endif
static char *
_item_tags_remove(const char *str)
edje_object_part_text_select_none(sd->entry_edje, "elm.text");
}
-#ifndef TIZEN_PROFILE_WEARABLE
static void
_hover_item_clicked_cb(void *data,
Evas_Object *obj EINA_UNUSED,
}
}
}
-#endif
static void _magnifier_move(void *data, Evas_Coord cx, Evas_Coord cy);
_select_word(data, NULL, NULL);
elm_widget_scroll_freeze_push(data);
}
-#ifndef TIZEN_PROFILE_WEARABLE
- if (!_elm_config->context_menu_disabled &&
+ if (!TIZEN_PROFILE_WEARABLE &&
+ !_elm_config->context_menu_disabled &&
!_elm_config->desktop_entry)
{
_menu_call(data);
}
-#endif
}
//
-#ifndef TIZEN_PROFILE_WEARABLE
/* Context menu will not appear if context menu disabled is set
* as false on a long press callback */
- else if (!_elm_config->context_menu_disabled &&
+ else if (!TIZEN_PROFILE_WEARABLE &&
+ !_elm_config->context_menu_disabled &&
!_elm_config->desktop_entry)
_menu_call(data);
-#endif
}
//sd->long_pressed = EINA_TRUE;
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
-#ifndef TIZEN_PROFILE_WEARABLE
Evas_Event_Key_Down *ev = event_info;
-#endif
// TIZEN ONLY (20150205): Support CopyPasteUI
ELM_ENTRY_DATA_GET(data, sd);
//
/* First check if context menu disabled is false or not, and
* then check for key id */
-#ifndef TIZEN_PROFILE_WEARABLE
- if ((!_elm_config->context_menu_disabled) && !strcmp(ev->key, "Menu"))
+ if (!TIZEN_PROFILE_WEARABLE &&
+ (!_elm_config->context_menu_disabled) && !strcmp(ev->key, "Menu"))
_menu_call(data);
-#endif
}
static void
if (_elm_config->desktop_entry)
{
sd->use_down = 1;
-#ifndef TIZEN_PROFILE_WEARABLE
- _menu_call(data);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ _menu_call(data);
}
}
}
_magnifier_hide(data);
//
// TIZEN ONLY (20150603): CopyPasteUI 2.4
-#ifndef TIZEN_PROFILE_WEARABLE
Eina_Bool popup_showing = EINA_FALSE;
-#endif
+
if (elm_widget_scroll_freeze_get(data))
elm_widget_scroll_freeze_pop(data);
if (sd->have_selection)
else
elm_entry_select_none(data);
}
-#ifndef TIZEN_PROFILE_WEARABLE
- if ((sd->api) && (sd->api->obj_popup_showing_get))
- popup_showing = sd->api->obj_popup_showing_get(data);
- if ((!_elm_config->context_menu_disabled) &&
- (!popup_showing))
- {
- _menu_call(data);
- }
-#endif
+ if (!TIZEN_PROFILE_WEARABLE) {
+ if ((sd->api) && (sd->api->obj_popup_showing_get))
+ popup_showing = sd->api->obj_popup_showing_get(data);
+ if ((!_elm_config->context_menu_disabled) &&
+ (!popup_showing))
+ {
+ _menu_call(data);
+ }
+ }
//
}
else
(!_elm_config->desktop_entry))
{
sd->use_down = 1;
-#ifndef TIZEN_PROFILE_WEARABLE
- _menu_call(data);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ _menu_call(data);
}
}
if ((!_elm_config->context_menu_disabled) &&
(!_elm_config->desktop_entry) && (sd->long_pressed))
*/
-#ifndef TIZEN_PROFILE_WEARABLE
- if ((!_elm_config->context_menu_disabled) &&
+ if (!TIZEN_PROFILE_WEARABLE &&
+ (!_elm_config->context_menu_disabled) &&
(!_elm_config->desktop_entry))
_menu_call(data);
-#endif
if (!_elm_config->desktop_entry)
edje_object_part_text_select_allow_set(sd->entry_edje, "elm.text",
EINA_FALSE);
(!_elm_config->desktop_entry) && (sd->long_pressed))
_menu_call(data);
*/
-#ifndef TIZEN_PROFILE_WEARABLE
- if ((!_elm_config->context_menu_disabled) &&
+ if (!TIZEN_PROFILE_WEARABLE &&
+ (!_elm_config->context_menu_disabled) &&
(!_elm_config->desktop_entry))
_menu_call(data);
-#endif
if (!_elm_config->desktop_entry)
edje_object_part_text_select_allow_set(sd->entry_edje, "elm.text",
EINA_FALSE);
priv->context_menu = EINA_TRUE;
priv->auto_save = EINA_TRUE;
priv->editable = EINA_TRUE;
-#ifdef TIZEN_PROFILE_WEARABLE
- priv->sel_allow = EINA_FALSE;
-#else
- priv->sel_allow = EINA_TRUE;
-#endif
+ priv->sel_allow = (TIZEN_PROFILE_WEARABLE) ? EINA_FALSE : EINA_TRUE;
priv->drop_format = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE;
/////////////////////////////////////////////////////////////////
entries = eina_list_prepend(entries, obj);
-#ifndef TIZEN_PROFILE_WEARABLE
- // module - find module for entry
- priv->api = _module_find(obj);
- // if found - hook in
- if ((priv->api) && (priv->api->obj_hook)) priv->api->obj_hook(obj);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ {
+ // module - find module for entry
+ priv->api = _module_find(obj);
+ // if found - hook in
+ if ((priv->api) && (priv->api->obj_hook)) priv->api->obj_hook(obj);
+ }
_mirrored_set(obj, elm_widget_mirrored_get(obj));
} Size_Cache;
+/* For Tizen Profile (wearable) Recognition */
+#include <system_info.h>
+static char tizen_profile_wearable = -1; /* Unknown */
+static char probe_tizen_profile_wearable()
+{
+ char *profileName;
+ if (tizen_profile_wearable != -1)
+ return tizen_profile_wearable;
+
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ switch (*profileName) {
+ case 'w':
+ case 'W':
+ tizen_profile_wearable = 1;
+ break;
+ default: // common or unknown ==> ALL ARE COMMON.
+ tizen_profile_wearable = 0;
+ }
+ free(profileName);
+
+ return tizen_profile_wearable;
+}
+#define TIZEN_PROFILE_WEARABLE (__builtin_expect(tizen_profile_wearable != -1, 1)?tizen_profile_wearable:probe_tizen_profile_wearable())
+
// TIZEN ONLY : for banded ux
-#ifndef TIZEN_PROFILE_WEARABLE
static void
_banded_item_bg_add(Elm_Gen_Item *it, Evas_Object *target)
{
i = i + 1;
}
}
-#endif
static void
_item_content_free(Evas_Object *content)
_view_clear(VIEW(it), NULL);
// TIZEN ONLY : for banded ux
-#ifndef TIZEN_PROFILE_WEARABLE
- if (GL_IT(it)->banded_bg)
- ELM_SAFE_FREE(GL_IT(it)->banded_bg, evas_object_del);
- if (GL_IT(it)->wsd->banded_bg_on)
+ if (!TIZEN_PROFILE_WEARABLE)
{
- if (it->item->banded_anim) ecore_animator_del(it->item->banded_anim);
- it->item->banded_anim = NULL;
+ if (GL_IT(it)->banded_bg)
+ ELM_SAFE_FREE(GL_IT(it)->banded_bg, evas_object_del);
+ if (GL_IT(it)->wsd->banded_bg_on)
+ {
+ if (it->item->banded_anim) ecore_animator_del(it->item->banded_anim);
+ it->item->banded_anim = NULL;
+ }
}
-#endif
if (GL_IT(it)->highlight_timer)
{
edje_object_signal_emit(VIEW(it), SIGNAL_ENABLED, "elm");
if (it->selected)
{
-#ifndef TIZEN_PROFILE_WEARABLE
- if (sd->banded_bg_on)
+ if (!TIZEN_PROFILE_WEARABLE && sd->banded_bg_on)
_banded_item_bg_color_change(it, EINA_TRUE);
-#endif
edje_object_signal_emit(VIEW(it), SIGNAL_HIGHLIGHTED, "elm");
evas_object_smart_callback_call(WIDGET(it), SIG_HIGHLIGHTED, EO_OBJ(it));
}
elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
}
//
-#ifndef TIZEN_PROFILE_WEARABLE
- _banded_item_bg_add(it, VIEW(it));
-#endif
+ if (!TIZEN_PROFILE_WEARABLE) _banded_item_bg_add(it, VIEW(it));
// Register accessibility before realized callback
// because user can customize accessibility.
_access_widget_item_register(it);
+ REORDER_FASTER, ow, oh));
}
-#ifdef TIZEN_PROFILE_WEARABLE
- _item_all_position(it, GL_IT(it)->scrl_x - REORDERED_ITEM_OFFSET,
- GL_IT(it)->scrl_y - REORDERED_ITEM_OFFSET);
-#else
- _item_all_position(it, GL_IT(it)->scrl_x, GL_IT(it)->scrl_y - REORDERED_ITEM_OFFSET);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ _item_all_position(it, GL_IT(it)->scrl_x - REORDERED_ITEM_OFFSET,
+ GL_IT(it)->scrl_y - REORDERED_ITEM_OFFSET);
+ else
+ _item_all_position(it, GL_IT(it)->scrl_x, GL_IT(it)->scrl_y - REORDERED_ITEM_OFFSET);
if (it->deco_all_view)
evas_object_raise(it->deco_all_view);
Elm_Genlist_Data *sd = itb->sd;
Elm_Gen_Item *it;
Elm_Gen_Item *aligned_item = NULL;
-#ifndef TIZEN_PROFILE_WEARABLE
Elm_Gen_Item *top_drawn_item = NULL;
-#endif
const Eina_List *l, *ll;
Evas_Object *content;
Eina_Bool unrealize = EINA_TRUE;
GL_IT(it)->w = sd->minw;
GL_IT(it)->h = GL_IT(it)->minh;
-#ifndef TIZEN_PROFILE_WEARABLE
//Kiran only
- if (!top_drawn_item)
+ if (!TIZEN_PROFILE_WEARABLE && !top_drawn_item)
{
if (GL_IT(it)->scrl_y <= oy && ELM_RECTS_INTERSECT(GL_IT(it)->scrl_x, GL_IT(it)->scrl_y,
GL_IT(it)->w, GL_IT(it)->h, ox, oy, ow, oh))
sd->top_drawn_item = top_drawn_item;
}
}
-#endif
if (wsd->scroll_item_align_enable)
{
if (!sd->aligned_item)
itb->realized = EINA_TRUE;
-#ifndef TIZEN_PROFILE_WEARABLE
- if (sd->banded_bg_on)
+ if (!TIZEN_PROFILE_WEARABLE && sd->banded_bg_on)
_banded_item_bg_index_color_set(sd->top_drawn_item, ox, oy, ow, oh);
-#endif
if (aligned_item)
{
psd->wsd->blocks_realized = realized_new;
// TIZEN_ONLY(20150701) : banded color background feature. enabled only un-scrollable
-#ifndef TIZEN_PROFILE_WEARABLE
- if (psd->wsd->banded_bg_rect && !psd->wsd->reorder.it)
+ if (!TIZEN_PROFILE_WEARABLE && psd->wsd->banded_bg_rect && !psd->wsd->reorder.it)
{
Evas_Coord bg_x, bg_y, bg_w, bg_h, svy, svh;
Elm_Gen_Item *tmp = NULL, *prev = NULL;
evas_object_show(psd->wsd->banded_bg_rect);
}
}
-#endif
// TIZEN_ONLY
if (psd->wsd->comp_y)
elm_interface_atspi_accessible_active_descendant_changed_signal_emit(WIDGET(it), EO_OBJ(it));
}
-#ifndef TIZEN_PROFILE_WEARABLE
static Eina_Bool
_banded_item_highlight_anim(void *data, double pos)
{
return EINA_TRUE;
}
-#endif
static void
_item_highlight(Elm_Gen_Item *it)
it->highlighted = EINA_TRUE;
sd->highlighted_item = it;
-#ifndef TIZEN_PROFILE_WEARABLE
- if (sd->banded_bg_on)
+ if (!TIZEN_PROFILE_WEARABLE && sd->banded_bg_on)
{
if (it->item->banded_anim) ecore_animator_del(it->item->banded_anim);
it->item->banded_anim = ecore_animator_timeline_add(ELM_ITEM_HIGHLIGHT_TIMER, _banded_item_highlight_anim, it);
}
-#endif
if (it->deco_all_view)
{
edje_object_signal_emit(it->deco_all_view, SIGNAL_HIGHLIGHTED, "elm");
it->highlighted = EINA_FALSE;
GL_IT(it)->wsd->highlighted_item = NULL;
-#ifndef TIZEN_PROFILE_WEARABLE
- if (GL_IT(it)->wsd->banded_bg_on && effect)
- {
- if (it->item->banded_anim) ecore_animator_del(it->item->banded_anim);
- it->item->banded_anim = ecore_animator_timeline_add(ELM_ITEM_HIGHLIGHT_TIMER, _banded_item_highlight_anim, it);
- }
- else
- {
- if (it->item->banded_anim) ELM_SAFE_FREE(it->item->banded_anim, ecore_animator_del);
- _banded_item_bg_color_change(it, EINA_FALSE);
- }
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ {
+ if (GL_IT(it)->wsd->banded_bg_on && effect)
+ {
+ if (it->item->banded_anim) ecore_animator_del(it->item->banded_anim);
+ it->item->banded_anim = ecore_animator_timeline_add(ELM_ITEM_HIGHLIGHT_TIMER, _banded_item_highlight_anim, it);
+ }
+ else
+ {
+ if (it->item->banded_anim) ELM_SAFE_FREE(it->item->banded_anim, ecore_animator_del);
+ _banded_item_bg_color_change(it, EINA_FALSE);
+ }
+ }
if (it->deco_all_view)
edje_object_signal_emit(it->deco_all_view, SIGNAL_UNHIGHLIGHTED, "elm");
edje_object_signal_emit(VIEW(it), SIGNAL_UNHIGHLIGHTED, "elm");
eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply());
if (!int_ret) return ELM_THEME_APPLY_FAILED;
-#ifndef TIZEN_PROFILE_WEARABLE
- _banded_bg_state_check(obj, sd);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE) _banded_bg_state_check(obj, sd);
EINA_INLIST_FOREACH(sd->blocks, itb)
{
eo_do(sd->obj, elm_interface_scrollable_bounce_allow_set
(EINA_FALSE, EINA_FALSE));
-#ifdef TIZEN_PROFILE_WEARABLE
- if (sd->decorate_all_mode)
-#endif
+ if (!TIZEN_PROFILE_WEARABLE || sd->decorate_all_mode)
edje_object_signal_emit(VIEW(it), SIGNAL_REORDER_ENABLED, "elm");
sd->reorder.it = it;
}
else if (sd->reorder.it == it)
{
-#ifdef TIZEN_PROFILE_WEARABLE
+ if (TIZEN_PROFILE_WEARABLE)
+ {
Elm_Gen_Item *it2, *it_max = NULL, *it_min = NULL;
Evas_Coord r_y_scrl, it_y_max = -99999999, it_y_min = 99999999;
_item_move_before(it, it_min);
evas_object_smart_callback_call(WIDGET(it), SIG_MOVED, EO_OBJ(it));
}
-#else
+ } else {
//Kiran only
Elm_Gen_Item *moved_it = NULL;
Elm_Gen_Item *ptr_it = sd->top_drawn_item;
_item_move_before(it, moved_it);
evas_object_smart_callback_call(WIDGET(it), SIG_MOVED, EO_OBJ(it));
}
-#endif
+ }
sd->reorder.it = NULL;
sd->reorder.dir = 0;
if (sd->reorder.anim)
else if (GL_IT(it)->deco_it_view)
_view_inflate(GL_IT(it)->deco_it_view, it, &(GL_IT(it)->deco_it_contents));
-#ifndef TIZEN_PROFILE_WEARABLE
- _banded_item_bg_add(it, VIEW(it));
-#endif
+ if (!TIZEN_PROFILE_WEARABLE) _banded_item_bg_add(it, VIEW(it));
if (it->selected)
evas_object_smart_callback_call(WIDGET(it), SIG_HIGHLIGHTED, EO_OBJ(it));
EOLIAN static void
_elm_genlist_evas_object_smart_move(Eo *obj, Elm_Genlist_Data *sd, Evas_Coord x, Evas_Coord y)
{
-#ifndef TIZEN_PROFILE_WEARABLE
Evas_Coord ox, oy, bg_x, bg_y;
- evas_object_geometry_get(obj, &ox, &oy, NULL, NULL);
- evas_object_geometry_get(sd->banded_bg_rect, &bg_x, &bg_y, NULL, NULL);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ {
+ evas_object_geometry_get(obj, &ox, &oy, NULL, NULL);
+ evas_object_geometry_get(sd->banded_bg_rect, &bg_x, &bg_y, NULL, NULL);
+ }
eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y));
evas_object_move(sd->hit_rect, x, y);
-#ifndef TIZEN_PROFILE_WEARABLE
- evas_object_move(sd->banded_bg_rect, (bg_x + x - ox), (bg_y + y - oy));
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ evas_object_move(sd->banded_bg_rect, (bg_x + x - ox), (bg_y + y - oy));
}
EOLIAN static void
elm_layout_theme_set(obj, "genlist", "base", elm_widget_style_get(obj));
-#ifndef TIZEN_PROFILE_WEARABLE
- _banded_bg_state_check(obj, priv);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE) _banded_bg_state_check(obj, priv);
/* interface's add() routine issued AFTER the object's smart_add() */
eo_do(obj, elm_interface_scrollable_objects_set(wd->resize_obj, priv->hit_rect));
priv->highlight = EINA_TRUE;
priv->fx_mode = EINA_FALSE;
priv->on_hold = EINA_FALSE;
-#ifndef TIZEN_PROFILE_WEARABLE
//Kiran only
priv->top_drawn_item = NULL;
-#endif
priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj));
pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
eo_data_ref(obj, NULL);
end:
if (it == sd->key_down_item) sd->key_down_item = NULL;
if (it == sd->highlighted_item) sd->highlighted_item = NULL;
-#ifndef TIZEN_PROFILE_WEARABLE
- if (it == sd->top_drawn_item) sd->top_drawn_item = NULL;
-#endif
+ if (!TIZEN_PROFILE_WEARABLE && it == sd->top_drawn_item) sd->top_drawn_item = NULL;
_item_unrealize(it, EINA_FALSE);
eo_del(EO_OBJ(it));
// TIZEN_ONLY(20150703) : banded color background feature. enabled only un-scrollable
-#ifndef TIZEN_PROFILE_WEARABLE
- if (sd->banded_bg_rect && !sd->items)
+ if (!TIZEN_PROFILE_WEARABLE && sd->banded_bg_rect && !sd->items)
{
evas_object_smart_member_del(sd->banded_bg_rect);
ELM_SAFE_FREE(sd->banded_bg_rect, evas_object_del);
}
-#endif
_changed(sd->pan_obj);
}
if (sd->g_item) sd->g_item = NULL;
if (sd->g_type) sd->g_type = NULL;
-#ifndef TIZEN_PROFILE_WEARABLE
- if (sd->banded_bg_rect)
+ if (!TIZEN_PROFILE_WEARABLE && sd->banded_bg_rect)
{
evas_object_smart_member_del(sd->banded_bg_rect);
ELM_SAFE_FREE(sd->banded_bg_rect, evas_object_del);
}
-#endif
}
EAPI void
evas_object_geometry_get(VIEW(it), NULL, &y, NULL, &h);
int res = _is_item_in_viewport(wy, wh, y, h);
//TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile
-#ifndef TIZEN_PROFILE_WEARABLE
- if (res > 0)
- {
- // new item is above current
- elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
- }
- else if (res < 0)
+ if (!TIZEN_PROFILE_WEARABLE)
{
- // new item is below current
- elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ if (res > 0)
+ {
+ // new item is above current
+ elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
+ }
+ else if (res < 0)
+ {
+ // new item is below current
+ elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ }
+ else
+ elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
+ } else {
+ elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
}
- else
- elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
-#else
- elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
-#endif
//
}
else // if item is not realized we should search if we are over or below viewport
eo_do(eo_it, idx = elm_obj_genlist_item_index_get());
eina_list_free(realized);
//TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile
-#ifndef TIZEN_PROFILE_WEARABLE
- if (idx < top)
- elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
- else if (idx > bottom)
- elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_TOP);
- else
- elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
-#else
- elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ {
+ if (idx < top)
+ elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
+ else if (idx > bottom)
+ elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ else
+ elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
+ } else {
+ elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
+ }
//
}
}
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DELEMENTARY_BUILD \
+@CAPI_SYSTEM_INFO_CFLAGS@ \
@ELEMENTARY_CFLAGS@
pkgdir = $(pkglibdir)/modules/copypasteUI_ctxpopup/$(MODULE_ARCH)
module_la_SOURCES = copypaste.c \
cbhm_helper.c
-module_la_LIBADD = @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la
+module_la_LIBADD = @CAPI_SYSTEM_INFO_LIBS@ @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la
module_la_LDFLAGS = -no-undefined -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static
#define LOG(x...) do { } while (0)
#endif
+/* For Tizen Profile (wearable) Recognition */
+#include <system_info.h>
+static char tizen_profile_wearable = -1; /* Unknown */
+static char probe_tizen_profile_wearable()
+{
+ char *profileName;
+ if (tizen_profile_wearable != -1)
+ return tizen_profile_wearable;
+
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ switch (*profileName) {
+ case 'w':
+ case 'W':
+ tizen_profile_wearable = 1;
+ break;
+ default: // common or unknown ==> ALL ARE COMMON.
+ tizen_profile_wearable = 0;
+ }
+ free(profileName);
+
+ return tizen_profile_wearable;
+}
+#define TIZEN_PROFILE_WEARABLE (__builtin_expect(tizen_profile_wearable != -1, 1)?tizen_profile_wearable:probe_tizen_profile_wearable())
+
Elm_Entry_Extension_data *ext_mod;
static int _mod_hook_count = 0;
static Evas_Coord _previous_pressed_point_x = -1;
ext_mod->selectall(data, obj, event_info);
}
-#ifndef TIZEN_PROFILE_WEARABLE
static void
_select(void *data, Evas_Object *obj, void *event_info)
{
_ctxpopup_hide(obj);
ext_mod->select(data, obj, event_info);
}
-#endif
static void
_paste(void *data, Evas_Object *obj, void *event_info)
{
if (!ext_mod->password)
{
-#ifndef TIZEN_PROFILE_WEARABLE
- CP_ICON_ADD(icon, "select");
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT, icon, _select, obj);
- ACCESS_FOCUS_ENABLE();
-#endif
+ if (!TIZEN_PROFILE_WEARABLE)
+ {
+ CP_ICON_ADD(icon, "select");
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT, icon, _select, obj);
+ ACCESS_FOCUS_ENABLE();
+ }
}
CP_ICON_ADD(icon, "select_all");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _select_all, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT_ALL,
- icon, _select_all, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _select_all, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT_ALL,
+ icon, _select_all, obj);
+ }
ACCESS_FOCUS_ENABLE();
}
#endif
{
CP_ICON_ADD(icon, "paste");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _paste, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
- icon, _paste, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _paste, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
+ icon, _paste, obj);
+ }
ACCESS_FOCUS_ENABLE();
}
}
if (ext_mod->editable)
{
CP_ICON_ADD(icon, "paste");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _paste, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
- icon, _paste, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _paste, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
+ icon, _paste, obj);
+ }
ACCESS_FOCUS_ENABLE();
}
}
#endif
{
CP_ICON_ADD(icon, "clipboard");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _clipboard_menu, obj); // Clipboard
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_CLIPBOARD,
- icon, _clipboard_menu, obj); // Clipboard
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _clipboard_menu, obj); // Clipboard
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_CLIPBOARD,
+ icon, _clipboard_menu, obj); // Clipboard
+ }
ACCESS_FOCUS_ENABLE();
}
// end for cbhm
if (selected_all == EINA_FALSE)
{
CP_ICON_ADD(icon, "select_all");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _select_all, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT_ALL,
- icon, _select_all, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _select_all, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT_ALL,
+ icon, _select_all, obj);
+ }
ACCESS_FOCUS_ENABLE();
}
if (!ext_mod->password)
{
CP_ICON_ADD(icon, "copy");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _copy, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_COPY,
- icon, _copy, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _copy, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_COPY,
+ icon, _copy, obj);
+ }
ACCESS_FOCUS_ENABLE();
if (ext_mod->editable)
{
CP_ICON_ADD(icon, "cut");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _cut, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_CUT,
- icon, _cut, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _cut, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_CUT,
+ icon, _cut, obj);
+ }
ACCESS_FOCUS_ENABLE();
}
}
#endif
{
CP_ICON_ADD(icon, "paste");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _paste, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
- icon, _paste, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _paste, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
+ icon, _paste, obj);
+ }
ACCESS_FOCUS_ENABLE();
}
}
else
{
CP_ICON_ADD(icon, "paste");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _paste, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
- icon, _paste, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _paste, obj);
+ } else {
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
+ icon, _paste, obj);
+ }
ACCESS_FOCUS_ENABLE();
}
}
{
if (!ext_mod->password)
{
-#ifndef TIZEN_PROFILE_WEARABLE
- CP_ICON_ADD(icon, "select");
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT,
- icon, _select, obj);
- ACCESS_FOCUS_ENABLE();
-#endif
- }
+ if (!TIZEN_PROFILE_WEARABLE)
+ {
+ CP_ICON_ADD(icon, "select");
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT,
+ icon, _select, obj);
+ ACCESS_FOCUS_ENABLE();
+ }
+ }
CP_ICON_ADD(icon, "select_all");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _select_all, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT_ALL,
- icon, _select_all, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _select_all, obj);
+ else
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_SELECT_ALL,
+ icon, _select_all, obj);
ACCESS_FOCUS_ENABLE();
}
#ifdef HAVE_ELEMENTARY_X
#endif
{
CP_ICON_ADD(icon, "paste");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _paste, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
- icon, _paste, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _paste, obj);
+ else
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
+ icon, _paste, obj);
ACCESS_FOCUS_ENABLE();
}
}
else
{
CP_ICON_ADD(icon, "paste");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _paste, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
- icon, _paste, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _paste, obj);
+ else
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_PASTE,
+ icon, _paste, obj);
ACCESS_FOCUS_ENABLE();
}
}
#endif
{
CP_ICON_ADD(icon, "clipboard");
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- icon, _clipboard_menu, obj);
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, S_CLIPBOARD,
- icon, _clipboard_menu, obj);
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ icon, _clipboard_menu, obj);
+ else
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, S_CLIPBOARD,
+ icon, _clipboard_menu, obj);
ACCESS_FOCUS_ENABLE();
}
// end for cbhm
else if (it->icon_type == ELM_ICON_STANDARD)
elm_icon_standard_set(ic, it->icon_file);
}
-#ifdef TIZEN_PROFILE_WEARABLE
- added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
- ic, _item_clicked, it );
-#else
- added_item = elm_ctxpopup_item_append(ext_mod->popup, it->label,
- ic, _item_clicked, it );
-#endif
+ if (TIZEN_PROFILE_WEARABLE)
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL,
+ ic, _item_clicked, it );
+ else
+ added_item = elm_ctxpopup_item_append(ext_mod->popup, it->label,
+ ic, _item_clicked, it );
ACCESS_FOCUS_ENABLE();
}
}