srpcgen: Use 'const char*' for string parameters
[chromium-blink-merge.git] / ppapi / api / private / ppb_flash_clipboard.idl
blob890a7d481c818042997c409db96bb9db684c43ca
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
3 * found in the LICENSE file.
4 */
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 */
11 label Chrome {
12 M17 = 3.0
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
20 #define PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY "PPB_Flash_Clipboard;3"
21 #endinl
23 /**
24 * This enumeration contains the types of clipboards that can be accessed.
25 * These types correspond to clipboard types in WebKit.
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
35 /**
36 * This enumeration contains the supported clipboard data formats.
38 [assert_size(4)]
39 enum PP_Flash_Clipboard_Format {
40 /** Indicates an invalid or unsupported clipboard data format. */
41 PP_FLASH_CLIPBOARD_FORMAT_INVALID = 0,
42 /** Indicates plain text clipboard data. */
43 PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT = 1,
44 /** Indicates HTML clipboard data. */
45 PP_FLASH_CLIPBOARD_FORMAT_HTML = 2
48 /**
49 * The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions
50 * used by Pepper Flash to access the clipboard.
52 * TODO(viettrungluu): Support more formats (e.g., HTML)....
54 [version=3.0]
55 interface PPB_Flash_Clipboard {
56 /**
57 * Checks whether a given data format is available from the given clipboard.
58 * Returns true if the given format is available from the given clipboard.
60 PP_Bool IsFormatAvailable(
61 [in] PP_Instance instance_id,
62 [in] PP_Flash_Clipboard_Type clipboard_type,
63 [in] PP_Flash_Clipboard_Format format);
65 /**
66 * Reads plain text data from the clipboard.
68 PP_Var ReadPlainText(
69 [in] PP_Instance instance_id,
70 [in] PP_Flash_Clipboard_Type clipboard_type);
72 /**
73 * Writes plain text data to the clipboard. If <code>text</code> is too large,
74 * it will return <code>PP_ERROR_NOSPACE</code> and not write to the
75 * clipboard.
77 int32_t WritePlainText(
78 [in] PP_Instance instance_id,
79 [in] PP_Flash_Clipboard_Type clipboard_type,
80 [in] PP_Var text);