Tizen Native API
3.0
|
This module provides functionalities of copy and paste for applications.
This module provides functionalities about clipboard.
Required Header
#include <cbhm.h>
Overview
Clipboard provides functionalities for copy and paste for applications The clipboard manages the history of copied items from applications. data can be transferred between applications by using clipboard with copy and paste operations
Functions | |
int | cbhm_open_service (cbhm_h *cbhm_handle) |
Creates and initializes clipboard handle. | |
int | cbhm_close_service (cbhm_h cbhm_handle) |
Closes clipboard handle. | |
int | cbhm_show (cbhm_h cbhm_handle) |
Shows clipboard. | |
int | cbhm_hide (cbhm_h cbhm_handle) |
Hides clipboard. | |
int | cbhm_selection_type_set (cbhm_h cbhm_handle, cbhm_sel_type_e type) |
Sets clipboard selection type. | |
int | cbhm_selection_type_get (cbhm_h cbhm_handle, cbhm_sel_type_e *type) |
Gets clipboard selection type. | |
int | cbhm_item_selected_callback_add (cbhm_h cbhm_handle, cbhm_selected_cb callback, void *user_data) |
Adds event callback function of selecting a clipboard item. | |
int | cbhm_selection_set (cbhm_h cbhm_handle, cbhm_sel_type_e type, const void *data, size_t len) |
Sends data to clipboard. | |
int | cbhm_selection_get (cbhm_h cbhm_handle, cbhm_sel_type_e type, cbhm_selection_data_cb callback, void *user_data) |
Receives data from clipboard. | |
int | cbhm_item_count_get (cbhm_h cbhm_handle) |
Gets the count of clipboard items. | |
Typedefs | |
typedef struct cbhm * | cbhm_h |
Clipboard handle. | |
typedef int(* | cbhm_selected_cb )(cbhm_h cbhm_handle, void *user_data) |
Event callback signature of selecting a clipboard item. | |
typedef int(* | cbhm_selection_data_cb )(cbhm_h cbhm_handle, const char *buf, size_t len, void *user_data) |
Event callback signature of receiving data from clipboard. |
Typedef Documentation
typedef struct cbhm* cbhm_h |
Clipboard handle.
- Since :
- 3.0
typedef int(* cbhm_selected_cb)(cbhm_h cbhm_handle, void *user_data) |
Event callback signature of selecting a clipboard item.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle [in] user_data User data to be passed to the given event callback function
- Returns:
- This is reserved
- See also:
- cbhm_item_selected_callabck_add()
typedef int(* cbhm_selection_data_cb)(cbhm_h cbhm_handle, const char *buf, size_t len, void *user_data) |
Event callback signature of receiving data from clipboard.
- Since :
- 3.0
- Parameters:
-
[in] Clipboard handle [out] buf Buffer for receiving data [in] len The length of buffer [in] user_data User data to be passed to the given event callback function
- Returns:
- This is reserved
- See also:
- cbhm_item_selected_callabck_add()
Enumeration Type Documentation
enum cbhm_error_e |
Enumeration for Clipboard Error Codes.
- Since :
- 3.0
enum cbhm_sel_type_e |
Function Documentation
int cbhm_close_service | ( | cbhm_h | cbhm_handle | ) |
Closes clipboard handle.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters
- See also:
- cbhm_open_service()
Hides clipboard.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters
- See also:
- cbhm_show()
int cbhm_item_count_get | ( | cbhm_h | cbhm_handle | ) |
Gets the count of clipboard items.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle
- Returns:
- The count of clipboard items
- Return values:
-
CBHM_ERROR_INVALID_PARAMETER Invalid function parameters
int cbhm_item_selected_callback_add | ( | cbhm_h | cbhm_handle, |
cbhm_selected_cb | callback, | ||
void * | user_data | ||
) |
Adds event callback function of selecting a clipboard item.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle [in] callback Callback function called when a clipboard item is selected [in] user_data User data to be passed to the given event callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters CBHM_ERROR_OUT_OF_MEMORY Out of memory
int cbhm_open_service | ( | cbhm_h * | cbhm_handle | ) |
Creates and initializes clipboard handle.
- Since :
- 3.0
- Parameters:
-
[out] cbhm_handle Clipboard handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters CBHM_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- cbhm_close_service()
int cbhm_selection_get | ( | cbhm_h | cbhm_handle, |
cbhm_sel_type_e | type, | ||
cbhm_selection_data_cb | callback, | ||
void * | user_data | ||
) |
Receives data from clipboard.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle [in] type Selection type [in] callback Callback function receiving data from clipboard [in] user_data User data to be passed to the given event callback function
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters CBHM_ERROR_NO_DATA No data available
- See also:
- cbhm_selection_set()
int cbhm_selection_set | ( | cbhm_h | cbhm_handle, |
cbhm_sel_type_e | type, | ||
const void * | data, | ||
size_t | len | ||
) |
Sends data to clipboard.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle [in] type Selection type [in] data Data to be sent [in] len The length of data
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters CBHM_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- cbhm_selection_get()
int cbhm_selection_type_get | ( | cbhm_h | cbhm_handle, |
cbhm_sel_type_e * | type | ||
) |
Gets clipboard selection type.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle [out] type Selection type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters
- See also:
- cbhm_selection_type_set()
int cbhm_selection_type_set | ( | cbhm_h | cbhm_handle, |
cbhm_sel_type_e | type | ||
) |
Sets clipboard selection type.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle [in] type Selection type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters
- See also:
- cbhm_selection_type_get()
Shows clipboard.
- Since :
- 3.0
- Parameters:
-
[in] cbhm_handle Clipboard handle
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CBHM_ERROR_NONE Successful CBHM_ERROR_INVALID_PARAMETER Invalid function parameters
- See also:
- cbhm_hide()