Update document header
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 17 Jul 2014 14:23:40 +0000 (23:23 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Sun, 20 Jul 2014 06:53:58 +0000 (15:53 +0900)
Change-Id: Idcf2a127dfb95363f8a15b7ba72cfdd69672e240

CMakeLists.txt
doc/livebox_doc.h

index d68e8c0..7696fa7 100644 (file)
@@ -52,12 +52,6 @@ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g")
 
-#ADD_DEFINITIONS("-Werror")
-#ADD_DEFINITIONS("-Wall")
-#ADD_DEFINITIONS("-Wextra")
-#ADD_DEFINITIONS("-ansi")
-#ADD_DEFINITIONS("-pedantic")
-
 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
 ADD_DEFINITIONS("-DLOG_TAG=\"LIVEBOX\"")
 ADD_DEFINITIONS("-DNDEBUG")
index 4b21f45..cc4d5c6 100644 (file)
  * limitations under the License.
  */
 
-/**
- * @ingroup CORE_LIB_GROUP
- * @defgroup CAPI_LIVEBOX_FRAMEWORK Livebox
- */
+
+#ifndef __LIVEBOX_DOC_H__
+#define __LIVEBOX_DOC_H__
 
 /**
- * \ingroup CAPI_LIVEBOX_FRAMEWORK
- * \defgroup CAPI_LIVEBOX_HELPER_MODULE Livebox Helper
- * \brief This helper library only can be used for Inhouse(EFL) liveboxes.
- * \section CAPI_LIVEBOX_HELPER_MODULE_HEADER Required Header
- * \#include <livebox.h>
- * \section CAPI_LIVEBOX_HELPER_MODULE_OVERVIEW Overview
- * Help the inhouse(EFL) Livebox developer to generate description data formally.
- * This API set is only be able to used data-provider-slave process.
- * Because some API should be linked with it while loading.
+ * @defgroup DYNAMICBOX_UTILITY_MODULE dynamicbox
+ * @brief Supports APIs for development of inhouse dynamic box
+ * @ingroup CAPI_DYNAMICBOX_FRAMEWORK 
+ * @section DYNAMICBOX_UTILITY_MODULE_HEADER Required Header
+ *   \#include <livebox.h>
+ * @section DYNAMICBOX_UTILITY_MODULE_OVERVIEW Overview
+<H1>Dynamic Box Utility functions</H1>
+
+<H2>Script type Dynamic Box</H2>
+If you choose the Script Type DBox, you have to use this.
+
+Dyanmic Box 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.
+
+@code
+struct livebox_desc *desc_handle;
+int idx;
+
+desc_handle = livebox_desc_open(id, 0);
+if (!desc_handle) {
+       // Error
+}
+
+livebox_desc_set_size(desc_handle, id, 720, 360);
+
+// Loads sub-layout object into main layout
+idx = livebox_desc_add_block(desc_handle, NULL, LB_DESC_TYPE_SCRIPT, "sub,layout", "/usr/apps/com.samsung.my-app/shared/res/dbox.edj", "sub,group");
+livebox_desc_set_id(desc_handle, idx, "sub,layout");
+
+// Set a text for sub-layout object
+livebox_desc_add_block(desc_handle, "sub,layout", LB_DESC_TYPE_TEXT, "sub,layout,text", "Hello World", NULL);
+
+// Flushes changes, the content will be changed after close this handle.
+livebox_desc_close(desc_handle);
+desc_handle = NULL;
+@endcode
+
+Only after you close the desc_handle, the provider will sends changes to the dynamic box manager service.
+And if it needs to propagates events to the home application, the home application will gets changes event.
+
+<H2>Window type Dynamic Box</H2>
+
+@code
+Evas_Object *parent;
+Evas_Object *win;
+
+parent = livebox_get_evas_object(id, 0);
+if (!parent) {
+       // Error
+}
+
+win = elm_win_add(parent, "Dynamic Box Window", ELM_WIN_DYNAMIC_BOX);
+evas_object_del(parent);
+if (!win) {
+       // Error
+}
+@endcode
+
+To create a window for dynamic box,
+You have to get the parent object using livebox_get_evas_object().
+And after creates a window for dynamic box, you have to delete the parent object.
+Its attributes will be passed to the newly created window. So you don't need keep the parent object anymore.
+You should delete it after create a window.
+
  */
+
+#endif /* __LIVEBOX_DOC_H__ */