OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /* From private/ppb_flash_clipboard.idl modified Thu Mar 28 10:23:59 2013. */ | 6 /* From private/ppb_flash_clipboard.idl modified Thu Jan 23 10:16:39 2014. */ |
7 | 7 |
8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ |
9 #define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ | 9 #define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_stdint.h" | 14 #include "ppapi/c/pp_stdint.h" |
15 #include "ppapi/c/pp_var.h" | 15 #include "ppapi/c/pp_var.h" |
16 | 16 |
17 #define PPB_FLASH_CLIPBOARD_INTERFACE_4_0 "PPB_Flash_Clipboard;4.0" | 17 #define PPB_FLASH_CLIPBOARD_INTERFACE_4_0 "PPB_Flash_Clipboard;4.0" |
18 #define PPB_FLASH_CLIPBOARD_INTERFACE_5_0 "PPB_Flash_Clipboard;5.0" | 18 #define PPB_FLASH_CLIPBOARD_INTERFACE_5_0 "PPB_Flash_Clipboard;5.0" |
19 #define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_5_0 | 19 #define PPB_FLASH_CLIPBOARD_INTERFACE_5_1 "PPB_Flash_Clipboard;5.1" |
| 20 #define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_5_1 |
20 | 21 |
21 /** | 22 /** |
22 * @file | 23 * @file |
23 * This file defines the private <code>PPB_Flash_Clipboard</code> API used by | 24 * This file defines the private <code>PPB_Flash_Clipboard</code> API used by |
24 * Pepper Flash for reading and writing to the clipboard. | 25 * Pepper Flash for reading and writing to the clipboard. |
25 */ | 26 */ |
26 | 27 |
27 | 28 |
28 /** | 29 /** |
29 * @addtogroup Enums | 30 * @addtogroup Enums |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 71 |
71 /** | 72 /** |
72 * @addtogroup Interfaces | 73 * @addtogroup Interfaces |
73 * @{ | 74 * @{ |
74 */ | 75 */ |
75 /** | 76 /** |
76 * The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions | 77 * The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions |
77 * used by Pepper Flash to access the clipboard. | 78 * used by Pepper Flash to access the clipboard. |
78 * | 79 * |
79 */ | 80 */ |
80 struct PPB_Flash_Clipboard_5_0 { | 81 struct PPB_Flash_Clipboard_5_1 { |
81 /** | 82 /** |
82 * Registers a custom clipboard format. The format is identified by a | 83 * Registers a custom clipboard format. The format is identified by a |
83 * string. An id identifying the format will be returned if the format is | 84 * string. An id identifying the format will be returned if the format is |
84 * successfully registered, which can be used to read/write data of that | 85 * successfully registered, which can be used to read/write data of that |
85 * format. If the format has already been registered, the id associated with | 86 * format. If the format has already been registered, the id associated with |
86 * that format will be returned. If the format fails to be registered | 87 * that format will be returned. If the format fails to be registered |
87 * <code>PP_FLASH_CLIPBOARD_FORMAT_INVALID</code> will be returned. | 88 * <code>PP_FLASH_CLIPBOARD_FORMAT_INVALID</code> will be returned. |
88 * | 89 * |
89 * All custom data should be read/written as <code>PP_Var</code> array | 90 * All custom data should be read/written as <code>PP_Var</code> array |
90 * buffers. The clipboard format is pepper-specific meaning that although the | 91 * buffers. The clipboard format is pepper-specific meaning that although the |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 * The error code will be <code>PP_ERROR_NOSPACE</code> if the value is | 123 * The error code will be <code>PP_ERROR_NOSPACE</code> if the value is |
123 * too large to be written, <code>PP_ERROR_BADARGUMENT</code> if a PP_Var | 124 * too large to be written, <code>PP_ERROR_BADARGUMENT</code> if a PP_Var |
124 * cannot be converted into the format supplied or <code>PP_FAILED</code> | 125 * cannot be converted into the format supplied or <code>PP_FAILED</code> |
125 * if the format is not supported. | 126 * if the format is not supported. |
126 */ | 127 */ |
127 int32_t (*WriteData)(PP_Instance instance_id, | 128 int32_t (*WriteData)(PP_Instance instance_id, |
128 PP_Flash_Clipboard_Type clipboard_type, | 129 PP_Flash_Clipboard_Type clipboard_type, |
129 uint32_t data_item_count, | 130 uint32_t data_item_count, |
130 const uint32_t formats[], | 131 const uint32_t formats[], |
131 const struct PP_Var data_items[]); | 132 const struct PP_Var data_items[]); |
| 133 /** |
| 134 * Gets a sequence number which uniquely identifies clipboard state. This can |
| 135 * be used to version the data on the clipboard and determine whether it has |
| 136 * changed. The sequence number will be placed in |sequence_number| and |
| 137 * PP_TRUE returned if the sequence number was retrieved successfully. |
| 138 */ |
| 139 PP_Bool (*GetSequenceNumber)(PP_Instance instance_id, |
| 140 PP_Flash_Clipboard_Type clipboard_type, |
| 141 uint64_t* sequence_number); |
132 }; | 142 }; |
133 | 143 |
134 typedef struct PPB_Flash_Clipboard_5_0 PPB_Flash_Clipboard; | 144 typedef struct PPB_Flash_Clipboard_5_1 PPB_Flash_Clipboard; |
135 | 145 |
136 struct PPB_Flash_Clipboard_4_0 { | 146 struct PPB_Flash_Clipboard_4_0 { |
137 PP_Bool (*IsFormatAvailable)(PP_Instance instance_id, | 147 PP_Bool (*IsFormatAvailable)(PP_Instance instance_id, |
138 PP_Flash_Clipboard_Type clipboard_type, | 148 PP_Flash_Clipboard_Type clipboard_type, |
139 PP_Flash_Clipboard_Format format); | 149 PP_Flash_Clipboard_Format format); |
140 struct PP_Var (*ReadData)(PP_Instance instance_id, | 150 struct PP_Var (*ReadData)(PP_Instance instance_id, |
141 PP_Flash_Clipboard_Type clipboard_type, | 151 PP_Flash_Clipboard_Type clipboard_type, |
142 PP_Flash_Clipboard_Format format); | 152 PP_Flash_Clipboard_Format format); |
143 int32_t (*WriteData)(PP_Instance instance_id, | 153 int32_t (*WriteData)(PP_Instance instance_id, |
144 PP_Flash_Clipboard_Type clipboard_type, | 154 PP_Flash_Clipboard_Type clipboard_type, |
145 uint32_t data_item_count, | 155 uint32_t data_item_count, |
146 const PP_Flash_Clipboard_Format formats[], | 156 const PP_Flash_Clipboard_Format formats[], |
147 const struct PP_Var data_items[]); | 157 const struct PP_Var data_items[]); |
148 }; | 158 }; |
| 159 |
| 160 struct PPB_Flash_Clipboard_5_0 { |
| 161 uint32_t (*RegisterCustomFormat)(PP_Instance instance_id, |
| 162 const char* format_name); |
| 163 PP_Bool (*IsFormatAvailable)(PP_Instance instance_id, |
| 164 PP_Flash_Clipboard_Type clipboard_type, |
| 165 uint32_t format); |
| 166 struct PP_Var (*ReadData)(PP_Instance instance_id, |
| 167 PP_Flash_Clipboard_Type clipboard_type, |
| 168 uint32_t format); |
| 169 int32_t (*WriteData)(PP_Instance instance_id, |
| 170 PP_Flash_Clipboard_Type clipboard_type, |
| 171 uint32_t data_item_count, |
| 172 const uint32_t formats[], |
| 173 const struct PP_Var data_items[]); |
| 174 }; |
149 /** | 175 /** |
150 * @} | 176 * @} |
151 */ | 177 */ |
152 | 178 |
153 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ */ | 179 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ */ |
154 | 180 |
OLD | NEW |