From 886f61c3e168256ca76b14a2ec16411ce7b3051f Mon Sep 17 00:00:00 2001 From: Rahul Dadhich Date: Tue, 12 Sep 2017 09:20:06 +0530 Subject: [PATCH] Added comments in view files Change-Id: I4d8c1c223e52a020a8f34a963fd14190766cb404 Signed-off-by: Rahul Dadhich --- src/2dview/gl-albums-edit.c | 81 ++++++- src/2dview/gl-albums-new.c | 29 ++- src/2dview/gl-albums-sel.c | 57 ++++- src/2dview/gl-albums.c | 288 +++++++++++++++++++++-- src/2dview/gl-thumbs-edit.c | 57 ++++- src/2dview/gl-thumbs-sel.c | 68 +++++- src/2dview/gl-thumbs.c | 468 ++++++++++++++++++++++++++++++++++---- src/2dview/gl-timeline.c | 539 +++++++++++++++++++++++++++++++++++++++++++- 8 files changed, 1477 insertions(+), 110 deletions(-) diff --git a/src/2dview/gl-albums-edit.c b/src/2dview/gl-albums-edit.c index e1fc1c7..1f3244b 100644 --- a/src/2dview/gl-albums-edit.c +++ b/src/2dview/gl-albums-edit.c @@ -26,13 +26,13 @@ #include "gl-tile.h" /** -* @Brif Update checkbox state and album cover and update selectioninfo. -* -* @Param data gl_appdata. -* @Param album_item album item. -* @Param check_obj object of checkbox. -* @Param b_ck_box true: Checkbox selection, false: album cover selection. -*/ + * Update checkbox state and album cover and update selectioninfo. + * @param data : App data. + * @param album_item : Media item data + * @param check_obj : checkbox obj + * @param b_ck_box : selection value + * @return + */ static int __gl_albums_edit_update_check_state(void *data, gl_cluster * album_item, Evas_Object * check_obj, @@ -83,6 +83,12 @@ static int __gl_albums_edit_update_check_state(void *data, return 0; } +/** + * Update the application state on check changed state in edit mode + * @param data :App data + * @param obj : grid object + * @param ei :event info + */ static void __gl_albums_edit_check_changed(void *data, Evas_Object * obj, void *ei) { @@ -104,6 +110,12 @@ static void __gl_albums_edit_check_changed(void *data, Evas_Object * obj, __gl_albums_edit_update_check_state(ad, album_item, obj, true); } +/** + * Update the application state on check changed state in edit mode + * @param data :App data + * @param obj : grid object + * @param ei :event info + */ static void __gl_albums_edit_check_grid_changed(void *data, Evas_Object * obj, void *ei) @@ -126,6 +138,12 @@ static void __gl_albums_edit_check_grid_changed(void *data, __gl_albums_edit_update_check_state(ad, album_item, obj, false); } +/** + * Create Delete popup + * @param data :App data + * @param obj : grid object + * @param ei :event info + */ static void __gl_albums_edit_del_cb(void *data, Evas_Object * obj, void *ei) { @@ -148,6 +166,12 @@ static void __gl_albums_edit_del_cb(void *data, Evas_Object * obj, } } +/** + * Perform cancel operation from edit mode + * @param data :App data + * @param obj : grid object + * @param ei :event info + */ static void __gl_albums_edit_cancel_cb(void *data, Evas_Object * obj, void *ei) { @@ -157,7 +181,12 @@ static void __gl_albums_edit_cancel_cb(void *data, Evas_Object * obj, _gl_albums_change_mode(data, false); } -/* Select-all checkbox selected/deselected */ +/** Select-all checkbox selected/deselected + * + * @param data :App data + * @param obj : grid object + * @param ei :event info + */ static void __gl_albums_edit_selall_cb(void *data, Evas_Object * obj, void *ei) { @@ -240,6 +269,13 @@ static void __gl_albums_edit_selall_cb(void *data, Evas_Object * obj, _gl_ui_update_navi_title_text(ad->ctrlinfo.nf_it, sel_all_cnt, false); } +/** + * Add content in grid items + * @param data : Album cluster data + * @param obj : grid object + * @param part : part name + * @return + */ Evas_Object *_gl_albums_edit_add_content(void *data, Evas_Object * obj, const char *part) { @@ -274,8 +310,10 @@ Evas_Object *_gl_albums_edit_add_content(void *data, Evas_Object * obj, } /** - * Use naviframe api to push albums edit view to stack. - * @param obj is the content to be pushed. + * Use naviframe api to push albums edit view to stack. + * @param data : App data + * @param parent :obj is the content to be pushed. + * @return */ int _gl_albums_edit_add_btns(void *data, Evas_Object * parent) { @@ -319,6 +357,11 @@ int _gl_albums_edit_add_btns(void *data, Evas_Object * parent) return 0; } +/** + * Update album edit view + * @param data :App data + * @return + */ int _gl_albums_edit_update_view(void *data) { GL_CHECK_VAL(data, -1); @@ -355,6 +398,11 @@ int _gl_albums_edit_update_view(void *data) return 0; } +/** + * Pop album edit view + * @param data : App data + * @return + */ int _gl_albums_edit_pop_view(void *data) { GL_CHECK_VAL(data, -1); @@ -371,6 +419,11 @@ int _gl_albums_edit_pop_view(void *data) return 0; } +/** + * Update view language on system language changed + * @param data : App data + * @return + */ int _gl_albums_edit_update_lang(void *data) { GL_CHECK_VAL(data, -1); @@ -384,8 +437,12 @@ int _gl_albums_edit_update_lang(void *data) return 0; } -/* albums view: more-delete-add to home */ -/* Delete in unavaliable for Facebook */ +/** + * Enable/disable naviframe button on flag value + * @param data : App data + * @param b_disable : flag to disable/ enable naviframe title button + * @return + */ int _gl_albums_edit_disable_btns(void *data, bool b_disable) { GL_CHECK_VAL(data, -1); diff --git a/src/2dview/gl-albums-new.c b/src/2dview/gl-albums-new.c index 325bd88..d318252 100644 --- a/src/2dview/gl-albums-new.c +++ b/src/2dview/gl-albums-new.c @@ -24,6 +24,11 @@ #include "gl-notify.h" #include "gl-file-util.h" +/** + * Create new album view + * @param data : App data + * @return + */ static int __gl_albums_new_pop_view(void *data) { GL_CHECK_VAL(data, -1); @@ -46,7 +51,12 @@ static int __gl_albums_new_pop_view(void *data) return 0; } -/* dont call elm_naviframe_item_pop in this callback */ +/** dont call elm_naviframe_item_pop in this callback + * Pop new album view + * @param data : App data + * @param it : grid item + * @return + */ static Eina_Bool __gl_albums_new_pop_cb(void *data, Elm_Object_Item * it) { /* If the back button is clicked or H/W Back key is pressed, @@ -63,6 +73,12 @@ static Eina_Bool __gl_albums_new_pop_cb(void *data, Elm_Object_Item * it) return EINA_TRUE; } +/** + * Create new album process and view + * @param data : App data + * @param op_func : Operation function + * @return + */ int _gl_albums_new_create_view(void *data, void *op_func) { GL_CHECK_VAL(data, -1); @@ -87,10 +103,13 @@ int _gl_albums_new_create_view(void *data, void *op_func) return 0; } -/* -* @param b_enter -* True: Enter key on Keyboard pressed, False: Button Done clicked -*/ + +/** True: Enter key on Keyboard pressed, False: Button Done clicked + * + * @param data : App data + * @param b_enter : boolean flag + * @return + */ int _gl_albums_new_process(void *data, bool b_enter) { gl_dbg("b_enter: %d", b_enter); diff --git a/src/2dview/gl-albums-sel.c b/src/2dview/gl-albums-sel.c index f0e9acc..d54490a 100644 --- a/src/2dview/gl-albums-sel.c +++ b/src/2dview/gl-albums-sel.c @@ -27,6 +27,12 @@ static void _gl_albums_sel_update_album_sel_list(void *data); +/** + * + * @param data : App data + * @param obj : grid object + * @param event_info : event info + */ static void __gl_albums_sel_trans_finished_cb(void *data, Evas_Object * obj, void *event_info) @@ -48,7 +54,11 @@ static void __gl_albums_sel_trans_finished_cb(void *data, } } -/* callback after user tap Cancel button in option header in select album view */ +/** callback after user tap Cancel button in option header in select album view + * @param data : App data + * @param it : object item + * @return + */ static Eina_Bool __gl_albums_sel_pop_cb(void *data, Elm_Object_Item * it) { GL_CHECK_FALSE(data); @@ -74,7 +84,11 @@ static Eina_Bool __gl_albums_sel_pop_cb(void *data, Elm_Object_Item * it) /** * Use naviframe api to push new album view to stack. - * @param obj is the content to be pushed. + * @param data : App data + * @param parent : parent layout + * @param obj : ontent to be pushed. + * @param title : naviframe title to display + * @return */ static int __gl_albums_sel_push_view(void *data, Evas_Object * parent, Evas_Object * obj, char *title) @@ -99,7 +113,13 @@ static int __gl_albums_sel_push_view(void *data, Evas_Object * parent, return 0; } -/* Free data after layout deleted */ +/** Free data after layout deleted + * + * @param data : App data + * @param e : event + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_sel_delete_layout_cb(void *data, Evas * e, Evas_Object * obj, void *ei) { @@ -117,6 +137,11 @@ static void __gl_albums_sel_delete_layout_cb(void *data, Evas * e, gl_dbg("Delete layout +++"); } +/** + * Create gringrid for album select view + * @param data : App data + * @return + */ Evas_Object *_gl_albums_create_sel_gengrid(void *data) { GL_CHECK_VAL(data, NULL); @@ -134,6 +159,12 @@ Evas_Object *_gl_albums_create_sel_gengrid(void *data) return layout_inner; } +/** + * Create album select split view + * @param data : App data + * @param layout_inner + * @return + */ int _gl_albums_create_split_album_sel_view(void *data, Evas_Object * layout_inner) { @@ -155,6 +186,11 @@ int _gl_albums_create_split_album_sel_view(void *data, return 0; } +/** + * Create album select view + * @param data : App data + * @return + */ int _gl_albums_sel_create_view(void *data) { GL_CHECK_VAL(data, -1); @@ -259,6 +295,11 @@ int _gl_albums_sel_create_view(void *data) return 0; } +/** + * Update album select view + * @param data : App data + * @return + */ int _gl_albums_sel_update_view(void *data) { GL_CHECK_VAL(data, -1); @@ -268,7 +309,11 @@ int _gl_albums_sel_update_view(void *data) return 0; } -/* callback after user tap Cancel button in option header in select album view */ +/** callback after user tap Cancel button in option header in select album view + * + * @param data : App data + * @return + */ int _gl_albums_sel_pop_view(void *data) { GL_CHECK_VAL(data, -1); @@ -286,6 +331,10 @@ int _gl_albums_sel_pop_view(void *data) return 0; } +/** + * Update album select info + * @param data : App data + */ static void _gl_albums_sel_update_album_sel_list(void *data) { GL_CHECK(data); diff --git a/src/2dview/gl-albums.c b/src/2dview/gl-albums.c index b46c932..8c7f7d0 100644 --- a/src/2dview/gl-albums.c +++ b/src/2dview/gl-albums.c @@ -41,6 +41,13 @@ static int __gl_albums_create_thumb(gl_item * gitem, gl_cluster * album); static Eina_Bool __gl_albums_pop_op(void *data); +/** + * This Api update the grid item on realization and send thumb + * creation request if thumbnail is not available + * @param data : App Data + * @param obj : Gengrid object + * @param ei : event info + */ static void __gl_albums_realized(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -65,6 +72,13 @@ static void __gl_albums_realized(void *data, Evas_Object * obj, void *ei) } } +/** + * This Api update the grid item on unrealization and send cancel thumb creation + * request if thumbnail is not available and request made of creation + * @param data : App Data + * @param obj : Gengrid object + * @param ei : event info + */ static void __gl_albums_unrealized(void *data, Evas_Object * obj, void *ei) { gl_dbg("unrealized"); @@ -86,6 +100,13 @@ static void __gl_albums_unrealized(void *data, Evas_Object * obj, void *ei) } } +/** + * This Api update the grid item on realization and send thumb + * creation request if thumbnail is not available + * @param data : App Data + * @param obj : Gengrid object + * @param ei : event info + */ static void __gl_split_albums_realized(void *data, Evas_Object * obj, void *ei) { @@ -119,6 +140,12 @@ static void __gl_split_albums_realized(void *data, Evas_Object * obj, gl_dbg("realized"); } +/** + * Api called when grid item in split view realeased. + * @param data : App Data + * @param obj : Gengrid object + * @param ei : event info + */ static void __gl_split_albums_released(void *data, Evas_Object * obj, void *ei) { @@ -147,6 +174,13 @@ static void __gl_split_albums_released(void *data, Evas_Object * obj, gl_dbg("released"); } +/** + * This function is called to create new album detail view, + * when a item is clicked in album view. + * @param data : App Data + * @param obj : Gengrid object + * @param ei : event info + */ void __gl_albums_new_album_sel(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -195,7 +229,12 @@ void __gl_albums_new_album_sel(void *data, Evas_Object * obj, void *ei) } } -/* Callback of album item selection */ +/** + * grid item sel CB to open a album when user clicks the album grid item + * @param data : App Data + * @param obj : Gengrid object + * @param ei : event info + */ static void __gl_albums_sel_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -242,6 +281,13 @@ static void __gl_albums_sel_cb(void *data, Evas_Object * obj, void *ei) } } +/** + * Function to set the part name in grid item + * @param data : App Data + * @param obj : Gengrid object + * @param part : Text part name + * @return + */ static char *__gl_albums_get_text(void *data, Evas_Object * obj, const char *part) { @@ -307,7 +353,12 @@ static char *__gl_albums_get_text(void *data, Evas_Object * obj, return strdup(buf); } -/* Only for local medias */ +/** + * CB function is called when thumbnail is created for media + * @param error + * @param path + * @param user_data + */ static void __gl_albums_create_thumb_cb(media_content_error_e error, const char *path, void *user_data) { @@ -336,7 +387,12 @@ static void __gl_albums_create_thumb_cb(media_content_error_e error, } } -/* Use file to create new thumb if possible */ +/** + * Sends request to create thumbnail for media + * @param gitem : media item data + * @param album : album data + * @return 0 on success + */ static int __gl_albums_create_thumb(gl_item * gitem, gl_cluster * album) { GL_CHECK_VAL(gitem, -1); @@ -358,6 +414,12 @@ static int __gl_albums_create_thumb(gl_item * gitem, gl_cluster * album) return -1; } +/** + * Set the thumbnail image to image part + * @param bg : background object + * @param data : Item data + * @return + */ static int __gl_albums_set_bg_file(Evas_Object * bg, void *data) { GL_CHECK_VAL(data, -1); @@ -387,6 +449,12 @@ static int __gl_albums_set_bg_file(Evas_Object * bg, void *data) return ret_val; } +/** + * Get the folder type icon + * @param obj : Grid object + * @param album : Alcum cluster data + * @return + */ static Evas_Object *__gl_albums_get_type_icon(Evas_Object * obj, gl_cluster * album) { @@ -405,6 +473,11 @@ static Evas_Object *__gl_albums_get_type_icon(Evas_Object * obj, return _obj; } +/** + * Set the count of media in a folder + * @param layout : layout for count + * @param text : text to display count + */ static void _gl_count_set(Evas_Object * layout, const char *text) { Evas_Object *edje; @@ -419,9 +492,17 @@ static void _gl_count_set(Evas_Object * layout, const char *text) if (msg) { msg->val = elm_config_scale_get(); edje_object_message_send(edje, EDJE_MESSAGE_FLOAT, 0, msg); + free(msg); } } +/** + * Set the content part in grid item + * @param data : Album cluster data + * @param obj : Grid Object + * @param part : part name + * @return + */ static Evas_Object *__gl_albums_get_content(void *data, Evas_Object * obj, const char *part) { @@ -508,6 +589,13 @@ static Evas_Object *__gl_albums_get_content(void *data, Evas_Object * obj, return _obj; } +/** + * Set the content part in grid item + * @param data : Album cluster data + * @param obj : Grid Object + * @param part : part name + * @return + */ static Evas_Object *__gl_albums_get_content_split_view(void *data, Evas_Object * obj, const char *part) @@ -592,7 +680,12 @@ static Evas_Object *__gl_albums_get_content_split_view(void *data, return _obj; } - +/** + * Closes the album detail view on back key. + * @param data : App data + * @param it : grid item + * @return + */ static Eina_Bool __gl_albums_close_album_cb(void *data, Elm_Object_Item * it) { @@ -604,6 +697,12 @@ static Eina_Bool __gl_albums_close_album_cb(void *data, return EINA_TRUE; } +/** + * + * @param data : Album cluster data + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_longpressed_cb(void *data, Evas_Object * obj, void *ei) { @@ -619,8 +718,13 @@ static void __gl_albums_longpressed_cb(void *data, Evas_Object * obj, GL_CHECK(album); _gl_albums_set_current(data, album); } - -/* Free data after layout deleted */ +/** + * delete CB when layout gets deleted + * @param data : album cluster data + * @param e : Event + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_delete_layout_cb(void *data, Evas * e, Evas_Object * obj, void *ei) { @@ -631,6 +735,12 @@ static void __gl_albums_delete_layout_cb(void *data, Evas * e, gl_dbg("Delete layout +++"); } +/** + * Create new album view + * @param data :App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_newalbum_cb(void *data, Evas_Object * obj, void *ei) { @@ -642,6 +752,12 @@ static void __gl_albums_newalbum_cb(void *data, Evas_Object * obj, _gl_albums_new_create_view(data, _gl_albums_sel_create_view); } +/** + * Handle back button from reorder view + * @param data :App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_reorder_soft_back_cb(void *data, Evas_Object * obj, void *ei) { @@ -649,6 +765,12 @@ static void __gl_reorder_soft_back_cb(void *data, Evas_Object * obj, __gl_albums_pop_op(data); } +/** + * Creates reorder view + * @param data :App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_reorder_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -673,6 +795,12 @@ static void __gl_albums_reorder_cb(void *data, Evas_Object * obj, void *ei) } } +/** + * Create view as Popup + * @param data :App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_viewas_pop_cb(void *data, Evas_Object * obj, void *ei) { @@ -691,6 +819,12 @@ static void __gl_albums_viewas_pop_cb(void *data, Evas_Object * obj, gl_dbg("EXIT"); } +/** + * Create Album edit view in case of delete + * @param data :App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_edit_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -712,6 +846,13 @@ static void __gl_albums_edit_cb(void *data, Evas_Object * obj, void *ei) } } +/** + * Create Context popup in case of + * more button clicked in album view + * @param data : App Data + * @param parent : Parent grid object + * @return + */ static int __gl_albums_ctxpopup_append(void *data, Evas_Object * parent) { gl_dbg(""); @@ -735,6 +876,12 @@ static int __gl_albums_ctxpopup_append(void *data, Evas_Object * parent) return 0; } +/** + * Add Naviframe cancel and done button in case of edit view + * @param data :App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_albums_more_btn_cb(void *data, Evas_Object * obj, void *ei) { @@ -751,6 +898,10 @@ static void __gl_albums_more_btn_cb(void *data, Evas_Object * obj, _gl_ctxpopup_create(data, obj, __gl_albums_ctxpopup_append); } +/** + * Update the Album list after user do reorder and return to album view + * @param data : App Data + */ void _gl_update_list_data(void *data) { GL_CHECK(data); @@ -794,6 +945,11 @@ void _gl_update_list_data(void *data) _gl_set_reorder_state_preference(); } +/** + * Handle Back key pop event + * @param data : App Data + * @return + */ static Eina_Bool __gl_albums_pop_op(void *data) { GL_CHECK_FALSE(data); @@ -824,6 +980,8 @@ static Eina_Bool __gl_albums_pop_op(void *data) /** * When push albums view for the first time, albums list is empty. * After albums list got from DB then update edit item state. + * @param data :App Data + * @return */ static int __gl_albums_add_btns(void *data) { @@ -848,7 +1006,11 @@ static int __gl_albums_add_btns(void *data) return 0; } -/* From thumbnails view to albums view */ +/** + * From thumbnails view to albums view + * @param data : App data + * @return + */ int _gl_albums_close_album(void *data) { gl_dbg(""); @@ -861,7 +1023,11 @@ int _gl_albums_close_album(void *data) return 0; } -/* Update albums view */ +/** + * Update albums view + * @param data : App data + * @return + */ int gl_albums_update_items(void *data) { GL_PROFILE_IN; @@ -935,7 +1101,12 @@ int gl_albums_update_items(void *data) return 0; } -/* Add albums view and append nothing */ +/** + * Add albums view and append nothing + * @param data : App data + * @param parent : parent layout + * @return + */ int _gl_albums_create_view(void *data, Evas_Object * parent) { GL_PROFILE_IN; @@ -955,7 +1126,11 @@ int _gl_albums_create_view(void *data, Evas_Object * parent) return 0; } -/* Update albums list and refresh albums view, remove invalid widgets */ +/** + * Update albums list and refresh albums view, remove invalid widgets + * @param data : App data + * @return + */ int gl_albums_update_view(void *data) { GL_CHECK_VAL(data, -1); @@ -976,7 +1151,11 @@ int gl_albums_update_view(void *data) return 0; } -/* From albums edit view to albums view */ +/** + * From albums edit view to albums view + * @param data : App data + * @return + */ int gl_albums_change_to_view(void *data) { GL_CHECK_VAL(data, -1); @@ -1035,12 +1214,14 @@ int gl_albums_change_to_view(void *data) } /** -* Remove nocontents view and show albums view. -* Case 1, gallery is empty->home key tapped -* ->take photos with camera->back to gallery; -* Case 2, gallery is empty->add web album -* ->update albums view. -*/ + * Remove nocontents view and show albums view. + * Case 1, gallery is empty->home key tapped + * ->take photos with camera->back to gallery; + * Case 2, gallery is empty->add web album + * ->update albums view. + * @param data : App data + * @return + */ int gl_albums_remove_nocontents(void *data) { GL_CHECK_VAL(data, -1); @@ -1075,7 +1256,10 @@ int gl_albums_remove_nocontents(void *data) return 0; } -/* Free resources allocated for albums view */ +/** Free resources allocated for albums view + * @param data : App data + * @return + */ int gl_albums_free_data(void *data) { gl_dbg(""); @@ -1088,6 +1272,11 @@ int gl_albums_free_data(void *data) return 0; } +/** + * Creates Album view + * @param data : App data + * @return + */ int _gl_albums_show_view_tab(void *data, Evas_Object * parent) { GL_CHECK_VAL(parent, -1); @@ -1122,7 +1311,11 @@ int _gl_albums_show_view_tab(void *data, Evas_Object * parent) return 0; } -/* Terminate EDIT mode */ +/** Terminate EDIT mode + * + * @param data : App data + * @return + */ int _gl_albums_hide_view_tab(void *data) { GL_CHECK_VAL(data, -1); @@ -1158,6 +1351,12 @@ int _gl_albums_hide_view_tab(void *data) return 0; } +/** + * chages diffrent mode in Albumview + * @param data : App data + * @param b_edit : edit mode flag + * @return + */ int _gl_albums_change_mode(void *data, bool b_edit) { GL_CHECK_VAL(data, -1); @@ -1190,6 +1389,11 @@ int _gl_albums_change_mode(void *data, bool b_edit) return 0; } +/** + * Update button more button + * @param data : App data + * @return + */ int _gl_albums_check_btns(void *data) { GL_CHECK_VAL(data, -1); @@ -1207,6 +1411,11 @@ int _gl_albums_check_btns(void *data) return 0; } +/** + * Rotate Album view + * @param data : App data + * @return + */ int _gl_albums_rotate_view(void *data) { GL_CHECK_VAL(data, -1); @@ -1228,7 +1437,11 @@ int _gl_albums_rotate_view(void *data) return _gl_tile_update_item_size(data, ad->albuminfo.view, true); } -/* Free resources allocated for albums view */ +/** Free resources allocated for albums view + * + * @param view : Grid object + * @return + */ int _gl_albums_clear_cbs(Evas_Object * view) { gl_dbg(""); @@ -1241,6 +1454,11 @@ int _gl_albums_clear_cbs(Evas_Object * view) return 0; } +/** + * Add Cluster data in media item data + * @param album : Album cluster data + * @param medias_elist : media list + */ void _gl_add_album_data(gl_cluster * album, Eina_List * medias_elist) { GL_CHECK(album); @@ -1256,6 +1474,11 @@ void _gl_add_album_data(gl_cluster * album, Eina_List * medias_elist) } } +/** + * Create album detail view + * @param album :Album cluster + * @return + */ int gl_albums_open_album(gl_cluster * album) { GL_CHECK_VAL(album, -1); @@ -1354,6 +1577,12 @@ int gl_albums_open_album(gl_cluster * album) return 0; } +/** + * Create grid object + * @param data : App Data + * @param parent : parent layout + * @return + */ Evas_Object *_gl_albums_add_gengrid(void *data, Evas_Object * parent) { GL_PROFILE_IN; @@ -1372,7 +1601,12 @@ Evas_Object *_gl_albums_add_gengrid(void *data, Evas_Object * parent) return grid; } -/* Add albums view and doesn't push it to naviframe */ +/** Add albums view and doesn't push it to naviframe + * + * @param data : App data + * @param parent : parent layout + * @return + */ Evas_Object *_gl_albums_add_view(void *data, Evas_Object * parent) { GL_CHECK_NULL(parent); @@ -1425,6 +1659,12 @@ Evas_Object *_gl_albums_add_view(void *data, Evas_Object * parent) return grid; } +/** + * Create Split album view + * @param data :App data + * @param parent : Parent layout + * @return + */ int _gl_split_albums_create_items(void *data, Evas_Object * parent) { GL_PROFILE_IN; @@ -1497,6 +1737,12 @@ int _gl_split_albums_create_items(void *data, Evas_Object * parent) } } +/** + * Create Album grid item + * @param data : App Data + * @param parent : grid item + * @return + */ int _gl_albums_create_items(void *data, Evas_Object * parent) { GL_PROFILE_IN; diff --git a/src/2dview/gl-thumbs-edit.c b/src/2dview/gl-thumbs-edit.c index f49d94c..c785f40 100644 --- a/src/2dview/gl-thumbs-edit.c +++ b/src/2dview/gl-thumbs-edit.c @@ -24,6 +24,10 @@ #include "gl-notify.h" #include "gl-popup.h" +/** + * Delete the selected media + * @param data : App data + */ static void __gl_thumbs_edit_del(void *data) { GL_CHECK(data); @@ -53,6 +57,10 @@ static void __gl_thumbs_edit_del(void *data) } } +/** + * Perform the copy/move operation on media + * @param data : App data + */ static void __gl_thumbs_edit_copy_move(void *data) { GL_CHECK(data); @@ -82,6 +90,13 @@ static void __gl_thumbs_edit_copy_move(void *data) } } +/** + * Pop the thumb edit view in either back button case + * or all media deleted from the album + * @param data : app data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_edit_cancel_cb(void *data, Evas_Object * obj, void *ei) { @@ -91,6 +106,12 @@ static void __gl_thumbs_edit_cancel_cb(void *data, Evas_Object * obj, _gl_thumbs_edit_pop_view(data); } +/** + * Perfoms the edit operations on medias like copy/move/delete + * @param data : app data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_edit_done_cb(void *data, Evas_Object * obj, void *ei) { @@ -106,7 +127,11 @@ static void __gl_thumbs_edit_done_cb(void *data, Evas_Object * obj, } } -/* Select-all checkbox selected/deselected */ +/* Select-all checkbox selected/deselected + * @param data : app data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_edit_selall_cb(void *data, Evas_Object * obj, void *ei) { @@ -185,7 +210,12 @@ static void __gl_thumbs_edit_selall_cb(void *data, Evas_Object * obj, false); } -/* Delete/Copy/Move -- unavailable for Facebook(Facebook Team confirmed) */ +/* Add buttons on naviframe item header cancel/done + * @param data : App data + * @param parent : parent layout + * @param nf_it : naviframe item + * @return + */ int _gl_thumbs_edit_add_btns(void *data, Evas_Object * parent, Elm_Object_Item * nf_it) { @@ -240,6 +270,13 @@ int _gl_thumbs_edit_add_btns(void *data, Evas_Object * parent, return 0; } +/** + * Creates thumb edit view + * (all grid items displayed with checkbox, + * naviframe title has 2 button and title displays the select count + * @param data : App data + * @return + */ int _gl_thumbs_edit_create_view(void *data) { GL_CHECK_VAL(data, -1); @@ -281,6 +318,11 @@ int _gl_thumbs_edit_create_view(void *data) return 0; } +/** + * pop the thumbedit view + * @param data : App data + * @return + */ int _gl_thumbs_edit_pop_view(void *data) { GL_CHECK_VAL(data, -1); @@ -316,6 +358,11 @@ int _gl_thumbs_edit_pop_view(void *data) return 0; } +/** + * update the edit view language on system language changed + * @param data : App data + * @return + */ int _gl_thumbs_edit_update_lang(void *data) { GL_CHECK_VAL(data, -1); @@ -334,6 +381,12 @@ int _gl_thumbs_edit_update_lang(void *data) /*thumbnail view: more-share/delete-Download */ /* Delete in unavaliable for Facebook */ /* Download only for Video files in Cloud album */ +/** + * Enable/ disable cancel/done/more buttons in naviframe + * @param data : App data + * @param b_disable : flag to enable/disable done button + * @return + */ int _gl_thumbs_edit_disable_btns(void *data, bool b_disable) { GL_CHECK_VAL(data, -1); diff --git a/src/2dview/gl-thumbs-sel.c b/src/2dview/gl-thumbs-sel.c index 88b076a..46e4c8e 100644 --- a/src/2dview/gl-thumbs-sel.c +++ b/src/2dview/gl-thumbs-sel.c @@ -25,6 +25,12 @@ #include "gl-strings.h" #include "gl-notify.h" +/** + * Thumb edit view pop CB + * @param data : app data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_sel_popup_cb(void *data, Evas_Object * obj, void *ei) { @@ -50,6 +56,12 @@ static void __gl_thumbs_sel_popup_cb(void *data, Evas_Object * obj, GL_IF_DEL_OBJ(ad->popupinfo.popup); } +/** + * Done button CB in naviframe title bar + * @param data : app data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_sel_done_cb(void *data, Evas_Object * obj, void *ei) { @@ -73,6 +85,12 @@ static void __gl_thumbs_sel_done_cb(void *data, Evas_Object * obj, GL_STR_ID_COPY, __gl_thumbs_sel_popup_cb, data); } +/** + * cancel button CB on naviframe title bar + * @param data : app data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_sel_cancel_cb(void *data, Evas_Object * obj, void *ei) { @@ -84,7 +102,12 @@ static void __gl_thumbs_sel_cancel_cb(void *data, Evas_Object * obj, elm_naviframe_item_pop(ad->maininfo.naviframe); } -/* Free data after layout deleted */ +/* Free data after layout deleted + * @param data : App data + * @param e : event + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_sel_delete_layout_cb(void *data, Evas * e, Evas_Object * obj, void *ei) { @@ -116,7 +139,12 @@ static void __gl_thumbs_sel_delete_layout_cb(void *data, Evas * e, gl_dbg("Delete layout +++"); } -/* Select-all checkbox selected/deselected */ +/* Select-all checkbox selected/deselected + * select all CB when select all check box state changes + * @param data : app data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_sel_selall_cb(void *data, Evas_Object * obj, void *ei) { @@ -214,6 +242,7 @@ static void __gl_thumbs_sel_selall_cb(void *data, Evas_Object * obj, } else if (count > 1) { char *popup_str = g_strdup_printf(GL_STR_PDITEM_ALREADY_SELECTED_IN_OTHER_ALBUM, count); _gl_notify_create_notiinfo(popup_str); + g_free(popup_str); } int sel_cnt = eina_list_count(ad->selinfo.elist); int fav_sel_cnt = eina_list_count(ad->selinfo.fav_elist); @@ -240,6 +269,11 @@ static void __gl_thumbs_sel_selall_cb(void *data, Evas_Object * obj, total_sel_count, false); } +/** + * Add cluster data in media item data + * @param album : Album cluseter data + * @param medias_elist : media list containing media data + */ void _gl_thumb_sel_add_album_data(gl_cluster * album, Eina_List * medias_elist) { @@ -257,7 +291,10 @@ void _gl_thumb_sel_add_album_data(gl_cluster * album, } /** - * Album selected for adding tags to photo + * Creates thumb select view + * @param data : App data + * @param album_item : album cluster data + * @return */ int _gl_thumbs_sel_create_view(void *data, gl_cluster * album_item) { @@ -370,12 +407,14 @@ int _gl_thumbs_sel_create_view(void *data, gl_cluster * album_item) Edje_Message_Int *msg = (Edje_Message_Int *) malloc(sizeof(Edje_Message_Int) + sizeof(int)); - msg->val = ((w < h) ? (w - (w / 3)) : (w - (h / 3))); - gl_dbgE("msg value : %d", msg->val); - edje_object_message_send(elm_layout_edje_get - (ad->albuminfo.select_layout), - EDJE_MESSAGE_INT, 2, msg); - free(msg); + if (msg) { + msg->val = ((w < h) ? (w - (w / 3)) : (w - (h / 3))); + gl_dbgE("msg value : %d", msg->val); + edje_object_message_send(elm_layout_edje_get + (ad->albuminfo.select_layout), + EDJE_MESSAGE_INT, 2, msg); + free(msg); + } elm_object_signal_emit(ad->albuminfo.select_layout, "elm,selectall,state,visible,bg", "elm"); elm_object_signal_emit(ad->albuminfo.select_layout, @@ -406,6 +445,11 @@ int _gl_thumbs_sel_create_view(void *data, gl_cluster * album_item) return 0; } +/** + * Updates the language of thumb select view in case of system language changed + * @param data : App data + * @return + */ int _gl_thumbs_sel_update_lang(void *data) { GL_CHECK_VAL(data, -1); @@ -418,6 +462,12 @@ int _gl_thumbs_sel_update_lang(void *data) return 0; } +/** + * Enable/disable the naviframe title buttons + * @param data : App data + * @param b_disabled : falg to enable/disable buttons + * @return + */ int _gl_thumbs_sel_disable_btns(void *data, bool b_disabled) { GL_CHECK_VAL(data, -1); diff --git a/src/2dview/gl-thumbs.c b/src/2dview/gl-thumbs.c index 5f5ab23..9a02022 100644 --- a/src/2dview/gl-thumbs.c +++ b/src/2dview/gl-thumbs.c @@ -33,6 +33,11 @@ static void __gl_thumbs_check_changed(void *data, Evas_Object * obj, void *ei); + +/** + * Open files in image viewer + * @param data : Item data + */ void _gl_thumbs_open_file(void *data) { gl_dbg(""); @@ -53,6 +58,10 @@ void _gl_thumbs_open_file(void *data) gl_ext_load_iv_ug(ad, gitem, GL_UG_IV); } +/** + * Open file in image viewer select mode + * @param data : item data + */ void _gl_thumbs_open_file_select_mode(void *data) { gl_dbg(""); @@ -68,6 +77,12 @@ void _gl_thumbs_open_file_select_mode(void *data) gl_ext_load_iv_ug_select_mode(ad, gitem->item, GL_UG_IV); } +/** + * Update the check box and select file info + * @param data : item data + * @param it : object item + * @return + */ static int __gl_thumbs_change_check(void *data, Elm_Object_Item * it) { GL_CHECK_VAL(it, -1); @@ -83,6 +98,12 @@ static int __gl_thumbs_change_check(void *data, Elm_Object_Item * it) return 0; } +/** + * Update the check box and select file info + * @param data : item data + * @param obj : grid object + * @param ei + */ static void __gl_thumbs_sel_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -100,6 +121,12 @@ static void __gl_thumbs_sel_cb(void *data, Evas_Object * obj, void *ei) _gl_thumbs_open_file(data); } +/** + * + * @param data + * @param obj + * @param ei + */ static void __gl_thumbs_realized(void *data, Evas_Object * obj, void *ei) { gl_dbg("realized"); @@ -127,6 +154,12 @@ static void __gl_thumbs_realized(void *data, Evas_Object * obj, void *ei) } } +/** + * Send thumbnail generation request if thumbnail is not available + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_unrealized(void *data, Evas_Object * obj, void *ei) { gl_dbg("unrealized"); @@ -153,6 +186,12 @@ static void __gl_thumbs_unrealized(void *data, Evas_Object * obj, void *ei) } } +/** + * long press event + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_longpressed_cb(void *data, Evas_Object * obj, void *ei) { @@ -170,6 +209,12 @@ static void __gl_thumbs_longpressed_cb(void *data, Evas_Object * obj, } } +/** + * update the view on system language changed + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_lang_changed(void *data, Evas_Object * obj, void *ei) { @@ -189,6 +234,12 @@ static void __gl_thumbs_lang_changed(void *data, Evas_Object * obj, } } +/** + * Checks if item already selected + * @param sel_list : selected item list + * @param gitem : item data + * @return + */ bool _gl_check_item_already_selected(Eina_List *sel_list, gl_item *gitem) { GL_CHECK_FALSE(gitem); @@ -210,6 +261,13 @@ bool _gl_check_item_already_selected(Eina_List *sel_list, gl_item *gitem) } return false; } + +/** + * update the check state and select info + * @param data : item data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_check_changed(void *data, Evas_Object * obj, void *ei) { @@ -313,7 +371,12 @@ static void __gl_thumbs_check_changed(void *data, Evas_Object * obj, } -/* Only for local medias */ +/** + * CB function is called when thumbnail is created for media + * @param error : thumbnail server error type + * @param path : thumbnail path + * @param user_data : Thumb data + */ static void __gl_thumbs_create_thumb_cb(media_content_error_e error, const char *path, void *user_data) { @@ -346,7 +409,11 @@ static void __gl_thumbs_create_thumb_cb(media_content_error_e error, } } -/* Use file to create new thumb if possible */ +/** + * ends request to create thumbnail for media + * @param gitem : item data + * @return + */ int _gl_thumbs_create_thumb(gl_item * gitem) { GL_CHECK_VAL(gitem, -1); @@ -367,6 +434,12 @@ int _gl_thumbs_create_thumb(gl_item * gitem) return -1; } +/** + * open image in image viewer select mode + * @param data : item data + * @param obj : grid object + * @param event_info : event info + */ void open_image_in_select_mode(void *data, Evas_Object * obj, void *event_info) { @@ -374,6 +447,13 @@ void open_image_in_select_mode(void *data, Evas_Object * obj, _gl_thumbs_open_file_select_mode(data); } +/** + * sets the content for grid item + * @param data : Item data + * @param obj : grid object + * @param part : part name + * @return + */ static Evas_Object *__gl_thumbs_get_content(void *data, Evas_Object * obj, const char *part) { @@ -453,6 +533,13 @@ static Evas_Object *__gl_thumbs_get_content(void *data, Evas_Object * obj, return NULL; } +/** + * Set the text for grid item + * @param data : item data + * @param obj : grid object + * @param part : part name + * @return + */ static char *__gl_thumbs_get_text(void *data, Evas_Object * obj, const char *part) { @@ -482,6 +569,11 @@ static char *__gl_thumbs_get_text(void *data, Evas_Object * obj, return NULL; } +/** + * set the type of grid item + * @param data : App data + * @return + */ static int __gl_thumbs_set_type(void *data) { GL_CHECK_VAL(data, -1); @@ -510,6 +602,11 @@ static int __gl_thumbs_set_type(void *data) return 0; } +/** + * Set the item class type for grid item generation + * @param data : App data + * @return + */ static int __gl_thumbs_set_item_style(void *data) { GL_CHECK_VAL(data, -1); @@ -524,6 +621,12 @@ static int __gl_thumbs_set_item_style(void *data) return 0; } +/** + * Create the grid item in thumb view + * @param data : App data + * @param parent : parent layout + * @return + */ static bool __gl_thumbs_create_items(void *data, Evas_Object * parent) { GL_CHECK_FALSE(data); @@ -608,11 +711,13 @@ static bool __gl_thumbs_create_items(void *data, Evas_Object * parent) } } -/* -* Set new view to all/image_grid_view. -* -* b_noc, true: it's nocontents view, false: normal view. -*/ +/** + * Set new view to all/image_grid_view. + * @param data : App data + * @param view : grid object + * @param b_noc : true: it's nocontents view, false: normal view. + * @return + */ static int __gl_thumbs_set_view(void *data, Evas_Object * view, bool b_noc) { GL_CHECK_VAL(data, -1); @@ -626,6 +731,11 @@ static int __gl_thumbs_set_view(void *data, Evas_Object * view, bool b_noc) return 0; } +/** + * Add album data to media data + * @param album :album cluster data + * @param medias_elist : media list containing media data + */ void _gl_thumbs_add_album_data(gl_cluster * album, Eina_List * medias_elist) { @@ -641,15 +751,17 @@ void _gl_thumbs_add_album_data(gl_cluster * album, } } -/* -* When select album, show first (GL_FIRST_VIEW_END_POS+1) medias. -* Then use idler to get other medias from DB and appened -* them to gridview. -* In order to reduce transit time of first show of thumbnails view. -* Cause most of time is spent for getting records from DB, -* so we get first (GL_FIRST_VIEW_END_POS+1) items and show thumbnails view, -* it will accelerate view show. -*/ +/** + * When select album, show first (GL_FIRST_VIEW_END_POS+1) medias. + * Then use idler to get other medias from DB and appened + * them to gridview. + * In order to reduce transit time of first show of thumbnails view. + * Cause most of time is spent for getting records from DB, + * so we get first (GL_FIRST_VIEW_END_POS+1) items and show thumbnails view, + * it will accelerate view show. + * @param data + * @return : App data + */ static int __gl_thumbs_idler_append_items(void *data) { GL_CHECK_VAL(data, -1); @@ -755,6 +867,11 @@ static int __gl_thumbs_idler_append_items(void *data) } } +/** + * Reset the naviframe buttons + * @param data : App data + * @return + */ static int __gl_thumbs_mode_reset_btns(void *data) { GL_CHECK_VAL(data, -1); @@ -769,6 +886,12 @@ static int __gl_thumbs_mode_reset_btns(void *data) return 0; } +/** + * Append grid items after transaction finished + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_trans_finished_cb(void *data, Evas_Object * obj, void *ei) { @@ -794,6 +917,12 @@ static void __gl_thumbs_trans_finished_cb(void *data, Evas_Object * obj, } } +/** + * Pop thumb view + * @param data : App data + * @param it : grid item object + * @return + */ static Eina_Bool __gl_thumbs_pop_cb(void *data, Elm_Object_Item * it) { GL_CHECK_FALSE(data); @@ -826,6 +955,12 @@ static Eina_Bool __gl_thumbs_pop_cb(void *data, Elm_Object_Item * it) return EINA_TRUE; } +/** + * Create thumb edit view + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_edit_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -863,6 +998,12 @@ static void __gl_thumbs_edit_cb(void *data, Evas_Object * obj, void *ei) } } +/** + * Perform copy operation + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_copy_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -892,6 +1033,12 @@ static void __gl_thumbs_copy_cb(void *data, Evas_Object * obj, void *ei) } } +/** + * Perform move operation + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_move_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -921,6 +1068,12 @@ static void __gl_thumbs_move_cb(void *data, Evas_Object * obj, void *ei) } } +/** + * Pop the thumb view on back key + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_soft_back_cb(void *data, Evas_Object * obj, void *ei) { @@ -930,15 +1083,13 @@ static void __gl_thumbs_soft_back_cb(void *data, Evas_Object * obj, elm_naviframe_item_pop(ad->maininfo.naviframe); } -/* - * Local : New album/Edit/View/Slideshow/Show hidden items/Tag buddy - * Nearby : Edit/Refresh/Slideshow - * PTP: Edit/Slideshow - * Places: Edit/Footstep - * Tags: Eidt/View/Slideshow - * People: Edit/Slideshow/Tag buddy - * Easymode: New album/Edit/Slideshow - */ + +/** + * Add context popup on more button clicked + * @param data : App data + * @param parent + * @return + */ static int __gl_thumbs_ctxpopup_append(void *data, Evas_Object * parent) { GL_CHECK_VAL(parent, -1); @@ -965,6 +1116,12 @@ static int __gl_thumbs_ctxpopup_append(void *data, Evas_Object * parent) return 0; } +/** + * More button CB in thumb view (Album detail view) + * @param data : App data + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_more_btn_cb(void *data, Evas_Object * obj, void *ei) { @@ -983,7 +1140,11 @@ static void __gl_thumbs_more_btn_cb(void *data, Evas_Object * obj, /** * Use naviframe api to push thumbnails view to stack. - * @param obj is the content to be pushed. + * Add button on naviframe in thumb view + * @param data : App data + * @param parent : parent layout + * @param nf_it : naviframe item + * @return */ static int __gl_thumbs_add_btns(void *data, Evas_Object * parent, Elm_Object_Item * nf_it) @@ -1011,7 +1172,11 @@ static int __gl_thumbs_add_btns(void *data, Evas_Object * parent, return 0; } -/* Clear data for thumbs view */ +/* Clear data for thumbs view + * + * @param data : App data + * @return + */ static int __gl_thumbs_clear_data(void *data) { GL_CHECK_VAL(data, -1); @@ -1044,7 +1209,13 @@ static int __gl_thumbs_clear_data(void *data) return 0; } -/* Free data after layout deleted */ +/* Free data after layout deleted + * + * @param data :App data + * @param e : event + * @param obj : grid object + * @param ei : event info + */ static void __gl_thumbs_delete_layout_cb(void *data, Evas * e, Evas_Object * obj, void *ei) { @@ -1060,6 +1231,15 @@ static void __gl_thumbs_delete_layout_cb(void *data, Evas * e, gl_dbg("Delete layout +++"); } +/** + * Push thumb view in naviframe + * @param data : App data + * @param parent : parent layout + * @param obj : grid object + * @param mode : naviframe mode + * @param title : naviframe title + * @return + */ static int __gl_thumbs_push_view(void *data, Evas_Object * parent, Evas_Object * obj, gl_navi_mode mode, char *title) @@ -1093,7 +1273,12 @@ static int __gl_thumbs_push_view(void *data, Evas_Object * parent, return 0; } -/* Free data after layout deleted */ +/* Free data after layout deleted + * @param data : App data + * @param e : event + * @param obj : grid obj + * @param ei : event info + */ static void __gl_thumbs_del_view_cb(void *data, Evas * e, Evas_Object * obj, void *ei) { @@ -1105,6 +1290,11 @@ static void __gl_thumbs_del_view_cb(void *data, Evas * e, } } +/** + * Added idler + * @param data : App data + * @return + */ Eina_Bool _gl_thumbs_append_items(void *data) { GL_CHECK_CANCEL(data); @@ -1120,6 +1310,11 @@ Eina_Bool _gl_thumbs_append_items(void *data) return ECORE_CALLBACK_CANCEL; } +/** + * Adding new item style to create item in thumb view + * @param parent : parent layout + * @return + */ Elm_Gengrid_Item_Class *_gl_thumbs_new_item_style(Evas_Object * parent) { GL_CHECK_NULL(parent); @@ -1139,6 +1334,15 @@ Elm_Gengrid_Item_Class *_gl_thumbs_new_item_style(Evas_Object * parent) return gic; } +/** + * Add content to grid item in thumb view + * @param data : App data + * @param parent : parent layout + * @param gitem : item data + * @param w : item width + * @param h : item height + * @return + */ Evas_Object *_gl_thumbs_get_content(void *data, Evas_Object * parent, gl_item * gitem, int w, int h) { @@ -1173,6 +1377,11 @@ Evas_Object *_gl_thumbs_get_content(void *data, Evas_Object * parent, return layout; } +/** + * Add naviframe button in thumb view + * @param data App data + * @return + */ int _gl_thumbs_add_btns(void *data) { GL_CHECK_VAL(data, -1); @@ -1181,6 +1390,13 @@ int _gl_thumbs_add_btns(void *data) return 0; } +/** + * Create teh grid and add CBs + * @param data : App data + * @param parent : Parent layout + * @param mode : Type of media ie images/videos/both + * @return + */ Evas_Object *_gl_thumbs_add_grid(void *data, Evas_Object * parent, gl_thumb_mode mode) { @@ -1227,6 +1443,11 @@ Evas_Object *_gl_thumbs_add_grid(void *data, Evas_Object * parent, return grid; } +/** + * Displays thumb edit view + * @param data : App data + * @return + */ int _gl_thumbs_show_edit_view(void *data) { GL_CHECK_VAL(data, -1); @@ -1256,6 +1477,11 @@ int _gl_thumbs_show_edit_view(void *data) } } +/** + * Show thumb view items + * @param data : App data + * @return + */ Eina_Bool _gl_thumbs_show_items(void *data) { GL_CHECK_FALSE(data); @@ -1309,6 +1535,12 @@ Eina_Bool _gl_thumbs_show_items(void *data) return res; } +/** + * Set the thumb list + * @param data : App data + * @param elist :item data list + * @return + */ int _gl_thumbs_set_list(void *data, Eina_List * elist) { GL_CHECK_VAL(data, -1); @@ -1317,6 +1549,12 @@ int _gl_thumbs_set_list(void *data, Eina_List * elist) return 0; } +/** + * clear old and set new item data to list + * @param data : App data + * @param elist : item data list + * @return + */ int _gl_thumbs_clear_and_set_list(void *data, Eina_List * elist) { GL_CHECK_VAL(data, -1); @@ -1335,6 +1573,12 @@ int _gl_thumbs_clear_and_set_list(void *data, Eina_List * elist) return 0; } +/** + * get the item data list + * @param data : App data + * @param p_elist : Address of list + * @return + */ int _gl_thumbs_get_list(void *data, Eina_List ** p_elist) { GL_CHECK_VAL(p_elist, -1); @@ -1344,6 +1588,15 @@ int _gl_thumbs_get_list(void *data, Eina_List ** p_elist) return 0; } +/** + * Update edit split view + * @param data : App data + * @param nf_mode : naviframe mode + * @param title : naviframe item title + * @param b_idler : idler + * @param func : Popup CB + * @return + */ int _gl_thumbs_update_edit_split_view(void *data, int nf_mode, char *title, bool b_idler, Elm_Naviframe_Item_Pop_Cb func) @@ -1400,6 +1653,15 @@ int _gl_thumbs_update_edit_split_view(void *data, int nf_mode, char *title, return 0; } +/** + * Update split view + * @param data : App data + * @param nf_mode : naviframe mode + * @param title : naviframe item title + * @param b_idler : idler + * @param func : Popup CB + * @return + */ int _gl_thumbs_update_split_view(void *data, int nf_mode, char *title, bool b_idler, Elm_Naviframe_Item_Pop_Cb func) @@ -1429,6 +1691,11 @@ int _gl_thumbs_update_split_view(void *data, int nf_mode, char *title, return 0; } +/** + * Create gengrid + * @param data : App data + * @return + */ Evas_Object *_create_gengrid(void *data) { GL_CHECK_VAL(data, NULL); @@ -1446,6 +1713,12 @@ Evas_Object *_create_gengrid(void *data) return layout_inner; } +/** + * Create Split view + * @param data : App data + * @param layout_inner : split view layout + * @return + */ int _create_split_album_view(void *data, Evas_Object * layout_inner) { GL_CHECK_VAL(data, -1); @@ -1466,6 +1739,15 @@ int _create_split_album_view(void *data, Evas_Object * layout_inner) return 0; } +/** + * Update edit thumb view + * @param data : App data + * @param nf_mode : naviframe mode + * @param title : naviframe item title + * @param b_idler : idler + * @param func : Popup CB + * @return + */ int _gl_thumbs_create_view(void *data, int nf_mode, char *title, bool b_idler, Elm_Naviframe_Item_Pop_Cb func) { @@ -1542,14 +1824,16 @@ int _gl_thumbs_create_view(void *data, int nf_mode, char *title, } /** -* @param: b_update_albums_list -* True: Update albums list and medias list, then update normal view. -* False: Get new medias for current view from DB -* then update view to synchronize data with Myfile. -* Use case: -* 1, Update gridview/listview created from Map; -* 2, Update edit gridview/listview. -*/ + * @param: b_update_albums_list + * True: Update albums list and medias list, then update normal view. + * False: Get new medias for current view from DB + * then update view to synchronize data with Myfile. + * Use case: + * 1, Update gridview/listview created from Map; + * 2, Update edit gridview/listview. + * @param data : App data + * @return + */ int _gl_thumbs_update_items(void *data) { GL_CHECK_VAL(data, -1); @@ -1623,6 +1907,11 @@ int _gl_thumbs_update_items(void *data) return 0; } +/** + * Update thumb view + * @param data : App data + * @return + */ int _gl_thumbs_update_view(void *data) { GL_CHECK_VAL(data, -1); @@ -1657,6 +1946,12 @@ int _gl_thumbs_update_view(void *data) return 0; } +/** + * Destroy thumb view + * @param data : App data + * @param b_pop + * @return + */ int _gl_thumbs_destroy_view(void *data, bool b_pop) { GL_CHECK_VAL(data, -1); @@ -1681,10 +1976,11 @@ int _gl_thumbs_destroy_view(void *data, bool b_pop) } /** -* Get all/image_grid_view. -* -* True returned if it's normal view, if it's nocontents view return false. -*/ + * Get all/image_grid_view. + * @param data : App data + * @param view : thumb view + * @return : True if it's normal view, false if it's nocontents view. + */ bool _gl_thumbs_get_view(void *data, Evas_Object ** view) { GL_CHECK_FALSE(data); @@ -1712,6 +2008,8 @@ bool _gl_thumbs_get_view(void *data, Evas_Object ** view) /** * Show Nocontents in All/Images/Videos segment. + * @param data : App data + * @return */ bool _gl_thumbs_show_nocontents(void *data) { @@ -1734,7 +2032,11 @@ bool _gl_thumbs_show_nocontents(void *data) return true; } -/* Assign new value to all/image_grid_nocontents */ +/* Assign new value to all/image_grid_nocontents + * @param data : App data + * @param noc : no content layout + * @return + */ int _gl_thumbs_set_nocontents(void *data, Evas_Object * noc) { GL_CHECK_VAL(data, -1); @@ -1743,6 +2045,12 @@ int _gl_thumbs_set_nocontents(void *data, Evas_Object * noc) return 0; } +/** + * Set the size of grid item in thumb view + * @param data : App data + * @param gridview : grid view + * @return + */ int _gl_thumbs_set_size(void *data, Evas_Object * gridview) { GL_CHECK_VAL(data, -1); @@ -1779,6 +2087,11 @@ int _gl_thumbs_set_size(void *data, Evas_Object * gridview) return 0; } +/** + * Remove CBs from grid view object + * @param grid : grid object + * @return + */ int _gl_thumbs_clear_cbs(Evas_Object * grid) { GL_CHECK_VAL(grid, -1); @@ -1790,6 +2103,11 @@ int _gl_thumbs_clear_cbs(Evas_Object * grid) return 0; } +/** + * Delete thumb view + * @param data :App data + * @return + */ int _gl_thumbs_delete_view(void *data) { GL_CHECK_VAL(data, -1); @@ -1804,7 +2122,11 @@ int _gl_thumbs_delete_view(void *data) return 0; } -/* Update griditem size */ +/* Update griditem size + * @param data : App data + * @param view : Thumb view object + * @return + */ int _gl_thumbs_update_size(void *data, Evas_Object * view) { GL_CHECK_VAL(data, -1); @@ -1840,6 +2162,9 @@ int _gl_thumbs_update_size(void *data, Evas_Object * view) /** * Check to append a item to gengrid or not, * if it's a normal item or it's the first burstshot item then append it to view + * @param gitem : item data + * @param burstshot_id : burst shot id + * @return */ bool _gl_thumbs_is_append(gl_item * gitem, char **burstshot_id) { @@ -1865,6 +2190,11 @@ bool _gl_thumbs_is_append(gl_item * gitem, char **burstshot_id) return b_to_append; } +/** + * Check if media count is zero + * @param data : App data + * @return + */ bool _gl_thumbs_check_zero(void *data) { GL_CHECK_VAL(data, -1); @@ -1874,7 +2204,10 @@ bool _gl_thumbs_check_zero(void *data) return (eina_list_count(medias_elist) <= 0); } -/* Update the label text, recreate label to disable effect in edit view */ +/* Update the label text, recreate label to disable effect in edit view ram nf_it + * @param title :naviframe item title + * @return + */ int _gl_thumbs_update_label(Elm_Object_Item * nf_it, char *title) { GL_CHECK_VAL(nf_it, -1); @@ -1885,7 +2218,12 @@ int _gl_thumbs_update_label(Elm_Object_Item * nf_it, char *title) return 0; } -/* Update the label text */ +/* Update the label text + * @param nf_it : naviframe item + * @param sel_cnt : sel count + * @param b_lang : language changed CB flag + * @return + */ int _gl_thumbs_update_label_text(Elm_Object_Item * nf_it, int sel_cnt, bool b_lang) { @@ -1918,6 +2256,11 @@ int _gl_thumbs_update_label_text(Elm_Object_Item * nf_it, int sel_cnt, return 0; } +/** + * update hte language of view in case of system language changed + * @param data : App data + * @return + */ int _gl_thumbs_update_lang(void *data) { GL_CHECK_VAL(data, -1); @@ -1931,7 +2274,10 @@ int _gl_thumbs_update_lang(void *data) return 0; } -/* Check buttons state when coming back from albums-select view */ +/* Check buttons state when coming back from albums-select view + * @param data : App data + * @return + */ int _gl_thumbs_check_btns(void *data) { GL_CHECK_VAL(data, -1); @@ -1939,6 +2285,12 @@ int _gl_thumbs_check_btns(void *data) return 0; } +/** + * Set the thumbedit mode + * @param data : App data + * @param mode : Display mode + * @return + */ int _gl_thumbs_set_edit_mode(void *data, int mode) { GL_CHECK_VAL(data, -1); @@ -1947,6 +2299,11 @@ int _gl_thumbs_set_edit_mode(void *data, int mode) return 0; } +/** + * get the type of edit mode + * @param data : App data + * @return + */ int _gl_thumbs_get_edit_mode(void *data) { GL_CHECK_FALSE(data); @@ -1954,6 +2311,11 @@ int _gl_thumbs_get_edit_mode(void *data) return ad->gridinfo.edit_mode; } +/** + * Rotates the thumb view in case of device rotation CB + * @param data : App data + * @return + */ int _gl_thumbs_rotate_view(void *data) { GL_CHECK_VAL(data, -1); @@ -2008,6 +2370,12 @@ int _gl_thumbs_rotate_view(void *data) return 0; } +/** + * Switch between split view and normal detail view + * @param data : App data + * @param prev_x : previous x + * @param current_x : current x + */ void _gl_thumbs_change_view(void *data, int prev_x, int current_x) { GL_CHECK(data); @@ -2070,6 +2438,10 @@ void _gl_thumbs_change_view(void *data, int prev_x, int current_x) } } +/** + * Update the count display badge on split album item + * @param data : App data + */ void _gl_thumb_update_split_view_badge(void *data) { GL_CHECK(data); @@ -2094,6 +2466,10 @@ void _gl_thumb_update_split_view_badge(void *data) } } +/** + * Update the split view + * @param data : App data + */ void _gl_thumb_update_split_view(void *data) { GL_CHECK(data); diff --git a/src/2dview/gl-timeline.c b/src/2dview/gl-timeline.c index ab8d64b..9d11d07 100644 --- a/src/2dview/gl-timeline.c +++ b/src/2dview/gl-timeline.c @@ -134,6 +134,12 @@ static Evas_Object *__gl_timeline_create_list_view(gl_timeline_s * void _gl_timeline_notify_date_check(gl_timeline_s * it_d, Evas_Object * obj, gl_media_s * item); +/** + * Checks if the media item is selected + * @param timeline_d : Timeline data + * @param uuid : media id + * @return + */ static bool __gl_timeline_is_checked(gl_timeline_s * timeline_d, char *uuid) { @@ -151,6 +157,11 @@ static bool __gl_timeline_is_checked(gl_timeline_s * timeline_d, return false; } +/** + * Clears the selected media list in time view + * @param timeline_d : Timeline data + * @return + */ static bool __gl_timeline_clear_sel_list(gl_timeline_s * timeline_d) { GL_CHECK_FALSE(timeline_d); @@ -166,6 +177,11 @@ static bool __gl_timeline_clear_sel_list(gl_timeline_s * timeline_d) return false; } +/** + * Gets selected media count in time view + * @param timeline_d : Timeline data + * @return + */ static int __gl_timeline_get_sel_cnt(gl_timeline_s * timeline_d) { GL_CHECK_VAL(timeline_d, 0); @@ -173,6 +189,12 @@ static int __gl_timeline_get_sel_cnt(gl_timeline_s * timeline_d) return eina_list_count(timeline_d->sel_d->sel_list); } +/** + * Append the media id to select media list in time view + * @param timeline_d : Timeline data + * @param uuid : media id + * @return + */ static bool __gl_timeline_sel_append_item(gl_timeline_s * timeline_d, char *uuid) { @@ -195,6 +217,13 @@ static bool __gl_timeline_sel_append_item(gl_timeline_s * timeline_d, return true; } +/** + * Update the count variable on flag value + * @param timeline_d : Timeline data + * @param item : media item data + * @param b_append : Add/remove media count + * @return + */ static bool __gl_timeline_check_special_file(gl_timeline_s * timeline_d, gl_media_s * item, bool b_append) @@ -219,6 +248,14 @@ static bool __gl_timeline_check_special_file(gl_timeline_s * timeline_d, return true; } +/** + * Updates the select all check box based on select media count + * Enable/disable the done button based on select media count + * @param timeline_d : Timeline data + * @param all_cnt : all media count + * @param sel_cnt : select media count + * @return + */ int __gl_timeline_check_btns_state(gl_timeline_s * timeline_d, int all_cnt, int sel_cnt) { @@ -259,6 +296,12 @@ int __gl_timeline_check_btns_state(gl_timeline_s * timeline_d, int all_cnt, return 0; } +/** + * Remove the media from selected media list + * @param timeline_d : Timeline data + * @param uuid : media id + * @return + */ static bool __gl_timeline_sel_remove_item(gl_timeline_s * timeline_d, char *uuid) { @@ -280,6 +323,13 @@ static bool __gl_timeline_sel_remove_item(gl_timeline_s * timeline_d, return false; } +/** + * preforms the check/uncheck operation + * @param it_d : Timeline data + * @param obj : check box object + * @param item : item data + * @return + */ static int __gl_timeline_thumb_check_op(gl_timeline_s * it_d, Evas_Object * obj, gl_media_s * item) @@ -308,6 +358,12 @@ static int __gl_timeline_thumb_check_op(gl_timeline_s * it_d, return 0; } +/** + * Check changed CB + * @param data : media item data + * @param obj : check box object + * @param ei : event info + */ static void __gl_timeline_thumbs_check_changed(void *data, Evas_Object * obj, void *ei) { @@ -320,6 +376,12 @@ static void __gl_timeline_thumbs_check_changed(void *data, __gl_timeline_thumb_check_op(td, obj, gitem); } +/** + * Checks if media is of yesterday + * @param req_tm : media time + * @param now_tm : current time + * @return + */ static bool __gl_timeline_is_yesterday(struct tm *req_tm, struct tm *now_tm) { @@ -340,6 +402,12 @@ static bool __gl_timeline_is_yesterday(struct tm *req_tm, } } +/** + * checks if media is of today + * @param req_tm : media time + * @param now_tm : current time + * @return + */ static bool __gl_timeline_is_today(struct tm *req_tm, struct tm *now_tm) { if (req_tm->tm_year == now_tm->tm_year && @@ -351,6 +419,14 @@ static bool __gl_timeline_is_today(struct tm *req_tm, struct tm *now_tm) } /* change 'time_t' to 'struct tm' */ +/** + * + * @param mtime1 + * @param mtime2 + * @param t1 + * @param t2 + * @return + */ static int __gl_timeline_get_tm(time_t mtime1, time_t mtime2, struct tm *t1, struct tm *t2) { @@ -365,6 +441,14 @@ static int __gl_timeline_get_tm(time_t mtime1, time_t mtime2, } /* Caller need to free strings returned */ +/** + * gets the time to display in time view + * @param t1 : media time + * @param t2 : current time + * @param str1 : time line string + * @param str2 : time line string + * @return + */ static int __gl_timeline_get_mtime_str(struct tm t1, struct tm t2, char **str1, char **str2) { @@ -431,6 +515,13 @@ static int __gl_timeline_get_mtime_str(struct tm t1, struct tm t2, return 0; } +/** + * + * @param data : Timeline data + * @param e : event + * @param obj : time view layout + * @param ei : event info + */ static void __gl_timeline_resize_layout_cb(void *data, Evas * e, Evas_Object * obj, void *ei) { @@ -446,6 +537,11 @@ static void __gl_timeline_resize_layout_cb(void *data, Evas * e, timeline_d->h = h; } +/** + * Displays no content view + * @param timeline_d : Timeline data + * @return + */ static int __gl_timelne_show_nocontents(gl_timeline_s * timeline_d) { GL_CHECK_VAL(timeline_d, -1); @@ -466,6 +562,11 @@ static int __gl_timelne_show_nocontents(gl_timeline_s * timeline_d) return 0; } +/** + * delete no content view + * @param timeline_d : Timeline data + * @return + */ static int __gl_timelne_del_nocontents(gl_timeline_s * timeline_d) { GL_CHECK_VAL(timeline_d, -1); @@ -480,6 +581,12 @@ static int __gl_timelne_del_nocontents(gl_timeline_s * timeline_d) return 0; } +/** + * gets the index of item to be sent to image-viewer while launching + * @param data : App data + * @param path : media path + * @return + */ int _gl_timeline_get_item_index(void *data, char *path) { GL_CHECK_VAL(data, 1); @@ -501,6 +608,11 @@ int _gl_timeline_get_item_index(void *data, char *path) return 1; } +/** + * updates the grid item and check state + * @param obj : grid object + * @param state : check state + */ void _gl_timeline_update_item_grid(Evas_Object * obj, bool state) { Elm_Object_Item *it_f = NULL; @@ -529,6 +641,11 @@ void _gl_timeline_update_item_grid(Evas_Object * obj, bool state) } } +/** + * Update the grid items on a particular date + * @param data : Timeline data + * @param date_item : date item data + */ void _gl_timeline_update_items_data_on_particular_date(void *data, _gl_date_item_data * date_item) @@ -571,6 +688,11 @@ void _gl_timeline_update_items_data_on_particular_date(void *data, g_free(text); } +/** + * update the check state for media item data + * @param obj : grid object + * @param state : check state + */ void _gl_timeline_update_date_item_data(Evas_Object * obj, bool state) { GL_CHECK(obj); @@ -589,6 +711,13 @@ void _gl_timeline_update_date_item_data(Evas_Object * obj, bool state) } } +/** + * Update grid items on particular date + * @param data : Timeline data + * @param obj : grid object + * @param it : grid item object + * @param state : check state + */ void _gl_timeline_update_items_on_particular_date(void *data, Evas_Object * obj, Elm_Object_Item * it, @@ -612,6 +741,12 @@ void _gl_timeline_update_items_on_particular_date(void *data, } } +/** + * Date lavel check select CB + * @param data : Timeline data + * @param obj : grid object + * @param ei : event info + */ static void __gl_timeline_date_check_sel_cb(void *data, Evas_Object * obj, void *ei) { @@ -646,6 +781,13 @@ static void __gl_timeline_date_check_sel_cb(void *data, Evas_Object * obj, } } +/** + * delete the date item data + * @param data : Parent object + * @param e : event + * @param obj : grid object + * @param event_info + */ void __gl_del_date_item(void *data, Evas * e, Evas_Object * obj, void *event_info) { @@ -668,6 +810,13 @@ void __gl_del_date_item(void *data, Evas * e, Evas_Object * obj, } } +/** + * gets the state of date check box + * @param data : Timeline data + * @param date_item : date item data + * @param number_of_items_on_particular_date : media count on same date + * @return + */ bool _gl_get_date_check_state(void *data, _gl_date_item_data * date_item, int number_of_items_on_particular_date) { @@ -691,6 +840,12 @@ bool _gl_get_date_check_state(void *data, _gl_date_item_data * date_item, return flag; } +/** + * Update the check box state on a paricular date + * @param data : Timeline data + * @param date_item : date item data + * @param it_n : grid item + */ void _gl_timeline_update_date_check_on_particular_date(void *data, _gl_date_item_data * date_item, @@ -733,9 +888,16 @@ void _gl_timeline_update_date_check_on_particular_date(void *data, g_free(text); } +/** + * Notify date check box for update + * @param it_d : Timeline data + * @param obj : grid object + * @param item : media item data + */ void _gl_timeline_notify_date_check(gl_timeline_s * it_d, Evas_Object * obj, gl_media_s * item) { + GL_CHECK(obj); time_t mtime1 = 0; time_t mtime2 = 0; struct tm t1; @@ -752,7 +914,6 @@ void _gl_timeline_notify_date_check(gl_timeline_s * it_d, char *text2 = NULL; __gl_timeline_get_tm(mtime1, mtime2, &t1, &t2); __gl_timeline_get_mtime_str(t1, ct, &text1, &text2); - GL_CHECK(obj); Elm_Object_Item *it_n = NULL; _gl_date_item_data *date_item = NULL; @@ -791,6 +952,12 @@ void _gl_timeline_notify_date_check(gl_timeline_s * it_d, } +/** + * Grid item sel CB + * @param data : Timeline data + * @param obj : grid object + * @param ei : event info + */ static void __gl_timeline_thumbs_sel_cb(void *data, Evas_Object * obj, void *ei) { @@ -826,6 +993,14 @@ static void __gl_timeline_thumbs_sel_cb(void *data, Evas_Object * obj, _gl_ui_restore_scroller_pos(gitem->view); } +/** + * Create the contents for grid item + * @param data : media data + * @param parent : parent layout + * @param w : item width + * @param h : item height + * @return + */ Evas_Object *_gl_timeline_thumbs_get_content(void *data, Evas_Object * parent, int w, int h) @@ -858,6 +1033,12 @@ Evas_Object *_gl_timeline_thumbs_get_content(void *data, return layout; } +/** + * thumbnail generation request CB + * @param error : thumbnail server error code + * @param path : thumbnail path + * @param user_data : media data + */ static void __gl_timeline_thumbs_create_thumb_cb(media_content_error_e error, const char *path, void *user_data) @@ -878,6 +1059,11 @@ static void __gl_timeline_thumbs_create_thumb_cb(media_content_error_e } /* Use file to create new thumb if possible */ +/** + * send thumbnail creation request for media + * @param gitem : media item data + * @return + */ int _gl_timeline_thumbs_create_thumb(gl_media_s * gitem) { GL_CHECK_VAL(gitem, -1); @@ -891,6 +1077,12 @@ int _gl_timeline_thumbs_create_thumb(gl_media_s * gitem) return -1; } +/** + * Grid item realisation object + * @param data : timeline data + * @param obj : grid object + * @param ei : event info + */ static void __gl_timeline_thumbs_realized(void *data, Evas_Object * obj, void *ei) { @@ -914,6 +1106,12 @@ static void __gl_timeline_thumbs_realized(void *data, Evas_Object * obj, } } +/** + * Grid item unrealisation object + * @param data : timeline data + * @param obj : grid object + * @param ei : event info + */ static void __gl_timeline_thumbs_unrealized(void *data, Evas_Object * obj, void *ei) { @@ -934,6 +1132,10 @@ static void __gl_timeline_thumbs_unrealized(void *data, Evas_Object * obj, } } +/** + * Open media in image-viewer in select mode + * @param data : media item data + */ void _gl_timeline_open_file_select_mode(void *data) { gl_media_s *gitem = (gl_media_s *) data; @@ -947,6 +1149,12 @@ void _gl_timeline_open_file_select_mode(void *data) GL_SORT_BY_DATE_ASC); } +/** + * Open media in image-viewer select mode + * @param data : media item data + * @param obj : arrow button obj + * @param event_info : event info + */ void _gl_timeline_open_image_in_select_mode(void *data, Evas_Object * obj, void *event_info) { @@ -954,6 +1162,13 @@ void _gl_timeline_open_image_in_select_mode(void *data, Evas_Object * obj, _gl_timeline_open_file_select_mode(data); } +/** + * set the content of grid item + * @param data : media item data + * @param obj : grid object + * @param part : item part name + * @return + */ static Evas_Object *__gl_timeline_thumbs_get_content(void *data, Evas_Object * obj, const char *part) @@ -1038,6 +1253,14 @@ static Evas_Object *__gl_timeline_thumbs_get_content(void *data, return NULL; } +/** + * Set the size of grid item + * @param data : App data + * @param view : grid object + * @param size_w : item width + * @param size_h : item height + * @return + */ int _gl_timeline_thumb_set_size(void *data, Evas_Object * view, int *size_w, int *size_h) { @@ -1107,6 +1330,11 @@ int _gl_timeline_thumb_set_size(void *data, Evas_Object * view, return 0; } +/** + * create a grid object and set the property of object + * @param parent : parent layout + * @return + */ Evas_Object *_gl_grid_add(Evas_Object * parent) { GL_CHECK_NULL(parent); @@ -1126,6 +1354,10 @@ Evas_Object *_gl_grid_add(Evas_Object * parent) return grid; } +/** + * free media item data + * @param timeline_d : Time view data + */ void _gl_time_finialize_media_data(gl_timeline_s * timeline_d) { GL_CHECK(timeline_d); @@ -1141,6 +1373,11 @@ void _gl_time_finialize_media_data(gl_timeline_s * timeline_d) } } +/** + * Update the check state in media item data + * @param timeline_d : Time view data + * @param list : selected media data list + */ void _gl_time_update_selected_media(gl_timeline_s * timeline_d, Eina_List * list) { @@ -1161,6 +1398,12 @@ void _gl_time_update_selected_media(gl_timeline_s * timeline_d, } } +/** + * Append the grid item to the grid object + * @param pGengrid : grid object + * @param nGenItemIndex : list item index + * @param timeline_d : Time view data + */ static void _gl_time_view_append_gengrid_items(Evas_Object * pGengrid, int nGenItemIndex, @@ -1214,6 +1457,13 @@ static void _gl_time_view_append_gengrid_items(Evas_Object * g_free(text); } +/** + * set the thumb icon to grid item + * @param pUserData : genlist item index + * @param pObject : grid object + * @param pPart : part name + * @return + */ static Evas_Object *__gl_get_icon_of_grid_cb(const void *pUserData, Evas_Object * @@ -1246,6 +1496,13 @@ static Evas_Object *__gl_get_icon_of_grid_cb(const void return pGengrid; } +/** + * set the date text of media item group + * @param data : date item data + * @param obj : grinlist object + * @param part : part name + * @return + */ static char *__gl_time_date_get_text(void *data, Evas_Object * obj, const char *part) { @@ -1255,6 +1512,13 @@ static char *__gl_time_date_get_text(void *data, Evas_Object * obj, return strdup(date_item->text); } +/** + * Set the date list item check box + * @param pUserData : date item data + * @param pObject : genlist object + * @param pPart : part name + * @return + */ static Evas_Object *__gl_get_date_check(const void *pUserData, Evas_Object * pObject, const char *pPart) @@ -1284,6 +1548,14 @@ static Evas_Object *__gl_get_date_check(const void return NULL; } +/** + * get the count of media items on same date + * @param item : media item data + * @param list : media item data list + * @param text : item date label + * @param start_index : start item index + * @return + */ int _get_count_of_items_on_same_date(gl_media_s * item, Eina_List * list, char **text, int start_index) { @@ -1311,7 +1583,23 @@ int _get_count_of_items_on_same_date(gl_media_s * item, Eina_List * list, if (text1) { text3 = g_strdup_printf("%s", text1); } + if (text1) { + g_free(text1); + text1 = NULL; + } + if (text2) { + g_free(text2); + text2 = NULL; + } for (i = start_index; i < item_cnt; i++) { + if (text1) { + g_free(text1); + text1 = NULL; + } + if (text2) { + g_free(text2); + text2 = NULL; + } item = eina_list_nth(list, i); if (!item) { if (text3) { @@ -1339,9 +1627,20 @@ int _get_count_of_items_on_same_date(gl_media_s * item, Eina_List * list, if (text3) { g_free(text3); } + if (text1) { + g_free(text1); + } + if (text2) { + g_free(text2); + } return count; } +/** + * get the number of items to be shown in a row + * @param data : App data + * @return + */ int _gl_time_get_number_of_items_per_row(void *data) { GL_CHECK_VAL(data, -1); @@ -1373,6 +1672,11 @@ int _gl_time_get_number_of_items_per_row(void *data) return items_per_row; } +/** + * Get the genlist item style based on number of item in a row + * @param data : App style + * @return + */ char *_gl_time_get_genlist_style(void *data) { GL_CHECK_VAL(data, NULL); @@ -1417,6 +1721,13 @@ char *_gl_time_get_genlist_style(void *data) return style; } +/** + * create time view list and grid objects + * @param timeline_d : Time view data + * @param genlist : genlist object + * @param update : update flag to decide the update of media item data + * @return + */ int _gl_timeline_create_grid_view(gl_timeline_s * timeline_d, Evas_Object * genlist, bool update) { @@ -1563,6 +1874,12 @@ int _gl_timeline_create_grid_view(gl_timeline_s * timeline_d, return 0; } +/** + * Display the date popup on fast scroll + * @param data : Time view data + * @param obj : genlist object + * @param ei : event info + */ static void __gl_timeline_genlist_move_cb(void *data, Evas_Object * obj, void *ei) { @@ -1596,7 +1913,9 @@ static void __gl_timeline_genlist_move_cb(void *data, Evas_Object * obj, __gl_timeline_get_tm(mtime1, mtime2, &t1, &t2); __gl_timeline_get_mtime_str(t1, ct, &text1, &text2); - + if (text2) { + g_free(text2); + } if (text1) { if (timeline_d->date_layout) { elm_object_part_text_set(timeline_d->date_layout, @@ -1612,6 +1931,12 @@ static void __gl_timeline_genlist_move_cb(void *data, Evas_Object * obj, } } +/** + * Hide the date popup on fast scroll + * @param data : Time view data + * @param obj : genlist object + * @param ei : event info + */ static void __gl_timeline_genlist_move_stop_cb(void *data, Evas_Object * obj, void *ei) { @@ -1626,6 +1951,11 @@ static void __gl_timeline_genlist_move_stop_cb(void *data, gl_dbg("Exit"); } +/** + * Create genlist object and add properties of object + * @param parent : parent layout + * @return + */ Evas_Object *_gl_genlist_add(Evas_Object * parent) { Evas_Object *genlist = NULL; @@ -1649,6 +1979,12 @@ Evas_Object *_gl_genlist_add(Evas_Object * parent) return genlist; } +/** + * Set the list item object to time view data to display the date popup on fast scroll + * @param data : Time view data + * @param obj : list object + * @param ei : event info + */ static void __gl_timeline_genlist_realized(void *data, Evas_Object * obj, void *ei) { @@ -1660,6 +1996,12 @@ static void __gl_timeline_genlist_realized(void *data, Evas_Object * obj, timeline_d->realized_item = it; } +/** + * Create Time list view and set CBs + * @param timeline_d : Time view data + * @param update : update flag to decide the update of media item data + * @return + */ static Evas_Object *__gl_timeline_create_list_view(gl_timeline_s * timeline_d, bool update) { @@ -1704,7 +2046,12 @@ static Evas_Object *__gl_timeline_create_list_view(gl_timeline_s * return genlist; } -/* Free data after layout deleted */ +/* Free data after layout deleted + * @param data : Time view data + * @param e : event + * @param obj : view layout + * @param ei : event info + */ static void __gl_timeline_del_layout_cb(void *data, Evas * e, Evas_Object * obj, void *ei) { @@ -1721,6 +2068,11 @@ static void __gl_timeline_del_layout_cb(void *data, Evas * e, gl_dbg("Delete timeline layout +++"); } +/** + * Add resizze and delete CBs on view layout + * @param timeline_d : Time view data + * @return + */ static int __gl_timeline_add_cbs(gl_timeline_s * timeline_d) { GL_CHECK_VAL(timeline_d, -1); @@ -1746,6 +2098,12 @@ static int __gl_timeline_add_cbs(gl_timeline_s * timeline_d) return 0; } +/** + * Create time edit view + * @param data : App data + * @param obj : context popup object + * @param ei : event info + */ static void __gl_timeline_edit_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -1762,6 +2120,12 @@ static void __gl_timeline_edit_cb(void *data, Evas_Object * obj, void *ei) __gl_timeline_change_mode(data, GL_TL_VIEW_EDIT); } +/** + * start time view copy operation + * @param data : App data + * @param obj : Context popup object + * @param ei : event info + */ static void __gl_timeline_copy_cb(void *data, Evas_Object * obj, void *ei) { GL_CHECK(data); @@ -1778,6 +2142,12 @@ static void __gl_timeline_copy_cb(void *data, Evas_Object * obj, void *ei) __gl_timeline_change_mode(data, GL_TL_VIEW_COPY); } +/** + * + * @param data : App data + * @param obj : context popup object + * @param ei : event info + */ static void __gl_albums_viewas_pop_cb(void *data, Evas_Object * obj, void *ei) { @@ -1796,7 +2166,11 @@ static void __gl_albums_viewas_pop_cb(void *data, Evas_Object * obj, gl_dbg("EXIT"); } -/* 'Delete medias' is available in Dali view */ +/** + * Delete media operation + * @param data : App data + * @return + */ static int __gl_timeline_del_op(void *data) { GL_CHECK_VAL(data, -1); @@ -1827,7 +2201,10 @@ static int __gl_timeline_del_op(void *data) return 0; } -/* Update view after deleting process done */ +/* Update view after deleting process done + * @param data : App data + * @return + */ static int __gl_timeline_update_del_view(void *data) { GL_CHECK_VAL(data, -1); @@ -1844,7 +2221,12 @@ static int __gl_timeline_update_del_view(void *data) return 0; } -/* 'Move medias' is only available in tab Albums */ + +/** + * Time view copy/move media operation + * @param data : App data + * @return + */ static int __gl_timeline_move_copy_op(void *data) { GL_CHECK_VAL(data, -1); @@ -1887,7 +2269,10 @@ static int __gl_timeline_move_copy_op(void *data) return 0; } -/* Update view after moving process done */ +/* Update view after moving process done + * @param data : App data + * @return + */ static int __gl_timeline_update_move_copy_view(void *data) { GL_CHECK_VAL(data, -1); @@ -1914,6 +2299,11 @@ static int __gl_timeline_update_move_copy_view(void *data) return 0; } +/** + * Time view move copy operation + * @param data : app data + * @return + */ int __gl_timeline_move_copy(void *data) { GL_CHECK_VAL(data, -1); @@ -2002,7 +2392,13 @@ int __gl_timeline_move_copy(void *data) return -1; } -/* Easy mode: New album/Edit/Slideshow */ + +/** + * Append item to context popup to display on more button click + * @param data :App data + * @param parent : parent layout + * @return + */ static int __gl_timeline_ctxpopup_append(void *data, Evas_Object * parent) { gl_dbg(""); @@ -2029,6 +2425,12 @@ static int __gl_timeline_ctxpopup_append(void *data, Evas_Object * parent) return 0; } +/** + * More button click CB + * @param data : App data + * @param obj : button object + * @param ei : event info + */ static void __gl_timeline_more_cb(void *data, Evas_Object * obj, void *ei) { gl_dbg("more button clicked"); @@ -2051,6 +2453,11 @@ static void __gl_timeline_more_cb(void *data, Evas_Object * obj, void *ei) } } +/** + * Reset the title of naviframe item + * @param data : App data + * @return + */ static int __gl_timeline_reset_label(void *data) { GL_CHECK_VAL(data, -1); @@ -2071,6 +2478,11 @@ static int __gl_timeline_reset_label(void *data) return 0; } +/** + * Reset the naviframe buttons + * @param data : App data + * @return + */ static int __gl_timeline_reset_btns(void *data) { GL_CHECK_VAL(data, -1); @@ -2084,6 +2496,11 @@ static int __gl_timeline_reset_btns(void *data) return 0; } +/** + * Set all media check data to false + * @param data : App data + * @return + */ int _gl_time_data_selected_list_finalize(void *data) { GL_CHECK_VAL(data, -1); @@ -2106,6 +2523,12 @@ int _gl_time_data_selected_list_finalize(void *data) return 0; } +/** + * Naviframe cancel button click CB + * @param data : App data + * @param obj : button object + * @param ei : event info + */ static void __gl_timeline_edit_cancel_cb(void *data, Evas_Object * obj, void *ei) { @@ -2115,6 +2538,11 @@ static void __gl_timeline_edit_cancel_cb(void *data, Evas_Object * obj, __gl_timeline_change_mode(data, GL_TL_VIEW_NORMAL); } +/** + * Add nafirame buttons + * @param data : App data + * @return + */ static int __gl_timeline_add_btns(void *data) { gl_dbg(""); @@ -2139,6 +2567,12 @@ static int __gl_timeline_add_btns(void *data) return 0; } +/** + * Media delete CB + * @param data : App data + * @param obj : button object + * @param ei : event info + */ static void __gl_timeline_del_cb(void *data, Evas_Object * obj, void *ei) { elm_toolbar_item_selected_set((Elm_Object_Item *) ei, EINA_FALSE); @@ -2172,7 +2606,11 @@ static void __gl_timeline_del_cb(void *data, Evas_Object * obj, void *ei) } -/* Select-all checkbox selected/deselected */ +/* Select-all checkbox selected/deselected + * @param data : App data + * @param obj : check box object + * @param ei : event info + */ static void __gl_timeline_thumb_edit_selall_cb(void *data, Evas_Object * obj, void *ei) { @@ -2221,8 +2659,9 @@ static void __gl_timeline_thumb_edit_selall_cb(void *data, } /** - * Use naviframe api to push albums edit view to stack. - * @param obj is the content to be pushed. + * Add naviframe title button for time edit view + * @param data : App data + * @return */ static int __gl_timeline_edit_add_btns(void *data) { @@ -2272,6 +2711,11 @@ static int __gl_timeline_edit_add_btns(void *data) return 0; } +/** + * Update time view + * @param data : App data + * @return + */ bool __gl_update_timeline(void *data) { GL_CHECK_FALSE(data); @@ -2291,6 +2735,12 @@ bool __gl_update_timeline(void *data) return true; } +/** + * Change the time view mode + * @param data :App data + * @param mode : time view mode + * @return + */ static int __gl_timeline_change_mode(void *data, int mode) { GL_CHECK_VAL(data, -1); @@ -2328,6 +2778,11 @@ static int __gl_timeline_change_mode(void *data, int mode) return 0; } +/** + * Pop time view edit view + * @param data : App data + * @return + */ static Eina_Bool __gl_timeline_pop_op(void *data) { GL_CHECK_FALSE(data); @@ -2341,6 +2796,12 @@ static Eina_Bool __gl_timeline_pop_op(void *data) return EINA_FALSE; } +/** + * Create full time view + * @param data : App data + * @param parent : parent layout + * @return + */ int _gl_timeline_create_view(void *data, Evas_Object * parent) { GL_CHECK_VAL(parent, -1); @@ -2441,6 +2902,11 @@ int _gl_timeline_create_view(void *data, Evas_Object * parent) return -1; } +/** + * Set no content view text + * @param data : App data + * @return + */ bool _gl_check_no_content_view(void *data) { GL_CHECK_VAL(data, -1); @@ -2462,6 +2928,10 @@ bool _gl_check_no_content_view(void *data) return false; } +/** + * Update time view selected media information + * @param data : App data + */ static void _gl_timeline_update_selected_info(void *data) { GL_CHECK(data); @@ -2494,6 +2964,11 @@ static void _gl_timeline_update_selected_info(void *data) } } +/** + * Update time view + * @param data : App data + * @return + */ int _gl_timeline_update_view(void *data) { GL_CHECK_VAL(data, -1); @@ -2544,6 +3019,11 @@ int _gl_timeline_update_view(void *data) return 0; } +/** + * update time view display language on system language changed + * @param data : App data + * @return + */ int _gl_timeline_update_lang(void *data) { GL_CHECK_VAL(data, -1); @@ -2557,6 +3037,11 @@ int _gl_timeline_update_lang(void *data) return 0; } +/** + * Hides time view in case of switch the view to Album view + * @param data : App data + * @return + */ int _gl_timeline_hide_view(void *data) { GL_CHECK_VAL(data, -1); @@ -2577,6 +3062,11 @@ int _gl_timeline_hide_view(void *data) return 0; } +/** + * Rotates time view in case of device rotated + * @param data :App data + * @return + */ int _gl_timeline_view_rotate(void *data) { gl_dbgE("ENTRY"); @@ -2616,6 +3106,11 @@ int _gl_timeline_view_rotate(void *data) return 0; } +/** + * Update the time view grid item size + * @param data : App data + * @return + */ int _gl_timeline_update_grid_size(void *data) { gl_dbgE("ENTRY"); @@ -2637,6 +3132,12 @@ int _gl_timeline_update_grid_size(void *data) return 0; } +/** + * Update view and media list with image-viewer select mode reply + * @param data : App data + * @param select_result : result received from image-viewer + * @param count : selected media count + */ void _gl_update_timeview_iv_select_mode_reply(void *data, char **select_result, int count) @@ -2721,6 +3222,12 @@ void _gl_update_timeview_iv_select_mode_reply(void *data, } } +/** + * Set the selected media list to App control handle + * @param service : App control handle + * @param data : App data + * @return + */ int _gl_ext_load_time_iv_selected_list(app_control_h service, void *data) { gl_dbgE("ENTRY"); @@ -2775,6 +3282,11 @@ int _gl_ext_load_time_iv_selected_list(app_control_h service, void *data) return GL_UG_SUCCESS; } +/** + * Gets if view is time edit view + * @param data : App data + * @return + */ bool _gl_is_timeline_edit_mode(void *data) { GL_CHECK_FALSE(data); @@ -2786,6 +3298,11 @@ bool _gl_is_timeline_edit_mode(void *data) return false; } +/** + * Gets if mode is time edit copy mode + * @param data : App data + * @return + */ bool _gl_is_timeline_edit_copy_mode(void *data) { GL_CHECK_FALSE(data); -- 2.7.4