2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <app_preference.h>
18 #include <Elementary.h>
24 #include <vconf-keys.h>
27 #include "w-input-selector.h"
29 #define RECENT_EMOJI_LIST "recent_emoji_list"
31 #define EMOTICON_CNT 180
34 extern App_Data* app_data;
36 static int is_content_reuse_on = 0;
41 vector <int> recent_emoji_list;
48 static Elm_Object_Item *it_emoticon_empty = NULL;
49 static Elm_Object_Item *it_emoticon_recent_group = NULL;
50 static Elm_Object_Item *it_emoticon_emoji_group = NULL;
51 static Elm_Object_Item *it_last = NULL;
53 static Elm_Genlist_Item_Class *itc_emoticon = NULL;
55 #define INITAL_ITEM_UNIT 24
56 #define LOADING_ITEM_UNIT 27
57 static int loading_done_for_item = 0;
58 Ecore_Timer *lazy_loading_timer_for_items = NULL;
60 #define INITAL_CONTENT_UNIT 51
61 #define LOADING_CONTENT_UNIT 9
62 static int loading_done_for_contents = 0;
63 Ecore_Timer *lazy_loading_timer_for_contents = NULL;
66 typedef struct emoticon_content
73 static emoticon_content_s emoticon_contents_pool[EMOTICON_CNT] = { 0, };
74 static emoticon_content_s emoticon_recents_pool[RECENT_CNT] = { 0, };
77 Emoticon emoticon_info[EMOTICON_CNT] = {
261 //---------------------------------------------------------------------------------------//
263 static Eina_Bool _custom_back_cb2(void *data, Elm_Object_Item *it)
265 PRINTFUNC(DLOG_DEBUG, "");
267 if (is_content_reuse_on) {
270 if (lazy_loading_timer_for_items != NULL) {
271 ecore_timer_del(lazy_loading_timer_for_items);
272 lazy_loading_timer_for_items = NULL;
275 if (lazy_loading_timer_for_contents != NULL) {
276 ecore_timer_del(lazy_loading_timer_for_contents);
277 lazy_loading_timer_for_contents = NULL;
280 //Recent EMOTICONS : the recent emoiton need to be updated whenever emoticon view is generated, so deleted here.
281 for (i=0;i< RECENT_CNT;i++)
283 if (emoticon_recents_pool[i].used == 0 && emoticon_recents_pool[i].content) {
284 evas_object_del(emoticon_recents_pool[i].content);
286 emoticon_recents_pool[i].content = NULL;
290 _back_to_genlist_for_selector();
295 void get_recent_emoticons(vector <int> &emoticon_list)
297 int ret = PREFERENCE_ERROR_NONE;
300 ret = preference_get_string(RECENT_EMOJI_LIST, &str);
301 if (PREFERENCE_ERROR_NONE != ret) {
302 PRINTFUNC(DLOG_ERROR, "preference_get_string error!(%d)", ret);
305 emoticon_list.clear();
307 PRINTFUNC(DLOG_DEBUG, "str = %s", str);
311 tok = strtok_r(str, ",", &ptr);
312 while (tok != NULL) {
313 PRINTFUNC(DLOG_DEBUG, "tok = %s", tok);
314 emoticon_list.push_back(strtol(tok, (char **)NULL, 10));
315 tok = strtok_r(NULL, ",", &ptr);
325 void set_recent_emoticons(vector <int> &emoticon_list, int val)
328 int ret = PREFERENCE_ERROR_NONE;
330 if (emoticon_list.size() > 0) {
331 for (i = 0; i < emoticon_list.size(); i++) {
332 PRINTFUNC(DLOG_DEBUG, "%d == %d", emoticon_list.at(i), val);
334 if (emoticon_list.at(i) == val) {
335 emoticon_list.erase(emoticon_list.begin()+i);
340 if (emoticon_list.size() >= RECENT_CNT) {
341 emoticon_list.erase(emoticon_list.end());
345 emoticon_list.insert(emoticon_list.begin(), val);
348 char str[10] = {0, };
350 for (i = 0; i < emoticon_list.size(); i++) {
351 snprintf(str, sizeof(str), "%d", emoticon_list.at(i));
353 if (i+1 != emoticon_list.size())
357 PRINTFUNC(DLOG_DEBUG, "%s", stored.c_str());
359 ret = preference_set_string(RECENT_EMOJI_LIST, stored.c_str());
360 if (PREFERENCE_ERROR_NONE != ret) {
361 PRINTFUNC(DLOG_ERROR, "preference_set_string error!(%d)", ret);
365 static void _emoticon_item_clicked_cb(void *data, Evas_Object * obj, void *event_info)
367 int index = (uintptr_t)data;
369 PRINTFUNC(DLOG_DEBUG, "index = %d", index);
371 // store in recents list
372 set_recent_emoticons(recent_emoji_list, index);
375 const Eina_Unicode unicode_event[2] = { (Eina_Unicode)emoticon_info[index].code, 0 };
376 char* utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length);
378 reply_to_sender_by_callback((const char*)utf_8, "emoticon");
380 PRINTFUNC(SECURE_DEBUG, "[%d]%s", index, utf_8);
387 Evas_Object* get_emoticon_button(Evas_Object* parent, int index){
391 Evas_Object* btn = elm_button_add(parent);
392 elm_object_style_set(btn, "emoticon");
393 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
394 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
397 const Eina_Unicode unicode_event[2] = { (Eina_Unicode)emoticon_info[index].code, 0 };
398 char* utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length);
399 elm_object_part_text_set(btn, "elm.text", utf_8);
404 evas_object_layer_set(btn, 32000);
406 evas_object_smart_callback_add(btn, "clicked", _emoticon_item_clicked_cb, (void *)(uintptr_t)index);
411 Evas_Object* get_recent_emoticon_button(Evas_Object* parent, int index){
415 Evas_Object* btn = elm_button_add(parent);
416 elm_object_style_set(btn, "emoticon");
417 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
418 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
421 const Eina_Unicode unicode_event[2] = { (Eina_Unicode)emoticon_info[recent_emoji_list.at(index)].code, 0 };
422 char* utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length);
423 elm_object_part_text_set(btn, "elm.text", utf_8);
425 evas_object_data_set(btn, "index", (void*)(uintptr_t) recent_emoji_list.at(index));
430 evas_object_layer_set(btn, 32000);
431 evas_object_smart_callback_add(btn, "clicked", _emoticon_item_clicked_cb, (void*)(uintptr_t) recent_emoji_list.at(index));
436 static void _emoticon_gl_lang_changed(void *data, Evas_Object *obj, void *event_info)
438 elm_genlist_realized_items_update(obj);
441 static char * __emoticon_gl_text_get(void *data, Evas_Object *obj, const char *part)
443 //PRINTFUNC(DLOG_DEBUG,"part = %s", part);
445 const char* str = (const char*) data;
449 if (!strcmp(part, "elm.text")) {
450 //PRINTFUNC(DLOG_DEBUG,"str = %s", str);
451 return strdup(gettext(str));
456 static void _emoticon_gl_content_unswallowed_cb(void *data, Evas_Object *obj, void *event_info)
458 Elm_Object_Item *it = (Elm_Object_Item *)event_info;
460 const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(it);
462 // PRINTFUNC(DLOG_DEBUG,"%s - stype[%s]", __func__, itc->item_style);
463 if (!strcmp(itc->item_style, "3button_flat")) {
464 int index = (uintptr_t)elm_object_item_data_get(it);
465 //PRINTFUNC(DLOG_DEBUG,"it = %p", it);
466 PRINTFUNC(DLOG_DEBUG, "index = %d %d %d", index, index+1, index+2);
468 if (index < EMOTICON_CNT) {
469 emoticon_contents_pool[index].used = 0;
471 if (index + 1 < EMOTICON_CNT) {
472 emoticon_contents_pool[index+1].used = 0;
474 if (index + 2 < EMOTICON_CNT) {
475 emoticon_contents_pool[index+2].used = 0;
477 } else if (!strcmp(itc->item_style, "3button_flat_recent")) {
478 unsigned int index = (uintptr_t)elm_object_item_data_get(it);
479 //PRINTFUNC(DLOG_DEBUG,"index = %d",index);
481 if (index < recent_emoji_list.size()) {
482 emoticon_recents_pool[index].used = 0;
484 if (index + 1 < recent_emoji_list.size()) {
485 emoticon_recents_pool[index+1].used = 0;
487 if (index + 2 < recent_emoji_list.size()) {
488 emoticon_recents_pool[index+2].used = 0;
493 static Evas_Object * __emoticon_gl_recent_content_get(void *data, Evas_Object *obj, const char *part)
495 if (is_content_reuse_on) {
496 unsigned int index = (uintptr_t)data;
499 //PRINTFUNC(DLOG_DEBUG,"%s %d", part, index);
500 if (!strcmp(part, "elm.icon.1") || (!strcmp(part, "elm.icon.2")) || (!strcmp(part, "elm.icon.3"))) {
501 if (!strcmp(part, "elm.icon.1")) {
502 if (index >= recent_emoji_list.size()) return NULL;
504 } else if (!strcmp(part, "elm.icon.2")) {
505 if (index + 1 >= recent_emoji_list.size()) return NULL;
506 new_index = index + 1;
507 } else if (!strcmp(part, "elm.icon.3")) {
508 if (index + 2 >= recent_emoji_list.size()) return NULL;
509 new_index = index + 2;
512 Evas_Object* btn = NULL;
513 btn = (Evas_Object*)emoticon_recents_pool[new_index].content;
514 emoticon_recents_pool[new_index].used = 1;
516 } else if (!strcmp(part, "base")) {
517 Evas_Object* btn = elm_button_add(obj);
518 elm_object_style_set(btn, "ime/transparent");
522 unsigned int index = (uintptr_t)data;
525 // PRINTFUNC(DLOG_DEBUG,"%s %d", part, index);
526 if (!strcmp(part, "elm.icon.1") || (!strcmp(part, "elm.icon.2")) || (!strcmp(part, "elm.icon.3"))) {
527 if (!strcmp(part, "elm.icon.1")) {
528 if (index >= recent_emoji_list.size()) return NULL;
530 } else if (!strcmp(part, "elm.icon.2")) {
531 if (index + 1 >= recent_emoji_list.size()) return NULL;
532 new_index = index + 1;
533 } else if (!strcmp(part, "elm.icon.3")) {
534 if (index + 2 >= recent_emoji_list.size()) return NULL;
535 new_index = index + 2;
537 return get_recent_emoticon_button(obj, new_index);
538 } else if (!strcmp(part, "base")) {
539 Evas_Object* btn = elm_button_add(obj);
540 elm_object_style_set(btn, "ime/transparent");
547 static Evas_Object * __emoticon_gl_emoticon_content_get(void *data, Evas_Object *obj, const char *part)
549 //PRINTFUNC(DLOG_DEBUG,"%s", __func__);
551 if (is_content_reuse_on) {
552 int index = (uintptr_t)data;
555 if (!strcmp(part, "elm.icon.1") || (!strcmp(part, "elm.icon.2")) || (!strcmp(part, "elm.icon.3"))) {
556 if (!strcmp(part, "elm.icon.1")) {
557 if (index >= EMOTICON_CNT) return NULL;
559 } else if (!strcmp(part, "elm.icon.2")) {
560 if (index + 1 >= EMOTICON_CNT) return NULL;
561 new_index = index + 1;
562 } else if (!strcmp(part, "elm.icon.3")) {
563 if (index + 2 >= EMOTICON_CNT) return NULL;
564 new_index = index + 2;
567 Evas_Object* btn = NULL;
568 btn = (Evas_Object*)emoticon_contents_pool[new_index].content;
569 emoticon_contents_pool[new_index].used = 1;
571 char utf_8[10] = {0, };
572 snprintf(utf_8, sizeof(utf_8), "%d", new_index);
573 elm_object_part_text_set(btn, "elm.text", strdup(utf_8));
576 const Eina_Unicode unicode_event[2] = { (Eina_Unicode)emoticon_info[new_index].code, 0 };
577 char* utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length);
578 elm_object_part_text_set(btn, "elm.text", utf_8);
579 evas_object_data_set(btn, "index", (void*)(uintptr_t)new_index);
586 } else if (!strcmp(part, "base")) {
587 Evas_Object* btn = elm_button_add(obj);
588 elm_object_style_set(btn, "ime/transparent");
592 int index = (uintptr_t)data;
595 if (!strcmp(part, "elm.icon.1") || (!strcmp(part, "elm.icon.2")) || (!strcmp(part, "elm.icon.3"))) {
596 if (!strcmp(part, "elm.icon.1")) {
597 if (index >= EMOTICON_CNT) return NULL;
599 } else if (!strcmp(part, "elm.icon.2")) {
600 if (index + 1 >= EMOTICON_CNT) return NULL;
601 new_index = index + 1;
602 } else if (!strcmp(part, "elm.icon.3")) {
603 if (index + 2 >= EMOTICON_CNT) return NULL;
604 new_index = index + 2;
606 return get_emoticon_button(obj, new_index);
607 } else if (!strcmp(part, "base")) {
608 Evas_Object* btn = elm_button_add(obj);
609 elm_object_style_set(btn, "ime/transparent");
617 void _create_reusable_recents(Evas_Object *parent)
620 PRINTFUNC(DLOG_ERROR, "parent is null");
625 for (i = 0; i < recent_emoji_list.size(); i++ ) {
626 emoticon_recents_pool[i].index = i;
627 emoticon_recents_pool[i].content = get_recent_emoticon_button(parent, i);
628 emoticon_recents_pool[i].used = 0;
632 static Eina_Bool _lazy_loader_cb_for_contents(void *data)
634 Evas_Object *gl = (Evas_Object *)data;
636 PRINTFUNC(DLOG_ERROR, "gl is null");
637 lazy_loading_timer_for_contents = NULL;
638 return ECORE_CALLBACK_CANCEL;
641 if (loading_done_for_contents == EMOTICON_CNT) {
642 PRINTFUNC(DLOG_DEBUG, "lazy loading contents done");
643 lazy_loading_timer_for_contents = NULL;
644 return ECORE_CALLBACK_CANCEL;
648 if (loading_done_for_contents + LOADING_CONTENT_UNIT > EMOTICON_CNT) {
649 loading_top = EMOTICON_CNT;
651 loading_top = loading_done_for_contents + LOADING_CONTENT_UNIT;
654 PRINTFUNC(DLOG_DEBUG, "_lazy_loader_cb_for_contents loading_done = %d", loading_done_for_contents);
657 for (i = loading_done_for_contents; i < loading_top; i++) {
658 emoticon_contents_pool[i].index = i;
659 emoticon_contents_pool[i].used = 0;
661 if (emoticon_contents_pool[i].content == NULL) { // reusable
662 emoticon_contents_pool[i].content = get_emoticon_button(gl, i);
666 loading_done_for_contents = loading_top;
668 return ECORE_CALLBACK_RENEW;
671 void create_reusable_button(Evas_Object *parent)
674 PRINTFUNC(DLOG_ERROR, "parent is null");
677 loading_done_for_contents = INITAL_CONTENT_UNIT;
680 for (i = 0; i < INITAL_CONTENT_UNIT; i++ ) {
681 emoticon_contents_pool[i].index = i;
682 emoticon_contents_pool[i].used = 0;
684 if (emoticon_contents_pool[i].content == NULL) { // reusable
685 emoticon_contents_pool[i].content = get_emoticon_button(parent, i);
689 lazy_loading_timer_for_contents = ecore_timer_add(0.25, _lazy_loader_cb_for_contents, (void *)parent);
692 static Eina_Bool _lazy_loader_cb_for_items(void *data)
694 Evas_Object *gl = (Evas_Object *)data;
696 PRINTFUNC(DLOG_ERROR, "gl is null");
697 lazy_loading_timer_for_items = NULL;
698 return ECORE_CALLBACK_CANCEL;
701 if (loading_done_for_item == EMOTICON_CNT) {
702 PRINTFUNC(DLOG_DEBUG, "lazy loading item done");
703 //elm_genlist_realized_items_update(gl);
704 elm_genlist_item_class_free(itc_emoticon);
705 lazy_loading_timer_for_items = NULL;
707 return ECORE_CALLBACK_CANCEL;
711 if (loading_done_for_item + LOADING_ITEM_UNIT > EMOTICON_CNT) {
712 loading_top = EMOTICON_CNT;
714 loading_top = loading_done_for_item + LOADING_ITEM_UNIT;
717 if (loading_top > loading_done_for_contents) {
718 PRINTFUNC(DLOG_DEBUG, "Wait for content loading");
719 return ECORE_CALLBACK_RENEW;
721 PRINTFUNC(DLOG_DEBUG, "_lazy_loader_cb_for_items loading_done_for_item = %d", loading_done_for_item);
724 for (i = loading_done_for_item; i < loading_top; i++ ) {
726 elm_genlist_item_append(gl, itc_emoticon, (void*)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)(uintptr_t)i);
729 loading_done_for_item = loading_top;
730 return ECORE_CALLBACK_RENEW;
733 void _create_reusable_contents(Evas_Object *gl){
735 PRINTFUNC(DLOG_ERROR, "gl is null");
739 loading_done_for_item = INITAL_ITEM_UNIT;
741 for (i = 0; i < INITAL_ITEM_UNIT; i++ ) {
743 elm_genlist_item_append(gl, itc_emoticon, (void*)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)(uintptr_t)i);
746 lazy_loading_timer_for_items = ecore_timer_add(0.1, _lazy_loader_cb_for_items, (void *)gl);
749 Evas_Object* _create_emoticon_genlist(void* data)
751 PRINTFUNC(DLOG_DEBUG, "%s", __func__);
752 App_Data* ad = (App_Data*) data;
756 Evas_Object* genlist = elm_genlist_add(ad->naviframe);
760 Evas_Object* circle_object_genlist = eext_circle_object_genlist_add(genlist, ad->circle_surface);
761 eext_circle_object_genlist_scroller_policy_set(circle_object_genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
762 evas_object_data_set(genlist, "circle", (void *) circle_object_genlist);
763 eext_rotary_object_event_activated_set(circle_object_genlist, EINA_TRUE);
765 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
766 evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
767 evas_object_show(genlist);
769 Elm_Object_Item *nf_emoticon_item = elm_naviframe_item_push(ad->naviframe, NULL, NULL, NULL, genlist, "empty");
771 elm_naviframe_item_pop_cb_set(nf_emoticon_item, _custom_back_cb2, ad);
773 evas_object_smart_callback_add(genlist, "language,changed", _emoticon_gl_lang_changed, genlist);
775 if (is_content_reuse_on) {
776 evas_object_smart_callback_add(genlist, "content,unswallowed", _emoticon_gl_content_unswallowed_cb, NULL);
782 void _update_emoticon_items(void *data)
784 PRINTFUNC(DLOG_DEBUG, "%s", __func__);
785 Evas_Object* gl = (Evas_Object*) data;
790 Elm_Object_Item *it = NULL;
791 Elm_Object_Item *first_it = NULL;
793 Elm_Genlist_Item_Class * itc_dummy = elm_genlist_item_class_new();
794 itc_dummy->item_style = "title";
795 itc_dummy->func.text_get = NULL;
796 itc_dummy->func.content_get = NULL;
797 itc_dummy->func.state_get = NULL;
798 itc_dummy->func.del = NULL;
800 Elm_Genlist_Item_Class *itc_group = elm_genlist_item_class_new();
802 itc_group->item_style = "groupindex";
803 itc_group->func.text_get = __emoticon_gl_text_get;
804 itc_group->func.content_get = NULL;
805 itc_group->func.state_get = NULL;
806 itc_group->func.del = NULL;
808 Elm_Genlist_Item_Class *itc_recent = elm_genlist_item_class_new();
809 if (is_content_reuse_on) {
810 // itc_recent->content_reusable = EINA_TRUE;
812 itc_recent->item_style = "3button_flat_recent";
813 itc_recent->func.text_get = NULL;
814 itc_recent->func.content_get = __emoticon_gl_recent_content_get;
815 itc_recent->func.state_get = NULL;
816 itc_recent->func.del = NULL;
818 itc_emoticon = elm_genlist_item_class_new();
819 if (is_content_reuse_on) {
820 // itc_emoticon->content_reusable = EINA_TRUE;
822 itc_emoticon->item_style = "3button_flat";
823 itc_emoticon->func.text_get = NULL;
824 itc_emoticon->func.content_get = __emoticon_gl_emoticon_content_get;
825 itc_emoticon->func.state_get = NULL;
826 itc_emoticon->func.del = NULL;
828 // dummy title for empty space
829 it_emoticon_empty = elm_genlist_item_append(gl, itc_dummy, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
831 if (recent_emoji_list.size() > 0) {
832 if (is_content_reuse_on) {
833 _create_reusable_recents(gl);
837 it_emoticon_recent_group = elm_genlist_item_append(gl, itc_group, (void*)"IDS_IME_HEADER_RECENT_M_RECETLY_SENT_EMOJIS_ABB", NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)2);
838 elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
839 if (first_it == NULL)
840 first_it = it_emoticon_recent_group;
842 PRINTFUNC(DLOG_DEBUG, "size = %d", recent_emoji_list.size());
844 for (i=0;i < recent_emoji_list.size();i=i+3)
846 it = elm_genlist_item_append(gl, itc_recent, (void*)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)(uintptr_t)i);
851 it_emoticon_emoji_group = elm_genlist_item_append(gl, itc_group, (void*)"IDS_IME_HEADER_EMOJIS_ABB", NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)2);
852 elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
853 if (first_it == NULL)
854 first_it = it_emoticon_emoji_group;
856 if (is_content_reuse_on) {
857 _create_reusable_contents(gl);
860 for (i=0;i< EMOTICON_CNT;i=i+3) {
861 it = elm_genlist_item_append(gl, itc_emoticon, (void*)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, (void *)(uintptr_t)i);
864 elm_genlist_item_class_free(itc_emoticon);
866 it = elm_genlist_item_next_get(first_it);
867 const Elm_Genlist_Item_Class *itc_temp = elm_genlist_item_item_class_get(it);
868 if (itc_temp == itc_group) {
869 it = elm_genlist_item_next_get(it);
871 elm_genlist_item_show(it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
873 elm_genlist_item_class_free(itc_recent);
874 elm_genlist_item_class_free(itc_group);
875 elm_genlist_item_class_free(itc_dummy);
878 void ise_show_emoticon_list(void *data)
880 App_Data* ad = (App_Data*) data;
884 it_emoticon_empty = NULL;
885 it_emoticon_recent_group = NULL;
886 it_emoticon_emoji_group = NULL;
889 get_recent_emoticons(recent_emoji_list);
891 Evas_Object* emoticon_list = NULL;
893 emoticon_list = _create_emoticon_genlist(ad);
895 if (is_content_reuse_on) {
896 create_reusable_button(ad->naviframe); // button object need to survive even if genlist is deleted.
898 _update_emoticon_items(emoticon_list);