Skip to content

Commit f8a9104

Browse files
author
Tobias
committed
Add async clipboard module to internal API docs
1 parent 2976b8c commit f8a9104

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

docs/API-internal.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ keysym values.
1818
* __Display__ (core/display.js): Efficient 2D rendering abstraction
1919
layered on the HTML5 canvas element.
2020

21+
* __Clipboard__ (core/clipboard.js): Clipboard event handler.
22+
2123
* __Websock__ (core/websock.js): Websock client from websockify
2224
with transparent binary data support.
2325
[Websock API](https://github.com/novnc/websockify-js/wiki/websock.js) wiki page.
2426

2527

2628
## 1.2 Callbacks
2729

28-
For the Mouse, Keyboard and Display objects the callback functions are
29-
assigned to configuration attributes, just as for the RFB object. The
30-
WebSock module has a method named 'on' that takes two parameters: the
31-
callback event name, and the callback function.
30+
For the Mouse, Keyboard, Display, and Clipboard objects, the callback
31+
functions are assigned to configuration attributes, just as for the RFB
32+
object. The WebSock module has a method named 'on' that takes two
33+
parameters: the callback event name, and the callback function.
3234

3335
## 2. Modules
3436

@@ -81,3 +83,23 @@ None
8183
| blitImage | (x, y, width, height, arr, offset, from_queue) | Blit pixels (of R,G,B,A) to the display
8284
| drawImage | (img, x, y) | Draw image and track damage
8385
| autoscale | (containerWidth, containerHeight) | Scale the display
86+
87+
## 2.3 Clipboard module
88+
89+
### 2.3.1 Configuration attributes
90+
91+
None
92+
93+
### 2.3.2 Methods
94+
95+
| name | parameters | description
96+
| ------------------ | ----------------- | ------------
97+
| writeClipboard | (text) | An async write text to clipboard
98+
| grab | () | Begin capturing clipboard events
99+
| ungrab | () | Stop capturing clipboard events
100+
101+
### 2.3.3 Callbacks
102+
103+
| name | parameters | description
104+
| ------- | ---------- | ------------
105+
| onRead | (text) | Called following a target focus event and an async clipboard read

0 commit comments

Comments
 (0)