Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
PPB_Flash_Clipboard_5_1 Struct Reference

#include <ppb_flash_clipboard.h>

Public Attributes

uint32_t(* RegisterCustomFormat )(PP_Instance instance_id, const char *format_name)
 
PP_Bool(* IsFormatAvailable )(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format)
 
struct PP_Var(* ReadData )(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format)
 
int32_t(* WriteData )(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t data_item_count, const uint32_t formats[], const struct PP_Var data_items[])
 
PP_Bool(* GetSequenceNumber )(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint64_t *sequence_number)
 

Detailed Description

The PPB_Flash_Clipboard interface contains pointers to functions used by Pepper Flash to access the clipboard.

Member Data Documentation

PP_Bool(* PPB_Flash_Clipboard_5_1::GetSequenceNumber)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint64_t *sequence_number)

Gets a sequence number which uniquely identifies clipboard state. This can be used to version the data on the clipboard and determine whether it has changed. The sequence number will be placed in |sequence_number| and PP_TRUE returned if the sequence number was retrieved successfully.

PP_Bool(* PPB_Flash_Clipboard_5_1::IsFormatAvailable)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format)

Checks whether a given data format is available from the given clipboard. Returns true if the given format is available from the given clipboard.

struct PP_Var(* PPB_Flash_Clipboard_5_1::ReadData)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t format)

Reads data in the given format from the clipboard. An undefined PP_Var is returned if there is an error in reading the clipboard data and a null PP_Var is returned if there is no data of the specified format to read.

uint32_t(* PPB_Flash_Clipboard_5_1::RegisterCustomFormat)(PP_Instance instance_id, const char *format_name)

Registers a custom clipboard format. The format is identified by a string. An id identifying the format will be returned if the format is successfully registered, which can be used to read/write data of that format. If the format has already been registered, the id associated with that format will be returned. If the format fails to be registered PP_FLASH_CLIPBOARD_FORMAT_INVALID will be returned.

All custom data should be read/written as PP_Var array buffers. The clipboard format is pepper-specific meaning that although the data will be stored on the system clipboard, it can only be accessed in a sensible way by using the pepper API. Data stored in custom formats can be safely shared between different applications that use pepper.

int32_t(* PPB_Flash_Clipboard_5_1::WriteData)(PP_Instance instance_id, PP_Flash_Clipboard_Type clipboard_type, uint32_t data_item_count, const uint32_t formats[], const struct PP_Var data_items[])

Writes the given array of data items to the clipboard. All existing clipboard data in any format is erased before writing this data. Thus, passing an array of size 0 has the effect of clearing the clipboard without writing any data. Each data item in the array should have a different PP_Flash_Clipboard_Format. If multiple data items have the same format, only the last item with that format will be written. If there is an error writing any of the items in the array to the clipboard, none will be written and an error code is returned. The error code will be PP_ERROR_NOSPACE if the value is too large to be written, PP_ERROR_BADARGUMENT if a PP_Var cannot be converted into the format supplied or PP_FAILED if the format is not supported.


The documentation for this struct was generated from the following file: