Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: ppapi/c/private/ppb_flash_clipboard.h

Issue 9212066: Modified the flash cipboard interface to add html clipboard support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 Wed Dec 14 18:08:00 2011. */ 6 /* From private/ppb_flash_clipboard.idl modified Wed Jan 25 14:08:27 2012. */
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_3_0 "PPB_Flash_Clipboard;3.0" 17 #define PPB_FLASH_CLIPBOARD_INTERFACE_3_0 "PPB_Flash_Clipboard;3.0"
18 #define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_3_0 18 #define PPB_FLASH_CLIPBOARD_INTERFACE_4_0 "PPB_Flash_Clipboard;4.0"
19 #define PPB_FLASH_CLIPBOARD_INTERFACE PPB_FLASH_CLIPBOARD_INTERFACE_4_0
19 20
20 /** 21 /**
21 * @file 22 * @file
22 * This file defines the private <code>PPB_Flash_Clipboard</code> API used by 23 * This file defines the private <code>PPB_Flash_Clipboard</code> API used by
23 * Pepper Flash for reading and writing to the clipboard. 24 * Pepper Flash for reading and writing to the clipboard.
24 */ 25 */
25 26
26 27
27 /** 28 /**
28 * The old version string for this interface, equivalent to version 3.0. 29 * The old version string for this interface, equivalent to version 3.0.
(...skipping 27 matching lines...) Expand all
56 PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT = 1, 57 PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT = 1,
57 /** Indicates HTML clipboard data. */ 58 /** Indicates HTML clipboard data. */
58 PP_FLASH_CLIPBOARD_FORMAT_HTML = 2 59 PP_FLASH_CLIPBOARD_FORMAT_HTML = 2
59 } PP_Flash_Clipboard_Format; 60 } PP_Flash_Clipboard_Format;
60 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_Clipboard_Format, 4); 61 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Flash_Clipboard_Format, 4);
61 /** 62 /**
62 * @} 63 * @}
63 */ 64 */
64 65
65 /** 66 /**
67 * @addtogroup Structs
68 * @{
69 */
70 struct PP_Flash_Clipboard_Data_Item {
71 PP_Flash_Clipboard_Format format;
72 struct PP_Var data;
73 };
74 /**
75 * @}
76 */
77
78 /**
66 * @addtogroup Interfaces 79 * @addtogroup Interfaces
67 * @{ 80 * @{
68 */ 81 */
69 /** 82 /**
70 * The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions 83 * The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions
71 * used by Pepper Flash to access the clipboard. 84 * used by Pepper Flash to access the clipboard.
72 * 85 *
73 * TODO(viettrungluu): Support more formats (e.g., HTML)....
74 */ 86 */
75 struct PPB_Flash_Clipboard_3_0 { 87 struct PPB_Flash_Clipboard_4_0 {
76 /** 88 /**
77 * Checks whether a given data format is available from the given clipboard. 89 * Checks whether a given data format is available from the given clipboard.
78 * Returns true if the given format is available from the given clipboard. 90 * Returns true if the given format is available from the given clipboard.
79 */ 91 */
80 PP_Bool (*IsFormatAvailable)(PP_Instance instance_id, 92 PP_Bool (*IsFormatAvailable)(PP_Instance instance_id,
81 PP_Flash_Clipboard_Type clipboard_type, 93 PP_Flash_Clipboard_Type clipboard_type,
82 PP_Flash_Clipboard_Format format); 94 PP_Flash_Clipboard_Format format);
83 /** 95 /**
84 * Reads plain text data from the clipboard. 96 * Reads data in the given <code>format</code> from the clipboard.
85 */ 97 */
98 struct PP_Var (*ReadData)(PP_Instance instance_id,
99 PP_Flash_Clipboard_Type clipboard_type,
100 PP_Flash_Clipboard_Format format);
101 /**
102 * Writes the given array of data items to the clipboard. Each data item
103 * should have a different <code>PP_Flash_Clipboard_Format</code>.
104 * Any existing clipboard data is erased before writing this data.
105 */
106 int32_t (*WriteData)(
107 PP_Instance instance_id,
108 PP_Flash_Clipboard_Type clipboard_type,
109 uint32_t data_item_count,
110 const struct PP_Flash_Clipboard_Data_Item data_items[]);
111 };
112
113 typedef struct PPB_Flash_Clipboard_4_0 PPB_Flash_Clipboard;
114
115 struct PPB_Flash_Clipboard_3_0 {
116 PP_Bool (*IsFormatAvailable)(PP_Instance instance_id,
117 PP_Flash_Clipboard_Type clipboard_type,
118 PP_Flash_Clipboard_Format format);
86 struct PP_Var (*ReadPlainText)(PP_Instance instance_id, 119 struct PP_Var (*ReadPlainText)(PP_Instance instance_id,
87 PP_Flash_Clipboard_Type clipboard_type); 120 PP_Flash_Clipboard_Type clipboard_type);
88 /**
89 * Writes plain text data to the clipboard. If <code>text</code> is too large,
90 * it will return <code>PP_ERROR_NOSPACE</code> and not write to the
91 * clipboard.
92 */
93 int32_t (*WritePlainText)(PP_Instance instance_id, 121 int32_t (*WritePlainText)(PP_Instance instance_id,
94 PP_Flash_Clipboard_Type clipboard_type, 122 PP_Flash_Clipboard_Type clipboard_type,
95 struct PP_Var text); 123 struct PP_Var text);
96 }; 124 };
97
98 typedef struct PPB_Flash_Clipboard_3_0 PPB_Flash_Clipboard;
99 /** 125 /**
100 * @} 126 * @}
101 */ 127 */
102 128
103 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ */ 129 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ */
104 130
OLDNEW
« ppapi/api/private/ppb_flash_clipboard.idl ('K') | « ppapi/api/private/ppb_flash_clipboard.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698