diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-11-20 17:06:58 +0100 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-11-20 17:06:58 +0100 |
commit | 014ee1e6794746800a9ff8d239d074c6efd01ea3 (patch) | |
tree | 742bfd441520ec7ecba2215d7010c7b0ca617085 | |
parent | 7b03abd12b57f440e2de0e499376726b080898f8 (diff) | |
download | efl-devs/bu5hm4n/spotlight_work.tar.gz |
remove unused code filedevs/bu5hm4n/spotlight_work
-rw-r--r-- | src/lib/elementary/efl_page_indicator_icon.c | 191 |
1 files changed, 0 insertions, 191 deletions
diff --git a/src/lib/elementary/efl_page_indicator_icon.c b/src/lib/elementary/efl_page_indicator_icon.c deleted file mode 100644 index fadd3dae4d..0000000000 --- a/src/lib/elementary/efl_page_indicator_icon.c +++ /dev/null @@ -1,191 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#endif - -#include <Elementary.h> -#include "elm_priv.h" - -#include "efl_page_indicator_icon.h" -#include "efl_page_indicator.h" -#include "efl_ui_widget_pager.h" - -#define MY_CLASS EFL_PAGE_INDICATOR_ICON_CLASS - - - -EOLIAN static void -_efl_page_indicator_icon_update(Eo *obj, - Efl_Page_Indicator_Icon_Data *pd, - double pos) -{ - EFL_PAGE_INDICATOR_DATA_GET(obj, spd); - double delta = fabs(pos); - - if (pd->curr) - { - eina_value_set(pd->v, 0.0); - efl_layout_signal_message_send(pd->curr, 1, *(pd->v)); - if (pd->adj) efl_layout_signal_message_send(pd->adj, 1, *(pd->v)); - } - - efl_page_indicator_update(efl_super(obj, MY_CLASS), pos); - - pd->curr = eina_list_nth(pd->items, spd->curr_idx); - eina_value_set(pd->v, (1.0 - delta)); - efl_layout_signal_message_send(pd->curr, 1, *(pd->v)); - - if (pos < 0) - pd->adj = eina_list_nth(pd->items, (spd->curr_idx - 1 + spd->cnt) % spd->cnt); - else if (pos > 0) - pd->adj = eina_list_nth(pd->items, (spd->curr_idx + 1 + spd->cnt) % spd->cnt); - else pd->adj = NULL; - - if (pd->adj) - { - eina_value_set(pd->v, delta); - efl_layout_signal_message_send(pd->adj, 1, *(pd->v)); - } -} - -EOLIAN static void -_efl_page_indicator_icon_pack(Eo *obj, - Efl_Page_Indicator_Icon_Data *pd, - int index) -{ - EFL_PAGE_INDICATOR_DATA_GET(obj, spd); - Eo *item, *existing; - - item = efl_add(EFL_CANVAS_LAYOUT_CLASS, spd->idbox); - elm_widget_theme_object_set(spd->idbox, item, - "spotlight", "indicator", "default"); - efl_gfx_hint_align_set(item, 0.5, 0.5); - efl_gfx_hint_weight_set(item, 0, 0); - efl_gfx_hint_fill_set(item, 0, 0); - - if (index == spd->cnt) - { - pd->items = eina_list_append(pd->items, item); - efl_pack_end(spd->idbox, item); - } - else - { - existing = eina_list_nth(pd->items, index); - pd->items = eina_list_prepend_relative(pd->items, item, existing); - efl_pack_before(spd->idbox, item, existing); - } - - efl_page_indicator_pack(efl_super(obj, MY_CLASS), index); - - if (!pd->curr) - { - pd->curr = eina_list_nth(pd->items, spd->curr_idx); - eina_value_set(pd->v, 1.0); - efl_layout_signal_message_send(pd->curr, 1, *(pd->v)); - } -} - -EOLIAN static void -_efl_page_indicator_icon_unpack(Eo *obj, - Efl_Page_Indicator_Icon_Data *pd, - int index) -{ - EFL_PAGE_INDICATOR_DATA_GET(obj, spd); - Eo *item; - - item = eina_list_nth(pd->items, index); - pd->items = eina_list_remove(pd->items, item); - efl_pack_unpack(spd->idbox, item); - efl_del(item); - - if (index == spd->curr_idx) pd->curr = NULL; - - efl_page_indicator_unpack(efl_super(obj, MY_CLASS), index); - - if ((pd->curr == NULL) && (spd->curr_idx != -1)) - { - pd->curr = eina_list_nth(pd->items, spd->curr_idx); - eina_value_set(pd->v, 1.0); - efl_layout_signal_message_send(pd->curr, 1, *(pd->v)); - } -} - -EOLIAN static void -_efl_page_indicator_icon_unpack_all(Eo *obj, - Efl_Page_Indicator_Icon_Data *pd) -{ - Eo *item; - - EINA_LIST_FREE(pd->items, item) - { - efl_del(item); - } - - pd->curr = NULL; - - efl_page_indicator_unpack_all(efl_super(obj, MY_CLASS)); -} - -EOLIAN static void -_efl_page_indicator_icon_efl_page_indicator_bind(Eo *obj, - Efl_Page_Indicator_Icon_Data *pd, - Eo *pager, - Efl_Canvas_Group *idbox) -{ - EFL_PAGE_INDICATOR_DATA_GET(obj, spd); - Eo *item; - int i, page; - - if (spd->pager.obj) - { - EINA_LIST_FREE(pd->items, item) - { - efl_del(item); - } - } - - efl_page_indicator_bind(efl_super(obj, MY_CLASS), pager, idbox); - - if (spd->pager.obj) - { - efl_ui_layout_orientation_set(spd->idbox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL); - efl_gfx_arrangement_content_padding_set(spd->idbox, 15, 15); - - pd->v = eina_value_float_new(0.0); - - if (spd->cnt != 0) - { - for (i = 0; i < spd->cnt; i++) - { - item = efl_add(EFL_CANVAS_LAYOUT_CLASS, spd->idbox); - pd->items = eina_list_append(pd->items, item); - - elm_widget_theme_object_set(spd->idbox, item, - "pager", "indicator", "default"); - efl_gfx_hint_align_set(item, 0.5, 0.5); - efl_gfx_hint_weight_set(item, 0, 0); - efl_gfx_hint_fill_set(item, 0, 0); - efl_pack_end(spd->idbox, item); - } - - page = efl_ui_pager_current_page_get(spd->pager.obj); - item = eina_list_nth(pd->items, page); - eina_value_set(pd->v, 1.0); - efl_layout_signal_message_send(item, 1, *(pd->v)); - - pd->curr = item; - } - } -} - - -#define EFL_PAGE_INDICATOR_ICON_EXTRA_OPS \ - EFL_OBJECT_OP_FUNC(efl_page_indicator_update, \ - _efl_page_indicator_icon_update), \ - EFL_OBJECT_OP_FUNC(efl_page_indicator_pack, \ - _efl_page_indicator_icon_pack), \ - EFL_OBJECT_OP_FUNC(efl_page_indicator_unpack, \ - _efl_page_indicator_icon_unpack), \ - EFL_OBJECT_OP_FUNC(efl_page_indicator_unpack_all, \ - _efl_page_indicator_icon_unpack_all) - -#include "efl_page_indicator_icon.eo.c" |