Index: ppapi/c/private/ppb_flash_clipboard.h |
diff --git a/ppapi/c/private/ppb_flash_clipboard.h b/ppapi/c/private/ppb_flash_clipboard.h |
index 7b84a2729a570e84427f098036a0d1eab92c5fbe..c8124ba3c07e8d7761c28088bfbcffe1eee5e2ee 100644 |
--- a/ppapi/c/private/ppb_flash_clipboard.h |
+++ b/ppapi/c/private/ppb_flash_clipboard.h |
@@ -3,7 +3,7 @@ |
* found in the LICENSE file. |
*/ |
-/* From private/ppb_flash_clipboard.idl modified Wed Dec 14 18:08:00 2011. */ |
+/* From private/ppb_flash_clipboard.idl modified Wed Jan 25 14:08:27 2012. */ |
#ifndef PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ |
#define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ |
@@ -15,7 +15,8 @@ |
#include "ppapi/c/pp_var.h" |
#define PPB_FLASH_CLIPBOARD_INTERFACE_3_0 "PPB_Flash_Clipboard;3.0" |
-#define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_3_0 |
+#define PPB_FLASH_CLIPBOARD_INTERFACE_4_0 "PPB_Flash_Clipboard;4.0" |
+#define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_4_0 |
/** |
* @file |
@@ -63,6 +64,18 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_Clipboard_Format, 4); |
*/ |
/** |
+ * @addtogroup Structs |
+ * @{ |
+ */ |
+struct PP_Flash_Clipboard_Data_Item { |
+ PP_Flash_Clipboard_Format format; |
+ struct PP_Var data; |
+}; |
+/** |
+ * @} |
+ */ |
+ |
+/** |
* @addtogroup Interfaces |
* @{ |
*/ |
@@ -70,9 +83,8 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_Clipboard_Format, 4); |
* The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions |
* used by Pepper Flash to access the clipboard. |
* |
- * TODO(viettrungluu): Support more formats (e.g., HTML).... |
*/ |
-struct PPB_Flash_Clipboard_3_0 { |
+struct PPB_Flash_Clipboard_4_0 { |
/** |
* Checks whether a given data format is available from the given clipboard. |
* Returns true if the given format is available from the given clipboard. |
@@ -81,21 +93,35 @@ struct PPB_Flash_Clipboard_3_0 { |
PP_Flash_Clipboard_Type clipboard_type, |
PP_Flash_Clipboard_Format format); |
/** |
- * Reads plain text data from the clipboard. |
+ * Reads data in the given <code>format</code> from the clipboard. |
*/ |
- struct PP_Var (*ReadPlainText)(PP_Instance instance_id, |
- PP_Flash_Clipboard_Type clipboard_type); |
+ struct PP_Var (*ReadData)(PP_Instance instance_id, |
+ PP_Flash_Clipboard_Type clipboard_type, |
+ PP_Flash_Clipboard_Format format); |
/** |
- * Writes plain text data to the clipboard. If <code>text</code> is too large, |
- * it will return <code>PP_ERROR_NOSPACE</code> and not write to the |
- * clipboard. |
+ * Writes the given array of data items to the clipboard. Each data item |
+ * should have a different <code>PP_Flash_Clipboard_Format</code>. |
+ * Any existing clipboard data is erased before writing this data. |
*/ |
+ int32_t (*WriteData)( |
+ PP_Instance instance_id, |
+ PP_Flash_Clipboard_Type clipboard_type, |
+ uint32_t data_item_count, |
+ const struct PP_Flash_Clipboard_Data_Item data_items[]); |
+}; |
+ |
+typedef struct PPB_Flash_Clipboard_4_0 PPB_Flash_Clipboard; |
+ |
+struct PPB_Flash_Clipboard_3_0 { |
+ PP_Bool (*IsFormatAvailable)(PP_Instance instance_id, |
+ PP_Flash_Clipboard_Type clipboard_type, |
+ PP_Flash_Clipboard_Format format); |
+ struct PP_Var (*ReadPlainText)(PP_Instance instance_id, |
+ PP_Flash_Clipboard_Type clipboard_type); |
int32_t (*WritePlainText)(PP_Instance instance_id, |
PP_Flash_Clipboard_Type clipboard_type, |
struct PP_Var text); |
}; |
- |
-typedef struct PPB_Flash_Clipboard_3_0 PPB_Flash_Clipboard; |
/** |
* @} |
*/ |