OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /** |
| 7 * This file defines the private <code>PPB_Flash_Clipboard</code> API used by |
| 8 * Pepper Flash for reading and writing to the clipboard. |
| 9 */ |
| 10 |
| 11 label Chrome { |
| 12 M17 = 3.0 |
| 13 }; |
| 14 |
| 15 #inline c |
| 16 /** |
| 17 * The old version string for this interface, equivalent to version 3.0. |
| 18 * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184 |
| 19 */ |
| 20 #define PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY "PPB_Flash_Clipboard;3" |
| 21 #endinl |
| 22 |
| 23 /** |
| 24 * This enumeration contains the types of clipboards that can be accessed. |
| 25 * These types correspond to clipboard types in WebKit. |
| 26 */ |
| 27 [assert_size(4)] |
| 28 enum PP_Flash_Clipboard_Type { |
| 29 /** The standard clipboard. */ |
| 30 PP_FLASH_CLIPBOARD_TYPE_STANDARD = 0, |
| 31 /** The selection clipboard (e.g., on Linux). */ |
| 32 PP_FLASH_CLIPBOARD_TYPE_SELECTION = 1, |
| 33 /** The drag clipboard. */ |
| 34 PP_FLASH_CLIPBOARD_TYPE_DRAG = 2 |
| 35 }; |
| 36 |
| 37 /** |
| 38 * This enumeration contains the supported clipboard data formats. |
| 39 */ |
| 40 [assert_size(4)] |
| 41 enum PP_Flash_Clipboard_Format { |
| 42 /** Indicates an invalid or unsupported clipboard data format. */ |
| 43 PP_FLASH_CLIPBOARD_FORMAT_INVALID = 0, |
| 44 /** Indicates plain text clipboard data. */ |
| 45 PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT = 1, |
| 46 /** Indicates HTML clipboard data. */ |
| 47 PP_FLASH_CLIPBOARD_FORMAT_HTML = 2 |
| 48 }; |
| 49 |
| 50 /** |
| 51 * The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions |
| 52 * used by Pepper Flash to access the clipboard. |
| 53 * |
| 54 * TODO(viettrungluu): Support more formats (e.g., HTML).... |
| 55 */ |
| 56 [version=3.0] |
| 57 interface PPB_Flash_Clipboard { |
| 58 /** |
| 59 * Checks whether a given data format is available from the given clipboard. |
| 60 * Returns true if the given format is available from the given clipboard. |
| 61 */ |
| 62 PP_Bool IsFormatAvailable( |
| 63 [in] PP_Instance instance_id, |
| 64 [in] PP_Flash_Clipboard_Type clipboard_type, |
| 65 [in] PP_Flash_Clipboard_Format format); |
| 66 |
| 67 /** |
| 68 * Reads plain text data from the clipboard. |
| 69 */ |
| 70 PP_Var ReadPlainText( |
| 71 [in] PP_Instance instance_id, |
| 72 [in] PP_Flash_Clipboard_Type clipboard_type); |
| 73 |
| 74 /** |
| 75 * Writes plain text data to the clipboard. If <code>text</code> is too large, |
| 76 * it will return <code>PP_ERROR_NOSPACE</code> and not write to the |
| 77 * clipboard. |
| 78 */ |
| 79 int32_t WritePlainText( |
| 80 [in] PP_Instance instance_id, |
| 81 [in] PP_Flash_Clipboard_Type clipboard_type, |
| 82 [in] PP_Var text); |
| 83 }; |
OLD | NEW |