src/toolbar.c
src/ug.c
src/ui_manager.c
+ src/list.c
)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
+ aul
capi-base-common
capi-system-info
bundle
isf
# security-privilege-checker
ui-gadget-1
+ rua
)
FOREACH(flag ${pkgs_CFLAGS})
#define __TIZEN_ATTACH_PANEL_DOC_H__
/**
- * @defgroup CAPI_PANEL_MODULE Panel
- * @brief The Panel module provides APIs to choose data or apps easily.
* @ingroup CAPI_APPLICATION_FRAMEWORK
- *
- * @section CAPI_PANEL_MODULE_OVERVIEW Overview
- * <table>
- * <tr><th>API</th><th>Description</th></tr>
- * <tr><td>@ref CAPI_PANEL_ATTACH_MODULE</td><td>Provide functions to attach images, voices, contacts, events and files.</td></tr>
- * <tr><td>@ref CAPI_PANEL_STICKER_MODULE</td><td>Provide functions to attach stickers easily.</td></tr>
- * <tr><td>@ref CAPI_PANEL_SHARE_MODULE</td><td>Provide functions to share data with apps.</td></tr>
- * </table>
- *
* @defgroup CAPI_PANEL_ATTACH_MODULE Attach panel
- * @brief The Attach Panel provides functions to attach data easily. Users can attach images, take pictures, record voice and select files to attach into the caller app
- * @ingroup CAPI_PANEL_MODULE
+ * @brief Attach panel provides functions to attach images, voices, contacts, events and files. Users can attach images, take pictures, record voice and select files to attach into the caller app
*
* @section CAPI_PANEL_ATTACH_MODULE_HEADER Required Header
* \#include <attach_panel.h>
+ *
* @section CAPI_PANEL_ATTACH_MODULE_OVERVIEW Overview
- * It provides functions for adding an Attach Panel (attach_panel_create()) and deleting it (attach_panel_destroy()) in an app.\n
- * It is shown with (attach_panel_show()) and hiden with (attach_panel_hide()).\n
- * The results can be returned into the result callback that is set (attach_panel_set_result_cb()) or unset (attach_panel_unset_result_cb()).\n
- * Content categories can be added (attach_panel_add_content_category()) or removed (attach_panel_remove_content_category()).\n
+ * - It provides functions for adding an attach panel (attach_panel_create()) and deleting it (attach_panel_destroy()) in an app.\n
+ * - Content categories can be added (attach_panel_add_content_category()) or removed (attach_panel_remove_content_category()).\n
+ * - Dynamic configurations can be handled with (attach_panel_set_extra_data()). This is used with a content category.
+ * - Results can be returned into the result callback that is set (attach_panel_set_result_cb()) or unset (attach_panel_unset_result_cb()).\n
+ * - Events are delivered into the event callback that is set with (attach_panel_set_event_cb()) or unset with (attach_panel_unset_event_cb()).\n
+ * - The panel can be shown with (attach_panel_show()) and hidden with (attach_panel_hide()).\n
+ * - You can get the state of the panel with (attach_panel_get_visibility()).\n
*
* @section CAPI_PANEL_ATTACH_MODULE_FEATURE Related Features
* This API is related with the following features:\n
- * - http://tizen.org/feature/camera\n
- * - http://tizen.org/feature/microphone\n
+ * - %http://tizen.org/feature/camera\n
+ * - %http://tizen.org/feature/microphone\n
+ *
* It is recommended to design feature related codes in your application for reliability.\n
* You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
*/
+
#endif
*/
typedef enum attach_panel_content_category {
ATTACH_PANEL_CONTENT_CATEGORY_IMAGE = 1, /**< Attaching images from the gallery */
- ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, /**< Taking pictures or videos with the camera to attach */
- ATTACH_PANEL_CONTENT_CATEGORY_VOICE, /**< Taking voices with the voice-recoder to attach */
+ ATTACH_PANEL_CONTENT_CATEGORY_CAMERA, /**< Taking pictures to attach */
+ ATTACH_PANEL_CONTENT_CATEGORY_VOICE, /**< Taking a voice clip to attach */
ATTACH_PANEL_CONTENT_CATEGORY_VIDEO, /**< Attaching video from the gallery */
ATTACH_PANEL_CONTENT_CATEGORY_AUDIO, /**< Attaching audio from my files */
ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR, /**< Attaching calendar data from the calendar */
ATTACH_PANEL_CONTENT_CATEGORY_CONTACT, /**< Attaching contact data from the contacts */
ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, /**< Attaching files data from my files */
+ ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, /**< Taking a video clip to attach */
} attach_panel_content_category_e;
+/**
+ * @brief Enumeration for events
+ * @since_tizen 2.4
+ * @see attach_panel_set_event_cb()
+ * @see attach_panel_unset_event_cb()
+ */
+typedef enum attach_panel_event {
+ ATTACH_PANEL_EVENT_SHOW_START = 1, /**< Attach panel starts the effect to show */
+ ATTACH_PANEL_EVENT_SHOW_FINISH, /**< Attach panel finishes the effect to show */
+ ATTACH_PANEL_EVENT_HIDE_START, /**< Attach panel starts the effect to hide the panel */
+ ATTACH_PANEL_EVENT_HIDE_FINISH, /**< Attach panel finishes the effect to hide the panel */
+} attach_panel_event_e;
+
/**
* @brief Attach panel handle.
* @since_tizen 2.4
* @param[in] result app_control handler.\n
* The caller app has to use app_control_get_extra_data_array() to get received data.\n
* http://tizen.org/appcontrol/data/selected\n
+ * @param[in] result_code result of app_control
* @param[in] user_data user data
* @pre The callback must be registered using attach_panel_set_result_cb()\n
* attach_panel_add_content_category() and attach_panel_show() must be called to invoke this callback.
* @see attach_panel_set_result_cb()
* @see attach_panel_unset_result_cb()
*/
-typedef void (*attach_panel_result_cb)(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *user_data);
+typedef void (*attach_panel_result_cb)(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *user_data);
+
+/**
+ * @brief Called when reserved events are published from the panel-side.
+ *
+ * @since_tizen 2.4
+ * @param[in] attach_panel Attach panel handler
+ * @param[in] event Attach panel event
+ * @param[in] event_info additional event information.\n
+ * This can be NULL if there are no necessary information.
+ * @param[in] user_data user data
+ * @pre The callback must be registered using attach_panel_set_event_cb()
+ *
+ * @see attach_panel_set_event_cb()
+ * @see attach_panel_unset_event_cb()
+ */
+typedef void (*attach_panel_event_cb)(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *user_data);
/**
* @brief Enumeration for values of attach-panel response types.
* @see attach_panel_set_extra_data()
* @see attach_panel_set_result_cb()
* @see attach_panel_unset_result_cb()
+ * @see attach_panel_set_event_cb()
+ * @see attach_panel_unset_event_cb()
* @see attach_panel_show()
* @see attach_panel_hide()
* @see attach_panel_get_visibility()
* Evas_Object *conformant;
* };
*
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
* {
* char **select = NULL;
* int i = 0;
* // Error handling
* }
*
+ * if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ * // Error handling
+ * }
+ *
* ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
* if (APP_CONTROL_ERROR_NONE != ret || !select) {
* // Error handling
*
* @endcode
*/
-extern int attach_panel_create(Evas_Object *conformant, attach_panel_h *attach_panel);
+int attach_panel_create(Evas_Object *conformant, attach_panel_h *attach_panel);
/**
* @brief Destroys the attach panel.
* @see attach_panel_set_extra_data()
* @see attach_panel_set_result_cb()
* @see attach_panel_unset_result_cb()
+ * @see attach_panel_set_event_cb()
+ * @see attach_panel_unset_event_cb()
* @see attach_panel_show()
* @see attach_panel_hide()
* @see attach_panel_get_visibility()
*
* @endcode
*/
-extern int attach_panel_destroy(attach_panel_h attach_panel);
+int attach_panel_destroy(attach_panel_h attach_panel);
/**
* @brief Adds a content category in the attach panel.
* @since_tizen 2.4
* @privlevel public
+ * @privilege %http://tizen.org/privilege/mediastorage
+ * @privilege %http://tizen.org/privilege/camera
+ * @privilege %http://tizen.org/privilege/recorder
+ * @privilege %http://tizen.org/privilege/appmanager.launch
* @remarks The caller app has to check the return value of this function.\n
* Content categories will be shown as the sequence of using @a attach_panel_add_content_category.\n
* Some contents need time to load it all.\n
* So, it is needed to use this before the mainloop of attach_panel_show().\n
* Privileges,\n
+ * %http://tizen.org/privilege/mediastorage, for using ATTACH_PANEL_CONTENT_CATEGORY_IMAGE or ATTACH_PANEL_CONTENT_CATEGORY_CAMERA\n
* %http://tizen.org/privilege/camera, for using ATTACH_PANEL_CONTENT_CATEGORY_CAMERA\n
* %http://tizen.org/privilege/recorder, for using ATTACH_PANEL_CONTENT_CATEGORY_VOICE\n
* %http://tizen.org/privilege/appmanager.launch, for adding content categories on the More tab\n
*
* @param[in] attach_panel Attach panel handler
* @param[in] content_category The content_category to be added in the @a attach_panel.
- * @param[in] The attach panel send some information using @a bundle.
+ * @param[in] extra_data The attach panel send some information using @a bundle.
* @return #ATTACH_PANEL_ERROR_NONE on success,
* otherwise a negative error value
* @retval #ATTACH_PANEL_ERROR_NONE Successful
* Evas_Object *conformant;
* };
*
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
* {
* char **select = NULL;
* int i = 0;
* // Error handling
* }
*
+ * if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ * // Error handling
+ * }
+ *
* ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
* if (APP_CONTROL_ERROR_NONE != ret || !select) {
* // Error handling
*
* @endcode
*/
-extern int attach_panel_add_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle * extra_data);
+int attach_panel_add_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data);
/**
* @brief Removes the content category from the attach panel.
*
* @endcode
*/
-extern int attach_panel_remove_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category);
+int attach_panel_remove_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category);
/**
* @brief Sets extra data to send to the content category using a bundle.
*
* @param[in] attach_panel Attach panel handler
* @param[in] content_category The content_category to be set the some information in the @a attach_panel.
- * @param[in] The attach panel set some information using @a bundle.
+ * @param[in] extra_data The attach panel set some information using @a bundle.
* @return #ATTACH_PANEL_ERROR_NONE on success,
* otherwise a negative error value
* @retval #ATTACH_PANEL_ERROR_NONE Successful
* Evas_Object *conformant;
* };
*
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
* {
* char **select = NULL;
* int i = 0;
* // Error handling
* }
*
+ * if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ * // Error handling
+ * }
+ *
* ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
* if (APP_CONTROL_ERROR_NONE != ret || !select) {
* // Error handling
* free(select);
* }
*
- * static void _event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+ * static void _reset_bundle_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
* {
* struct appdata *ad = data;
* bundle *extra_data = NULL;
* }
*
* bundle_free(extra_data);
- *
* }
*
* static int app_control(void *data)
*
* @endcode
*/
-extern int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data);
+int attach_panel_set_extra_data(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data);
/**
* @brief Sets the result callback that will be called when an user selects and confirms something to attach in the attach panel.
* Evas_Object *conformant;
* };
*
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
* {
* char **select = NULL;
* int i = 0;
* // Error handling
* }
*
+ * if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ * // Error handling
+ * }
+ *
* ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
* if (APP_CONTROL_ERROR_NONE != ret || !select) {
* // Error handling
*
* @endcode
*/
-extern int attach_panel_set_result_cb(attach_panel_h attach_panel, attach_panel_result_cb result_cb, void *user_data);
+int attach_panel_set_result_cb(attach_panel_h attach_panel, attach_panel_result_cb result_cb, void *user_data);
/**
* @brief Unsets the result callback that will be called when an user selects and confirms something to attach in the attach panel.
* @remarks The caller app has to check the return value of this function.\n
*
* @param[in] attach_panel Attach panel handler
- * @param[in] result_cb Attach panel result callback
* @return #ATTACH_PANEL_ERROR_NONE on success,
* otherwise a negative error value
* @retval #ATTACH_PANEL_ERROR_NONE Successful
*
* @endcode
*/
-extern int attach_panel_unset_result_cb(attach_panel_h attach_panel);
+int attach_panel_unset_result_cb(attach_panel_h attach_panel);
+
+/**
+ * @brief Sets the event callback that will be called when reserved events are published from the panel-side.
+ * @since_tizen 2.4
+ * @remarks The caller app has to check the return value of this function.\n
+ * We can set only one callback function with this API.\n
+ * If you set multiple callbacks with this API,\n
+ * the last one is registered only.
+ *
+ * @param[in] attach_panel Attach panel handler
+ * @param[in] panel_event_cb Attach panel event callback
+ * @param[in] user_data User data
+ * @return #ATTACH_PANEL_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #ATTACH_PANEL_ERROR_NONE Successful
+ * @retval #ATTACH_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ATTACH_PANEL_ERROR_ALREADY_DESTROYED already removed
+ *
+ * @pre Call attach_panel_create() before calling this function.
+ * @post The event_cb set with attach_panel_set_event_cb() will be called after publishing reserved events.
+ * @see attach_panel_create()
+ * @see attach_panel_destroy()
+ * @see attach_panel_show()
+ * @see attach_panel_hide()
+ * @see attach_panel_get_visibility()
+ * @see attach_panel_unset_event_cb()
+ * @see attach_panel_event_cb
+ *
+ * @par Example
+ * @code
+ * #include <attach_panel.h>
+ *
+ * struct appdata {
+ * Evas_Object *attach_panel;
+ * Evas_Object *conformant;
+ * };
+ *
+ * static void _event_cb(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *data)
+ * {
+ * switch (event) {
+ * case ATTACH_PANEL_EVENT_SHOW_START:
+ * // event handling
+ * break;
+ * case ATTACH_PANEL_EVENT_SHOW_FINISH:
+ * // event handling
+ * break;
+ * case ATTACH_PANEL_EVENT_HIDE_START:
+ * // event handling
+ * break;
+ * case ATTACH_PANEL_EVENT_HIDE_FINISH:
+ * // event handling
+ * break;
+ * default:
+ * // error handling
+ * break;
+ * }
+ * }
+ *
+ * static int app_control(void *data)
+ * {
+ * struct appdata *ad = data;
+ * int ret = ATTACH_PANEL_ERROR_NONE;
+ *
+ * if (!ad) {
+ * // Error handling
+ * }
+ *
+ * if (!ad->conformant) {
+ * // Error handling
+ * }
+ *
+ * ret = attach_panel_create(ad->conformant, &ad->attach_panel);
+ * if (ATTACH_PANEL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * ret = attach_panel_set_event_cb(ad->attach_panel, _event_cb, ad);
+ * if (ATTACH_PANEL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * // other routines
+ *
+ * return 0;
+ * }
+ *
+ * @endcode
+ */
+int attach_panel_set_event_cb(attach_panel_h attach_panel, attach_panel_event_cb panel_event_cb, void *user_data);
+
+/**
+ * @brief Unsets the event callback
+ * @since_tizen 2.4
+ * @remarks The caller app has to check the return value of this function.
+ *
+ * @param[in] attach_panel Attach panel handler
+ * @param[in] result_cb Attach panel result callback
+ * @return #ATTACH_PANEL_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #ATTACH_PANEL_ERROR_NONE Successful
+ * @retval #ATTACH_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #ATTACH_PANEL_ERROR_ALREADY_DESTROYED already removed
+ *
+ * @pre Call attach_panel_create() before calling this function.
+ * @see attach_panel_create()
+ * @see attach_panel_destroy()
+ * @see attach_panel_show()
+ * @see attach_panel_hide()
+ * @see attach_panel_get_visibility()
+ * @see attach_panel_set_event_cb()
+ *
+ * @par Example
+ * @code
+ * #include <attach_panel.h>
+ *
+ * struct appdata {
+ * Evas_Object *attach_panel;
+ * Evas_Object *conformant;
+ * };
+ *
+ * static int app_terminate(void *data)
+ * {
+ * struct appdata *ad = data;
+ * int ret = 0;
+ *
+ * if (!ad) {
+ * // Error handling
+ * }
+ *
+ * if (!ad->attach_panel) {
+ * // Error handling
+ * }
+ *
+ * ret = attach_panel_unset_event_cb(ad->attach_panel);
+ * if (ATTACH_PANEL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * ret = attach_panel_destroy(ad->attach_panel);
+ * if (ATTACH_PANEL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ * ad->attach_panel = NULL;
+ *
+ * return 0;
+ * }
+ *
+ * @endcode
+ */
+int attach_panel_unset_event_cb(attach_panel_h attach_panel);
/**
* @brief Shows the attach panel, asynchronously.
* Evas_Object *conformant;
* };
*
- * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *data)
+ * static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *data)
* {
* char **select = NULL;
* int i = 0;
* // Error handling
* }
*
+ * if (APP_CONTROL_RESULT_SUCCEEDED != result_code) {
+ * // Error handling
+ * }
+ *
* ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
* if (APP_CONTROL_ERROR_NONE != ret || !select) {
* // Error handling
*
* @endcode
*/
-extern int attach_panel_show(attach_panel_h attach_panel);
+int attach_panel_show(attach_panel_h attach_panel);
/**
* @brief Hides the attach panel, asynchronously.
*
* @endcode
*/
-extern int attach_panel_hide(attach_panel_h attach_panel);
+int attach_panel_hide(attach_panel_h attach_panel);
/**
* @brief Gets a value that indicates whether the attach_panel is visible.
*
* @endcode
*/
-extern int attach_panel_get_visibility(attach_panel_h attach_panel, bool *visible);
+int attach_panel_get_visibility(attach_panel_h attach_panel, bool *visible);
/**
* @}
#define MODE_ENABLE "enable"
#define MODE_DISABLE "disable"
+#define MODE_TRUE "true"
+#define MODE_FALSE "false"
#define TABBAR_NAME_MORE "More"
#define BUF_SIZE 128
* mime : "image/(asterisk)"
* extra_data : See below
* 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
*
* mime : NULL
* extra_data : See below
* 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ * 2) "http://tizen.org/appcontrol/data/total_size" : any bytes
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
*
* mime : NULL
* extra_data : See below
* 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ * 2) "http://tizen.org/appcontrol/data/total_size" : any bytes
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
*
* mime : "video/(asterisk)"
* extra_data : See below
* 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
*
* mime : "audio/(asterisk)"
* extra_data : See below
* 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
*
* extra_data : See below
* 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
* 2) "http://tizen.org/appcontrol/data/mode" : 1
- * 3) "http://tizen.org/appcontrol/data/result_type" : "vcs"
- * 4) "http://tizen.org/appcontrol/data/item_type" : "event"
- * 5) "http://tizen.org/appcontrol/data/max" : 1
+ * 3) "http://tizen.org/appcontrol/data/type" : "vcs"
+ * 4) "http://tizen.org/appcontrol/data/total_count" : any numbers
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
*
* operation : APP_CONTROL_OPERATION_PICK
* mime : "application/vnd.tizen.contact"
* extra_data : See below
- * APP_CONTROL_DATA_SELECTION_MODE : "multiple"
- * 1) "http://tizen.org/appcontrol/data/result_type" : "vcard"
- * 2) "http://tizen.org/appcontrol/data/item_type" : "person"
+ * 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ * 2) "http://tizen.org/appcontrol/data/type" : "vcf"
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
*
* mime : NULL
* extra_data : See below
* 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
+ * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
+ * return data : See below
+ * 1) "http://tizen.org/appcontrol/data/selected"
+ *
+ * - ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER
+ * appid : NULL
+ * operation : APP_CONTROL_OPERATION_CREATE_CONTENT
+ * mime : "video/3gp"
+ * extra_data : See below
+ * 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
+ * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
+ * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
* return data : See below
* 1) "http://tizen.org/appcontrol/data/selected"
+
*/
*
* key : "__ATTACH_PANEL_SHOW_TOOLBAR__"
* value : "true" or "false"
- * when : set as true when the panel's tabbar it is needed to be shown, and false when it is needed to be hidden.
+ * when : set as true when the panel's tabbar needs to be shown, and false when it needs to be hidden.
+ * how : ug_send_result()
+ *
+ * key : "__ATTACH_PANEL_SHOW_PANEL__"
+ * value : "true" or "false"
+ * when : set as true when the panel it needs to be shown, and false when it needs to be hidden.
* how : ug_send_result()
*/
attach_panel_state_e attach_panel_land_state;
attach_panel_result_cb result_cb;
void *result_data;
+ attach_panel_event_cb event_cb;
+ void *event_data;
Evas_Coord transit_width;
Evas_Coord transit_height;
Eina_Bool is_delete;
Eina_Bool rotate;
Eina_Bool flick;
- int current_page;
- int show_page;
+ int cur_page_no;
+ int cur_event_state;
+ int magic_no;
};
typedef struct _attach_panel attach_panel_s;
/* launching features */
const char *operation;
- const char *result_type;
+ const char *type;
const char *item_type;
const char *selection_mode;
const char *mime;
Elm_Object_Item *tabbar_item;
Elm_Object_Item *grid_item;
Evas_Object *content;
+ Evas_Object *page;
bundle *extra_data;
int index;
+ int order;
};
typedef struct _content content_s;
#define GRID_ROW_COUNT 4
#define GRID_ITEM_HEIGHT_REL 1.15
#define GRID_ICON_SIZE_REL 0.5
+#define ORDER_MAX 99
#endif
void _content_list_send_message(Eina_List *list, const char *key, const char *value, int is_ug);
-void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int show_page);
+void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int cur_page_no);
void _content_list_set_pause(Eina_List *list, int is_ug);
void _content_list_set_resume(Eina_List *list, int is_ug);
extern void _gesture_set_full_mode(attach_panel_h attach_panel);
extern attach_panel_state_e _gesture_get_state(void);
+extern void _gesture_set_state(attach_panel_state_e state);
extern Evas_Object *_gesture_create(attach_panel_h attach_panel);
extern void _gesture_destroy(attach_panel_h attach_panel);
extern Evas_Object *_grid_create(Evas_Object *page, attach_panel_h attach_panel);
extern void _grid_destroy(Evas_Object *grid);
+extern void _grid_refresh(Evas_Object *grid);
extern Elm_Object_Item *_grid_append_item(Evas_Object *grid, content_s *content_info);
extern void _grid_remove_item(Evas_Object *grid, content_s *content_info);
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __ATTACH_PANEL_LIST_H__
+#define __ATTACH_PANEL_LIST_H__
+
+extern Eina_List *_list_sort_by_rua(Eina_List *content_list);
+
+#endif
extern void _scroller_append_page(Evas_Object *scroller, Evas_Object *page);
extern void _scroller_remove_page(Evas_Object *scroller, Evas_Object *page);
-extern void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *current_page);
+extern void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *cur_page_no);
extern int _scroller_is_scrolling(Evas_Object *scroller);
extern void _scroller_resize(Evas_Object *scroller, int width, int height);
extern Evas_Object *_ui_manager_create(attach_panel_h attach_panel);
extern void _ui_manager_destroy(Evas_Object *ui_manager);
+extern Evas_Object *_ui_manager_create_content(Evas_Object *page, content_s *content_info, attach_panel_h attach_panel);
+extern void _ui_manager_destroy_content(content_s *content_info, attach_panel_h attach_panel);
#endif /* __TIZEN_ATTACH_PANEL_UI_MANAGER_H__ */
BuildRequires: gettext-tools
BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(isf)
#BuildRequires: pkgconfig(security-privilege-checker)
BuildRequires: pkgconfig(ui-gadget-1)
+BuildRequires: pkgconfig(rua)
%description
Description: Attach Panel
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "ملفاتي"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "تسجيل\nفيديو"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Fayllarım"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nyaz"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Моите файлове"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Запис\nвидео"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "আমার ফাইলগুলি"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ভিডিও\nরেকর্ড করুন"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Meus fitx"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Moje soubory"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Nahrát\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mine filer"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Optag\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Eigene Dateien"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\naufnehmen"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Τα Αρχεία Μου"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Εγγραφή\nβίντεο"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "My Files"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Record\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "My Files"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Record\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "My Files"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Record\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mis archivos"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Grabar\nvídeo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mis archivos"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Grabar\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Minu failid"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Salvesta\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Nire fitxat."
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Grabatu\nbideoa"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "فایلهای من"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ضبط\nویدیو"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Omat tied."
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Tallenna\nvideota"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mes fichiers"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Enreg.\nvidéo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mes fichiers"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Enreg.\nvidéo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mo Chomhaid"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Taifead\nfíseán"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Os meus arqu."
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "મારી ફાઇલ્સ"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "વિડિયો\nરેકોર્ડ કરો"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "הקבצים שלי"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "צלם\nוידאו"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "मेरी फाइलें"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "वीडियो\nरिकॉर्ड करे"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Moje datoteke"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Snimi\nvideo."
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Saját fájlok"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Videó-\nrögzítés"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Իմ Ֆայլերը"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Տեսագրել"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Skrár"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Taka\nmyndskeið"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Archivio"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Registra\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "マイファイル"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "録画"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "ჩემი ფაილები"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ვიდეოს\nჩაწერა"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Файлдарым"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Бейне\nжазу"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "ನನ್ನ ಫೈಲ್ಗಳು"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ವೀಡಿಯೊ\nರೆಕಾರ್ಡ್"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "내 파일"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "동영상\n촬영"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mano failai"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Įraš.\nvaiz.įr."
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mani faili"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Ierakst.\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Мои датотеки"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Снимање\nвидео"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "എന്റെ ഫയലുകൾ"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "വീഡിയോ\nറെക്കോർഡ് ചെയ്യുക"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mine filer"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Ta opp\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mijn bestanden"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nopnemen"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Moje pliki"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Nagraj\nwideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Meus Arquivos"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Meus Ficheiros"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Gravar\nvídeo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Fiş. mele"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Înreg.\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Мои файлы"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Запись\nвидео"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "මගේ ගොනු"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "වීඩියෝ\nපටිගත ක."
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Moje súbory"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Nahrať\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Moje datoteke"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Snemaj\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Moji fajlovi"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Snimi\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Mina filer"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Spela in\nvideo"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "எ. கோப்புகள்"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "நிகழ்படத்தை\nபதிவுசெய்."
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "నా ఫైల్లు"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "వీడియో\nరికార్డ్ చేయి"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "ไฟล์ส่วนตัว"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "บันทึก\nวิดีโอ"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Dosyalarım"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nkaydı"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Мої файли"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Запис\nвідео"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "میری فائلیں"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "ریکارڈ\nویڈیو"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "Fayllarim"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "Video\nyozish"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "我的文件"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "录制\n视频"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "我的檔案"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "錄製\n影片"
+
msgid "IDS_COM_BUTTON_MY_FILES_ABB"
msgstr "我的檔案"
+msgid "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB"
+msgstr "錄影"
+
}
}
part {
- name: "toolbar";
- type: SWALLOW;
+ name: "toolbar,clip";
+ type: RECT;
scale: 1;
- mouse_events: 1;
description {
state: "default" 0.0;
rel1 { relative: 0.0 0.0; to: "bg"; }
align: 0.5 0.0;
visible: 1;
}
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ }
+ }
+ part {
+ name: "toolbar";
+ type: SWALLOW;
+ clip_to: "toolbar,clip";
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; to: "toolbar,clip"; }
+ rel2 { relative: 1.0 1.0; to: "toolbar,clip"; }
+ fixed: 0 1;
+ align: 0.5 0.5;
+ visible: 1;
+ }
}
part {
name: "scroller";
mouse_events: 1;
description {
state: "default" 0.0;
- rel1 { relative: 0.0 1.0; to: "toolbar"; }
+ rel1 { relative: 0.0 1.0; to: "toolbar,clip"; }
rel2 { relative: 1.0 1.0; to: "bg"; }
align: 0.5 1.0;
fixed: 1 1;
}
}
}
+ programs {
+ program {
+ name: "toolbar,show";
+ signal: "toolbar,show";
+ source: "toolbar";
+ action: STATE_SET "default" 0.0;
+ target: "toolbar,clip";
+ transition: LINEAR 0.2;
+ }
+ program {
+ name: "toolbar,hide";
+ signal: "toolbar,hide";
+ source: "toolbar";
+ action: STATE_SET "hide" 0.0;
+ target: "toolbar,clip";
+ transition: LINEAR 0.2;
+ }
+ }
} // group
group {
name: "grid,icon";
+static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, app_control_result_e result_code, void *user_data)
+{
+ char **select = NULL;
+ int i = 0;
+ int length = 0;
+ int ret = APP_CONTROL_ERROR_NONE;
+
+ ret_if(!result);
+
+ ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
+ if (APP_CONTROL_ERROR_NONE == ret) {
+ for (i = 0; i < length; i++) {
+ _D("file_path is %s[%d]", select[i], i);
+ elm_object_part_text_set(sample_info.layout, "result", select[i]);
+ free(select[i]);
+ }
+ }
+
+ free(select);
+}
+
+
+
+static void _event_cb(attach_panel_h attach_panel, attach_panel_event_e event, void *event_info, void *data)
+{
+ ret_if(!attach_panel);
+
+ switch (event) {
+ case ATTACH_PANEL_EVENT_SHOW_START:
+ _D("attach panel : show start");
+ break;
+ case ATTACH_PANEL_EVENT_SHOW_FINISH:
+ _D("attach panel : show finish");
+ break;
+ case ATTACH_PANEL_EVENT_HIDE_START:
+ _D("attach panel : hide start");
+ break;
+ case ATTACH_PANEL_EVENT_HIDE_FINISH:
+ _D("attach panel : hide finish");
+ break;
+ }
+}
+
+
+
static void _win_back_key_cb(void *data, Evas_Object *obj, void *event_info)
{
bool visible = false;
attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR);
attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CONTACT);
attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_MYFILES);
+ attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER);
+
+ attach_panel_unset_result_cb(sample_info.attach_panel);
+ attach_panel_unset_event_cb(sample_info.attach_panel);
attach_panel_destroy(sample_info.attach_panel);
sample_info.attach_panel = NULL;
attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR);
attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CONTACT);
attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_MYFILES);
+ attach_panel_remove_content_category(sample_info.attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER);
attach_panel_hide(sample_info.attach_panel);
+ attach_panel_unset_result_cb(sample_info.attach_panel);
+ attach_panel_unset_event_cb(sample_info.attach_panel);
+
attach_panel_destroy(sample_info.attach_panel);
sample_info.attach_panel = NULL;
}
-static void _result_cb(attach_panel_h attach_panel, attach_panel_content_category_e content_category, app_control_h result, void *user_data)
-{
- char **select = NULL;
- int i = 0;
- int length = 0;
- int ret = APP_CONTROL_ERROR_NONE;
-
- ret_if(!result);
-
- ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
- if (APP_CONTROL_ERROR_NONE == ret) {
- for (i = 0; i < length; i++) {
- _D("file_path is %s[%d]", select[i], i);
- elm_object_part_text_set(sample_info.layout, "result", select[i]);
- free(select[i]);
- }
- }
-
- free(select);
-}
-
-
-
static void _attach_panel_create_cb(void *data, Evas_Object *obj, void *event_info)
{
attach_panel_h attach_panel = NULL;
attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR, NULL);
attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_CONTACT, NULL);
attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, NULL);
+ attach_panel_add_content_category(attach_panel, ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, NULL);
attach_panel_set_result_cb(attach_panel, _result_cb, NULL);
+ attach_panel_set_event_cb(attach_panel, _event_cb, NULL);
attach_panel_show(attach_panel);
ret_if(!key);
ret_if(!app_control);
+ _D("key: %s", key);
+
switch(type) {
case BUNDLE_TYPE_STR:
ret = bundle_keyval_get_basic_val(kv, (void *) &basic_val, &size);
#include <isf_control.h>
#include <system_info.h>
#include <tizen.h>
-//#include <privilege_checker.h>
+#if 0 /* privilege_checker is not included in the 3.0 */
+#include <privilege_checker.h>
+#endif
#include <ui-gadget.h>
#include "attach_panel.h"
#include "conf.h"
#include "content_list.h"
#include "gesture.h"
+#include "grid.h"
#include "ui_manager.h"
+#include "list.h"
#include "log.h"
#include "scroller.h"
+#include "toolbar.h"
static const char *const ATTACH_PANEL_DOMAIN = "attach-panel";
static const char *const PLATFORM_FEATURE_CAMERA = "tizen.org/feature/camera";
-innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_MYFILES] = {
+innate_content_s innate_content_info[ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER] = {
{
.appid = "attach-panel-gallery",
.name = "IDS_COM_TAB4_IMAGES_ABB2",
.is_ug = ATTACH_PANEL_CONTENT_CATEGORY_UG,
},
{
- .appid = NULL,
+ .appid = "videos",
.name = "IDS_COM_BUTTON2_VIDEOS",
.operation = APP_CONTROL_OPERATION_PICK,
.icon = "/usr/share/icons/video.png",
.is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
},
{
- .appid = "NULL",
+ .appid = "audio",
.name = "IDS_COM_BUTTON2_AUDIO_FILES",
.operation = APP_CONTROL_OPERATION_PICK,
.icon = "/usr/share/icons/music.png",
.is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
},
{
- .appid = "NULL",
+ .appid = "calendar",
.name = "IDS_EMAIL_BUTTON2_CALENDAR",
.operation = APP_CONTROL_OPERATION_PICK,
.icon = "/usr/share/icons/calendar.png",
.tabbar_name = "IDS_COM_TAB4_MORE_ABB",
.mode = 1,
- .result_type = "vcs",
- .item_type = "event",
+ .type = "vcs",
.selection_mode = "multiple",
.mime = "application/vnd.tizen.calendar",
.max = 1,
.is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
},
{
- .appid = "NULL",
+ .appid = "contacts",
.name = "IDS_COM_BUTTON2_CONTACTS",
.operation = APP_CONTROL_OPERATION_PICK,
.icon = "/usr/share/icons/contact.png",
.tabbar_name = "IDS_COM_TAB4_MORE_ABB",
- .result_type = "vcard",
+ .type = "vcf",
.item_type = "person",
.selection_mode = "multiple",
.mime = "application/vnd.tizen.contact",
.is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
},
{
- .appid = "NULL",
+ .appid = "myfiles",
.name = "IDS_COM_BUTTON_MY_FILES_ABB",
.operation = APP_CONTROL_OPERATION_PICK,
.tabbar_name = "IDS_COM_TAB4_MORE_ABB",
.content_category = ATTACH_PANEL_CONTENT_CATEGORY_MYFILES,
.is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
},
+ {
+ .appid = "record_video",
+ .name = "IDS_IDLE_BUTTON2_RECORD_NVIDEO_ABB",
+ .operation = APP_CONTROL_OPERATION_CREATE_CONTENT,
+ .icon = "/usr/share/icons/default.png",
+ .tabbar_name = "IDS_COM_TAB4_MORE_ABB",
+ .selection_mode = "single",
+ .mime = "video/3gp",
+ .content_category = ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER,
+ .is_ug = ATTACH_PANEL_CONTENT_CATEGORY_APP,
+ },
};
attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_HIDE;
} else if (ATTACH_PANEL_STATE_HALF == attach_panel->attach_panel_port_state) {
attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_FULL;
+ _gesture_set_state(ATTACH_PANEL_STATE_FULL);
_content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,full", "");
} else {
attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_FULL;
+ _gesture_set_state(ATTACH_PANEL_STATE_FULL);
}
break;
case 0:
attach_panel->attach_panel_port_state = ATTACH_PANEL_STATE_HIDE;
} else {
if (ATTACH_PANEL_STATE_HALF == attach_panel->attach_panel_port_state) {
+ _gesture_set_state(ATTACH_PANEL_STATE_HALF);
_content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,half", "");
} else {
attach_panel->attach_panel_port_state = ATTACH_PANEL_STATE_FULL;
+ _gesture_set_state(ATTACH_PANEL_STATE_FULL);
}
}
break;
}
_scroller_resize(attach_panel->scroller, w, 0);
+ elm_scroller_page_show(attach_panel->scroller, attach_panel->cur_page_no, 0);
}
panel->is_delete = EINA_FALSE;
panel->rotate = EINA_FALSE;
panel->flick = EINA_TRUE;
- panel->current_page = 0;
- panel->show_page = 0;
+ panel->cur_page_no = 0;
+ panel->magic_no = 0x1024;
panel->gesture = _gesture_create(panel);
goto_if(!panel->gesture, ERROR);
evas_object_smart_callback_add(panel->win, "wm,rotation,changed", __rotate_cb, panel);
+ elm_scroller_movement_block_set(panel->scroller, ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL);
__rotate_cb(panel, panel->win, NULL);
*attach_panel = panel;
Eina_List *l = NULL;
ret_if(!attach_panel);
+ _D("%s : attach panel is destroyed", __func__);
+
+ if (0x1024 != attach_panel->magic_no) {
+ _D("attach panel is already destroyed");
+ return;
+ }
+
+ attach_panel->magic_no = 0;
_gesture_destroy(attach_panel);
EXPORT_API int attach_panel_destroy(attach_panel_h attach_panel)
{
retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+ _D("%s : attach panel will be destroyed", __func__);
if (EINA_TRUE == attach_panel->is_delete) {
_E("Attach panel is already removed");
return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
}
+ attach_panel->is_delete = EINA_TRUE;
if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
_attach_panel_del(attach_panel);
} else {
- attach_panel->is_delete = EINA_TRUE;
+ attach_panel_hide(attach_panel);
}
return ATTACH_PANEL_ERROR_NONE;
-//static const char *const PRIVILEGE_CAMERA = "http://tizen.org/privilege/camera";
-//static const char *const PRIVILEGE_RECORDER = "http://tizen.org/privilege/recorder";
-//static const char *const PRIVILEGE_APPMANAGER_LAUNCH = "http://tizen.org/privilege/appmanager.launch";
+#if 0 /* privilege_checker is not included in the 3.0 */
+static const char *const PRIVILEGE_CAMERA = "http://tizen.org/privilege/camera";
+static const char *const PRIVILEGE_RECORDER = "http://tizen.org/privilege/recorder";
+static const char *const PRIVILEGE_APPMANAGER_LAUNCH = "http://tizen.org/privilege/appmanager.launch";
+#endif
EXPORT_API int attach_panel_add_content_category(attach_panel_h attach_panel, attach_panel_content_category_e content_category, bundle *extra_data)
{
content_s *content_info = NULL;
retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
retv_if(!attach_panel->ui_manager, ATTACH_PANEL_ERROR_NOT_INITIALIZED);
retv_if(content_category < ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
- retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
if (EINA_TRUE == attach_panel->is_delete) {
_E("Attach panel is already removed");
ret = system_info_get_platform_bool(PLATFORM_FEATURE_CAMERA, &value);
break_if(SYSTEM_INFO_ERROR_NONE != ret);
retv_if(false == value, ATTACH_PANEL_ERROR_UNSUPPORTED_CONTENT_CATEGORY);
-/*
+
+#if 0 /* privilege_checker is not included in the 3.0 */
ret = privilege_checker_check_privilege(PRIVILEGE_CAMERA);
retv_if(PRIVILEGE_CHECKER_ERR_UNDECLARED_PRIVILEGE == ret, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
break_if(PRIVILEGE_CHECKER_ERR_NONE != ret);
-*/
+#endif
break;
case ATTACH_PANEL_CONTENT_CATEGORY_VOICE:
ret = system_info_get_platform_bool(PLATFORM_FEATURE_MICROPHONE, &value);
break_if(SYSTEM_INFO_ERROR_NONE != ret);
retv_if(false == value, ATTACH_PANEL_ERROR_UNSUPPORTED_CONTENT_CATEGORY);
-/*
+#if 0 /* privilege_checker is not included in the 3.0 */
ret = privilege_checker_check_privilege(PRIVILEGE_RECORDER);
retv_if(PRIVILEGE_CHECKER_ERR_UNDECLARED_PRIVILEGE == ret, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
break_if(PRIVILEGE_CHECKER_ERR_NONE != ret);
-*/
+#endif
break;
case ATTACH_PANEL_CONTENT_CATEGORY_VIDEO:
case ATTACH_PANEL_CONTENT_CATEGORY_AUDIO:
case ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR:
case ATTACH_PANEL_CONTENT_CATEGORY_CONTACT:
case ATTACH_PANEL_CONTENT_CATEGORY_MYFILES:
-/*
+#if 0 /* privilege_checker is not included in the 3.0 */
ret = privilege_checker_check_privilege(PRIVILEGE_APPMANAGER_LAUNCH);
retv_if(PRIVILEGE_CHECKER_ERR_UNDECLARED_PRIVILEGE == ret, ATTACH_PANEL_ERROR_PERMISSION_DENIED);
break_if(PRIVILEGE_CHECKER_ERR_NONE != ret);
-*/
+#endif
break;
default:
break;
retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
retv_if(!attach_panel->ui_manager, ATTACH_PANEL_ERROR_NOT_INITIALIZED);
retv_if(content_category < ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
- retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
if (EINA_TRUE == attach_panel->is_delete) {
_E("Attach panel is already removed");
retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
retv_if(!attach_panel->ui_manager, ATTACH_PANEL_ERROR_NOT_INITIALIZED);
retv_if(content_category < ATTACH_PANEL_CONTENT_CATEGORY_IMAGE, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
- retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_MYFILES, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(content_category > ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(!extra_data, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
bundle_foreach(extra_data, (void *) __iter_cb, &bundle_is_op);
}
if (innate_content_info[content_category-1].is_ug) {
+ if (!content_info->content) {
+ _D("Create ug because ug is not created yet");
+ content_info->content = _ui_manager_create_content(content_info->page, content_info, attach_panel);
+ retv_if(!content_info->content, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
+ if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
+ _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ } else {
+ _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ }
+ }
ret = app_control_create(&app_control);
retv_if(APP_CONTROL_ERROR_NONE != ret, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
+EXPORT_API int attach_panel_set_event_cb(attach_panel_h attach_panel, attach_panel_event_cb event_cb, void *user_data)
+{
+ retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(!event_cb, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+
+ if (EINA_TRUE == attach_panel->is_delete) {
+ _E("Attach panel is already removed");
+ return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
+ }
+
+ attach_panel->event_cb = event_cb;
+ attach_panel->event_data = user_data;
+
+ return ATTACH_PANEL_ERROR_NONE;
+}
+
+
+
+EXPORT_API int attach_panel_unset_event_cb(attach_panel_h attach_panel)
+{
+ retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
+
+ if (EINA_TRUE == attach_panel->is_delete) {
+ _E("Attach panel is already removed");
+ return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
+ }
+
+ attach_panel->event_cb = NULL;
+ attach_panel->event_data = NULL;
+
+ return ATTACH_PANEL_ERROR_NONE;
+}
+
+
+
EXPORT_API int attach_panel_show(attach_panel_h attach_panel)
{
+ Elm_Object_Item *first_it;
+ content_s *content_info = NULL;
int height = 0;
retv_if(!attach_panel, ATTACH_PANEL_ERROR_INVALID_PARAMETER);
attach_panel->transit_height = height;
}
- //_content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
+ retv_if(!content_info, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
+
+ _toolbar_bring_in(attach_panel->toolbar, content_info->tabbar_item);
+
+ if (content_info->content) {
+ elm_scroller_page_show(attach_panel->scroller, attach_panel->cur_page_no, 0);
+ } else {
+ content_info->content = _ui_manager_create_content(content_info->page, content_info, attach_panel);
+ retv_if(!content_info->content, ATTACH_PANEL_ERROR_OUT_OF_MEMORY);
+ }
+
+ _content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
_content_list_send_message(attach_panel->content_list, "__ATTACH_PANEL_INITIALIZE__", MODE_ENABLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
evas_object_show(attach_panel->ui_manager);
+
_gesture_show(attach_panel);
- elm_scroller_page_show(attach_panel->scroller, attach_panel->current_page, 0);
+
+ attach_panel->content_list = _list_sort_by_rua(attach_panel->content_list);
+ _grid_refresh(attach_panel->grid);
+
+ first_it = elm_gengrid_first_item_get(attach_panel->grid);
+ if (first_it) {
+ elm_gengrid_item_show(first_it, ELM_GENGRID_ITEM_SCROLLTO_TOP);
+ }
return ATTACH_PANEL_ERROR_NONE;
}
return ATTACH_PANEL_ERROR_ALREADY_DESTROYED;
}
- //_content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
_gesture_hide(attach_panel);
return ATTACH_PANEL_ERROR_NONE;
EINA_LIST_FOREACH(list, l, content_info) {
continue_if(!content_info);
+ if (!content_info->content) {
+ _D("ug is not created yet");
+ continue;
+ }
innate_content_s *innate_content_info = content_info->innate_content_info;
continue_if(!innate_content_info);
ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
if (!ui_gadget) {
- _E("Fail to get the ui gadget");
- app_control_destroy(app_control);
- return;
+ _D("Fail to get the ui gadget");
+ continue;
}
ug_send_message(ui_gadget, app_control);
}
-void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int show_page)
+void _content_list_send_message_to_content(Eina_List *list, const char *key, const char *value, int cur_page_no)
{
content_s *content_info = NULL;
app_control_h app_control = NULL;
ret_if(!key);
ret_if(!value);
- content_info = eina_list_nth(list, show_page);
+ content_info = eina_list_nth(list, cur_page_no);
ret_if(!content_info);
if (!content_info->innate_content_info->is_ug) {
ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
if (!ui_gadget) {
- _E("Fail to get the ui gadget");
+ _D("Fail to get the ui gadget");
app_control_destroy(app_control);
return;
}
ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
if (!ui_gadget) {
- _E("Fail to get the ui gadget");
- return;
+ _D("Fail to get the ui gadget");
+ continue;
}
- //ug_pause_ug(ui_gadget);
+#if 0 /* privilege_checker is not included in the 3.0 */
+ ug_pause_ug(ui_gadget);
+#endif
}
}
}
ui_gadget = evas_object_data_get(content_info->content, DATA_KEY_UG);
if (!ui_gadget) {
- _E("Fail to get the ui gadget");
- return;
+ _D("Fail to get the ui gadget");
+ continue;
}
- //ug_resume_ug(ui_gadget);
+#if 0 /* privilege_checker is not included in the 3.0 */
+ ug_resume_ug(ui_gadget);
+#endif
}
}
}
+void _gesture_set_state(attach_panel_state_e state)
+{
+ gesture_info_s.attach_panel_state = state;
+}
+
+
+
static Elm_Transit_Effect *__custom_effect_new(Evas_Coord from_h, Evas_Coord to_h)
{
custom_effect_s *custom_effect = calloc(1, sizeof(custom_effect_s));
static void __attach_panel_transit_del_cb(void *data, Elm_Transit *transit)
{
attach_panel_h attach_panel = data;
+ _D("%s : transit is ended", __func__);
gesture_info_s.transit = NULL;
if (gesture_info_s.attach_panel_state == ATTACH_PANEL_STATE_HIDE) {
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,hide,finished", "");
+ if (attach_panel->event_cb) {
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_FINISH, NULL, attach_panel->event_data);
+ }
if (attach_panel->is_delete) {
_attach_panel_del(attach_panel);
}
} else {
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,finished", "");
+ if (attach_panel->event_cb) {
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_FINISH, NULL, attach_panel->event_data);
+ }
}
}
if (gesture_info_s.transit) {
_E("Transit is already activating");
+ if (attach_panel->cur_event_state == ATTACH_PANEL_EVENT_HIDE_START) {
+ if (gesture_info_s.attach_panel_state != ATTACH_PANEL_STATE_HIDE) {
+ if (attach_panel->event_cb) {
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_FINISH, NULL, attach_panel->event_data);
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_START, NULL, attach_panel->event_data);
+ }
+ }
+ } else {
+ if (gesture_info_s.attach_panel_state == ATTACH_PANEL_STATE_HIDE) {
+ if (attach_panel->event_cb) {
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_FINISH, NULL, attach_panel->event_data);
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_START, NULL, attach_panel->event_data);
+ }
+ }
+ }
return;
}
if (gesture_info_s.attach_panel_state == ATTACH_PANEL_STATE_HIDE) {
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,hide,started", "");
+ attach_panel->cur_event_state = ATTACH_PANEL_EVENT_HIDE_START;
+ if (attach_panel->event_cb) {
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_HIDE_START, NULL, attach_panel->event_data);
+ }
} else {
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,started", "");
+ attach_panel->cur_event_state = ATTACH_PANEL_EVENT_SHOW_START;
+ if (attach_panel->event_cb) {
+ attach_panel->event_cb(attach_panel, ATTACH_PANEL_EVENT_SHOW_START, NULL, attach_panel->event_data);
+ }
}
gesture_info_s.transit = elm_transit_add();
void _gesture_show(attach_panel_h attach_panel)
{
gesture_info_s.attach_panel_state = ATTACH_PANEL_STATE_HALF;
- _D("");
+ _D("gesture show start");
if (attach_panel->rotate) {
_content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_FULL;
+ gesture_info_s.attach_panel_state = ATTACH_PANEL_STATE_FULL;
__attach_panel_transit_set(attach_panel, 0, attach_panel->transit_height, TRANSIT_DURATION);
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,full", "");
_content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
elm_scroller_movement_block_set(attach_panel->grid, ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL);
attach_panel->attach_panel_port_state = ATTACH_PANEL_STATE_HALF;
+ gesture_info_s.attach_panel_state = ATTACH_PANEL_STATE_HALF;
__attach_panel_transit_set(attach_panel, 0, attach_panel->transit_height, TRANSIT_DURATION);
}
}
void _gesture_hide(attach_panel_h attach_panel)
{
- _D("");
+ _D("gestrue hide start");
if (attach_panel->rotate) {
attach_panel->attach_panel_land_state = ATTACH_PANEL_STATE_HIDE;
elm_object_signal_emit(attach_panel->conformant, "elm,state,attach_panel,show,half", "");
* limitations under the License.
*/
+#include <aul.h>
#include <app_control.h>
#include <Elementary.h>
+#include <rua.h>
#include "attach_panel.h"
#include "attach_panel_internal.h"
#include "attach_bundle.h"
#include "conf.h"
+#include "content_list.h"
#include "gesture.h"
#include "grid.h"
#include "log.h"
}
}
- current_content_info = eina_list_nth(attach_panel->content_list, attach_panel->current_page);
+ current_content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
retv_if(!current_content_info, EINA_TRUE);
if (attach_panel->grid != current_content_info->content) {
{
content_s *info = data;
innate_content_s *innate_content_info = NULL;
+ char *buf = NULL;
retv_if(!info, NULL);
innate_content_info = info->innate_content_info;
retv_if(!innate_content_info, NULL);
if (!strcmp(part, "elm.text")) {
- return strdup(D_(innate_content_info->name));
+ buf = elm_entry_utf8_to_markup(D_(innate_content_info->name));
+ return buf;
}
return NULL;
static void __reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
{
content_s *content_info = user_data;
+ char **select = NULL;
+ int i = 0;
+ int length = 0;
+ int ret = APP_CONTROL_ERROR_NONE;
ret_if(!content_info);
ret_if(!content_info->attach_panel);
+ /* This is just for protocol log */
+ _D("relay callback is called");
+ ret = app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &select, &length);
+ if (APP_CONTROL_ERROR_NONE == ret && select) {
+ for (i = 0; i < length; i++) {
+ _D("selected is %s[%d]", select[i], i);
+ }
+ }
+
+ ret = app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/path", &select, &length);
+ if (APP_CONTROL_ERROR_NONE == ret && select) {
+ for (i = 0; i < length; i++) {
+ _D("path is %s[%d]", select[i], i);
+ }
+ }
+
if (content_info->attach_panel->result_cb) {
content_info->attach_panel->result_cb(content_info->attach_panel
, content_info->innate_content_info->content_category
, reply
+ , result
, content_info->attach_panel->result_data);
if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
- /* This is same with attach_panel_hide */
- //_content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ /* This is same with attach_panel_hide() */
+ _content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
_gesture_hide(content_info->attach_panel);
}
} else {
ret_if(APP_CONTROL_ERROR_NONE != ret);
if (content_info->innate_content_info->operation) {
- app_control_set_operation(app_control, content_info->innate_content_info->operation);
+ ret = app_control_set_operation(app_control, content_info->innate_content_info->operation);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to set operation");
}
if (content_info->innate_content_info->mode) {
snprintf(value, sizeof(value), "%d", content_info->innate_content_info->mode);
- app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/mode", value);
+ ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/mode", value);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add 'http://tizen.org/appcontrol/data/mode'");
}
- if (content_info->innate_content_info->result_type) {
- app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/result_type", content_info->innate_content_info->result_type);
+ if (content_info->innate_content_info->type) {
+ ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/type", content_info->innate_content_info->type);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add 'http://tizen.org/appcontrol/data/type'");
}
if (content_info->innate_content_info->item_type) {
- app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/item_type", content_info->innate_content_info->item_type);
+ ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/item_type", content_info->innate_content_info->item_type);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add 'http://tizen.org/appcontrol/data/item_type'");
}
if (content_info->innate_content_info->selection_mode) {
- app_control_add_extra_data(app_control, APP_CONTROL_DATA_SELECTION_MODE, content_info->innate_content_info->selection_mode);
+ ret = app_control_add_extra_data(app_control, APP_CONTROL_DATA_SELECTION_MODE, content_info->innate_content_info->selection_mode);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add APP_CONTROL_DATA_SELECTION_MODE");
}
if (content_info->innate_content_info->mime) {
- app_control_set_mime(app_control, content_info->innate_content_info->mime);
+ ret = app_control_set_mime(app_control, content_info->innate_content_info->mime);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to set mime");
}
if (content_info->innate_content_info->max) {
snprintf(value, sizeof(value), "%d", content_info->innate_content_info->max);
- app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/max", value);
+ ret = app_control_add_extra_data(app_control, "http://tizen.org/appcontrol/data/max", value);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add 'http://tizen.org/appcontrol/data/max'");
}
if (content_info->extra_data) {
_bundle_add_to_app_control(content_info->extra_data, app_control);
}
- app_control_set_launch_mode(app_control, APP_CONTROL_LAUNCH_MODE_GROUP);
+#if 0 /* privilege_checker is not included in the 3.0 */
+ ret = app_control_add_extra_data(app_control, AUL_SVC_K_RUA_STAT_CALLER, "attach-panel");
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add 'AUL_SVC_K_RUA_STAT_CALLER'");
+
+ ret = app_control_add_extra_data(app_control, AUL_SVC_K_RUA_STAT_TAG, content_info->innate_content_info->appid);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add 'AUL_SVC_K_RUA_STAT_TAG'");
+#endif
+
+ ret = app_control_add_extra_data(app_control, "__CALLER_PANEL__", "attach-panel");
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to add '__CALLER_PANEL__'");
+
+ ret = app_control_set_launch_mode(app_control, APP_CONTROL_LAUNCH_MODE_GROUP);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to set launch mode");
+
+ ret = app_control_send_launch_request(app_control, __reply_cb, content_info);
+ if (APP_CONTROL_ERROR_NONE != ret)
+ _E("Fail to send launch request");
- app_control_send_launch_request(app_control, __reply_cb, content_info);
app_control_destroy(app_control);
}
int index = 0;
int count = 0;
- int sum = 0;
- int i = 0;
- static int column = 0;
- static int row = 0;
retv_if(!grid, ECORE_CALLBACK_CANCEL);
count = eina_list_count(list);
if (index == count) goto OUT;
-
- if (!index) {
- int grid_w;
- int grid_h;
- evas_object_geometry_get(grid, NULL, NULL, &grid_w, &grid_h);
- int w = (int) evas_object_data_get(grid, PRIVATE_DATA_KEY_ITEM_WIDTH);
- int h = (int) evas_object_data_get(grid, PRIVATE_DATA_KEY_ITEM_HEIGHT);
- if (w) {
- column = grid_w / w;
- row = (int) ceil((double) ((double) grid_h / (double) h));
+ info = eina_list_nth(list, index);
+ if (info && info->innate_content_info) {
+ if (!info->innate_content_info->is_ug) {
+ elm_gengrid_item_append(grid, gic, info, __item_selected, info);
}
}
-
- sum = column * row;
- for (; i < sum; ++i) {
- info = eina_list_nth(list, index);
- elm_gengrid_item_append(grid, gic, info, __item_selected, info);
- index++;
- if (index == count) goto OUT;
- }
+ index++;
+ if (index == count) goto OUT;
evas_object_data_set(grid, PRIVATE_DATA_KEY_LIST_INDEX, (void *) index);
return ECORE_CALLBACK_RENEW;
+void _grid_refresh(Evas_Object *grid)
+{
+ Ecore_Animator *anim = NULL;
+
+ ret_if(!grid);
+
+ elm_gengrid_clear(grid);
+
+ anim = evas_object_data_del(grid, PRIVATE_DATA_KEY_ANIMATOR);
+ if (anim) {
+ ecore_animator_del(anim);
+ }
+ anim = ecore_animator_add(__animator_cb, grid);
+ ret_if(!anim);
+
+ evas_object_data_set(grid, PRIVATE_DATA_KEY_ANIMATOR, anim);
+}
+
+
+
static void __edge_top_cb(void *data, Evas_Object *grid, void *event_info)
{
ret_if(!grid);
elm_gengrid_align_set(grid, 0.0, 0.0);
elm_gengrid_horizontal_set(grid, EINA_FALSE);
elm_gengrid_multi_select_set(grid, EINA_FALSE);
+ elm_object_style_set(grid, "popup");
gic = elm_gengrid_item_class_new();
goto_if(!gic, ERROR);
gic->func.content_get = __content_get;
gic->func.state_get = NULL;
gic->func.del = __del;
- gic->item_style = "type2";
+ gic->item_style = "default";
evas_object_data_set(grid, PRIVATE_DATA_KEY_GRID_LIST, attach_panel->content_list);
evas_object_data_set(grid, PRIVATE_DATA_KEY_GIC, gic);
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <aul.h>
+#include <Elementary.h>
+#include <tizen.h>
+#include <rua.h>
+#if 0 /* privilege_checker is not included in the 3.0 */
+#include <rua_stat.h>
+#endif
+
+#include "attach_panel.h"
+#include "attach_panel_internal.h"
+#include "conf.h"
+#include "log.h"
+
+
+
+static struct {
+ int ordering;
+} list_info = {
+ .ordering = 1,
+};
+
+static int __rua_stat_tag_iter_cb(const char *rua_stat_tag, void *data)
+{
+ Eina_List *content_list = data;
+ Eina_List *l = NULL;
+ Eina_List *ln = NULL;
+ content_s *content_info = NULL;
+
+ retv_if(!content_list, -1);
+ retv_if(!rua_stat_tag, -1);
+
+ _D("[Rua] %d : %s", list_info.ordering, rua_stat_tag);
+ EINA_LIST_FOREACH_SAFE(content_list, l, ln, content_info) {
+ continue_if(!content_info);
+ continue_if(!content_info->innate_content_info);
+ if (!strcmp(rua_stat_tag, content_info->innate_content_info->appid)) {
+ content_info->order = list_info.ordering;
+ list_info.ordering ++;
+ }
+ }
+
+ return 0;
+}
+
+
+
+static int __sort_cb(const void *d1, const void *d2)
+{
+ content_s *content_info1 = (content_s *) d1;
+ content_s *content_info2 = (content_s *) d2;
+
+ if (!content_info1 || !content_info1->innate_content_info) {
+ return 1;
+ }
+ if (!content_info2 || !content_info2->innate_content_info) {
+ return -1;
+ }
+ if (content_info1->innate_content_info->is_ug || content_info2->innate_content_info->is_ug) {
+ return -1;
+ }
+ if (content_info1->order < content_info2->order) {
+ return -1;
+ } else if (content_info1->order > content_info2->order) {
+ return 1;
+ } else {
+ return (strcmp(content_info1->innate_content_info->appid, content_info2->innate_content_info->appid));
+ }
+}
+
+
+
+Eina_List * _list_sort_by_rua(Eina_List *content_list)
+{
+ int ret = 0;
+
+ retv_if(!content_list, NULL);
+
+ list_info.ordering = 1;
+#if 0 /* privilege_checker is not included in the 3.0 */
+ ret = rua_stat_get_stat_tags("attach-panel", __rua_stat_tag_iter_cb, content_list);
+ retv_if(0 != ret, NULL);
+#endif
+
+ content_list = eina_list_sort(content_list, eina_list_count(content_list), __sort_cb);
+
+ return content_list;
+}
return;
}
- if (attach_panel->show_page != index) {
- _content_list_send_message_to_content(attach_panel->content_list, "__ATTACH_PANEL_SHOW_CONTENT_CATEGORY__", "false", attach_panel->show_page);
+ if (attach_panel->cur_page_no != index) {
+ _content_list_send_message_to_content(attach_panel->content_list, "__ATTACH_PANEL_SHOW_CONTENT_CATEGORY__", "false", attach_panel->cur_page_no);
_content_list_send_message_to_content(attach_panel->content_list, "__ATTACH_PANEL_SHOW_CONTENT_CATEGORY__", "true", index);
- attach_panel->show_page = index;
+ attach_panel->cur_page_no = index;
_D("change the show page : %d", index);
}
}
EINA_LIST_FOREACH(attach_panel->content_list, l, info) {
if (index == i) {
tabbar_item = info->tabbar_item;
- attach_panel->current_page = i;
+ attach_panel->cur_page_no = i;
break;
}
i++;
if (w == screen_w || w == screen_h) {
_D("screen size(%d, %d)", screen_w, screen_h);
- elm_scroller_page_show(scroller, attach_panel->current_page, 0);
+ elm_scroller_page_show(scroller, attach_panel->cur_page_no, 0);
}
}
elm_box_align_set(box, 0.5, 0.0);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(box);
- evas_object_event_callback_add(box, EVAS_CALLBACK_RESIZE, __resize_cb, "box");
elm_object_content_set(scroller, box);
- attach_panel->current_page = 0;
+ attach_panel->cur_page_no = 0;
return scroller;
if (box) {
evas_object_del(box);
}
- evas_object_event_callback_del(box, EVAS_CALLBACK_RESIZE, __resize_cb);
evas_object_del(scroller);
}
-void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *current_page)
+void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page, int *cur_page_no)
{
Evas_Object *box = NULL;
Evas_Object *tmp = NULL;
index = 0;
}
- *current_page = index;
+ *cur_page_no = index;
elm_scroller_page_bring_in(scroller, index, 0);
}
#include "attach_panel.h"
#include "attach_panel_internal.h"
#include "attach_bundle.h"
+#include "content_list.h"
#include "gesture.h"
#include "log.h"
{
content_s *content_info = priv;
char *enable = NULL;
+ char **select = NULL;
+
+ int i = 0;
+ int length = 0;
int ret = 0;
ret_if(!content_info);
}
ret = app_control_get_extra_data(result, "__ATTACH_PANEL_FULL_MODE__", &enable);
-
if (APP_CONTROL_ERROR_NONE == ret) {
ret_if(!enable);
return;
}
- _D("This is not result cb for attach-panel");
+ /* This can be called by clicking the 'Cancel' button on the UGs */
+ ret = app_control_get_extra_data(result, "__ATTACH_PANEL_SHOW_PANEL__", &enable);
+ if (APP_CONTROL_ERROR_NONE == ret) {
+ ret_if(!enable);
+
+ _D("attach panel show panel %s", enable);
+ if (!strcmp(enable, MODE_TRUE)) {
+ if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+ /* This is same with attach_panel_show() */
+ _content_list_set_resume(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _content_list_send_message(content_info->attach_panel->content_list, "__ATTACH_PANEL_INITIALIZE__", MODE_ENABLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _gesture_show(content_info->attach_panel);
+ }
+ } else {
+ if (ATTACH_PANEL_STATE_HIDE != _gesture_get_state()) {
+ /* This is same with attach_panel_hide() */
+ _content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _gesture_hide(content_info->attach_panel);
+ }
+ }
+ return;
+ }
+
+ /* This can be called on the state of recording video. */
+ ret = app_control_get_extra_data(result, "__ATTACH_PANEL_SHOW_TOOLBAR__", &enable);
+ if (APP_CONTROL_ERROR_NONE == ret) {
+ ret_if(!enable);
+
+ _D("attach panel show toolbar %s", enable);
+ if (!strcmp(enable, MODE_TRUE)) {
+ elm_object_signal_emit(content_info->attach_panel->ui_manager, "toolbar,show", "toolbar");
+ } else {
+ elm_object_signal_emit(content_info->attach_panel->ui_manager, "toolbar,hide", "toolbar");
+ }
+ return;
+ }
+
+ _D("The core of the panel sends the results to the caller");
+
+ /* This is just for protocol log */
+ _D("relay callback is called");
+ ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/selected", &select, &length);
+ if (APP_CONTROL_ERROR_NONE == ret && select) {
+ for (i = 0; i < length; i++) {
+ _D("selected is %s[%d]", select[i], i);
+ }
+ }
+
+ ret = app_control_get_extra_data_array(result, "http://tizen.org/appcontrol/data/path", &select, &length);
+ if (APP_CONTROL_ERROR_NONE == ret && select) {
+ for (i = 0; i < length; i++) {
+ _D("path is %s[%d]", select[i], i);
+ }
+ }
if (content_info->attach_panel->result_cb) {
content_info->attach_panel->result_cb(content_info->attach_panel
, content_info->innate_content_info->content_category
, result
+ , APP_CONTROL_RESULT_SUCCEEDED
, content_info->attach_panel->result_data);
if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
- /* This is same with attach_panel_hide */
- //_content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ /* This is same with attach_panel_hide() */
+ _content_list_set_pause(content_info->attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
_gesture_hide(content_info->attach_panel);
}
-
} else {
_D("content_info->attach_panel->result_cb is NULL");
}
ret_if(!ug);
+ evas_object_event_callback_del(ug, EVAS_CALLBACK_RESIZE, __resize_cb);
ui_gadget = evas_object_data_del(ug, DATA_KEY_UG);
ret_if(!ui_gadget);
#include <Elementary.h>
#include <bundle.h>
+#include <efl_extension.h>
#include <ui-gadget.h>
#include <ui-gadget-module.h>
#include "conf.h"
#include "content_list.h"
#include "gesture.h"
+#include "list.h"
#include "log.h"
#include "page.h"
#include "scroller.h"
-static Evas_Object *__create_content(Evas_Object *page, content_s *content_info, attach_panel_h attach_panel)
+Evas_Object *_ui_manager_create_content(Evas_Object *page, content_s *content_info, attach_panel_h attach_panel)
{
Evas_Object *content = NULL;
Elm_Object_Item *item = NULL;
}
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(page, "content", content);
evas_object_data_set(content, DATA_KEY_PAGE, page);
-static void __destroy_content(content_s *content_info, attach_panel_h attach_panel)
+void _ui_manager_destroy_content(content_s *content_info, attach_panel_h attach_panel)
{
ret_if(!content_info->content);
ret_if(!attach_panel);
content_info->attach_panel = attach_panel;
content_info->innate_content_info = innate_content_info;
content_info->extra_data = extra_data;
+ content_info->order = ORDER_MAX;
if (innate_content_info->is_ug) {
/* UG side */
content_info->tabbar_item =
_toolbar_append_item(attach_panel->toolbar, innate_content_info->name, page);
goto_if(!content_info->tabbar_item, ERROR);
+ content_info->content = NULL;
+ content_info->order = 0;
} else {
/* App side */
if (attach_panel->grid) {
attach_panel->grid_tabbar_item = content_info->tabbar_item;
goto_if(!content_info->tabbar_item, ERROR);
}
+ content_info->content = _ui_manager_create_content(page, content_info, attach_panel);
+ goto_if(!content_info->content, ERROR);
+ elm_object_part_content_set(page, "content", content_info->content);
}
- content_info->content = __create_content(page, content_info, attach_panel);
- goto_if(!content_info->content, ERROR);
- elm_object_part_content_set(page, "content", content_info->content);
+ content_info->page = page;
if (1 == _toolbar_count_item(attach_panel->toolbar)) {
_toolbar_bring_in(attach_panel->toolbar, content_info->tabbar_item);
ERROR:
if (content_info->tabbar_item) _toolbar_remove_item(attach_panel->toolbar, content_info->tabbar_item);
- if (content_info->content) __destroy_content(content_info, attach_panel);
+ if (content_info->content) _ui_manager_destroy_content(content_info, attach_panel);
if (page) _page_destroy(page);
free(content_info);
ret_if(!ui_manager);
ret_if(!content_info);
- ret_if(!content_info->content);
attach_panel = evas_object_data_get(ui_manager, DATA_KEY_ATTACH_PANEL_INFO);
ret_if(!attach_panel);
- __destroy_content(content_info, attach_panel);
+ _ui_manager_destroy_content(content_info, attach_panel);
if (content_info->innate_content_info->is_ug
|| !attach_panel->grid) {
EINA_LIST_FREE(attach_panel->content_list, content_info) {
Evas_Object *page = NULL;
- __destroy_content(content_info, attach_panel);
+ _ui_manager_destroy_content(content_info, attach_panel);
page= evas_object_data_get(content_info->content, DATA_KEY_PAGE);
if (page) {
elm_object_part_content_unset(page, "content");
{
attach_panel_h attach_panel = data;
Evas_Object *page = event_info;
+ content_s *content_info = NULL;
ret_if(!attach_panel);
ret_if(!attach_panel->toolbar);
ret_if(!attach_panel->scroller);
ret_if(!page);
- _scroller_bring_in_page(attach_panel->scroller, page, &attach_panel->current_page);
+ content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
+ ret_if(!content_info);
+ ret_if(!content_info->innate_content_info);
+
+ if (EINA_TRUE == attach_panel->is_delete) {
+ _D("This is attach_panel_destroy");
+ return;
+ }
+
+ if (page == content_info->page) {
+ _D("Tab the same page");
+ return;
+ }
+
+ if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+ _D("state of attach_panel is hide state");
+ return;
+ }
+
+ /* TODO : destroy the ug when page is not shown
+
+ if (content_info->innate_content_info->is_ug) {
+ _ui_manager_destroy_content(content_info, attach_panel);
+ content_info->content = NULL;
+ } */
+
+ _scroller_bring_in_page(attach_panel->scroller, page, &attach_panel->cur_page_no);
+ content_info = eina_list_nth(attach_panel->content_list, attach_panel->cur_page_no);
+ ret_if(!content_info);
+ ret_if(!content_info->innate_content_info);
+
+ if (!content_info->innate_content_info->is_ug) {
+ return;
+ }
+
+ if (content_info->content) {
+ return;
+ }
+
+ _D("change tab for create ug (%s)", content_info->innate_content_info->appid);
+
+ content_info->content = _ui_manager_create_content(content_info->page, content_info, attach_panel);
+ ret_if(!content_info->content);
+ if (ATTACH_PANEL_STATE_FULL == _gesture_get_state()) {
+ _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_MULTIPLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ } else {
+ _content_list_send_message(attach_panel->content_list, APP_CONTROL_DATA_SELECTION_MODE, SELECTION_MODE_SINGLE, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ }
}
}
_D("caller window is resumed");
- //_content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _content_list_set_resume(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+
+ attach_panel->content_list = _list_sort_by_rua(attach_panel->content_list);
+ _grid_refresh(attach_panel->grid);
}
}
_D("caller window is paused");
- //_content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
}
_D("keypad state on");
+ if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+ _D("attach panel is already hide");
+ return;
+ }
/* This is same with attach_panel_hide */
- //_content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
+ _gesture_hide(attach_panel);
+}
+
+
+
+static void __key_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ attach_panel_h attach_panel = data;
+ ret_if(!attach_panel);
+
+ if (ATTACH_PANEL_STATE_HIDE == _gesture_get_state()) {
+ _D("attach panel is already hide");
+ return;
+ }
+ /* This is same with attach_panel_hide() */
+ _content_list_set_pause(attach_panel->content_list, ATTACH_PANEL_CONTENT_CATEGORY_UG);
_gesture_hide(attach_panel);
}
evas_object_smart_callback_add(parent, "iconified", __window_pause_cb, attach_panel);
evas_object_smart_callback_add(attach_panel->conformant, "language,changed", __lang_changed_cb, NULL);
evas_object_smart_callback_add(attach_panel->conformant, "virtualkeypad,state,on", __keypad_on_cb, attach_panel);
+ eext_object_event_callback_add(ui_manager, EEXT_CALLBACK_BACK, __key_back_cb, attach_panel);
return ui_manager;
attach_panel = evas_object_data_del(ui_manager, DATA_KEY_ATTACH_PANEL_INFO);
ret_if(!attach_panel);
+ eext_object_event_callback_del(ui_manager, EEXT_CALLBACK_BACK, __key_back_cb);
evas_object_smart_callback_del(attach_panel->conformant, "virtualkeypad,state,on", __keypad_on_cb);
evas_object_smart_callback_del(attach_panel->conformant, "language,changed", __lang_changed_cb);
evas_object_event_callback_del(ui_manager, EVAS_CALLBACK_RESIZE, __resize_cb);