Update accessibiility operation
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 10 Oct 2013 09:03:18 +0000 (18:03 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Thu, 10 Oct 2013 09:03:18 +0000 (18:03 +0900)
Change-Id: Idd71c6a4ea0b0f002a03a0588052f71b36823e74

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

index b64c55c..3661b04 100644 (file)
@@ -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);
 
 /*!
index a05b31a..081ec1a 100644 (file)
@@ -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
index 74fb887..b5abe7d 100644 (file)
@@ -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,
                },