mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-01 01:36:09 +03:00
87 lines
2.3 KiB
Plaintext
87 lines
2.3 KiB
Plaintext
// Copyright 2018 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
module ui.mojom;
|
|
|
|
import "mojo/public/mojom/base/big_string.mojom";
|
|
import "mojo/public/mojom/base/string16.mojom";
|
|
import "mojo/public/mojom/base/time.mojom";
|
|
import "skia/public/interfaces/bitmap.mojom";
|
|
|
|
enum ClipboardType {
|
|
COPY_PASTE,
|
|
SELECTION,
|
|
DRAG,
|
|
};
|
|
|
|
// Provides remote access to a ui::Clipboard instance.
|
|
interface ClipboardHost {
|
|
[Sync]
|
|
GetSequenceNumber(ClipboardType type) => (uint64 result);
|
|
|
|
[Sync]
|
|
IsFormatAvailable(string format, ClipboardType type) => (bool result);
|
|
|
|
Clear(ClipboardType type);
|
|
|
|
[Sync]
|
|
ReadAvailableTypes(ClipboardType type) =>
|
|
(array<mojo_base.mojom.String16> types, bool contains_filenames);
|
|
|
|
[Sync]
|
|
ReadText(ClipboardType type) => (mojo_base.mojom.BigString16 result);
|
|
|
|
[Sync]
|
|
ReadAsciiText(ClipboardType type) => (mojo_base.mojom.BigString result);
|
|
|
|
[Sync]
|
|
ReadHTML(ClipboardType type) => (mojo_base.mojom.BigString16 markup,
|
|
string src_url,
|
|
uint32 fragment_start,
|
|
uint32 fragment_end);
|
|
|
|
[Sync]
|
|
ReadRTF(ClipboardType type) => (string result);
|
|
|
|
[Sync]
|
|
ReadImage(ClipboardType type) => (skia.mojom.Bitmap? image);
|
|
|
|
[Sync]
|
|
ReadCustomData(ClipboardType clipboard_type, mojo_base.mojom.String16 type) =>
|
|
(mojo_base.mojom.BigString16 result);
|
|
|
|
[Sync]
|
|
ReadBookmark() => (mojo_base.mojom.String16 title, string url);
|
|
|
|
[Sync]
|
|
ReadData(string format) => (string result);
|
|
|
|
[Sync]
|
|
GetLastModifiedTime() => (mojo_base.mojom.Time time);
|
|
|
|
ClearLastModifiedTime();
|
|
|
|
// Writing to the clipboard via IPC is a two-phase operation. First, the
|
|
// client sends all the types of data it would like to write to the host.
|
|
// Then, it calls CommitWrite to commit the data to the system clipboard.
|
|
WriteText(mojo_base.mojom.BigString16 text);
|
|
|
|
WriteHTML(mojo_base.mojom.BigString16 markup, string url);
|
|
|
|
WriteRTF(string rtf);
|
|
|
|
WriteBookmark(string url, mojo_base.mojom.String16 title);
|
|
|
|
WriteWebSmartPaste();
|
|
|
|
WriteBitmap(skia.mojom.Bitmap bitmap);
|
|
|
|
WriteData(string type, mojo_base.mojom.BigString data);
|
|
|
|
CommitWrite(ClipboardType type);
|
|
|
|
[EnableIf=is_mac]
|
|
WriteStringToFindPboard(mojo_base.mojom.String16 text);
|
|
};
|