From: Sung-jae Park Date: Mon, 4 Mar 2013 11:03:02 +0000 (+0000) Subject: Add PD move event X-Git-Tag: 2.1b_release~12^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=e5a6a140ea364b09f7769d63921fdbe470a7d6df;p=platform%2Fframework%2Fweb%2Flivebox-viewer.git Add PD move event Change-Id: Iad6368979c251ccedd195d3235f1e08e09e6bb38 --- diff --git a/include/livebox.h b/include/livebox.h index cfb3068..1b3d711 100644 --- a/include/livebox.h +++ b/include/livebox.h @@ -520,6 +520,15 @@ extern int livebox_create_pd(struct livebox *handler, ret_cb_t cb, void *data); extern int livebox_create_pd_with_position(struct livebox *handler, double x, double y, ret_cb_t cb, void *data); /*! + * \brief PD position is updated. + * \param[in] handler + * \param[in] x 0.0 ~ 1.0 + * \param[in] y 0.0 ~ 1.0 + * \return int 0 if succeed to send request for updating position of the PD. + */ +extern int livebox_move_pd(struct livebox *handler, double x, double y); + +/*! * \brief Destroy the PD of given handler if it is created. * \param[in] handler * \param[in] cb diff --git a/live.viewer/src/lb.c b/live.viewer/src/lb.c index 0ad95cd..cbe928b 100644 --- a/live.viewer/src/lb.c +++ b/live.viewer/src/lb.c @@ -82,7 +82,7 @@ static int update_pd_canvas(struct livebox *handle, Evas_Object *image) data = livebox_acquire_pdfb(handle); if (data) { evas_object_image_data_set(image, NULL); - evas_object_image_colorspace_set(canvas, EVAS_COLORSPACE_ARGB8888); + evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888); evas_object_image_alpha_set(image, EINA_TRUE); evas_object_image_size_set(image, w, h); evas_object_image_smooth_scale_set(image, EINA_TRUE); diff --git a/packaging/liblivebox-viewer.spec b/packaging/liblivebox-viewer.spec index dfbaa3d..f24782d 100644 --- a/packaging/liblivebox-viewer.spec +++ b/packaging/liblivebox-viewer.spec @@ -1,6 +1,6 @@ Name: liblivebox-viewer Summary: Library for developing the application. -Version: 0.9.8 +Version: 0.9.9 Release: 1 Group: framework/livebox License: Flora License diff --git a/src/livebox.c b/src/livebox.c index 6ca3adc..3356ac6 100644 --- a/src/livebox.c +++ b/src/livebox.c @@ -1019,6 +1019,34 @@ EAPI int livebox_create_pd_with_position(struct livebox *handler, double x, doub return master_rpc_async_request(handler, packet, 0, pd_create_cb, create_cb_info(cb, data)); } +EAPI int livebox_move_pd(struct livebox *handler, double x, double y) +{ + struct packet *packet; + + if (!handler) { + ErrPrint("Handler is NIL\n"); + return -EINVAL; + } + + if (!handler->pd.data.fb || handler->state != CREATE || !handler->id) { + ErrPrint("Handler is not valid\n"); + return -EINVAL; + } + + if (!handler->is_pd_created) { + DbgPrint("PD is not created\n"); + return -EINVAL; + } + + packet = packet_create_noack("pd_move", "ssdd", handler->pkgname, handler->id, x, y); + if (!packet) { + ErrPrint("Failed to build param\n"); + return -EFAULT; + } + + return master_rpc_request_only(handler, packet); +} + EAPI int livebox_activate(const char *pkgname, ret_cb_t cb, void *data) { struct packet *packet;