summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/conf.h36
-rw-r--r--inc/grid.h51
-rw-r--r--inc/index.h38
-rw-r--r--inc/list.h28
-rw-r--r--inc/log.h9
-rw-r--r--inc/page.h33
-rw-r--r--inc/scroller.h113
-rw-r--r--inc/share_panel.h10
-rw-r--r--inc/share_panel_internal.h22
-rw-r--r--inc/ui_manager.h45
-rw-r--r--inc/utils.h13
11 files changed, 371 insertions, 27 deletions
diff --git a/inc/conf.h b/inc/conf.h
index 80e045a..a2abe11 100644
--- a/inc/conf.h
+++ b/inc/conf.h
@@ -17,28 +17,38 @@
#ifndef __TIZEN_SHARE_PANEL_CONF_H__
#define __TIZEN_SHARE_PANEL_CONF_H__
-#define BASE_WIDTH 480
-#define BASE_HEIGHT 800
+/**
+ * @defgroup Defines Defines
+ * @addtogroup Defines
+ * @{
+ */
+
+#define BASE_WIDTH 480 /**<Base layout width*/
+#define BASE_HEIGHT 800 /**<Base layout height*/
/* ITEM_ICON is changed from 74 to 63 about 87% decrease because of resolution issues. */
-#define ITEM_ICON_WIDTH 63
-#define ITEM_ICON_HEIGHT 63
+#define ITEM_ICON_WIDTH 63 /**<Width of the item's icon*/
+#define ITEM_ICON_HEIGHT 63 /**<Height of the item's icon*/
/* ITEM_WIDTH is changed from 123 to 107 about 87% decrease because of resolution issues. */
-#define ITEM_WIDTH 118
+#define ITEM_WIDTH 118 /**<Width of the item*/
/* ITEM_HEIGHT is changed from 166 to 144 about 87% decrease because of resolution issues. */
-#define ITEM_HEIGHT 144
+#define ITEM_HEIGHT 144 /**<Height of the item*/
-#define INDEX_HEIGHT 50
-#define TITLE_HEIGHT 54
-#define SCROLLER_HEIGHT 300
+#define INDEX_HEIGHT 50 /**<Height of the index*/
+#define TITLE_HEIGHT 54 /**<Height of the title*/
+#define SCROLLER_HEIGHT 300 /**<Height of the scroller*/
-#define SHARE_PANEL_LINE_MAX 4
+#define SHARE_PANEL_LINE_MAX 4 /**<Maximum number of items in line*/
/* PANEL_HEIGHT is changed from 368 to 320 about 87% decrease because of resolution issues. */
-#define PANEL_HEIGHT (SCROLLER_HEIGHT+INDEX_HEIGHT+TITLE_HEIGHT)
+#define PANEL_HEIGHT (SCROLLER_HEIGHT+INDEX_HEIGHT+TITLE_HEIGHT) /**<Height of the panel*/
-#define PROJECT "share-panel"
-#define PACKAGE "org.tizen.share-panel"
+#define PROJECT "share-panel" /**<Name of the project*/
+#define PACKAGE "org.tizen.share-panel" /**<Share Panel package name*/
+
+/**
+ * @}
+ */
#endif /* __TIZEN_SHARE_PANEL_CONF_H__ */
diff --git a/inc/grid.h b/inc/grid.h
index f19535a..f796300 100644
--- a/inc/grid.h
+++ b/inc/grid.h
@@ -19,14 +19,65 @@
#include <Elementary.h>
+/**
+ * @ingroup View
+ * @defgroup Grid Grid
+ * @addtogroup Grid
+ * @{
+ */
+
+/**
+ * @brief Creates grid of applications that meet sharing requirements.
+ *
+ * @param page The page widget
+ *
+ * @return created grid
+ */
extern Evas_Object *_grid_create(Evas_Object *page);
+
+/**
+ * @brief Destroys the application grid.
+ *
+ * @param grid The grid to be destroyed
+ */
extern void _grid_destroy(Evas_Object *grid);
+/**
+ * @brief Appends item to the application grid.
+ *
+ * @param grid The grid widget
+ * @param item_info The info structure of the item to be appended
+ *
+ * @return Elm_Object_Item of the appended item
+ */
extern Elm_Object_Item *_grid_append_item(Evas_Object *grid, item_s *item_info);
+
+/**
+ * @brief Removes item from the application grid.
+ *
+ * @param grid The grid where item is removed
+ * @param item_info Info structure of the item to be removed
+ */
extern void _grid_remove_item(Evas_Object *grid, item_s *item_info);
+/**
+ * @brief Returns number of items in application grid.
+ *
+ * @param grid The grid widget
+ */
extern int _grid_count_item(Evas_Object *grid);
+/**
+ * @brief Sends app control launch request related to the given item.
+ *
+ * @param item The info structure of the item related with app to be launched
+ *
+ * @return app_control_error_e type value
+ */
int _app_control_launch(item_s *item);
+/**
+ * @}
+ */
+
#endif /* __TIZEN_SHARE_PANEL_GRID_H__ */
diff --git a/inc/index.h b/inc/index.h
index 3fca5cb..2c174d1 100644
--- a/inc/index.h
+++ b/inc/index.h
@@ -19,10 +19,48 @@
#include <Evas.h>
+/**
+ * @ingroup View
+ * @defgroup Index Index
+ * @addtogroup Index
+ * @{
+ */
+
+/**
+ * @brief Creates share panel page index.
+ *
+ * @param ui_manager The parent layout
+ * @param count Number of pages
+ *
+ * @return created index
+ */
extern Evas_Object *_index_create(Evas_Object *ui_manager, unsigned int count);
+
+/**
+ * @brief Updates the index status.
+ *
+ * @param index The index to be updated
+ * @param count Number of pages
+ */
extern void _index_update(Evas_Object *index, unsigned int count);
+
+/**
+ * @brief Destroys index.
+ *
+ * @param index The index to be destroyed
+ */
extern void _index_destroy(Evas_Object *index);
+/**
+ * @brief Sets index page.
+ *
+ * @param index The index object to be set
+ * @param idx The index
+ */
extern void _index_bring_in(Evas_Object *index, int idx);
+/**
+ * @}
+ */
+
#endif //__TIZEN_SHARE_PANEL_INDEX_H__
diff --git a/inc/list.h b/inc/list.h
index be7b248..25a34bc 100644
--- a/inc/list.h
+++ b/inc/list.h
@@ -19,7 +19,35 @@
#include <Elementary.h>
+/**
+ * @defgroup Model Model
+ */
+
+/**
+ * @ingroup Model
+ * @defgroup List List
+ * @addtogroup List
+ * @{
+ */
+
+/**
+ * @brief Creates list of the sharing data applications.
+ *
+ * @param share_panel Share panel info handle
+ *
+ * @return created list
+ */
Eina_List *_list_create(share_panel_h share_panel);
+
+/**
+ * @brief Destroys list of the sharing data applications.
+ *
+ * @param list The list to be destroyed.
+ */
void _list_destroy(Eina_List *list);
+/**
+ * @}
+ */
+
#endif /* __TIZEN_SHARE_PANEL_LIST_H__ */
diff --git a/inc/log.h b/inc/log.h
index b290715..4603d11 100644
--- a/inc/log.h
+++ b/inc/log.h
@@ -19,6 +19,11 @@
#include <dlog.h>
+/**
+ * @addtogroup Utils
+ * @{
+ */
+
#define OK (0)
#define FAIL (-1)
@@ -96,4 +101,8 @@
} \
}
+/**
+ * @}
+ */
+
#endif /* __TIZEN_SHARE_PANEL_LOG_H__ */
diff --git a/inc/page.h b/inc/page.h
index 560b74e..aae3c6f 100644
--- a/inc/page.h
+++ b/inc/page.h
@@ -19,9 +19,42 @@
#include <Elementary.h>
+/**
+ * @ingroup View
+ * @defgroup Page Page
+ * @addtogroup Page
+ * @{
+ */
+
+/**
+ * @brief Creates share panel scroller's page.
+ *
+ * @param scroller The scroller where to add page
+ * @param page_width Width of the page
+ * @param page_height Height of the page
+ *
+ * @return created page
+ */
extern Evas_Object *_page_create(Evas_Object *scroller, int page_width, int page_height);
+
+/**
+ * @brief Destroys scroller's page.
+ *
+ * @param page The page to be destroyed
+ */
extern void _page_destroy(Evas_Object *page);
+/**
+ * @brief Resizes page.
+ *
+ * @param page The page to be resized
+ * @param width Page's new width
+ * @param height Page's new height
+ */
extern void _page_resize(Evas_Object *page, int width, int height);
+/**
+ * @}
+ */
+
#endif /* __TIZEN_SHARE_PANEL_PAGE_H__ */
diff --git a/inc/scroller.h b/inc/scroller.h
index 78c0665..d374027 100644
--- a/inc/scroller.h
+++ b/inc/scroller.h
@@ -19,6 +19,16 @@
#include <Elementary.h>
+/**
+ * @ingroup View
+ * @defgroup Scroller Scroller
+ * @addtogroup Scroller
+ * @{
+ */
+
+/**
+ * @brief Enumerations for share panel event error.
+ */
typedef enum {
SCROLLER_EVENT_TYPE_INVALID = 0,
SCROLLER_EVENT_TYPE_SCROLL,
@@ -27,23 +37,126 @@ typedef enum {
SCROLLER_EVENT_TYPE_MAX,
} scroller_event_type_e;
+/**
+ * @brief Creates application page scroller.
+ *
+ * @param ui_manager The main parent layout
+ * @param share_panel The share panel info structure
+ *
+ * @return created scroller
+ */
extern Evas_Object *_scroller_create(Evas_Object *ui_manager, share_panel_s *share_panel);
+
+/**
+ * @brief Destroys application page scroller.
+ *
+ * @param scroller The scroller to be destroyed
+ */
extern void _scroller_destroy(Evas_Object *scroller);
+/**
+ * @brief Appends new page to the scroller.
+ *
+ * @param scroller The scroller widget
+ * @param page The page to be appended
+ */
extern void _scroller_append_page(Evas_Object *scroller, Evas_Object *page);
+
+/**
+ * @brief Removes page form the scroller.
+ *
+ * @param scroller The scroller widget
+ * @param page The page to be removed
+ */
extern void _scroller_remove_page(Evas_Object *scroller, Evas_Object *page);
+/**
+ * @brief Appends list items into the scroller.
+ *
+ * @param scroller The scroller widget
+ * @param list The list of applications to be appended
+ * @param page_width Width of the pages to be appended
+ * @param page_height Height of the pages to be appended
+ */
extern void _scroller_append_list(Evas_Object *scroller, Eina_List *list, int page_width, int page_height);
+
+/**
+ * @brief Removes list items from the scroller.
+ *
+ * @param scroller The scroller widget
+ * @param list The list of applications to be removed
+ */
extern void _scroller_remove_list(Evas_Object *scroller, Eina_List *list);
+/**
+ * @brief Brings in scroller's page.
+ *
+ * @param scroller The scroller widget
+ * @param page The page to be bringed
+ */
extern void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page);
+
+/**
+ * @brief Gets region of the scroller's index.
+ *
+ * @param scroller The scroller widget
+ *
+ * @return index's region
+ */
extern int _scroller_get_region_index(Evas_Object *scroller);
+
+/**
+ * @brief Gets the number of pages in scroller's box.
+ *
+ * @param scroller The scroller widget
+ *
+ * @return number of pages
+ */
extern unsigned int _scroller_count(Evas_Object *scroller);
+/**
+ * @brief Gets current scroller's scrolling status
+ *
+ * @param scroller The scroller widget
+ *
+ * @return scroller's scrolling status
+ */
extern int _scroller_is_scrolling(Evas_Object *scroller);
+
+/**
+ * @brief Resizes share panel scroller.
+ *
+ * @param scroller The scroller widget
+ * @param width The new width value to be set
+ * @param height The new height value to be set
+ */
extern void _scroller_resize(Evas_Object *scroller, int width, int height);
+/**
+ * @brief Registers scroller event callbacks.
+ *
+ * @param scroller The scroller widget
+ * @param event_type The type of the event
+ * @param event_cb The callback function to be called
+ * @param data The data to be passed to the event callback function
+ *
+ * @return share_panel_error_e enumeration value
+ */
extern int _scroller_register_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *data), void *data);
+
+/**
+ * @brief Unregister scroller event callbacks.
+ *
+ * @param scroller The scroller widget
+ * @param event_type The type of the event
+ * @param event_cb The scroller's event callback function to be unregistered
+ *
+ * @return share_panel_error_e enumeration value
+ */
extern int _scroller_unregister_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *data));
+/**
+ * @}
+ */
+
#endif /* __TIZEN_SHARE_PANEL_SCROLLER_H__ */
diff --git a/inc/share_panel.h b/inc/share_panel.h
index a0c5233..0ff1d59 100644
--- a/inc/share_panel.h
+++ b/inc/share_panel.h
@@ -31,13 +31,11 @@ extern "C" {
#endif
/**
- * @file share_panel.h
- * @brief This file declares the API of the libshare-panel library.
- */
-
-/**
- * @addtogroup CAPI_PANEL_SHARE_MODULE
+ * @defgroup View View
+ * @defgroup SPanel Share Panel
+ * @addtogroup SPanel
* @{
+ * @defgroup SPInternal Share Panel Internal
*/
/**
diff --git a/inc/share_panel_internal.h b/inc/share_panel_internal.h
index b04bbc7..7098547 100644
--- a/inc/share_panel_internal.h
+++ b/inc/share_panel_internal.h
@@ -28,15 +28,22 @@
#define DEFAULT_ICON "/usr/share/icons/A01-1_icon_Menu.png"
#define KEY_BACK "XF86Back"
+/**
+ * @addtogroup SPInternal
+ * @{
+ */
-
+/**
+ * @brief Share panel state enumeration.
+ */
enum {
SHARE_PANEL_SHOW_STATE_HIDE,
SHARE_PANEL_SHOW_STATE_HALF,
};
-
-
+/**
+ * @brief Share panel base info structure.
+ */
struct _share_panel {
Evas_Object *win;
Evas_Object *ui_manager;
@@ -59,8 +66,9 @@ struct _share_panel {
};
typedef struct _share_panel share_panel_s;
-
-
+/**
+ * @brief Application related item info structure.
+ */
struct _item {
app_control_h caller_control;
share_panel_s *share_panel;
@@ -72,6 +80,8 @@ struct _item {
};
typedef struct _item item_s;
-
+/**
+ * @}
+ */
#endif // __TIZEN_SHARE_PANEL_INTERNAL_H__
diff --git a/inc/ui_manager.h b/inc/ui_manager.h
index 660f743..03b525d 100644
--- a/inc/ui_manager.h
+++ b/inc/ui_manager.h
@@ -19,13 +19,56 @@
#include <Elementary.h>
+/**
+ * @ingroup View
+ * @defgroup Man UI Manager
+ * @addtogroup Man
+ * @{
+ */
+
+/**
+ * @brief Creates share panel ui manager.
+ *
+ * @param share_panel The share panel main info structure
+ *
+ * @return created ui manager
+ */
extern Evas_Object *_ui_manager_create(share_panel_s *share_panel);
+
+/**
+ * @brief Destroys share panel ui manager.
+ *
+ * @param ui_manager The UI to be destroyed
+ */
extern void _ui_manager_destroy(Evas_Object *ui_manager);
+/**
+ * @brief Resizes the share panel's UI.
+ *
+ * @param ui_manager The UI widget
+ * @param width The new width size to be set
+ * @param height The new height size to be set
+ */
extern void _ui_manager_resize(Evas_Object *ui_manager, int width, int height);
+
+/**
+ * @brief Shows share panel's UI.
+ *
+ * @param share_panel The share panel info structure
+ */
extern int _ui_manager_show(share_panel_h share_panel);
+
+/**
+ * @brief Hides share panel's UI.
+ *
+ * @param share_panel The share panel info structure
+ *
+ * @return share_panel_error_e enumeration
+ */
extern int _ui_manager_hide(share_panel_h share_panel);
-extern void _ui_manager_reply_to_cancellation(share_panel_h share_panel);
+/**
+ * @}
+ */
#endif /* __TIZEN_SHARE_PANEL_UI_MANAGER_H__ */
diff --git a/inc/utils.h b/inc/utils.h
index 7ce3b65..4e5fed9 100644
--- a/inc/utils.h
+++ b/inc/utils.h
@@ -18,13 +18,24 @@
#define UTILS_H_
/**
+ * @defgroup Utils Utilities
+ * @addtogroup Utils
+ * @{
+ */
+
+/**
+ * @brief Gets share panel's absolute resource path
+ *
* @param sub_path sub path in res/ folder
*
* @return Absolute path for sub_path
- * @remarks The returned path should be released.
+ * @remarks The returned path should be released.
*/
char *utils_get_res_file_path(char *sub_path);
+/**
+ * @}
+ */
#endif /* UTILS_H_ */