API changes by ACR
authorKyuho Jo <kyuho.jo@samsung.com>
Mon, 16 Mar 2015 12:01:46 +0000 (21:01 +0900)
committerKyuho Jo <kyuho.jo@samsung.com>
Fri, 20 Mar 2015 09:57:03 +0000 (18:57 +0900)
Change-Id: Ic2ba5e6bfc834f193886ecdc22f12fad14aa8771
Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
doc/widget_doc.h
include/widget.h
include/widget_internal.h
packaging/libwidget.spec
src/snapshot_window.c
src/virtual_window.c
src/virtual_window_wayland.c
src/widget.c

index 22cd957..a778b69 100755 (executable)
@@ -80,7 +80,7 @@ if (!win) {
 @endcode
 
 To create a window for widget,
-You have to get the parent object using widget_get_evas_object().
+You have to get the parent object using widget_get_evas().
 And after creating a window for widget, you have to delete it.
 Its attributes will be passed to the newly created window. So you don't need keep the parent object anymore.
 
index ed1752a..de6e93f 100755 (executable)
@@ -15,6 +15,8 @@
  */
 
 #include <widget_service.h>
+#include <Evas.h>
+#include <Ecore.h>
 
 #ifndef __WIDGET_UILITY_H
 #define __WIDGET_UILITY_H
@@ -35,227 +37,36 @@ extern "C" {
  */
 
 /**
- * @brief Event information type for widget_content_event()
- * @details definition is in widget_service.h file
- * @since_tizen 2.4
- */
-typedef struct widget_event_info *widget_event_info_t;
-
-/**
- * @brief Creates an evas to draw widget contents
+ * @brief Creates an Evas to draw widget contents
  * @details Creating a new Object using widget frame buffer.
  * @since_tizen 2.4
  * @param[in] id Instance Id
- * @param[in] gbar 1 if this object is created for Glance Bar or 0 (for widget)
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return void* Object type
- * @retval Address Valid evas object
- * @retval @c NULL failed to create, widget_last_status() will returns reason of failure
- */
-extern void *widget_get_evas(const char *id, int gbar);
-
-/**
- * @brief Set extra information for updated content.
- * @details
- *      If the provider should give some hints to the viewer,
- *      such as title, icon and name, this function can set them.
- *      provider will send those information to the viewer when the
- *      content is updated.
- * @since_tizen 2.4
- * @privlevel N/P
- * @feature http://tizen.org/feature/shell.appwidget
- * @remarks This function only works with the buffer type inhouse provider.
- * @param[in] id widget Instance Id
- * @param[in] content Content string that will pass to a widget via widget_create interface when it is re-created.
- * @param[in] title Human readable text for accessitility, summarized text for representing the content of a box.
- * @param[in] icon Path of icon image file - alternative image content
- * @param[in] name Name of a box - alternative text content
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
- * @retval #WIDGET_STATUS_ERROR_FAULT Unrecoverable error
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully sent
- */
-extern int widget_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
-
-/**
- * @brief Return values of widget programming interfaces: Operation is successfully done.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_DONE;
-
-/**
- * @brief Return values of widget programming interfaces: Contents are updated.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_OUTPUT_UPDATED;
-
-/**
- * @brief Return values of widget programming interfaces: Need to call the widget_need_to_update and widget_update_content.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_NEED_TO_SCHEDULE;
-
-/**
- * @internal
- * @brief Return values of widget programming interfaces: Need to create a new instance.
- * @since_tizen 2.4
- */
-extern const int WIDGET_NEED_TO_CREATE;
-
-/**
- * @brief Return values of widget programming interfaces: Need to do force update.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_FORCE_TO_SCHEDULE;
-
-/**
- * @brief Return values of widget programming interfaces: Need to destroy this instance.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_NEED_TO_DESTROY;
-
-/**
- * @brief Return values of widget programming interfaces: Need to update.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_NEED_TO_UPDATE;
-
-/**
- * @brief System event type: System font is changed.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_FONT_CHANGED;
-
-/**
- * @brief System event type: System language is changed.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_LANG_CHANGED;
-
-/**
- * @brief System event type: System time is changed.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_TIME_CHANGED;
-
-/**
- * @brief System event type: MMC Status change event.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_MMC_STATUS_CHANGED;
-
-/**
- * @brief System event type: Region changed.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_REGION_CHANGED;
-
-/**
- * @brief System event type: Accessibility mode changed.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_TTS_CHANGED;
-
-/**
- * @brief System event type: widget is paused.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
+ * @return instance of Evas
+ * @retval Valid pointer of Evas instance on success,
+ * @retval @c NULL failed to create, get_last_result() will returns reason of failure
  */
-extern const int WIDGET_SYS_EVENT_PAUSED;
-
-/**
- * @brief System event type: widget is resumed.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_RESUMED;
-
-/**
- * @brief System event type: widget instance is removed from a viewer.
- * @since_tizen 2.4
- * @feature http://tizen.org/feature/shell.appwidget
- */
-extern const int WIDGET_SYS_EVENT_DELETED;
+extern Evas *widget_get_evas(const char *id);
 
 /**
  * @brief Requests to schedule the update operation to a provider.
- *        Your widget will get the update request, if the @a id is specified, specific box only will get it.
+ * @detail Insert a update event to event queue and it will be handled by update callback function.
  * @since_tizen 2.4
  * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
  * @feature http://tizen.org/feature/shell.appwidget
  * @return If succes returns 0 or return less than 0
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully triggered
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #WIDGET_STATUS_ERROR_NOT_EXIST Given id instance is not exist
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_DISABLED in case of direct request for updating is disabled
+ * @retval #WIDGET_ERROR_NONE Successfully triggered
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #WIDGET_ERROR_NOT_EXIST Given id instance is not exist
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_DISABLED in case of direct request for updating is disabled
  */
 extern int widget_request_update(const char *id);
 
 /**
- * @brief Send a freeze request to the viewer (homescreen)
- * @details
- *        The viewer will get this request via event callback.
- *        Then it should freeze its scroller or stop moving the widget.
- * @since_tizen 2.4
- * @remarks If the viewer doesn't care this request, this will has no effect.
- * @param[in] widgetid widget Package Id
- * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
- * @privlevel public
- * @privilege %http://tizen.org/privilege/widget.provider
- * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_FAULT Failed to send requet
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully requested
- * @see widget_release_scroller()
- */
-extern int widget_freeze_scroller(const char *widgetid, const char *id);
-
-/**
- * @brief Send a release request to the viewer (homescreen)
- * @details
- *        The viewer will get this request via event callback.
- *        Then it should release its scroller or continue moving the widget.
- * @since_tizen 2.4
- * @remarks If the viewer doesn't care this request, this will has no effect.
- * @param[in] widgetid widget Package Id
- * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
- * @privlevel public
- * @privilege %http://tizen.org/privilege/widget.provider
- * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #WIDGET_STATUS_ERROR_FAULT Failed to send requet
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully requested
- * @see widget_freeze_scroller()
- */
-extern int widget_thaw_scroller(const char *widgetid, const char *id);
-
-/**
  * @}
  */
 
index 340c5cd..c3cf60a 100755 (executable)
@@ -155,6 +155,39 @@ extern "C" {
 
 /**
  * @internal
+ * @brief Return values of widget programming interfaces for the plug-in type widgets
+ * @since_tizen 2.4
+ * @feature http://tizen.org/feature/shell.appwidget
+ */
+typedef enum widget_api_result {
+       WIDGET_DONE = 0x00, /**< Operation is successfully done. */
+       WIDGET_OUTPUT_UPDATED = 0x01,  /**< Contents are updated. */
+       WIDGET_NEED_TO_SCHEDULE = 0x02, /**< Need to call the widget_need_to_update and widget_update_content. */
+       WIDGET_NEED_TO_CREATE = 0x04, /**< Need to create a new instance. */
+       WIDGET_NEED_TO_DESTROY = 0x08, /**< Need to destroy this instance. */
+       WIDGET_FORCE_TO_SCHEDULE = 0x10, /**< Need to do force update. */
+} widget_api_result_e;
+
+/**
+ * @internal
+ * @brief System event type for the plug-in type widgets
+ * @since_tizen 2.4
+ * @feature http://tizen.org/feature/shell.appwidget
+ */
+typedef enum widget_system_event {
+       WIDGET_SYS_EVENT_FONT_CHANGED = 0x01, /**< System font is changed. */
+       WIDGET_SYS_EVENT_LANG_CHANGED = 0x02, /**< System language is changed. */
+       WIDGET_SYS_EVENT_TIME_CHANGED = 0x04, /**< System time is changed. */
+       WIDGET_SYS_EVENT_REGION_CHANGED = 0x08, /**< Region changed. */
+       WIDGET_SYS_EVENT_TTS_CHANGED = 0x10, /**< Accessibility mode changed. */
+       WIDGET_SYS_EVENT_PAUSED = 0x0100, /**< widget is paused. */
+       WIDGET_SYS_EVENT_RESUMED = 0x0200, /**< widget is resumed. */
+       WIDGET_SYS_EVENT_MMC_STATUS_CHANGED = 0x0400, /**< MMC Status change event. */
+       WIDGET_SYS_EVENT_DELETED = 0x0800, /**< widget instance is removed from a viewer. */
+} widget_system_event_e;
+
+/**
+ * @internal
  * @brief widget description data handle.
  * @since_tizen 2.3
  */
@@ -178,7 +211,7 @@ typedef void (*widget_flush_cb)(void *snapshot_window, const char *id, int statu
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return Handle of desc instance
- * @retval @c NULL Failed to create a desc instance, widget_last_status() will returns reason of failure
+ * @retval @c NULL Failed to create a desc instance, get_last_result() will returns reason of failure
  * @pre Should be loaded by data-provider-slave.
  * @post Should be destroyed(flushed) using widget_desc_close() API.
  * @see widget_desc_close()
@@ -195,11 +228,11 @@ extern widget_desc_h widget_desc_open(const char *id, int gbar);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_NONE If the flushing description data is successfully done
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER If the given handle is not valid
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_NONE If the flushing description data is successfully done
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER If the given handle is not valid
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
  * @pre Handle must be created by widget_desc_open()
  * @post Handle must not be used after return from this function.
  * @see widget_desc_open()
@@ -214,10 +247,10 @@ extern int widget_desc_close(widget_desc_h handle);
  * @param[in] handle Handle which is created by widget_desc_open() function
  * @param[in] id Id string of target object
  * @param[in] category Category string that will be used by layout object
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid handle
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Memory is not enough to add this block
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid handle
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Memory is not enough to add this block
  * @retval index Index(>=0) of added block, which can be used by widget_desc_set_id()
  * @pre Must be called after create a handle using widget_desc_open()
  * @see widget_desc_set_id()
@@ -233,10 +266,10 @@ extern int widget_desc_set_category(widget_desc_h handle, const char *id, const
  * @param[in] id Id string of target object
  * @param[in] w Width in pixel
  * @param[in] h Height in pixel
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new block
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory to add a new block
  * @retval index Index(>=0) of added block Successfully added
  * @see widget_desc_open()
  * @see widget_desc_set_id()
@@ -251,11 +284,11 @@ extern int widget_desc_set_size(widget_desc_h handle, const char *id, int w, int
  * @param[in] handle Handle which is created by widget_desc_open() function
  * @param[in] idx Index of target block
  * @param[in] id Id String which will be used by other widget_desc_XXX functions
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_NONE Id is successfully updated for given idx of desc block
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_NONE Id is successfully updated for given idx of desc block
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_NOT_EXIST Given index of desc block is not exists
  * @pre Desc block should be exists which has given index "idx".
  * @post Specified Id string("id") can be used by other widget_desc_XXXX functions.
  * @see widget_desc_open()
@@ -274,8 +307,8 @@ extern int widget_desc_set_id(widget_desc_h handle, int idx, const char *id);
  * @param[in] data Content for specified part
  * @param[in] option Option for the block. (script: group, image: option, ...)
  * @return Index of current description block
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Not enough memory to add a new desc block
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory to add a new desc block
  * @retval index Index(>=0) of added desc block
  * @pre Handle must be created using widget_desc_open.
  * @see widget_desc_set_id()
@@ -290,10 +323,10 @@ extern int widget_desc_add_block(widget_desc_h handle, const char *id, const cha
  * @details If you discard the added desc block, use this API and the index of the created desc block.
  * @param[in] handle Handle which is created by widget_desc_open() function
  * @param[in] idx Index of added block, returned from widget_desc_add_block(), widget_desc_set_size(), widget_desc_set_category(), etc
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully deleted
- * @retval #WIDGET_STATUS_ERROR_NOT_EXIST Given index of desc block is not exists
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_NONE Successfully deleted
+ * @retval #WIDGET_ERROR_NOT_EXIST Given index of desc block is not exists
  * @pre Index must be exists.
  * @see widget_desc_add_block()
  * @see widget_desc_open()
@@ -322,12 +355,12 @@ extern const int WIDGET_USE_NET;
  * @since_tizen 2.3
  * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
  * @param[in] gbar 1 for updating content of Glance Bar or 0(for content of widget)
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_IO_ERROR I/O failed, Cannot access given resource file(id)
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully notified
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_IO_ERROR I/O failed, Cannot access given resource file(id)
+ * @retval #WIDGET_ERROR_NONE Successfully notified
  * @pre This API only can be used after loaded into the data-provider-slave process.
  */
 extern int widget_content_is_updated(const char *id, int gbar);
@@ -347,7 +380,7 @@ extern int widget_content_is_updated(const char *id, int gbar);
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return Buffer handle
- * @retval @c NULL Failed to acquire buffer, widget_last_status() will returns reason of failure.
+ * @retval @c NULL Failed to acquire buffer, get_last_result() will returns reason of failure.
  * @retval handler Handle object
  * @pre Given instance must be specify its type as buffer. or this API will be fail.
  * @post Allocated buffer object must be released via widget_release_buffer().
@@ -368,10 +401,10 @@ extern widget_buffer_h widget_create_buffer(const char *id, int gbar, int auto_a
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return int status
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully allocated
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WIDGET_STATUS_ERROR_FAULT Unrecoverable error occurred
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_NONE Successfully allocated
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WIDGET_ERROR_FAULT Unrecoverable error occurred
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
  * @pre widget_create_buffer() must be called
  * @see widget_create_buffer()
  * @see widget_release_buffer()
@@ -404,9 +437,9 @@ extern unsigned int widget_viewer_get_resource_id(widget_buffer_h handle, int id
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return int status
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully released
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_NONE Successfully released
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
  * @pre Handle must be created using widget_acquire_buffer().
  * @see widget_acquire_buffer()
  */
@@ -421,9 +454,9 @@ extern int widget_viewer_release_buffer(widget_buffer_h handle, int idx);
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return int status
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMTER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully destroyed
+ * @retval #WIDGET_ERROR_INVALID_PARAMTER Invalid argument
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_NONE Successfully destroyed
  * @see widget_create_buffer()
  */
 extern int widget_destroy_buffer(widget_buffer_h handle);
@@ -439,7 +472,7 @@ extern int widget_destroy_buffer(widget_buffer_h handle);
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return void* address of the render buffer
- * @retval @c NULL If it falis to get buffer address, widget_last_status() will returns reason of failure.
+ * @retval @c NULL If it falis to get buffer address, get_last_result() will returns reason of failure.
  * @retval address If it succeed to get the buffer address
  * @see widget_unref_buffer()
  */
@@ -453,11 +486,11 @@ extern void *widget_ref_buffer(widget_buffer_h handle);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid handle
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully unreference
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid handle
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_NONE Successfully unreference
  * @pre widget_ref_buffer() must be called.
  * @see widget_ref_buffer()
  */
@@ -473,11 +506,11 @@ extern int widget_unref_buffer(void *buffer);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully sync'd
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_NONE Successfully sync'd
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
  * @see widget_acquire_buffer()
  */
 extern int widget_viewer_sync_buffer(widget_buffer_h handle);
@@ -504,12 +537,12 @@ extern int widget_support_hw_buffer(widget_buffer_h handle);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_ALREADY H/W buffer is already created
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully created
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_ALREADY_EXIST H/W buffer is already created
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_NONE Successfully created
  * @pre Must be checked whether the H/W buffer is supported or not.
  * @post Must be destroyed if it is not necessary.
  * @see widget_support_hw_buffer()
@@ -525,11 +558,11 @@ extern int widget_create_hw_buffer(widget_buffer_h handle);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully destroyed
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_NONE Successfully destroyed
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
  * @pre Must be created h/w buffer using widget_create_hw_buffer.
  * @see widget_create_hw_buffer()
  */
@@ -545,7 +578,7 @@ extern int widget_destroy_hw_buffer(widget_buffer_h handle);
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return void* type
- * @retval @c NULL Failed to get H/W accelerated buffer address, widget_last_status() will returns reason of failure.
+ * @retval @c NULL Failed to get H/W accelerated buffer address, get_last_result() will returns reason of failure.
  * @retval addr H/W accelerated buffer address
  * @see widget_create_hw_buffer()
  */
@@ -559,8 +592,8 @@ extern void *widget_buffer_hw_buffer(widget_buffer_h handle);
  * @param[in] handle Buffer handle
  * @return int stride size
  * @retval positive_value length of stride
- * @return #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
- * @return #WIDGET_STATUS_ERROR_FAULT Unrecoverable error
+ * @return #WIDGET_ERROR_INVALID_PARAMETER Invalid parameter
+ * @return #WIDGET_ERROR_FAULT Unrecoverable error
  * @see widget_create_hw_buffer()
  */
 extern int widget_buffer_stride(widget_buffer_h handle);
@@ -574,11 +607,11 @@ extern int widget_buffer_stride(widget_buffer_h handle);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid handle
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully done
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid handle
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_NONE Successfully done
  * @post widget_buffer_post_render must be called after the rendering (accessing buffer) is completed.
  * @see widget_support_hw_buffer()
  * @see widget_buffer_post_render()
@@ -594,9 +627,9 @@ extern int widget_buffer_pre_render(widget_buffer_h handle);
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return If succes returns 0 or return less than 0
- * @retval #WIDGET_STATUS_ERROR_NONE If succeed
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_ERROR_NONE If succeed
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
  * @pre widget_buffer_pre_render must be called.
  * @see widget_support_hw_buffer()
  * @see widget_buffer_pre_render()
@@ -610,17 +643,17 @@ extern int widget_buffer_post_render(widget_buffer_h handle);
  * @since_tizen 2.3
  * @param[in] widgetid widget Package Id
  * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
- * @param[in] reason #WIDGET_STATUS_ERROR_NONE(0)
+ * @param[in] reason #WIDGET_ERROR_NONE(0)
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return #WIDGET_STATUS_ERROR_NONE on success,
- *          otherwise an error code (see #WIDGET_STATUS_ERROR_XXX) on failure
- * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
- * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #WIDGET_STATUS_ERROR_FAULT Failed to send a request
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully requested
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #WIDGET_ERROR_FAULT Failed to send a request
+ * @retval #WIDGET_ERROR_NONE Successfully requested
  */
 extern int widget_request_close_glance_bar(const char *widgetid, const char *id, int reason);
 
@@ -636,7 +669,7 @@ extern int widget_request_close_glance_bar(const char *widgetid, const char *id,
  * @param[in] id
  * @param[in] size_type
  * @return void* window
- * @retval @c NULL failed to create a snapshot window, widget_last_status() will returns reason of failure.
+ * @retval @c NULL failed to create a snapshot window, get_last_result() will returns reason of failure.
  * @retval Object window object (ex, elementary window)
  * @see widget_snapshot_window_flush()
  */
@@ -651,9 +684,9 @@ extern void *widget_snapshot_window_add(const char *id, int size_type);
  * @param[in] flush_cb Right after flush an image file, this callback will be called
  * @param[in] data Callback data for flush_cb
  * @return int status
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully flushed (flush timer added)
- * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid paramter
- * @retval #WIDGET_STATUS_ERROR_FAULT Failed to create a flush timer
+ * @retval #WIDGET_ERROR_NONE Successfully flushed (flush timer added)
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid paramter
+ * @retval #WIDGET_ERROR_FAULT Failed to create a flush timer
  * @see widget_snapshot_window_add()
  */
 extern int widget_snapshot_window_flush(void *snapshot_win, double timeout, widget_flush_cb flush_cb, void *data);
@@ -668,11 +701,87 @@ extern int widget_snapshot_window_flush(void *snapshot_win, double timeout, widg
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
  * @return int status
- * @retval #WIDGET_STATUS_ERROR_NONE Successfully sent
+ * @retval #WIDGET_ERROR_NONE Successfully sent
  */
 extern int widget_send_updated_by_idx(widget_buffer_h handle, int idx);
 
 /**
+ * @internal
+ * @brief Set extra information for updated content.
+ * @details
+ *      If the provider should give some hints to the viewer,
+ *      such as title, icon and name, this function can set them.
+ *      provider will send those information to the viewer when the
+ *      content is updated.
+ * @since_tizen 2.4
+ * @privlevel N/P
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @remarks This function only works with the buffer type inhouse provider.
+ * @param[in] id widget Instance Id
+ * @param[in] content Content string that will pass to a widget via widget_create interface when it is re-created.
+ * @param[in] title Human readable text for accessibility, summarized text for representing the content of a box.
+ * @param[in] icon Path of icon image file - alternative image content
+ * @param[in] name Name of a box - alternative text content
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
+ * @retval #WIDGET_ERROR_FAULT Unrecoverable error
+ * @retval #WIDGET_ERROR_NONE Successfully sent
+ * TODO: plug-in type
+ */
+extern int widget_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
+
+/**
+ * @internal
+ * @brief Send a freeze request to the viewer (homescreen)
+ * @details
+ *        The viewer will get this request via event callback.
+ *        Then it should freeze its scroller or stop moving the widget.
+ * @since_tizen 2.4
+ * @remarks If the viewer doesn't care this request, this will has no effect.
+ * @param[in] widgetid widget Package Id
+ * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.provider
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_FAULT Failed to send requet
+ * @retval #WIDGET_ERROR_NONE Successfully requested
+ * @see widget_release_scroller()
+ * TODO: plug-in type
+ */
+extern int widget_freeze_scroller(const char *widgetid, const char *id);
+
+/**
+ * @inernal
+ * @brief Send a release request to the viewer (homescreen)
+ * @details
+ *        The viewer will get this request via event callback.
+ *        Then it should release its scroller or continue moving the widget.
+ * @since_tizen 2.4
+ * @remarks If the viewer doesn't care this request, this will has no effect.
+ * @param[in] widgetid widget Package Id
+ * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.provider
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return #WIDGET_ERROR_NONE on success,
+ *          otherwise an error code (see #WIDGET_ERROR_XXX) on failure
+ * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
+ * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #WIDGET_ERROR_FAULT Failed to send requet
+ * @retval #WIDGET_ERROR_NONE Successfully requested
+ * @see widget_freeze_scroller()
+ * TODO: plug-in type
+ */
+extern int widget_thaw_scroller(const char *widgetid, const char *id);
+/**
  * @}
  */
 
index f67d409..a2c225a 100755 (executable)
@@ -2,7 +2,7 @@
 
 Name: libwidget
 Summary: widget development library
-Version: 1.0.0
+Version: 1.1.1
 Release: 1
 Group: HomeTF/widget
 License: Flora
index d7173ac..648d382 100755 (executable)
@@ -78,7 +78,7 @@ static inline int flush_data_to_file(Evas *e, const char *data, const char *file
        output = evas_object_image_add(e);
        if (!output) {
                DbgPrint("Failed to create an image object\n");
-               return WIDGET_STATUS_ERROR_FAULT;
+               return WIDGET_ERROR_FAULT;
        }
 
        evas_object_image_data_set(output, NULL);
@@ -93,18 +93,18 @@ static inline int flush_data_to_file(Evas *e, const char *data, const char *file
        if (evas_object_image_save(output, filename, NULL, QUALITY_N_COMPRESS) == EINA_FALSE) {
                evas_object_del(output);
                DbgPrint("Faield to save a captured image (%s)\n", filename);
-               return WIDGET_STATUS_ERROR_IO_ERROR;
+               return WIDGET_ERROR_IO_ERROR;
        }
 
        evas_object_del(output);
 
        if (access(filename, F_OK) != 0) {
                DbgPrint("File %s is not found\n", filename);
-               return WIDGET_STATUS_ERROR_IO_ERROR;
+               return WIDGET_ERROR_IO_ERROR;
        }
 
        DbgPrint("Flush data to a file (%s)\n", filename);
-       return WIDGET_STATUS_ERROR_NONE;
+       return WIDGET_ERROR_NONE;
 }
 
 static inline int destroy_virtual_canvas(Evas *e)
@@ -114,11 +114,11 @@ static inline int destroy_virtual_canvas(Evas *e)
        ee = ecore_evas_ecore_evas_get(e);
        if (!ee) {
                DbgPrint("Failed to ecore evas object\n");
-               return WIDGET_STATUS_ERROR_FAULT;
+               return WIDGET_ERROR_FAULT;
        }
 
        ecore_evas_free(ee);
-       return WIDGET_STATUS_ERROR_NONE;
+       return WIDGET_ERROR_NONE;
 }
 
 static inline int flush_to_file(const void *canvas, const char *filename, int w, int h)
@@ -130,14 +130,14 @@ static inline int flush_to_file(const void *canvas, const char *filename, int w,
        shot_e = create_virtual_canvas(w, h);
        if (!shot_e) {
                ErrPrint("Unable to create a new virtual window\n");
-               return WIDGET_STATUS_ERROR_FAULT;
+               return WIDGET_ERROR_FAULT;
        }
 
        shot_ee = ecore_evas_ecore_evas_get(shot_e);
        if (!shot_ee) {
                ErrPrint("Unable to get Ecore_Evas\n");
                destroy_virtual_canvas(shot_e);
-               return WIDGET_STATUS_ERROR_FAULT;
+               return WIDGET_ERROR_FAULT;
        }
 
        ecore_evas_manual_render_set(shot_ee, EINA_TRUE);
@@ -156,7 +156,7 @@ static Eina_Bool snapshot_cb(void *data)
        Ecore_Evas *ee;
        void *canvas;
        widget_flush_cb flush_cb;
-       int status = WIDGET_STATUS_ERROR_NONE;
+       int status = WIDGET_ERROR_NONE;
 
        info = evas_object_data_get(snapshot_win, "snapshot,info");
        if (!info) {
@@ -167,7 +167,7 @@ static Eina_Bool snapshot_cb(void *data)
        if (info->flush_timer) {
                info->flush_timer = NULL;
        } else {
-               status = WIDGET_STATUS_ERROR_CANCEL;
+               status = WIDGET_ERROR_CANCELED;
        }
 
        flush_cb = info->flush_cb;
@@ -177,7 +177,7 @@ static Eina_Bool snapshot_cb(void *data)
        if (!e) {
                ErrPrint("Invalid object\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, WIDGET_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, WIDGET_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
@@ -186,7 +186,7 @@ static Eina_Bool snapshot_cb(void *data)
        if (!ee) {
                ErrPrint("Invalid object (ee)\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, WIDGET_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, WIDGET_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
@@ -195,7 +195,7 @@ static Eina_Bool snapshot_cb(void *data)
        if (!canvas) {
                DbgPrint("Failed to get pixel canvas\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, WIDGET_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, WIDGET_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
@@ -209,7 +209,7 @@ static Eina_Bool snapshot_cb(void *data)
 
                DbgPrint("Flush size: %dx%d\n", w, h);
                ret = flush_to_file(canvas, info->id, w, h);
-               if (status == WIDGET_STATUS_ERROR_NONE) {
+               if (status == WIDGET_ERROR_NONE) {
                        status = ret;
                }
 
@@ -278,7 +278,7 @@ static Eina_Bool direct_snapshot_cb(void *data)
        if (!e) {
                ErrPrint("Invalid object, failed to get Evas\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, WIDGET_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, WIDGET_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
@@ -287,7 +287,7 @@ static Eina_Bool direct_snapshot_cb(void *data)
        if (!ee) {
                ErrPrint("Unable to get Ecore_Evas object\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, WIDGET_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, WIDGET_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
@@ -299,7 +299,7 @@ static Eina_Bool direct_snapshot_cb(void *data)
        if (!canvas) {
                ErrPrint("Failed to get canvas\n");
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, WIDGET_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, WIDGET_ERROR_FAULT, info->data);
                }
                return ECORE_CALLBACK_CANCEL;
        }
@@ -356,7 +356,7 @@ static void post_render_cb(void *data, Evas *e, void *event_info)
                info->flush_cb = NULL;
 
                if (flush_cb) {
-                       flush_cb(snapshot_win, info->id, WIDGET_STATUS_ERROR_FAULT, info->data);
+                       flush_cb(snapshot_win, info->id, WIDGET_ERROR_FAULT, info->data);
                }
                /*!
                 * \note
@@ -394,7 +394,7 @@ PUBLIC void *widget_snapshot_window_add(const char *id, int size_type)
        int w;
        int h;
 
-       if (widget_service_get_size(size_type, &w, &h) != WIDGET_STATUS_ERROR_NONE) {
+       if (widget_service_get_size(size_type, &w, &h) != WIDGET_ERROR_NONE) {
                ErrPrint("Invalid size\n");
                return NULL;
        }
@@ -460,13 +460,13 @@ PUBLIC int widget_snapshot_window_flush(void *snapshot_win, double timeout, widg
 
        if (!flush_cb || timeout < 0.0f) {
                ErrPrint("Invalid argument (%p, %lf)\n", flush_cb, timeout);
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        info = evas_object_data_get(snapshot_win, "snapshot,info");
        if (!info) {
                ErrPrint("Invalid argument\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        info->timeout = timeout;
@@ -479,7 +479,7 @@ PUBLIC int widget_snapshot_window_flush(void *snapshot_win, double timeout, widg
                 */
                info->flush_timer = ecore_timer_add(0.0001f, direct_snapshot_cb, snapshot_win);
                if (!info->flush_timer) {
-                       return WIDGET_STATUS_ERROR_FAULT;
+                       return WIDGET_ERROR_FAULT;
                }
        } else if (info->render_cnt) {
                /*!
@@ -489,14 +489,14 @@ PUBLIC int widget_snapshot_window_flush(void *snapshot_win, double timeout, widg
                DbgPrint("Rendered %d times already\n", info->render_cnt);
                info->flush_timer = ecore_timer_add(info->timeout, snapshot_cb, snapshot_win);
                if (!info->flush_timer) {
-                       return WIDGET_STATUS_ERROR_FAULT;
+                       return WIDGET_ERROR_FAULT;
                }
        }
 
        info->flush_cb = flush_cb;
        info->data = data;
 
-       return WIDGET_STATUS_ERROR_NONE;
+       return WIDGET_ERROR_NONE;
 }
 
 /* End of a file */
index 7b8934d..f302cad 100755 (executable)
@@ -29,6 +29,7 @@
 #include <dlog.h>
 #include <widget_errno.h>
 #include <widget_service.h>
+#include <widget_service_internal.h>
 #include <widget_conf.h>
 #include <widget_buffer.h>
 
@@ -879,7 +880,11 @@ static void ecore_evas_free_cb(Ecore_Evas *ee)
        info->ee = NULL;
 }
 
-PUBLIC void *widget_get_evas(const char *id, int is_gbar)
+#ifdef WIDGET_FEATURE_GBAR_SUPPORTED
+PUBLIC Evas *widget_get_evas(const char *id, int is_gbar)
+#else /* WIDGET_FEATURE_GBAR_SUPPORTED */
+PUBLIC Evas *widget_get_evas(const char *id)
+#endif /* WIDGET_FEATURE_GBAR_SUPPORTED */
 {
        vwin_info_t info;
        Evas_Object *rect;
@@ -925,7 +930,11 @@ PUBLIC void *widget_get_evas(const char *id, int is_gbar)
                return NULL;
        }
 
+#ifdef WIDGET_FEATURE_GBAR_SUPPORTED
        info->is_gbar = is_gbar;
+#else
+       info->is_gbar = 0;
+#endif /* WIDGET_FEATURE_GBAR_SUPPORTED */
 
        /**
         * Acquire a buffer for canvas.
index 61a9ebe..d332aaa 100755 (executable)
@@ -382,7 +382,7 @@ static void post_render_cb(void *data, Evas *e, void *event_info)
        }
 }
 
-PUBLIC void *widget_get_evas(const char *id, int is_gbar)
+PUBLIC Evas *widget_get_evas(const char *id, int is_gbar)
 {
        struct info *info;
        Evas_Object *rect;
index 8811eed..c521977 100755 (executable)
 #include <dlog.h>
 #include <widget_errno.h>
 #include <widget_service.h>
+#include <widget_service_internal.h>
 #include <widget_provider.h>
 #include <widget_provider_buffer.h>
 #include <widget_conf.h>
 #include <widget_buffer.h>
-#include <Evas.h>
-#include <Ecore.h>
 
 #include "debug.h"
 #include "dlist.h"
@@ -144,7 +143,7 @@ static inline void load_update_function(void)
 
 static int send_updated(const char *pkgname, const char *id, widget_buffer_h handle, int idx, int x, int y, int w, int h, int gbar, const char *descfile)
 {
-       int ret = WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+       int ret = WIDGET_ERROR_INVALID_PARAMETER;
 
        if (s_info.type == LOAD_TYPE_UNKNOWN) {
                load_update_function();
@@ -158,7 +157,7 @@ static int send_updated(const char *pkgname, const char *id, widget_buffer_h han
                 */
                ret = s_info.updated.slave.send(pkgname, id, handle, idx, x, y, w, h, gbar, descfile);
        } else {
-               widget_damage_region_t region = {
+               widget_damage_region_s region = {
                        .x = x,
                        .y = y,
                        .w = w,
@@ -196,19 +195,19 @@ static inline int event_handler_wrapper(widget_buffer_h buffer, widget_buffer_ev
        pkgname = widget_provider_buffer_pkgname(buffer);
        if (!pkgname) {
                ErrPrint("pkgname is not valid\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        id = widget_provider_buffer_id(buffer);
        if (!id) {
                ErrPrint("id is not valid[%s]\n", pkgname);
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (cbdata->handler) {
                ret = cbdata->handler(buffer, event_info, cbdata->cbdata);
        } else {
-               ret = WIDGET_STATUS_ERROR_FAULT;
+               ret = WIDGET_ERROR_FAULT;
        }
 
        switch (event_info->type) {
@@ -260,25 +259,6 @@ static inline int default_event_handler(widget_buffer_h buffer, widget_buffer_ev
        return 0;
 }
 
-PUBLIC const int WIDGET_DONE = 0x00;
-PUBLIC const int WIDGET_OUTPUT_UPDATED = 0x02;
-PUBLIC const int WIDGET_USE_NET = 0x04;
-
-PUBLIC const int WIDGET_NEED_TO_SCHEDULE = 0x01;
-PUBLIC const int WIDGET_NEED_TO_CREATE = 0x01;
-PUBLIC const int WIDGET_NEED_TO_DESTROY = 0x01;
-PUBLIC const int WIDGET_FORCE_TO_SCHEDULE = 0x08;
-
-PUBLIC const int WIDGET_SYS_EVENT_FONT_CHANGED = 0x01;
-PUBLIC const int WIDGET_SYS_EVENT_LANG_CHANGED = 0x02;
-PUBLIC const int WIDGET_SYS_EVENT_TIME_CHANGED = 0x04;
-PUBLIC const int WIDGET_SYS_EVENT_REGION_CHANGED = 0x08;
-PUBLIC const int WIDGET_SYS_EVENT_TTS_CHANGED = 0x10;
-PUBLIC const int WIDGET_SYS_EVENT_PAUSED = 0x0100;
-PUBLIC const int WIDGET_SYS_EVENT_RESUMED = 0x0200;
-PUBLIC const int WIDGET_SYS_EVENT_MMC_STATUS_CHANGED = 0x0400;
-PUBLIC const int WIDGET_SYS_EVENT_DELETED = 0x0800;
-
 PUBLIC struct widget_desc *widget_desc_open(const char *filename, int for_pd)
 {
        struct widget_desc *handle;
@@ -331,7 +311,7 @@ PUBLIC int widget_desc_close(struct widget_desc *handle)
        struct block *block;
 
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        dlist_foreach_safe(handle->block_list, l, n, block) {
@@ -376,7 +356,7 @@ PUBLIC int widget_desc_close(struct widget_desc *handle)
                ErrPrint("fclose: %s\n", strerror(errno));
        }
        free(handle);
-       return WIDGET_STATUS_ERROR_NONE;
+       return WIDGET_ERROR_NONE;
 }
 
 PUBLIC int widget_desc_set_category(struct widget_desc *handle, const char *id, const char *category)
@@ -384,25 +364,25 @@ PUBLIC int widget_desc_set_category(struct widget_desc *handle, const char *id,
        struct block *block;
 
        if (!handle || !category) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        block = calloc(1, sizeof(*block));
        if (!block) {
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->type = strdup(WIDGET_DESC_TYPE_INFO);
        if (!block->type) {
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->part = strdup("category");
        if (!block->part) {
                free(block->type);
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->data = strdup(category);
@@ -410,7 +390,7 @@ PUBLIC int widget_desc_set_category(struct widget_desc *handle, const char *id,
                free(block->type);
                free(block->part);
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        if (id) {
@@ -420,7 +400,7 @@ PUBLIC int widget_desc_set_category(struct widget_desc *handle, const char *id,
                        free(block->type);
                        free(block->part);
                        free(block);
-                       return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+                       return WIDGET_ERROR_OUT_OF_MEMORY;
                }
        }
 
@@ -435,25 +415,25 @@ PUBLIC int widget_desc_set_size(struct widget_desc *handle, const char *id, int
        char buffer[BUFSIZ];
 
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        block = calloc(1, sizeof(*block));
        if (!block) {
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->type = strdup(WIDGET_DESC_TYPE_INFO);
        if (!block->type) {
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->part = strdup("size");
        if (!block->part) {
                free(block->type);
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        if (id) {
@@ -462,7 +442,7 @@ PUBLIC int widget_desc_set_size(struct widget_desc *handle, const char *id, int
                        free(block->part);
                        free(block->type);
                        free(block);
-                       return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+                       return WIDGET_ERROR_OUT_OF_MEMORY;
                }
        }
 
@@ -473,7 +453,7 @@ PUBLIC int widget_desc_set_size(struct widget_desc *handle, const char *id, int
                free(block->part);
                free(block->type);
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->idx = handle->last_idx++;
@@ -490,27 +470,27 @@ PUBLIC int widget_desc_set_id(struct widget_desc *handle, int idx, const char *i
                if (block->idx == idx) {
                        if (strcasecmp(block->type, WIDGET_DESC_TYPE_SCRIPT)) {
                                ErrPrint("Invalid block is used\n");
-                               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+                               return WIDGET_ERROR_INVALID_PARAMETER;
                        }
 
                        free(block->target_id);
                        block->target_id = NULL;
 
                        if (!id || !strlen(id)) {
-                               return WIDGET_STATUS_ERROR_NONE;
+                               return WIDGET_ERROR_NONE;
                        }
 
                        block->target_id = strdup(id);
                        if (!block->target_id) {
                                ErrPrint("Heap: %s\n", strerror(errno));
-                               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+                               return WIDGET_ERROR_OUT_OF_MEMORY;
                        }
 
-                       return WIDGET_STATUS_ERROR_NONE;
+                       return WIDGET_ERROR_NONE;
                }
        }
 
-       return WIDGET_STATUS_ERROR_NOT_EXIST;
+       return WIDGET_ERROR_NOT_EXIST;
 }
 
 /*!
@@ -521,7 +501,7 @@ PUBLIC int widget_desc_add_block(struct widget_desc *handle, const char *id, con
        struct block *block;
 
        if (!handle || !type) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (!part) {
@@ -535,14 +515,14 @@ PUBLIC int widget_desc_add_block(struct widget_desc *handle, const char *id, con
        block = calloc(1, sizeof(*block));
        if (!block) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->type = strdup(type);
        if (!block->type) {
                ErrPrint("Heap: %s\n", strerror(errno));
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->part = strdup(part);
@@ -550,7 +530,7 @@ PUBLIC int widget_desc_add_block(struct widget_desc *handle, const char *id, con
                ErrPrint("Heap: %s\n", strerror(errno));
                free(block->type);
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        block->data = strdup(data);
@@ -559,7 +539,7 @@ PUBLIC int widget_desc_add_block(struct widget_desc *handle, const char *id, con
                free(block->type);
                free(block->part);
                free(block);
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        if (option) {
@@ -570,7 +550,7 @@ PUBLIC int widget_desc_add_block(struct widget_desc *handle, const char *id, con
                        free(block->type);
                        free(block->part);
                        free(block);
-                       return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+                       return WIDGET_ERROR_OUT_OF_MEMORY;
                }
        }
 
@@ -583,7 +563,7 @@ PUBLIC int widget_desc_add_block(struct widget_desc *handle, const char *id, con
                        free(block->type);
                        free(block->part);
                        free(block);
-                       return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+                       return WIDGET_ERROR_OUT_OF_MEMORY;
                }
        }
 
@@ -598,7 +578,7 @@ PUBLIC int widget_desc_del_block(struct widget_desc *handle, int idx)
        struct block *block;
 
        if (!handle || idx < 0) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        dlist_foreach(handle->block_list, l, block) {
@@ -611,11 +591,11 @@ PUBLIC int widget_desc_del_block(struct widget_desc *handle, int idx)
                        free(block->id);
                        free(block->target_id);
                        free(block);
-                       return WIDGET_STATUS_ERROR_NONE;
+                       return WIDGET_ERROR_NONE;
                }
        }
 
-       return WIDGET_STATUS_ERROR_NOT_EXIST;
+       return WIDGET_ERROR_NOT_EXIST;
 }
 
 PUBLIC int widget_viewer_acquire_buffer(widget_buffer_h handle, int idx, int width, int height, int pixel_size)
@@ -623,7 +603,7 @@ PUBLIC int widget_viewer_acquire_buffer(widget_buffer_h handle, int idx, int wid
        int ret;
 
        if (!handle || width <= 0 || height <= 0 || pixel_size <= 0 || idx > WIDGET_CONF_EXTRA_BUFFER_COUNT) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (idx >= 0) {
@@ -712,13 +692,13 @@ PUBLIC int widget_request_update(const char *filename)
 
        if (!filename) {
                ErrPrint("Invalid argument\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        uri = id_to_uri(filename);
        if (!uri) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        if (!s_info.request_update_by_id) {
@@ -726,7 +706,7 @@ PUBLIC int widget_request_update(const char *filename)
                if (!s_info.request_update_by_id) {
                        ErrPrint("\"widget_request_update_by_id\" is not exists\n");
                        free(uri);
-                       return WIDGET_STATUS_ERROR_FAULT;
+                       return WIDGET_ERROR_FAULT;
                }
        }
 
@@ -740,7 +720,7 @@ PUBLIC unsigned int widget_viewer_get_resource_id(widget_buffer_h handle, int id
        int ret;
 
        if (!handle || idx > WIDGET_CONF_EXTRA_BUFFER_COUNT) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (idx >= 0) {
@@ -757,7 +737,7 @@ PUBLIC int widget_viewer_release_buffer(widget_buffer_h handle, int idx)
        int ret;
 
        if (!handle || idx > WIDGET_CONF_EXTRA_BUFFER_COUNT) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (idx >= 0) {
@@ -775,7 +755,7 @@ PUBLIC int widget_destroy_buffer(widget_buffer_h handle)
        struct widget_buffer_data *user_data;
 
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        user_data = widget_provider_buffer_user_data(handle);
@@ -832,7 +812,7 @@ PUBLIC void *widget_ref_buffer(widget_buffer_h handle)
 PUBLIC int widget_unref_buffer(void *buffer)
 {
        if (!buffer) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        DbgPrint("Unref buffer\n");
@@ -850,30 +830,30 @@ PUBLIC int widget_viewer_sync_buffer(widget_buffer_h handle)
        int ret;
 
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        user_data = widget_provider_buffer_user_data(handle);
        if (!user_data) {
                ErrPrint("Invalid buffer\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (user_data->accelerated) {
                DbgPrint("H/W Buffer allocated. skip the sync buffer\n");
-               return WIDGET_STATUS_ERROR_NONE;
+               return WIDGET_ERROR_NONE;
        }
 
        pkgname = widget_provider_buffer_pkgname(handle);
        if (!pkgname) {
                ErrPrint("Invalid buffer handler\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        id = widget_provider_buffer_id(handle);
        if (!id) {
                ErrPrint("Invalid buffer handler\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        (void)widget_provider_buffer_sync(handle);
@@ -908,19 +888,19 @@ PUBLIC int widget_send_updated_by_idx(widget_buffer_h handle, int idx)
        user_data = widget_provider_buffer_user_data(handle);
        if (!user_data) {
                ErrPrint("Invalid buffer\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        pkgname = widget_provider_buffer_pkgname(handle);
        if (!pkgname) {
                ErrPrint("Invalid buffer handler\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        id = widget_provider_buffer_id(handle);
        if (!id) {
                ErrPrint("Invalid buffer handler\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (widget_provider_buffer_get_size(handle, &w, &h, &pixel_size) < 0) {
@@ -938,7 +918,7 @@ PUBLIC int widget_send_updated_by_idx(widget_buffer_h handle, int idx)
 PUBLIC int widget_support_hw_buffer(widget_buffer_h handle)
 {
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        return widget_provider_buffer_is_support_hw(handle);
@@ -950,16 +930,16 @@ PUBLIC int widget_create_hw_buffer(widget_buffer_h handle)
        int ret;
 
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        user_data = widget_provider_buffer_user_data(handle);
        if (!user_data) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (user_data->accelerated) {
-               return WIDGET_STATUS_ERROR_ALREADY;
+               return WIDGET_ERROR_ALREADY_EXIST;
        }
 
        ret = widget_provider_buffer_create_hw(handle);
@@ -973,13 +953,13 @@ PUBLIC int widget_destroy_hw_buffer(widget_buffer_h handle)
 
        if (!handle) {
                LOGD("handle is NULL\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        user_data = widget_provider_buffer_user_data(handle);
        if (!user_data || !user_data->accelerated) {
                LOGD("user_data is NULL\n");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        user_data->accelerated = 0;
@@ -1008,16 +988,16 @@ PUBLIC int widget_buffer_pre_render(widget_buffer_h handle)
        struct widget_buffer_data *user_data;
 
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        user_data = widget_provider_buffer_user_data(handle);
        if (!user_data) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (!user_data->accelerated) {
-               return WIDGET_STATUS_ERROR_NONE;
+               return WIDGET_ERROR_NONE;
        }
 
        /*!
@@ -1092,32 +1072,32 @@ PUBLIC int widget_buffer_post_render(widget_buffer_h handle)
 
        if (!handle) {
                PERF_MARK("post_render");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        user_data = widget_provider_buffer_user_data(handle);
        if (!user_data) {
                PERF_MARK("post_render");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (!user_data->accelerated) {
                PERF_MARK("post_render");
-               return WIDGET_STATUS_ERROR_NONE;
+               return WIDGET_ERROR_NONE;
        }
 
        pkgname = widget_provider_buffer_pkgname(handle);
        if (!pkgname) {
                ErrPrint("Invalid buffer handle\n");
                PERF_MARK("post_render");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        id = widget_provider_buffer_id(handle);
        if (!id) {
                ErrPrint("Invalid buffer handler\n");
                PERF_MARK("post_render");
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        ret = widget_provider_buffer_post_render(handle);
@@ -1164,7 +1144,7 @@ PUBLIC int widget_buffer_post_render(widget_buffer_h handle)
 PUBLIC int widget_buffer_stride(widget_buffer_h handle)
 {
        if (!handle) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        return widget_provider_buffer_stride(handle);
@@ -1176,7 +1156,7 @@ PUBLIC int widget_content_is_updated(const char *filename, int is_gbar)
                s_info.trigger_update_monitor = dlsym(RTLD_DEFAULT, FUNC_WIDGET_TRIGGER_UPDATE_MONITOR);
                if (!s_info.trigger_update_monitor) {
                        ErrPrint("Trigger update monitor function is not exists\n");
-                       return WIDGET_STATUS_ERROR_FAULT;
+                       return WIDGET_ERROR_FAULT;
                }
        }
 
@@ -1191,20 +1171,20 @@ PUBLIC int widget_request_close_glance_bar(const char *pkgname, const char *id,
 
        if (!pkgname || !id) {
                ErrPrint("Invalid parameters (%s) (%s)\n", pkgname, id);
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        if (strncmp(id, FILE_SCHEMA, schema_len)) {
                uri = id_to_uri(id);
                if (!uri) {
                        ErrPrint("Heap: %s\n", strerror(errno));
-                       return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+                       return WIDGET_ERROR_OUT_OF_MEMORY;
                }
        } else {
                uri = strdup(id);
                if (!uri) {
                        ErrPrint("Heap: %s\n", strerror(errno));
-                       return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+                       return WIDGET_ERROR_OUT_OF_MEMORY;
                }
        }
 
@@ -1219,13 +1199,13 @@ PUBLIC int widget_freeze_scroller(const char *pkgname, const char *id)
        int ret;
 
        if (!pkgname || !id) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        uri = id_to_uri(id);
        if (!uri) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        ret = widget_provider_send_hold_scroll(pkgname, uri, 1);
@@ -1239,13 +1219,13 @@ PUBLIC int widget_thaw_scroller(const char *pkgname, const char *id)
        int ret;
 
        if (!pkgname || !id) {
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        uri = id_to_uri(id);
        if (!uri) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        ret = widget_provider_send_hold_scroll(pkgname, uri, 0);
@@ -1262,7 +1242,7 @@ PUBLIC int widget_set_extra_info(const char *id, const char *content, const char
        uri = id_to_uri(id);
        if (!uri) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return WIDGET_STATUS_ERROR_OUT_OF_MEMORY;
+               return WIDGET_ERROR_OUT_OF_MEMORY;
        }
 
        if (!s_info.find_pkgname) {
@@ -1270,7 +1250,7 @@ PUBLIC int widget_set_extra_info(const char *id, const char *content, const char
                if (!s_info.find_pkgname) {
                        ErrPrint("Failed to find a \"widget_find_pkgname\"\n");
                        free(uri);
-                       return WIDGET_STATUS_ERROR_FAULT;
+                       return WIDGET_ERROR_FAULT;
                }
        }
 
@@ -1278,7 +1258,7 @@ PUBLIC int widget_set_extra_info(const char *id, const char *content, const char
        if (!pkgname) {
                ErrPrint("Failed to find a package (%s)\n", uri);
                free(uri);
-               return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+               return WIDGET_ERROR_INVALID_PARAMETER;
        }
 
        handle = widget_provider_buffer_find_buffer(WIDGET_TYPE_WIDGET, pkgname, uri);
@@ -1289,7 +1269,7 @@ PUBLIC int widget_set_extra_info(const char *id, const char *content, const char
                if (!user_data) {
                        ErrPrint("User data is not available\n");
                        free(uri);
-                       return WIDGET_STATUS_ERROR_FAULT;
+                       return WIDGET_ERROR_FAULT;
                }
 
                if (content && strlen(content)) {
@@ -1357,7 +1337,7 @@ PUBLIC int widget_set_extra_info(const char *id, const char *content, const char
                }
 
                free(uri);
-               return WIDGET_STATUS_ERROR_NONE;
+               return WIDGET_ERROR_NONE;
        }
        free(uri);
 
@@ -1365,7 +1345,7 @@ PUBLIC int widget_set_extra_info(const char *id, const char *content, const char
                s_info.update_extra_info = dlsym(RTLD_DEFAULT, FUNC_WIDGET_UPDATE_EXTRA_INFO);
                if (!s_info.update_extra_info) {
                        ErrPrint("Failed to find a \"widget_update_extra_info\"\n");
-                       return WIDGET_STATUS_ERROR_INVALID_PARAMETER;
+                       return WIDGET_ERROR_INVALID_PARAMETER;
                }
        }