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

Unified Diff: chrome/common/extensions/api/braille_private.idl

Issue 13355002: Implement chrome.brailleDisplayPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/permissions/api_permission.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/braille_private.idl
diff --git a/chrome/common/extensions/api/braille_private.idl b/chrome/common/extensions/api/braille_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..55b2ec98de1041e6eb5db091700da2f26f7bb643
--- /dev/null
+++ b/chrome/common/extensions/api/braille_private.idl
@@ -0,0 +1,60 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
David Tseng 2013/09/05 19:21:22 nit: 2013
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Braille display access private API.
+namespace braillePrivate {
+ // Braille display keyboard command.
+ enum KeyCommand {
+ line_up,
+ line_down,
+ pan_left,
+ pan_right,
+ top,
+ bottom,
+ routing,
+ dots,
+ standard_key
+ };
+
+ // A keyboard event.
+ dictionary KeyEvent {
+ KeyCommand command;
+ // 0-based display position for commands that involve a routing key.
+ long? displayPosition;
+ // Braille dot keys that were pressed, stored in the low-order bits.
+ // Dot 1 is stored in bit 0, dot2 in bit 1, etc.
+ long? brailleDots;
+ DOMString? standardKeyName;
+ boolean? spaceKey;
+ boolean? altKey;
+ boolean? shiftKey;
+ boolean? ctrlKey;
+ };
+
+ // The current braille display state.
+ dictionary DisplayState {
+ // Whether a braille display is currently available.
+ boolean available;
+ // Number of braille cells on the currently connected display.
+ long? textCells;
+ };
+
+ callback DisplayStateCallback = void(DisplayState result);
+
+ interface Functions {
+ // Gets the current display state.
+ static void getDisplayState(DisplayStateCallback callback);
+ // TODO: Temporary for testing without translation library.
+ static void writeText(DOMString text, long cursor);
+ // Write the given dot patterns to the display. The buffer should contain
+ // the same number of entries as the current display contains. If not,
+ // the output will be clipped or filled with blank cells to the right.
+ static void writeDots(ArrayBuffer cells);
+ };
+
+ interface Events {
+ static void onDisplayStateChanged(DisplayState state);
+ static void onKeyEvent(KeyEvent event);
+ };
+};
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/permissions/api_permission.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698