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 */
};
/*!
*/
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);
/*!
#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"
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;
.handler = update_info,
},
{
+ .type = TYPE_ACCESS,
+ .handler = update_access,
+ },
+ {
+ .type = TYPE_OPERATE_ACCESS,
+ .handler = operate_access,
+ },
+ {
.type = NULL,
.handler = NULL,
},