modify API set by tizen API guide
authorKyuho Jo <kyuho.jo@samsung.com>
Tue, 24 Feb 2015 12:12:18 +0000 (21:12 +0900)
committerKyuho Jo <kyuho.jo@samsung.com>
Tue, 24 Feb 2015 12:12:18 +0000 (21:12 +0900)
Change-Id: Iec2c57f8c6b2a1ca2df822b909e11a2041342402
Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
CMakeLists.txt
doc/widget_doc.h
include/widget.h
include/widget_internal.h [moved from include/internal/widget.h with 91% similarity]
packaging/libwidget.spec
src/snapshot_window.c
src/virtual_window.c
src/virtual_window_wayland.c
src/widget.c

index 77b0cc0..3da12e4 100755 (executable)
@@ -81,7 +81,7 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
        
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/widget.h DESTINATION include/${PROJECT_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/internal/widget.h DESTINATION include/${PROJECT_NAME}/internal)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/widget_internal.h DESTINATION include/${PROJECT_NAME})
 
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME "lib${PROJECT_NAME}")
        
index 9c2d72f..22cd957 100755 (executable)
 
 /**
  * @defgroup WIDGET_UTILITY_MODULE widget
- * @brief Supports APIs for development of inhouse dynamic box
+ * @brief Supports APIs for development of inhouse widget
  * @ingroup CAPI_WIDGET_FRAMEWORK 
  * @section WIDGET_UTILITY_MODULE_HEADER Required Header
  *   \#include <widget.h>
  * @section WIDGET_UTILITY_MODULE_OVERVIEW Overview
-<H1>Dynamic Box Utility functions</H1>
+<H1>widget Utility functions</H1>
 
-<H2>1. Script type Dynamic Box</H2>
+<H2>1. Script type widget</H2>
 If you choose the Script Type widget, you have to use this.
 
-Dynamic Box defines its own syntax to share the content between home application and provider application.
+widget defines its own syntax to share the content between home application and provider application.
 It is called "Description Data Syntax"
 
 To generate it you have to use following functions.
@@ -58,10 +58,10 @@ widget_desc_close(desc_handle);
 desc_handle = NULL;
 @endcode
 
-Only after you close the desc_handle, the provider will send changes to the dynamic box manager service.
+Only after you close the desc_handle, the provider will send changes to the widget manager service.
 And if it needs to propagate events to the home application, the home application will get changes event.
 
-<H2>2. Window(buffer) type Dynamic Box</H2>
+<H2>2. Window(buffer) type widget</H2>
 
 @code
 Evas_Object *parent;
@@ -72,38 +72,38 @@ if (!parent) {
     // Error
 }
 
-win = elm_win_add(parent, "Dynamic Box Window", ELM_WIN_DYNAMIC_BOX);
+win = elm_win_add(parent, "widget Window", ELM_WIN_DYNAMIC_BOX);
 evas_object_del(parent);
 if (!win) {
     // Error
 }
 @endcode
 
-To create a window for dynamic box,
+To create a window for widget,
 You have to get the parent object using widget_get_evas_object().
-And after creating a window for dynamic box, you have to delete it.
+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.
 
 After creating a window, you can do what you want like an application.
 Creatig any core-control such as button, list, etc, ....
 
-<H2>3. Image type Dynamic Box</H2>
-This kind of dynamic box should create an image file using given Id.
+<H2>3. Image type widget</H2>
+This kind of widget should create an image file using given Id.
 The Id's syntax is "file://ABS_PATH_OF_OUTPUT_FILE", so you should create an image file using this URI.
-The Id will be assigned to every dynamic box instances.
+The Id will be assigned to every widget instances.
 And those are unique.
 
 If you create an image file, you should notify it to the viewer using widget_provider_app_widget_updated()
 it is provided by libwidget_provider_app package.
 
-<H2>4. Text type Dynamic Box (Experimental)</H2>
+<H2>4. Text type widget (Experimental)</H2>
 In case of text type, you may have no window or script file.
-The text type dynamic box only needs to generate content data using widget_desc_XXXX series APIs.
+The text type widget only needs to generate content data using widget_desc_XXXX series APIs.
 Of course, after you prepare the desc file, you have to call widget_provider_app_widget_updated() function too.
-Then the viewer will get your updated contents and try to parse it to locate content of dynamic box to its screen.
-But, unfortunately, this type of dynamic box is not fully supported yet.
+Then the viewer will get your updated contents and try to parse it to locate content of widget to its screen.
+But, unfortunately, this type of widget is not fully supported yet.
 Because it very highly depends on the viewer implementations.
-So if the viewer doesn't support this type of dynamic box, you cannot do anything for user.
+So if the viewer doesn't support this type of widget, you cannot do anything for user.
 
 To generate the text data, you can use below API set.
 
@@ -123,7 +123,7 @@ Here is a sample code for you.
 struct widget_desc *handle;
 int idx;
 
-handle = widget_desc_open(handle, FOR_GBAR); // The second parameter will help you choose to target, for glance bar or dynamic box?
+handle = widget_desc_open(handle, FOR_GBAR); // The second parameter will help you choose to target, for glance bar or widget?
 idx = widget_desc_add_block(handle, NULL, WIDGET_DESC_TYPE_SCRIPT, "/opt/usr/apps/your.company.application/shared/resource/edje/script.edj", "sample", NULL);
 widget_desc_set_id(handle, idx, "sample");
 widget_desc_close(handle);
index c0b80f2..787dde1 100755 (executable)
@@ -43,10 +43,10 @@ typedef struct widget_event_info *widget_event_info_t;
 
 /**
  * @brief Creates an Object to create an elm_win object.
- * @details Creating a new Object using Dynamic Box frame buffer.
+ * @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 Dynamic Box)
+ * @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
@@ -64,14 +64,16 @@ extern void *widget_get_evas_object(const char *id, int gbar);
  *      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 Dynamic Box Instance Id
- * @param[in] content Content string that will pass to a Dynamic Box via widget_create interface when it is re-created.
+ * @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 int type
- * @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_OUT_OF_MEMORY Out of memory
  * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
  * @retval #WIDGET_STATUS_ERROR_FAULT Unrecoverable error
@@ -171,21 +173,21 @@ extern const int WIDGET_SYS_EVENT_REGION_CHANGED;
 extern const int WIDGET_SYS_EVENT_TTS_CHANGED;
 
 /**
- * @brief System event type: Dynamic Box is paused.
+ * @brief System event type: widget is paused.
  * @since_tizen 2.4
  * @feature http://tizen.org/feature/shell.appwidget
  */
 extern const int WIDGET_SYS_EVENT_PAUSED;
 
 /**
- * @brief System event type: Dynamic Box is resumed.
+ * @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: Dynamic Box instance is removed from a viewer.
+ * @brief System event type: widget instance is removed from a viewer.
  * @since_tizen 2.4
  * @feature http://tizen.org/feature/shell.appwidget
  */
@@ -214,12 +216,13 @@ extern int widget_request_update(const char *id);
  *        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 Dynamic Box Package Id
+ * @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 int type
+ * @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
@@ -236,12 +239,13 @@ extern int widget_freeze_scroller(const char *widgetid, const char *id);
  *        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 Dynamic Box Package Id
+ * @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 int type
+ * @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
similarity index 91%
rename from include/internal/widget.h
rename to include/widget_internal.h
index ad5963c..340c5cd 100755 (executable)
@@ -155,7 +155,7 @@ extern "C" {
 
 /**
  * @internal
- * @brief Dynamic Box description data handle.
+ * @brief widget description data handle.
  * @since_tizen 2.3
  */
 typedef struct widget_desc *widget_desc_h;
@@ -171,8 +171,8 @@ typedef void (*widget_flush_cb)(void *snapshot_window, const char *id, int statu
  * @internal
  * @brief Updates a description file.
  * @since_tizen 2.3
- * @remarks Must be used only by Inhouse Dynamic Box.
- * @param[in] id Dynamic Box Instance Id
+ * @remarks Must be used only by Inhouse widget.
+ * @param[in] id widget Instance Id
  * @param[in] gbar 1 for Glance Bar or 0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
@@ -188,14 +188,15 @@ extern widget_desc_h widget_desc_open(const char *id, int gbar);
 /**
  * @internal
  * @brief Completes the description file update.
- * @details Only if this API is called, the description data will be applied to the content of Dynamic Box (or GBar).
+ * @details Only if this API is called, the description data will be applied to the content of widget (or GBar).
  * @since_tizen 2.3
- * @remarks Must be used only by Inhouse Dynamic Box.
+ * @remarks Must be used only by Inhouse widget.
  * @param[in] handle Handle which is created by widget_desc_open() function
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return int type
+ * @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
@@ -213,7 +214,8 @@ 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 int type
+ * @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
  * @retval index Index(>=0) of added block, which can be used by widget_desc_set_id()
@@ -231,7 +233,8 @@ 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 int type
+ * @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
  * @retval index Index(>=0) of added block Successfully added
@@ -248,7 +251,8 @@ 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 int type
+ * @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
@@ -286,7 +290,8 @@ 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 int type
+ * @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
  * @pre Index must be exists.
@@ -297,7 +302,7 @@ extern int widget_desc_del_block(widget_desc_h handle, int idx);
 
 /**
  * @internal
- * @brief Structure for a Dynamic Box buffer defined by a provider.
+ * @brief Structure for a widget buffer defined by a provider.
  * @since_tizen 2.3
  */
 typedef struct widget_buffer *widget_buffer_h;
@@ -316,8 +321,9 @@ extern const int WIDGET_USE_NET;
  *    This function can be used from async callback function to notify the updated content.
  * @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 Dynamic Box)
- * @return int type
+ * @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)
@@ -331,7 +337,7 @@ extern int widget_content_is_updated(const char *id, int gbar);
  * @brief Acquires a buffer for GBar or widget, currently only the GBar is supported.
  * @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 Glance Bar or 0 for Dynamic Box
+ * @param[in] gbar 1 for Glance Bar or 0 for widget
  * @param[in] width Width in pixel
  * @param[in] height Height in pixel
  * @param[in] pixels Size of a pixel in bytes
@@ -370,7 +376,7 @@ extern widget_buffer_h widget_create_buffer(const char *id, int gbar, int auto_a
  * @see widget_create_buffer()
  * @see widget_release_buffer()
  */
-extern int widget_acquire_buffer(widget_buffer_h handle, int idx, int width, int height, int pixels);
+extern int widget_viewer_acquire_buffer(widget_buffer_h handle, int idx, int width, int height, int pixels);
 
 /**
  * @internal
@@ -386,7 +392,7 @@ extern int widget_acquire_buffer(widget_buffer_h handle, int idx, int width, int
  * @pre The system must be set to use the Resource Id method for content sharing.
  * @see widget_acquire_buffer()
  */
-extern unsigned int widget_resource_id(widget_buffer_h handle, int idx);
+extern unsigned int widget_viewer_get_resource_id(widget_buffer_h handle, int idx);
 
 /**
  * @internal
@@ -404,7 +410,7 @@ extern unsigned int widget_resource_id(widget_buffer_h handle, int idx);
  * @pre Handle must be created using widget_acquire_buffer().
  * @see widget_acquire_buffer()
  */
-extern int widget_release_buffer(widget_buffer_h handle, int idx);
+extern int widget_viewer_release_buffer(widget_buffer_h handle, int idx);
 
 /**
  * @internal
@@ -447,7 +453,8 @@ 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 int type
+ * @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
@@ -466,13 +473,14 @@ extern int widget_unref_buffer(void *buffer);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return int type
+ * @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
  * @see widget_acquire_buffer()
  */
-extern int widget_sync_buffer(widget_buffer_h handle);
+extern int widget_viewer_sync_buffer(widget_buffer_h handle);
 
 /**
  * @internal
@@ -496,7 +504,8 @@ 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 int type
+ * @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
@@ -516,7 +525,8 @@ 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 int type
+ * @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
@@ -564,7 +574,8 @@ 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 int type
+ * @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
@@ -597,13 +608,14 @@ extern int widget_buffer_post_render(widget_buffer_h handle);
  * @brief Sends a request to the viewer (homescreen) to close the GBar.
  * @details Even though you call this function. the homescreen can ignore it.
  * @since_tizen 2.3
- * @param[in] widgetid Dynamic Box Package Id
+ * @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)
  * @privlevel public
  * @privilege %http://tizen.org/privilege/widget.provider
  * @feature http://tizen.org/feature/shell.appwidget
- * @return int type
+ * @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
index 361af65..fa89ae3 100755 (executable)
@@ -4,7 +4,7 @@ Name: libwidget
 Summary: widget development library
 Version: 1.0.0
 Release: 1
-Group: HomeTF/DynamicBox
+Group: HomeTF/widget
 License: Flora
 Source0: %{name}-%{version}.tar.gz
 Source1001: %{name}.manifest
@@ -31,7 +31,7 @@ ExclusiveArch:
 Library for the development of a widget 
 
 %package devel
-Summary: Dynamic Box development library (dev)
+Summary: widget development library (dev)
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 
@@ -84,7 +84,7 @@ mkdir -p %{buildroot}/%{_datarootdir}/license
 %defattr(-,root,root,-)
 %manifest %{name}.manifest
 %{_includedir}/widget/widget.h
-%{_includedir}/widget/internal/widget.h
+%{_includedir}/widget/widget_internal.h
 %{_libdir}/pkgconfig/widget.pc
 
 # End of a file
index a0b86e3..d7173ac 100755 (executable)
@@ -25,7 +25,7 @@
 #include <widget_errno.h>
 
 #include "widget.h"
-#include "internal/widget.h"
+#include "widget_internal.h"
 #include "debug.h"
 
 #define QUALITY_N_COMPRESS "quality=100 compress=1"
index 58217f5..7c2a77e 100755 (executable)
@@ -33,7 +33,7 @@
 #include <widget_buffer.h>
 
 #include "widget.h"
-#include "internal/widget.h"
+#include "widget_internal.h"
 #include "debug.h"
 
 #define IS_GBAR 1
@@ -573,18 +573,18 @@ static Ecore_X_Pixmap alloc_pixmap_cb(void *data, Ecore_X_Window parent, int w,
        DbgPrint("Size of ee is updated: %dx%d - %d (info: %p)\n", info->w, info->h, depth, info);
        depth >>= 3;
 
-       if (widget_resource_id(info->handle, WIDGET_PRIMARY_BUFFER) == 0u) {
+       if (widget_viewer_get_resource_id(info->handle, WIDGET_PRIMARY_BUFFER) == 0u) {
                /**
                 * @note
                 * Need to allocate a primary buffer
                 */
-               widget_acquire_buffer(info->handle, WIDGET_PRIMARY_BUFFER, info->w, info->h, depth);
+               widget_viewer_acquire_buffer(info->handle, WIDGET_PRIMARY_BUFFER, info->w, info->h, depth);
                if (!info->handle) {
                        ErrPrint("Failed to get the buffer\n");
                        return 0u;
                }
 
-               pixmap = (Ecore_X_Pixmap)widget_resource_id(info->handle, WIDGET_PRIMARY_BUFFER);
+               pixmap = (Ecore_X_Pixmap)widget_viewer_get_resource_id(info->handle, WIDGET_PRIMARY_BUFFER);
        } else if (WIDGET_CONF_EXTRA_BUFFER_COUNT > 0) {
                int idx;
 
@@ -609,12 +609,12 @@ static Ecore_X_Pixmap alloc_pixmap_cb(void *data, Ecore_X_Window parent, int w,
                        }
                }
 
-               if (widget_acquire_buffer(info->handle, idx, info->w, info->h, depth) < 0) {
+               if (widget_viewer_acquire_buffer(info->handle, idx, info->w, info->h, depth) < 0) {
                        ErrPrint("Failed to acquire a buffer for %d\n", idx);
                        return 0u;
                }
 
-               info->resource_array[idx] = widget_resource_id(info->handle, idx);
+               info->resource_array[idx] = widget_viewer_get_resource_id(info->handle, idx);
                if (info->resource_array[idx] == 0u) {
                        ErrPrint("Failed to allocate pixmap\n");
                }
@@ -646,8 +646,8 @@ static void free_pixmap_cb(void *data, Ecore_X_Pixmap pixmap)
                ErrPrint("Impossible\n");
        }
 
-       if (widget_resource_id(info->handle, WIDGET_PRIMARY_BUFFER) == pixmap) {
-               if (widget_release_buffer(info->handle, WIDGET_PRIMARY_BUFFER) < 0) {
+       if (widget_viewer_get_resource_id(info->handle, WIDGET_PRIMARY_BUFFER) == pixmap) {
+               if (widget_viewer_release_buffer(info->handle, WIDGET_PRIMARY_BUFFER) < 0) {
                        DbgPrint("Failed to release buffer\n");
                }
                info->resource_cnt--;
@@ -660,7 +660,7 @@ static void free_pixmap_cb(void *data, Ecore_X_Pixmap pixmap)
                         * Find a index to release it
                         */
                        if (info->resource_array[idx] == pixmap) {
-                               if (widget_release_buffer(info->handle, idx) < 0) {
+                               if (widget_viewer_release_buffer(info->handle, idx) < 0) {
                                        DbgPrint("Failed to release buffer\n");
                                }
                                info->resource_array[idx] = 0u;
@@ -695,7 +695,7 @@ static void *alloc_fb(void *data, int size)
                return NULL;
        }
 
-       if (widget_acquire_buffer(info->handle, WIDGET_PRIMARY_BUFFER, info->w, info->h, sizeof(int)) < 0) {
+       if (widget_viewer_acquire_buffer(info->handle, WIDGET_PRIMARY_BUFFER, info->w, info->h, sizeof(int)) < 0) {
                ErrPrint("Failed to acquire buffer\n");
                return NULL;
        }
@@ -768,7 +768,7 @@ static void free_fb(void *data, void *ptr)
                ErrPrint("Unable to reach to here\n");
        }
 
-       if (widget_release_buffer(info->handle, WIDGET_PRIMARY_BUFFER) < 0) {
+       if (widget_viewer_release_buffer(info->handle, WIDGET_PRIMARY_BUFFER) < 0) {
                ErrPrint("Failed to release buffer\n");
        }
 
@@ -849,14 +849,14 @@ static void post_render_cb(void *data, Evas *e, void *event_info)
 
                if (idx == WIDGET_CONF_EXTRA_BUFFER_COUNT) {
                        /* Send updated event for PRIMARY BUFFER */
-                       if (front_resource_id == widget_resource_id(info->handle, WIDGET_PRIMARY_BUFFER)) {
+                       if (front_resource_id == widget_viewer_get_resource_id(info->handle, WIDGET_PRIMARY_BUFFER)) {
                                widget_send_updated_by_idx(info->handle, WIDGET_PRIMARY_BUFFER);
                        } else {
-                               DbgPrint("Unable to send updated: %u (%u)\n", front_resource_id, widget_resource_id(info->handle, WIDGET_PRIMARY_BUFFER));
+                               DbgPrint("Unable to send updated: %u (%u)\n", front_resource_id, widget_viewer_get_resource_id(info->handle, WIDGET_PRIMARY_BUFFER));
                        }
                }
        } else if (info->type == VWIN_SW_BUF) {
-               widget_sync_buffer(info->handle);
+               widget_viewer_sync_buffer(info->handle);
        }
 }
 
index 3fb3a75..c49f043 100755 (executable)
@@ -302,7 +302,7 @@ static void *alloc_fb(void *data, int size)
        /*!
         * Acquire a buffer for canvas.
         */
-       info->handle = widget_acquire_buffer(info->id, info->is_gbar,
+       info->handle = widget_viewer_acquire_buffer(info->id, info->is_gbar,
                        width, height,
                        event_handler_cb, info);
 
@@ -350,7 +350,7 @@ static void free_fb(void *data, void *ptr)
        widget_unref_buffer(ptr);
        LOGD("SW buffer is destroyed\n");
 out:
-       widget_release_buffer(info->handle);
+       widget_viewer_release_buffer(info->handle);
        info->handle = NULL;
 }
 
@@ -378,7 +378,7 @@ static void post_render_cb(void *data, Evas *e, void *event_info)
        if (info->is_hw) {
                widget_buffer_post_render(info->handle);
        } else {
-               widget_sync_buffer(info->handle);
+               widget_viewer_sync_buffer(info->handle);
        }
 }
 
index 58ddba3..8811eed 100755 (executable)
@@ -37,7 +37,7 @@
 #include "dlist.h"
 #include "util.h"
 #include "widget.h"
-#include "internal/widget.h"
+#include "widget_internal.h"
 
 #define PUBLIC __attribute__((visibility("default")))
 
@@ -618,7 +618,7 @@ PUBLIC int widget_desc_del_block(struct widget_desc *handle, int idx)
        return WIDGET_STATUS_ERROR_NOT_EXIST;
 }
 
-PUBLIC int widget_acquire_buffer(widget_buffer_h handle, int idx, int width, int height, int pixel_size)
+PUBLIC int widget_viewer_acquire_buffer(widget_buffer_h handle, int idx, int width, int height, int pixel_size)
 {
        int ret;
 
@@ -735,7 +735,7 @@ PUBLIC int widget_request_update(const char *filename)
        return ret;
 }
 
-PUBLIC unsigned int widget_resource_id(widget_buffer_h handle, int idx)
+PUBLIC unsigned int widget_viewer_get_resource_id(widget_buffer_h handle, int idx)
 {
        int ret;
 
@@ -752,7 +752,7 @@ PUBLIC unsigned int widget_resource_id(widget_buffer_h handle, int idx)
        return ret;
 }
 
-PUBLIC int widget_release_buffer(widget_buffer_h handle, int idx)
+PUBLIC int widget_viewer_release_buffer(widget_buffer_h handle, int idx)
 {
        int ret;
 
@@ -839,7 +839,7 @@ PUBLIC int widget_unref_buffer(void *buffer)
        return widget_provider_buffer_unref(buffer);
 }
 
-PUBLIC int widget_sync_buffer(widget_buffer_h handle)
+PUBLIC int widget_viewer_sync_buffer(widget_buffer_h handle)
 {
        struct widget_buffer_data *user_data;
        const char *pkgname;