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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
David Tseng 2013/09/05 19:21:22 nit: 2013
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Braille display access private API.
6 namespace braillePrivate {
7 // Braille display keyboard command.
8 enum KeyCommand {
9 line_up,
10 line_down,
11 pan_left,
12 pan_right,
13 top,
14 bottom,
15 routing,
16 dots,
17 standard_key
18 };
19
20 // A keyboard event.
21 dictionary KeyEvent {
22 KeyCommand command;
23 // 0-based display position for commands that involve a routing key.
24 long? displayPosition;
25 // Braille dot keys that were pressed, stored in the low-order bits.
26 // Dot 1 is stored in bit 0, dot2 in bit 1, etc.
27 long? brailleDots;
28 DOMString? standardKeyName;
29 boolean? spaceKey;
30 boolean? altKey;
31 boolean? shiftKey;
32 boolean? ctrlKey;
33 };
34
35 // The current braille display state.
36 dictionary DisplayState {
37 // Whether a braille display is currently available.
38 boolean available;
39 // Number of braille cells on the currently connected display.
40 long? textCells;
41 };
42
43 callback DisplayStateCallback = void(DisplayState result);
44
45 interface Functions {
46 // Gets the current display state.
47 static void getDisplayState(DisplayStateCallback callback);
48 // TODO: Temporary for testing without translation library.
49 static void writeText(DOMString text, long cursor);
50 // Write the given dot patterns to the display. The buffer should contain
51 // the same number of entries as the current display contains. If not,
52 // the output will be clipped or filled with blank cells to the right.
53 static void writeDots(ArrayBuffer cells);
54 };
55
56 interface Events {
57 static void onDisplayStateChanged(DisplayState state);
58 static void onKeyEvent(KeyEvent event);
59 };
60 };
OLDNEW
« 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