#include <Elementary.h>
+/**
+ * @brief Item info structure
+ */
typedef struct {
- char *pkgid;
- char *appid;
- char *name;
- char *icon;
- Eina_Bool is_selected;
- Elm_Object_Item *gl_item;
+ char *pkgid; /**< Application package id */
+ char *appid; /**< Application id */
+ char *name; /**< Name to display */
+ char *icon; /**< Icon path */
+ Eina_Bool is_selected; /**< Item selected status */
+ Elm_Object_Item *gl_item; /**< Genlist item */
} apptray_wgt_app_item_info_s;
+/**
+ * @brief Creates item info instance
+ * @param[in] appid Application id in accordance to item
+ * @return New instance of item info on success, otherwise NULL on failure
+ */
apptray_wgt_app_item_info_s *apptray_wgt_app_item_info_create(
const char *appid);
+/**
+ * @brief Destroys item info instance
+ * @param[in] item_info Item info instance to destroy
+ */
void apptray_wgt_app_item_info_destroy(apptray_wgt_app_item_info_s *item_info);
#endif /* __APPTRAY_WGT_APP_ITEM_INFO_H__*/
#include <stdbool.h>
+/**
+ * Enumeration for key types that are available for handling
+ */
typedef enum {
- APPTRAY_WGT_APP_KEY_TYPE_BACK = 0,
- APPTRAY_WGT_APP_KEY_TYPE_POWER,
- APPTRAY_WGT_APP_KEY_TYPE_MAX
+ APPTRAY_WGT_APP_KEY_TYPE_BACK = 0, /**< Back key */
+ APPTRAY_WGT_APP_KEY_TYPE_POWER, /**< Power key */
+
+ APPTRAY_WGT_APP_KEY_TYPE_MAX /**< Total keys count */
} apptray_wgt_app_key_type_e;
+/**
+ * @brief Key event callback prototype
+ */
typedef bool (*apptray_wgt_app_key_event_cb)(void *);
+/**
+ * @brief Initializes Key event provider
+ */
void apptray_wgt_app_key_event_provider_init(void);
+/**
+ * @brief Deinitializes Key event provider
+ */
void apptray_wgt_app_key_event_provider_deinit(void);
+/**
+ * @brief Adds key event handler
+ * @param[in] type Key type to handle
+ * @param[in] result_cb Result callback function
+ * @param[in] result_data Result callback data
+ * @return bool on success, false otherwise
+ */
bool apptray_wgt_app_key_event_provider_add_handler(
apptray_wgt_app_key_type_e type,
apptray_wgt_app_key_event_cb result_cb,
void *result_data);
+/**
+ * @brief Deletes key event handler
+ * @param[in] type Key type that was handled
+ * @param[in] result_cb Result callback function that was set
+ */
void apptray_wgt_app_key_event_provider_del_handler(
apptray_wgt_app_key_type_e type,
apptray_wgt_app_key_event_cb result_cb);
#ifndef __APPTRAY_WGT_APP_UTIL_H__
#define __APPTRAY_WGT_APP_UTIL_H__
+/**
+ * @brief Gets full path to edje files directory
+ * @return Path to edje files directory
+ */
const char *apptray_wgt_app_utils_get_edje_path();
+/**
+ * @brief Gets full path to locale files directory
+ * @return Path to locale files directory
+ */
const char *apptray_wgt_app_utils_get_locale_path();
+/**
+ * @brief Gets full path to default application icon resource
+ * @return Path to default application icon
+ */
const char *apptray_wgt_app_utils_get_default_app_icon_path();
#endif /* __APPTRAY_WGT_APP_UTIL_H__ */
#include "apptray_wgt_app_item_info.h"
-#include <stdlib.h>
#include <app.h>
#include <app_info.h>
#include <app_manager.h>
retv_if(!appid, NULL);
item_info = calloc(1, sizeof(apptray_wgt_app_item_info_s));
- if (NULL == item_info) {
- return NULL;
- }
+ retv_if(!item_info, NULL);
int error = app_info_create(appid, &appinfo_h);
_D("AppTrayError Error = %d, AppID=%s", error, appid);
free(item_info->appid);
free(item_info->name);
free(item_info->icon);
+
free(item_info);
}