Add new API for openning a PD with its position.
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 20 Nov 2012 09:44:41 +0000 (18:44 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 20 Nov 2012 10:55:37 +0000 (19:55 +0900)
Change-Id: I92d6ac7f0506ffbc9f500b9a85ed886690fc5e3a

include/livebox.h
packaging/liblivebox-viewer.spec
src/livebox.c

index 8bf7487..c8c0a25 100644 (file)
@@ -436,6 +436,17 @@ extern int livebox_has_pd(struct livebox *handler);
 extern int livebox_create_pd(struct livebox *handler, ret_cb_t cb, void *data);
 
 /*!
+ * \brief Create the PD of given handler with the relative position from livebox
+ * \param[in] handler
+ * \param[in] x 0.0 ~ 1.0
+ * \param[in] y 0.0 ~ 1.0
+ * \param[in] cb
+ * \param[in] data
+ * \return int
+ */
+extern int livebox_create_pd_with_position(struct livebox *handler, double x, double y, ret_cb_t cb, void *data);
+
+/*!
  * \brief Destroy the PD of given handler if it is created.
  * \param[in] handler
  * \param[in] cb
index e269053..8093cac 100644 (file)
@@ -1,6 +1,6 @@
 Name: liblivebox-viewer
 Summary: Library for the development of a livebox viewer
-Version: 0.8.1
+Version: 0.8.2
 Release: 1
 Group: main/app
 License: Samsung Proprietary License
index de7d01d..0775168 100644 (file)
@@ -941,6 +941,11 @@ EAPI int livebox_pd_is_created(struct livebox *handler)
 
 EAPI int livebox_create_pd(struct livebox *handler, ret_cb_t cb, void *data)
 {
+       return livebox_create_pd_with_position(handler, -1.0, -1.0, cb, data);
+}
+
+EAPI int livebox_create_pd_with_position(struct livebox *handler, double x, double y, ret_cb_t cb, void *data)
+{
        struct packet *packet;
 
        if (!handler) {
@@ -958,7 +963,7 @@ EAPI int livebox_create_pd(struct livebox *handler, ret_cb_t cb, void *data)
                return 0;
        }
 
-       packet = packet_create("create_pd", "ss", handler->pkgname, handler->id);
+       packet = packet_create("create_pd", "ssdd", handler->pkgname, handler->id, x, y);
        if (!packet) {
                ErrPrint("Failed to build param\n");
                return -EFAULT;