-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
pasteboard | ||
========== | ||
|
||
Exposes pasteboard functionnalities to copy and paste strings, images, colors and URLs. | ||
|
||
To minimize unnecessary notifications when accessing pasteboard data from other applications, | ||
first call ``hasStrings``, ``hasImages``, ``hasColors`` or ``hasURLs`` to check if the desired | ||
data type is available before retrieving it. This prevents a notification when the requested | ||
type is not present, but a notification may still appear if data is accessed. | ||
|
||
.. lua:module:: pasteboard | ||
.. lua:attribute:: name: string | ||
The name of the pasteboard. | ||
|
||
.. lua:attribute:: numberOfItems: number | ||
The number of items in the pasteboard. | ||
|
||
.. lua:attribute:: hasStrings: boolean | ||
Whether the pasteboard contains one or more strings. | ||
|
||
.. lua:attribute:: string: string | ||
The first string in the pasteboard. | ||
|
||
.. lua:attribute:: strings: table | ||
A table of strings in the pasteboard. | ||
|
||
.. lua:attribute:: hasImages: boolean | ||
Whether the pasteboard contains one or more images. | ||
|
||
.. lua:attribute:: image: image | ||
The first image in the pasteboard. | ||
|
||
.. lua:attribute:: images: table | ||
A table of images in the pasteboard. | ||
|
||
.. lua:attribute:: hasColors: boolean | ||
Whether the pasteboard contains one or more colors. | ||
|
||
.. lua:attribute:: color: color | ||
The first color in the pasteboard. | ||
|
||
.. lua:attribute:: colors: table | ||
A table of colors in the pasteboard. | ||
|
||
.. lua:attribute:: hasURLs: boolean | ||
Whether the pasteboard contains one or more URLs. | ||
|
||
.. lua:attribute:: URL: string | ||
The first URL in the pasteboard. | ||
|
||
.. lua:attribute:: URLs: table | ||
A table of URLs in the pasteboard. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ Codea 4 | |
api/tween | ||
api/ui | ||
api/objc | ||
api/pasteboard | ||
api/physics2d | ||
api/physics3d | ||
api/viewer | ||
|