/*!
* \brief
- * Use the default update period which is defined in the livebox package manifest.
+ * Use the default update period which is defined in the package manifest file of a livebox.
*/
#define DEFAULT_PERIOD -1.0f
CONTENT_EVENT_MOUSE_SET = 0x00000020, /*!< LB mouse set auto event for livebox */
CONTENT_EVENT_MOUSE_UNSET = 0x00000040, /*!< LB mouse unset auto event for livebox */
- CONTENT_EVENT_KEY_DOWN = 0x00100000, /*!< LB key press */
- CONTENT_EVENT_KEY_UP = 0x00200000, /*!< LB key release */
+ CONTENT_EVENT_KEY_DOWN = 0x00000001, /*!< LB key press */
+ CONTENT_EVENT_KEY_UP = 0x00000002, /*!< LB key release */
+ CONTENT_EVENT_KEY_FOCUS_IN = 0x00000008, /*!< LB key focused in */
+ CONTENT_EVENT_KEY_FOCUS_OUT = 0x00000010, /*!< LB key focused out */
+ CONTENT_EVENT_KEY_SET = 0x00000020, /*!< LB Key, start feeding event by master */
+ CONTENT_EVENT_KEY_UNSET = 0x00000040, /*!< LB key, stop feeding event by master */
CONTENT_EVENT_KEY_MASK = 0x80000000,
CONTENT_EVENT_MOUSE_MASK = 0x20000000,
LB_MOUSE_MOVE = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_MOVE, /*!< Move move on the livebox */
LB_MOUSE_ENTER = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_ENTER, /*!< Mouse enter to the livebox */
LB_MOUSE_LEAVE = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_LEAVE, /*!< Mouse leave from the livebox */
- LB_MOUSE_SET = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_SET,
- LB_MOUSE_UNSET = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_UNSET,
+ LB_MOUSE_SET = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_SET, /*!< Mouse event, start feeding event by master */
+ LB_MOUSE_UNSET = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_UNSET, /*!< Mouse event, stop feeding event by master */
PD_MOUSE_DOWN = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_DOWN, /*!< Mouse down on the PD */
PD_MOUSE_UP = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_UP, /*!< Mouse up on the PD */
PD_MOUSE_MOVE = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_MOVE, /*!< Mouse move on the PD */
PD_MOUSE_ENTER = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_ENTER, /*!< Mouse enter to the PD */
PD_MOUSE_LEAVE = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_LEAVE, /*!< Mouse leave from the PD */
- PD_MOUSE_SET = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_SET,
- PD_MOUSE_UNSET = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_UNSET,
+ PD_MOUSE_SET = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_SET, /*!< Mouse event, start feeding event by master */
+ PD_MOUSE_UNSET = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_MOUSE_MASK | CONTENT_EVENT_MOUSE_UNSET, /*!< Mouse event, stop feeding event by master */
LB_KEY_DOWN = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_DOWN, /*!< Key down on the livebox */
LB_KEY_UP = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_UP, /*!< Key up on the livebox */
+ LB_KEY_SET = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_SET, /*!< Key event, start feeding event by master */
+ LB_KEY_UNSET = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_UNSET, /*!< Key event, stop feeding event by master */
+ LB_KEY_FOCUS_IN = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_FOCUS_IN, /*!< Key event, focus in */
+ LB_KEY_FOCUS_OUT = CONTENT_EVENT_LB_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_FOCUS_OUT, /*!< Key event, foucs out */
PD_KEY_DOWN = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_DOWN, /*!< Key down on the livebox */
PD_KEY_UP = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_UP, /*!< Key up on the livebox */
+ PD_KEY_SET = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_SET, /*!< Key event, start feeding event by master */
+ PD_KEY_UNSET = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_UNSET, /*!< Key event, stop feeding event by master */
+ PD_KEY_FOCUS_IN = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_FOCUS_IN, /*!< Key event, focus in */
+ PD_KEY_FOCUS_OUT = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_FOCUS_OUT, /*!< Key event, focus out */
CONTENT_EVENT_MAX = 0xFFFFFFFF
};
LB_ACCESS_SCROLL_MOVE = ACCESS_EVENT_LB_MASK | ACCESS_EVENT_SCROLL_MOVE, /*!< Access event - scroll move */
LB_ACCESS_SCROLL_UP = ACCESS_EVENT_LB_MASK | ACCESS_EVENT_SCROLL_UP, /*!< Access event - scroll up */
- PD_ACCESS_HIGHLIGHT = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_HIGHLIGHT,
- PD_ACCESS_HIGHLIGHT_NEXT = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_HIGHLIGHT_NEXT,
- PD_ACCESS_HIGHLIGHT_PREV = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_HIGHLIGHT_PREV,
- PD_ACCESS_UNHIGHLIGHT = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_UNHIGHLIGHT,
- PD_ACCESS_ACTIVATE = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_ACTIVATE,
- PD_ACCESS_ACTION_DOWN = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_ACTION_DOWN,
- PD_ACCESS_ACTION_UP = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_ACTION_UP,
- PD_ACCESS_SCROLL_DOWN = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_SCROLL_DOWN,
- PD_ACCESS_SCROLL_MOVE = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_SCROLL_MOVE,
- PD_ACCESS_SCROLL_UP = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_SCROLL_UP
+ PD_ACCESS_HIGHLIGHT = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_HIGHLIGHT, /*!< Access event - Highlight an object in the PD */
+ PD_ACCESS_HIGHLIGHT_NEXT = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_HIGHLIGHT_NEXT, /*!< Access event - Move highlight to the next object in a PD */
+ PD_ACCESS_HIGHLIGHT_PREV = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_HIGHLIGHT_PREV, /*!< Access event - Move highlight to the prev object in a PD */
+ PD_ACCESS_UNHIGHLIGHT = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_UNHIGHLIGHT, /*!< Access event - Delet highlight from the PD */
+ PD_ACCESS_ACTIVATE = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_ACTIVATE, /*!< Access event - Launch or activate the highlighted object */
+ PD_ACCESS_ACTION_DOWN = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_ACTION_DOWN, /*!< Access event - down */
+ PD_ACCESS_ACTION_UP = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_ACTION_UP, /*!< Access event - up */
+ PD_ACCESS_SCROLL_DOWN = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_SCROLL_DOWN, /*!< Access event - scroll down */
+ PD_ACCESS_SCROLL_MOVE = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_SCROLL_MOVE, /*!< Access event - scroll move */
+ PD_ACCESS_SCROLL_UP = ACCESS_EVENT_PD_MASK | ACCESS_EVENT_SCROLL_UP /*!< Access event - scroll up */
};
/*!
LB_EVENT_UPDATE_MODE_CHANGED, /*!< Livebox Update mode is changed */
+ LB_EVENT_REQUEST_CLOSE_PD, /*!< Livebox requests to close the PD */
+
LB_EVENT_IGNORED /*!< Request is ignored */
};
/*!
* \brief Initialize the livebox system
* \details N/A
- * \remarks N/A
- * \param[in] disp If you have X Display connection object, you can re-use it. but you should care its life cycle.
+ * \remarks
+ * This API uses get/setenv APIs.
+ * Those APIs are not thread-safe.
+ * So you have to consider to use the livebox_init_with_options instead of this if you are developing multi-threaded viewer.
+ * \param[in] disp If you have X Display connection object already, you can re-use it. but you should care its life cycle.
* It must be alive before call the livebox_fini
* \return int
* \retval LB_STATUS_SUCCESS if success
* \pre N/A
* \post N/A
* \see livebox_fini
+ * \see livebox_init_with_options
*/
extern int livebox_init(void *disp);
* But some application doesn't want to use the env value.
* For them, this API will give a chance to set default options using given arguments
* \remarks N/A
- * \param[in] disp
- * \param[in] prevent_overwrite
- * \param[in] event_filter
- * \return int
+ * \param[in] disp if this display is NULL, the library will try to acquire a new connection with X
+ * \param[in] prevent_overwrite If the content of image type livebox is updated, don't overwrite it(1) or overwrite old file(0)
+ * \param[in] event_filter If the next event comes in this period, ignore it. It is too fast to processing it in time.
+ * \param[in] use_thread Use the receive thread.
+ * \return int Integer, Livebox status code
* \retval LB_STATUS_SUCCESS if success
* \pre N/A
* \post N/A
* \see livebox_init
* \see livebox_fini
*/
-extern int livebox_init_with_options(void *disp, int prevent_overwrite, double event_filter);
+extern int livebox_init_with_options(void *disp, int prevent_overwrite, double event_filter, int use_thread);
/*!
* \brief Finalize the livebox system
* \pre N/A
* \post N/A
* \see livebox_init
+ * \see livebox_init_with_options
*/
extern int livebox_fini(void);
/*!
- * \brief Client is paused.
+ * \brief Notify the status of client to the provider. "it is paused".
* \details N/A
* \remarks N/A
* \return int
extern int livebox_client_paused(void);
/*!
- * \brief Client is rfesumed.
+ * \brief Notify the status of client to the provider. "it is resumed".
* \details N/A
* \remarks N/A
* \return int
/*!
* \brief Add a new livebox
* \details
+ * If the screen size if "1280x720"
+ * Below size lists are used for default.
+ * Or you can find the default sizes in pixel from /usr/share/data-provider-master/resolution.ini
+ * Size types are defined from the liblivebox-service package. (livebox-service.h)
+ *
* Normal mode livebox
- * 1x1=175x175
- * 2x1=354x175
- * 2x2=354x354
- * 4x1=712x175
- * 4x2=712x354
- * 4x4=712x712
+ * 1x1=175x175, LB_SIZE_TYPE_1x1
+ * 2x1=354x175, LB_SIZE_TYPE_2x1
+ * 2x2=354x354, LB_SIZE_TYPE_2x2
+ * 4x1=712x175, LB_SIZE_TYPE_4x1
+ * 4x2=712x354, LB_SIZE_TYPE_4x2
+ * 4x4=712x712, LB_SIZE_TYPE_4x4
*
* Extended sizes
- * 4x3=712x533
- * 4x5=712x891
- * 4x6=712x1070
+ * 4x3=712x533, LB_SIZE_TYPE_4x3
+ * 4x5=712x891, LB_SIZE_TYPE_4x5
+ * 4x6=712x1070, LB_SIZE_TYPE_4x6
*
* Easy mode livebox
- * 21x21=224x215
- * 23x21=680x215
- * 23x23=680x653
+ * 21x21=224x215, LB_SIZE_TYPE_EASY_1x1
+ * 23x21=680x215, LB_SIZE_TYPE_EASY_3x1
+ * 23x23=680x653, LB_SIZE_TYPE_EASY_3x3
*
* Special livebox
- * 0x0=720x1280
+ * 0x0=720x1280, LB_SIZE_TYPE_0x0
+ *
* \remarks
* Even if you get the handle by return value of this function, it is not created instance.
* So you have to deal it as not initialized handle.
extern struct livebox *livebox_add_with_size(const char *pkgname, const char *content, const char *cluster, const char *category, double period, int type, ret_cb_t cb, void *data);
/*!
- * \brief Delete a livebox
+ * \brief Delete a livebox (deprecated)
* \details N/A
* \remarks
* If you call this with uninitialized handle, the return callback will be called synchronously.
* So before return from this function, the return callback will be called first.
- * \param[in] handler Handle of a livebox instance
+ * \param[in] handler Handler of a livebox instance
* \param[in] cb return callback
* \param[in] data user data for return callback
* \return int
extern int livebox_del(struct livebox *handler, ret_cb_t cb, void *data);
/*!
+ * \brief Delete a livebox (will be replaced with livebox_del)
+ * \details N/A
+ * \remarks
+ * If you call this with uninitialized handle, the return callback will be called synchronously.
+ * So before return from this function, the return callback will be called first.
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] type Deletion type, LB_DELETE_PERMANENTLY or LB_DELETE_TEMPORARY
+ * \param[in] cb return callback
+ * \param[in] data user data for return callback
+ * \return int
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_BUSY already in process
+ * \retval LB_STATUS_ERROR_FAULT failed to create a request packet
+ * \retval LB_STATUS_SUCCESS successfully sent, return callack will be called
+ * \pre N/A
+ * \post N/A
+ * \see ret_cb_t
+ */
+extern int livebox_del_NEW(struct livebox *handler, int type, ret_cb_t cb, void *data);
+
+/*!
* \brief Set a livebox events callback
* \details
* To get the events push from the provider, register the event callback using this function
* \brief Unset the livebox event handler
* \details N/A
* \remarks N/A
- * \param[in] cb
- * \return void *
+ * \param[in] cb Event handler
+ * \return void * Event handler data
* \retval pointer of 'data' which is used with the livebox_set_event_handler
* \pre N/A
* \post N/A
* event, pkgname, filename, funcname
* \details N/A
* \remarks N/A
- * \param[in] cb
- * \param[in] data
+ * \param[in] cb Event handler
+ * \param[in] data Event handler data
* \return int
* \retval LB_STATUS_SUCCESS if succeed to set fault event handler
* \retval LB_STATUS_ERROR_INVALID Invalid argument
* \brief Unset the live box fault event handler
* \details N/A
* \remarks N/A
- * \param[in] cb
- * \return void *
+ * \param[in] cb Event handler
+ * \return void * Callback data which is set via livebox_set_fault_handler
* \retval pointer of 'data' which is used with the livebox_set_fault_handler
* \pre N/A
* \post N/A
* \remarks
* Even though this function returns SUCCESS, it means just successfully sent a request to provider.
* So you have to check the return callback. and its "ret" argument.
- * \param[in] pkgname
- * \param[in] cb
- * \param[in] data
+ * \param[in] pkgname Package name which should be activated
+ * \param[in] cb Result callback
+ * \param[in] data Callback data
* \return int
* \retval LB_STATUS_SUCCESS Successfully sent a request
* \retval LB_STATUS_ERROR_INVALID Invalid argument
* \brief Resize the livebox
* \details
* Normal mode livebox size
- * 1x1=175x175
- * 2x1=354x175
- * 2x2=354x354
- * 4x1=712x175
- * 4x2=712x354
- * 4x4=712x712
+ * 1x1=175x175, LB_SIZE_TYPE_1x1
+ * 2x1=354x175, LB_SIZE_TYPE_2x1
+ * 2x2=354x354, LB_SIZE_TYPE_2x2
+ * 4x1=712x175, LB_SIZE_TYPE_4x1
+ * 4x2=712x354, LB_SIZE_TYPE_4x2
+ * 4x4=712x712, LB_SIZE_TYPE_4x4
*
* Extended livebox size
- * 4x3=712x533
- * 4x5=712x891
- * 4x6=712x1070
+ * 4x3=712x533, LB_SIZE_TYPE_4x3
+ * 4x5=712x891, LB_SIZE_TYPE_4x5
+ * 4x6=712x1070, LB_SIZE_TYPE_4x6
*
* Easy mode livebox size
- * 21x21=224x215
- * 23x21=680x215
- * 23x23=680x653
+ * 21x21=224x215, LB_SIZE_TYPE_EASY_1x1
+ * 23x21=680x215, LB_SIZE_TYPE_EASY_3x1
+ * 23x23=680x653, LB_SIZE_TYPE_EASY_3x3
*
* Special mode livebox size
- * 0x0=720x1280
+ * 0x0=720x1280, LB_SIZE_TYPE_0x0
* \remarks
* You have to check the return callback.
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \param[in] type Type of a livebox size, LB_SIZE_TYPE_1x1, ...
* \param[in] cb Result callback of the resize operation.
* \param[in] data User data for return callback
* \brief Send the click event for a livebox.
* \details N/A
* \remarks N/A
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \param[in] x Rational X of the content width.
* \param[in] y Rational Y of the content height.
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see N/A
* \brief Change the cluster/sub-cluster name of given livebox handler
* \details N/A
* \remarks N/A
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \param[in] cluster New cluster of a livebox
* \param[in] category New category of a livebox
* \param[in] cb Result callback for changing the cluster/category of a livebox
* \remarks
* You have to do not release the cluster & category.
* It is allocated inside of given livebox instance, so you can only read it.
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \param[out] cluster Storage(memory) for containing the cluster name
* \param[out] category Storage(memory) for containing the category name
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see N/A
*/
-extern int livebox_get_group(struct livebox *handler, char ** const cluster, char ** const category);
+extern int livebox_get_group(struct livebox *handler, const char **cluster, const char **category);
/*!
* \brief Get the period of this livebox handler
* if this function returns 0.0f, it means the livebox has no update period.
* or the handle is not valid.
* This function only can be works after the return callback of livebox_create fucntion is called.
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \return double
* \retval Current update period of a livebox
* \retval 0.0f it means the box has no update period, or it can returns 0.0 if the handles is not valid.
* \brief Change the update period
* \details N/A
* \remarks N/A
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \param[in] period New update period of a livebox
* \param[in] cb Result callback of changing the update period of this livebox
* \param[in] data User data for the result callback
* \return int
- * \retval LB_STATUS_SUCCESS
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval LB_STATUS_ERROR_BUSY
* \retval LB_STATUS_ERROR_ALREADY
- * \retval LB_STATUS_ERROR_FAULT
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
* \pre N/A
* \post N/A
* \see ret_cb_t
* \brief Is this an text type livebox?
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return livebox_lb_type
* \retval LB_TYPE_IMAGE Contents of a livebox is based on the image file
* \retval LB_TYPE_BUFFER Contents of a livebox is based on canvas buffer(shared)
* \details
* If the livebox instance is created by system this will returns 0.
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
* \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval 0 automatically created livebox by the provider
* \brief Get the content information string of given livebox
* \details N/A
* \remarks N/A
- * \param[in] handler
- * \return char *
+ * \param[in] handler Handler of a livebox instance
+ * \return const char *
* \retval content_info Livebox content info that can be used again via content_info argument of livebox_add or livebox_add_with_size.
* \pre N/A
* \post N/A
/*!
* \brief Get the sub cluster title string of given livebox
- * \details N/A
- * \remarks N/A
- * \param[in] handler
+ * \details
+ * This API is now used for accessibility.
+ * Each box should set their content as a string to read by TTS.
+ * So if the box has focus on the homescreen, the homescreen will read a text using this API.
+ * \remarks
+ * The title which is returned by this, the TTS should read it.
+ * But it is just recomended to a homescreen.
+ * So read it or not is depends on implementation of the homescreen.
+ * \param[in] handler Handler of a livebox instance
* \return const char *
* \retval sub cluster name
* \retval NULL
/*!
* \brief Get the filename of given livebox, if it is an IMAGE type livebox
- * \details N/A
+ * \details
+ * If the box is developed as image format to represent its contents,
+ * The homescreen should know its image file name.
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return const char *
* \retval filename if the livebox type is image this function will give you a abspath of an image file (content is rendered)
* \retval NULL if this has no image file or type is not image file.
* \brief Get the package name of given livebox handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return const char *
* \retval pkgname package name
* \retval NULL if the handler is not valid
* \brief Get the priority of a current content.
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return double
* \retval 0.0f handler is NULL
* \retval -1.0f Handler is not valid (not yet initialized)
* \brief Acquire the buffer of given livebox (Only for the buffer type)
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return void *
* \retval address of a FB
* \retval NULL if it fails to get fb address
* \remarks N/A
* \param[in] buffer
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see livebox_acquire_fb
* \remarks N/A
* \param[in] buffer
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
* \retval refcnt positive integer including ZERO
* \pre N/A
* \post N/A
* \brief Acquire the buffer of a PD frame (Only for the buffer type)
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
* \retval NULL
* \retval adress of buffer of PD
* \remarks N/A
* \param[in] buffer
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see livebox_acquire_pdfb
* \remarks N/A
* \param[in] buffer
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
* \retval reference count
* \pre N/A
* \post N/A
* \brief Get the size of the Livebox
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
* \retval LB_SIZE_TYPE_NxM
* \retval LB_SIZE_TYPE_INVALID
* \brief Get the size of the Progressive Disclosure
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[out] w
* \param[out] h
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see N/A
* \brief List of supported sizes of given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[out] cnt
* \param[out] size_list
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see N/A
* \brief BUFFER SIZE of the livebox if it is a buffer type
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval size of livebox buffer
* \pre N/A
* \post N/A
* \brief BUFFER SIZE of the progiressive disclosure if it is a buffer type
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval size of PD buffer
* \pre N/A
* \post N/A
/*!
* \brief Send the content event (for buffer type) to provider(livebox)
* \details N/A
- * \remarks N/A
- * \param[in] handler
- * \param[in] type
- * \param[in] x
- * \param[in] y
+ * \remarks DEPRECATED
+ * Use the livebox_mouse_event function instead of this.
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] type Event type
+ * \param[in] x coordinates of X axis
+ * \param[in] y coordinates of Y axis
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_BUSY
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_BUSY Previous operaion is not finished yet
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully sent
* \pre N/A
* \post N/A
+ * \see livebox_mouse_event
* \see livebox_access_event
+ * \see livebox_key_event
*/
extern int livebox_content_event(struct livebox *handler, enum content_event_type type, double x, double y);
/*!
- * \brief Send the access event(for buffer type) to provider(livebox).
+ * \brief Send the content event (for buffer type) to provider(livebox)
* \details N/A
* \remarks N/A
- * \param[in] handler
- * \param[in] type
- * \param[in] x
- * \param[in] y
- * \param[in] cb
- * \param[in] data
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] type Event type
+ * \param[in] x coordinates of X axis
+ * \param[in] y coordinates of Y axis
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_BUSY
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_BUSY Previous operation is not finished yet
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully sent
* \pre N/A
* \post N/A
* \see livebox_content_event
+ * \see livebox_access_event
+ * \see livebox_key_event
+ */
+extern int livebox_mouse_event(struct livebox *handler, enum content_event_type type, double x, double y);
+
+/*!
+ * \brief Send the access event(for buffer type) to provider(livebox).
+ * \details N/A
+ * \remarks N/A
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] type Event type
+ * \param[in] x coordinates of X axsis
+ * \param[in] y coordinates of Y axsis
+ * \param[in] cb Result callback function
+ * \param[in] data Callback data
+ * \return int
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_BUSY Previous operation is not finished yet
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully sent
+ * \pre N/A
+ * \post N/A
+ * \see livebox_mouse_event
+ * \see livebox_key_event
*/
extern int livebox_access_event(struct livebox *handler, enum access_event_type type, double x, double y, ret_cb_t cb, void *data);
/*!
- * \brief Do pin up or not.
+ * \brief Send the key event(for buffer type) to provider(livebox).
* \details N/A
* \remarks N/A
- * \param[in] handler
- * \param[in] flag
- * \param[in] cb
- * \param[in] data
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] type Key event type
+ * \param[in] keycode Code of key
+ * \param[in] cb Result callback
+ * \param[in] data Callback data
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval 1 box is pinned up
- * \retval 0 box is not pinned up
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_BUSY Previous operation is not finished yet
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully sent
+ * \pre N/A
+ * \post N/A
+ * \see livebox_mouse_event
+ * \see livebox_access_event
+ */
+extern int livebox_key_event(struct livebox *handler, enum content_event_type type, unsigned int keycode, ret_cb_t cb, void *data);
+
+/*!
+ * \brief Do pin up or not.
+ * \details
+ * If the livebox supports the pinup feature,
+ * you can freeze the update of given livebox.
+ * But it is different with pause.
+ * The box will be updated and it will decide wheter update its content or not when the pinup is on.
+ * \remarks N/A
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] flag Pinup value
+ * \param[in] cb Result callback
+ * \param[in] data Callback data
+ * \return int
+ * \retval LB_STATUS_ERROR_INVALID Invalid parameters
* \see ret_cb_t
+ * \see livebox_set_visibility
+ * \see livebox_is_pinned_up
*/
extern int livebox_set_pinup(struct livebox *handler, int flag, ret_cb_t cb, void *data);
* \brief Check the PIN-UP status of given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
+ * \retval LB_STATUS_ERROR_INVALID Invalid parameters
+ * \retval 1 box is pinned up
+ * \retval 0 box is not pinned up
+ * \see livebox_set_pinup
*/
extern int livebox_is_pinned_up(struct livebox *handler);
* \brief Check the PINUP feature availability of the given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval 1 if the box support Pinup feature
* \retval 0 if the box does not support the Pinup feature
* \pre N/A
* \post N/A
- * \see N/A
+ * \see livebox_is_pinned_up
+ * \see livebox_set_pinup
*/
extern int livebox_has_pinup(struct livebox *handler);
* \brief Check the PD existence of given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval 1 if the box support the PD
* \retval 0 if the box has no PD
* \pre N/A
* \brief Create the PD of given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
- * \param[in] cb
- * \param[in] data
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] cb Result callback
+ * \param[in] data Callback data
* \return int
- * \retval LB_STATUS_SUCCESS
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_BUSY
- * \retval LB_STATUS_ERROR_FAULT
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_BUSY Previous operation is not finished yet
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
* \pre N/A
* \post N/A
* \see ret_cb_t
+ * \see livebox_create_pd_with_position
+ * \see livebox_move_pd
+ * \see livebox_destroy_pd
*/
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
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[in] x 0.0 ~ 1.0
* \param[in] y 0.0 ~ 1.0
- * \param[in] cb
- * \param[in] data
+ * \param[in] cb Result callback
+ * \param[in] data Callback data
* \return int
- * \retval LB_STATUS_SUCCESS
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_BUSY
- * \retval LB_STATUS_ERROR_FAULT
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_BUSY Previous operation is not finished yet
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
* \pre N/A
* \post N/A
- * \see N/A
+ * \see livebox_create_pd
+ * \see livebox_destroy_pd
+ * \see livebox_move_pd
*/
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.
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[in] x 0.0 ~ 1.0
* \param[in] y 0.0 ~ 1.0
* \return int
* \retval LB_STATUS_SUCCESS if succeed to send request for updating position of the PD.
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \pre N/A
* \post N/A
* \see N/A
* \brief Destroy the PD of given handler if it is created.
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[in] cb
* \param[in] data
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see ret_cb_t
* \brief Check the create status of given livebox handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval 0 PD is not created
* \retval 1 PD is created
*/
* \brief Check the content type of the progressive disclosure of given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
* \retval PD_TYPE_BUFFER Contents of a PD is based on canvas buffer(shared)
* \retval PD_TYPE_TEXT Contents of a PD is based on formatted text file
* \brief Set function table for parsing the text content of a livebox
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[in] ops
* \return int
- * \retval LB_STATUS_SUCCESS
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \see livebox_set_pd_text_handler
*/
extern int livebox_set_text_handler(struct livebox *handler, struct livebox_script_operators *ops);
* \brief Set function table for parsing the text content of a Progressive Disclosure
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[in] ops
* \return int
- * \retval LB_STATUS_SUCCESS
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \see livebox_set_text_handler
*/
extern int livebox_set_pd_text_handler(struct livebox *handler, struct livebox_script_operators *ops);
* \brief Emit a text signal to given livebox only if it is a text type.
* \details N/A
* \remarks N/A
- * \param[in] handler
- * \param[in] emission
- * \param[in] source
- * \param[in] sx
- * \param[in] sy
- * \param[in] ex
- * \param[in] ey
- * \param[in] cb
- * \param[in] data
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] emission Emission string
+ * \param[in] source Source string
+ * \param[in] sx start X
+ * \param[in] sy start Y
+ * \param[in] ex end X
+ * \param[in] ey end Y
+ * \param[in] cb Result callback
+ * \param[in] data Callback data
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid parameters
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully emitted
* \see ret_cb_t
*/
extern int livebox_emit_text_signal(struct livebox *handler, const char *emission, const char *source, double sx, double sy, double ex, double ey, ret_cb_t cb, void *data);
* \brief Set a private data pointer to carry it using given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
- * \param[in] data
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] data data pointer
* \return int
- * \retval LB_STATUS_SUCCESS
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_SUCCESS Successfully registered
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \pre N/A
* \post N/A
* \see livebox_get_data
* \brief Get private data pointer which is carried by given handler
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return void *
* \retval data pointer
+ * \retval NULL if there is not data
* \pre N/A
* \post N/A
* \see livebox_set_data
/*!
* \brief Subscribe the event for liveboxes only in given cluster and sub-cluster
- * \details N/A
+ * \details
+ * If you wrote a view-only client.
+ * you can receive the event of specific liveboxes which are grouped in given cluster/category
+ * But you cannot modify their attributes (such as size, ...).
* \remarks N/A
* \param[in] cluster "*" can be used for subscribe all cluster's liveboxes event.
* If you use the "*", value in the category will be ignored.
* \param[in] category "*" can be used for subscribe liveboxes events of all category(sub-cluster) in given "cluster"
* \return int
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully requested
* \pre N/A
* \post N/A
* \see livebox_unsubscribe_group
* If you use the "*", value in the category will be ignored.
* \param[in] category "*" can be used for subscribe all sub-cluster's liveboxes event in given "cluster"
* \return int
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully requested
* \pre N/A
* \post N/A
* \see livebox_subscribe_group
/*!
* \brief Refresh the group(cluster/sub-cluser(aka. category))
- * \details N/A
- * \remarks N/A
+ * \details
+ * This function will trigger the update of all liveboxes in given cluster/category group
+ * \remarks
+ * Basically default livebox system doesn't use the cluster/category concept.
+ * But you can use it. so if you decide to use it then you can trigger the update of all liveboxes in given group.
* \param[in] cluster Cluster ID
* \param[in] category Sub-cluster ID
* \param[in] force 1 if the boxes should be updated even if they are paused
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully requested
* \pre N/A
* \post N/A
- * \see N/A
+ * \see livebox_refresh
*/
extern int livebox_refresh_group(const char *cluster, const char *category, int force);
* \brief Refresh a livebox
* \details N/A
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \param[in] force 1 if the box should be updated even if it is paused
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully requested
* \pre N/A
* \post N/A
- * \see N/A
+ * \see livebox_refresh_group
*/
extern int livebox_refresh(struct livebox *handler, int force);
/*!
* \brief Pixmap Id of a livebox content
- * \details N/A
+ * \details
+ * This function doesn't guarantees the life-cycle of the pixmap.
+ * If the service provider destroy the pixmap, you will not know about it.
+ * So you should validate it before access it.
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
* \retval 0 if the pixmap is not created
* \retval pixmap Pixmap Id need to be casted to (unsigned int) type
/*!
* \brief Pixmap Id of a PD content
- * \details N/A
+ * \details
+ * This function doesn't guarantees the life-cycle of the pixmap.
+ * If the service provider destroy the pixmap, you will not know about it.
+ * So you should validate it before access it.
* \remarks N/A
- * \param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return int
* \retval 0 if the pixmap is not created
* \retval pixmap Pixmap Id need to be casted to (unsigned int) type
extern int livebox_pd_pixmap(const struct livebox *handler);
/*!
- * \brief
- * \details N/A
+ * \brief Acquire the pixmap of PD
+ * \details
+ * After acquire the pixmap of PD, it will not be destroyed
+ * So if the new update is comming with new pixmap Id, you should release old pixmap manually
* \remarks N/A
- * \param[in] handler
- * \param[in] cb
- * \param[in] data
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] cb Result callback for acquiring request
+ * \param[in] data Callback Data
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Failed to send a request to the service provider or there is critical error that is unrecoverable
+ * \retval LB_STATUS_SUCCESS Successfully requested to acquire the pixmap of PD
* \pre N/A
* \post N/A
* \see livebox_release_pd_pixmap
* \brief Release the acquired pixmap ID
* \details N/A
* \remarks N/A
- * \param[in] handler
- * \param[in] pixmap
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] pixmap Pixmap Id to release it
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully released (request is sent)
* \pre N/A
* \post N/A
* \see livebox_acquire_pd_pixmap
extern int livebox_release_pd_pixmap(struct livebox *handler, int pixmap);
/*!
- * \brief
- * \details N/A
+ * \brief Getting the PIXMAP of a livebox
+ * \details
+ * Even if the render process release the pixmap, the pixmap will be kept before released by livebox_release_lb_pixmap
+ * You should release the pixmap manually.
* \remarks N/A
- * \param[in] handler
- * \param[in] cb
- * \param[in] data
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] cb Callback function which will be called with result of acquiring lb pixmap
+ * \param[in] data Callback data
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
- * \pre N/A
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully requested
+ * \pre
+ * Livebox service system should support the PIXMAP type buffer.
+ * The livebox should be designed to use the buffer (script type)
* \post N/A
* \see livebox_release_lb_pixmap
* \see livebox_acquire_pd_pixmap
extern int livebox_acquire_lb_pixmap(struct livebox *handler, ret_cb_t cb, void *data);
/*!
- * \brief
- * \details N/A
+ * \brief Release the pixmap of a livebox
+ * \details
+ * After the client gets new pixmap or no more need to keep current pixmap, use this to release it.
+ * If there is no user for given pixmap, the pixmap will be destroyed.
* \remarks N/A
- * \param[in] handler
- * \param[in] pixmap
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] pixmap Pixmap Id of given livebox handler
* \return int
- * \retval LB_STATUS_ERROR_INVALID
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
- * \pre N/A
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \pre
+ * The pixmap should be acquired by livebox_acquire_lb_pixmap
* \post N/A
* \see livebox_acquire_lb_pixmap
* \see livebox_release_pd_pixmap
* \brief Update the visible state of a livebox
* \details N/A
* \remarks N/A
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \param[in] state Configure the current visible state of a livebox
* \return int
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval LB_STATUS_ERROR_BUSY
* \retval LB_STATUS_ERROR_PERMISSION
* \retval LB_STATUS_ERROR_ALREADY
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully done
* \pre N/A
* \post N/A
* \see N/A
* \brief Current visible state of a livebox
* \details N/A
* \remarks N/A
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \return livebox_visible_state
* \retval LB_SHOW Livebox is showed. Default state
* \retval LB_HIDE Livebox is hide, Update timer is not be freezed. but you cannot receive any updates events. you should refresh(reload) the content of a livebox when you make this show again
* if you set 1 for active update mode, you should get buffer without updated event from provider.
* But is passive mode, you have to update content of a box when you get updated event.
* Default is Passive mode.
- * \param[in] handler Handler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \param[in] active_update 1 means active update, 0 means passive update (default)
* \param[in] cb Result callback function
* \param[in] data Callback data
* \return int
- * \retval LB_STATUS_ERROR_INVALID
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
* \retval LB_STATUS_ERROR_BUSY
* \retval LB_STATUS_ERROR_PERMISSION
* \retval LB_STATUS_ERROR_ALREADY
- * \retval LB_STATUS_ERROR_FAULT
- * \retval LB_STATUS_SUCCESS
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \pre N/A
+ * \post N/A
* \see ret_cb_t
*/
extern int livebox_set_update_mode(struct livebox *handler, int active_update, ret_cb_t cb, void *data);
* \brief Is this box in the active update mode?
* \details N/A
* \remarks N/A
- * \param[in] handler HAndler of a livebox
+ * \param[in] handler Handler of a livebox instance
* \return int
* \retval 0 if passive mode
* \retval 1 if active mode or error code
+ * \pre N/A
+ * \post N/A
* \see N/A
*/
extern int livebox_is_active_update(struct livebox *handler);
* \remarks N/A
* param[in] flag
* \return void
+ * \pre N/A
+ * \post N/A
* \see livebox_manual_sync
* \see livebox_sync_pd_fb
* \see livebox_sync_lb_fb
* \return int
* \retval 0 if auto sync
* \retval 1 if manual sync
+ * \pre N/A
+ * \post N/A
* \see livebox_set_manual_sync
* \see livebox_sync_pd_fb
* \see livebox_sync_lb_fb
* \brief Use the frame drop while resizing contents
* \details N/A
* \remarks N/A
- * \param[in] flag
+ * \param[in] flag 1 for dropping frames of old size or 0.
* \return void
+ * \pre N/A
+ * \post N/A
* \see livebox_frame_drop_for_resizing
*/
extern void livebox_set_frame_drop_for_resizing(int flag);
/*!
* \brief Get current mode
- * \details N/A
+ * \details
+ * While resizing the box, viewer doesn't want to know the updaed frames of old size anymore,
+ * In that case, if this mode is turnned on, the provider will not send the updated event to the viewer about old size.
+ * So the viewer can reduce its burden to update (or ignore) unnecessary frames
* \remarks N/A
* \return int
- * \retval 0 if disabled
- * \retval 1 if enabled
+ * \retval 0 if it is disabled
+ * \retval 1 if it is enabled
+ * \pre N/A
+ * \post N/A
* \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
+ * param[in] handler Handler of a livebox instance
* \return void
- * \retval 0 if success
+ * \retval LB_STATUS_SUCCESS If success
+ * \retval LB_STATUS_ERROR_INVALID Invalid handle
+ * \pre N/A
+ * \post N/A
* \see livebox_set_manual_sync
* \see livebox_manual_sync
* \see livebox_sync_lb_fb
* \brief Sync manually
* \details N/A
* \remarks N/A
- * param[in] handler
+ * \param[in] handler Handler of a livebox instance
* \return void
- * \retval 0 if success
+ * \retval LB_STATUS_SUCCESS If success
+ * \retval LB_STATUS_ERROR_INVALID Invalid handle
+ * \pre N/A
+ * \post N/A
* \see livebox_set_manual_sync
* \see livebox_manual_sync
* \see livebox_sync_pd_fb
extern int livebox_sync_lb_fb(struct livebox *handler);
/*!
+ * \brief Getting the alternative icon of given livebox instance.
+ * \details If the box should be represented as a shortcut icon, this function will get the alternative icon.
+ * \remarks N/A
+ * \param[in] handler Handler of a livebox instance
+ * \return const char *
+ * \retval address Absolute path of an alternative icon file
+ * \retval NULL Livebox has no alternative icon file
+ * \pre N/A
+ * \post N/A
+ * \see livebox_alt_name
+ */
+extern const char *livebox_alt_icon(struct livebox *handler);
+
+/*!
+ * \brief Getting the alternative name of given livebox instance.
+ * \details If the box should be represented as a shortcut name, this function will get the alternative name.
+ * \remarks N/A
+ * \param[in] handler Handler of a livebox instance
+ * \return const char *
+ * \retval name Alternative name of a livebox
+ * \retval NULL Livebox has no alternative name
+ * \pre N/A
+ * \post N/A
+ * \see livebox_alt_icon
+ */
+extern const char *livebox_alt_name(struct livebox *handler);
+
+/*!
+ * \brief Get the lock for frame buffer.
+ * \details
+ * This function should be used to prevent from rendering to the frame buffer while reading it.
+ * And the locking area should be short and must be released ASAP
+ * Or the render thread will be hang'd.
+ * \remarks
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] is_pd 1 for PD or 0
+ * \return int
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \pre N/A
+ * \post N/A
+ * \see livebox_release_fb_lock
+ */
+extern int livebox_acquire_fb_lock(struct livebox *handler, int is_pd);
+
+/*!
+ * \brief Release the lock of frame buffer
+ * \details
+ * This function should be called ASAP after acquire a lock of FB.
+ * Or the render process will be blocked.
+ * \remarks N/A
+ * \param[in] handler Handler of a livebox instance
+ * \param[in] is_pd 1 for PD or 0
+ * \return int
+ * \retval LB_STATUS_ERROR_FAULT Unrecoverable error occurred
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_SUCCESS Successfully done
+ * \pre N/A
+ * \post N/A
+ * \see livebox_acquire_fb_lock
+ */
+extern int livebox_release_fb_lock(struct livebox *handler, int is_pd);
+
+/*!
* \}
*/