summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-10-10 09:03:18 (GMT)
committerSung-jae Park <nicesj.park@samsung.com>2013-10-10 09:03:18 (GMT)
commitad80302c5dbbda3d5abdc8d6e0d9d5f753d0048b (patch)
treecaa5e951b1db8e588343bb40b6503b96d848068e
parentbb76f03955d7ec98c63a921efeb5507bf57dee39 (diff)
downloadlivebox-viewer-tizen_2.2.zip
livebox-viewer-tizen_2.2.tar.gz
livebox-viewer-tizen_2.2.tar.bz2
Change-Id: Idd71c6a4ea0b0f002a03a0588052f71b36823e74
-rw-r--r--include/livebox.h62
-rw-r--r--packaging/liblivebox-viewer.spec2
-rw-r--r--src/desc_parser.c44
3 files changed, 107 insertions, 1 deletions
diff --git a/include/livebox.h b/include/livebox.h
index b64c55c..3661b04 100644
--- a/include/livebox.h
+++ b/include/livebox.h
@@ -226,6 +226,8 @@ struct livebox_script_operators {
int (*update_drag)(struct livebox *handle, const char *id, const char *part, double dx, double dy); /*!< Update drag info */
int (*update_info_size)(struct livebox *handle, const char *id, int w, int h); /*!< Update content size */
int (*update_info_category)(struct livebox *handle, const char *id, const char *category); /*!< Update content category info */
+ int (*update_access)(struct livebox *handle, const char *id, const char *part, const char *text, const char *option); /*!< Update access information */
+ int (*operate_access)(struct livebox *handle, const char *id, const char *part, const char *operation, const char *option); /*!< Update access operation */
};
/*!
@@ -1413,16 +1415,76 @@ extern int livebox_set_update_mode(struct livebox *handler, int active_update, r
*/
extern int livebox_is_active_update(struct livebox *handler);
+/*!
+ * \brief Use the manual sync for S/W buffer
+ * \details N/A
+ * \remarks N/A
+ * param[in] flag
+ * \return void
+ * \see livebox_manual_sync
+ * \see livebox_sync_pd_fb
+ * \see livebox_sync_lb_fb
+ */
extern void livebox_set_manual_sync(int flag);
+/*!
+ * \brief Get current mode
+ * \details N/A
+ * \remarks N/A
+ * \return int
+ * \retval 0 if auto sync
+ * \retval 1 if manual sync
+ * \see livebox_set_manual_sync
+ * \see livebox_sync_pd_fb
+ * \see livebox_sync_lb_fb
+ */
extern int livebox_manual_sync(void);
+/*!
+ * \brief Use the frame drop while resizing contents
+ * \details N/A
+ * \remarks N/A
+ * \param[in] flag
+ * \return void
+ * \see livebox_frame_drop_for_resizing
+ */
extern void livebox_set_frame_drop_for_resizing(int flag);
+/*!
+ * \brief Get current mode
+ * \details N/A
+ * \remarks N/A
+ * \return int
+ * \retval 0 if disabled
+ * \retval 1 if enabled
+ * \see livebox_set_frame_drop_for_resizing
+ */
extern int livebox_frame_drop_for_resizing(void);
+/*!
+ * \brief Sync manually
+ * \details N/A
+ * \remarks N/A
+ * param[in] handler
+ * \return void
+ * \retval 0 if success
+ * \see livebox_set_manual_sync
+ * \see livebox_manual_sync
+ * \see livebox_sync_lb_fb
+ */
extern int livebox_sync_pd_fb(struct livebox *handler);
+/*!
+ * \brief Sync manually
+ * \details N/A
+ * \remarks N/A
+ * param[in] handler
+ * \return void
+ * \retval 0 if success
+ * \see livebox_set_manual_sync
+ * \see livebox_manual_sync
+ * \see livebox_sync_pd_fb
+ */
extern int livebox_sync_lb_fb(struct livebox *handler);
/*!
diff --git a/packaging/liblivebox-viewer.spec b/packaging/liblivebox-viewer.spec
index a05b31a..081ec1a 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.14.5
+Version: 0.14.6
Release: 1
Group: HomeTF/Livebox
License: Flora License
diff --git a/src/desc_parser.c b/src/desc_parser.c
index 74fb887..b5abe7d 100644
--- a/src/desc_parser.c
+++ b/src/desc_parser.c
@@ -37,6 +37,8 @@
#define TYPE_SIGNAL "signal"
#define TYPE_INFO "info"
#define TYPE_DRAG "drag"
+#define TYPE_ACCESS "access"
+#define TYPE_OPERATE_ACCESS "access,operation"
#define INFO_SIZE "size"
#define INFO_CATEGORY "category"
@@ -182,6 +184,40 @@ static int update_info(struct livebox *handle, struct block *block, int is_pd)
return 0;
}
+static int update_access(struct livebox *handle, struct block *block, int is_pd)
+{
+ struct livebox_script_operators *ops;
+
+ if (!block) {
+ ErrPrint("Invalid argument\n");
+ return LB_STATUS_ERROR_INVALID;
+ }
+
+ ops = is_pd ? &handle->pd.data.ops : &handle->lb.data.ops;
+ if (ops->update_access) {
+ ops->update_access(handle, block->id, block->part, block->data, block->option);
+ }
+
+ return 0;
+}
+
+static int operate_access(struct livebox *handle, struct block *block, int is_pd)
+{
+ struct livebox_script_operators *ops;
+
+ if (!block) {
+ ErrPrint("Invalid argument\n");
+ return LB_STATUS_ERROR_INVALID;
+ }
+
+ ops = is_pd ? &handle->pd.data.ops : &handle->lb.data.ops;
+ if (ops->operate_access) {
+ ops->operate_access(handle, block->id, block->part, block->data, block->option);
+ }
+
+ return 0;
+}
+
static inline int update_begin(struct livebox *handle, int is_pd)
{
struct livebox_script_operators *ops;
@@ -269,6 +305,14 @@ int parse_desc(struct livebox *handle, const char *descfile, int is_pd)
.handler = update_info,
},
{
+ .type = TYPE_ACCESS,
+ .handler = update_access,
+ },
+ {
+ .type = TYPE_OPERATE_ACCESS,
+ .handler = operate_access,
+ },
+ {
.type = NULL,
.handler = NULL,
},