| Distribution: | Developers only |
|---|---|
| Title: | Clipboard extensions |
| Date: | 11 Jan 2000 |
| Authors: | Justin Fletcher |
| Issue: | 1 |
| Revision: | 5 |
History |
| Revision | Author | Changes | |
|---|---|---|---|
| Draft | 13 Jan 1999 | JF | Private draft - sent to MB for comment |
| 2 | 15 Jan 1999 | JF |
Added list of applications currently (alledged to be) supporting
the global clipboard model. Added comment about Messenger bug. |
| 3 | 15 Jan 1999 | JF | Added note about ARPlayer supporting clipboard. On comments from MB, added Clipboard module proposal. Added documentation of current message system for completeness. |
| 4 | 17 Jan 1999 | JF | Addition of a Vantage, Impression and Ovation Pro to the 'supporting' list. Added comments from MB about suggested methods of implementing Clipboard module (message interface, or complete transparent replacement). Added 'auto-conversion' notes to the 'outstanding issues' section. |
| 5 | 11 Jan 2000 | JF | Updated for release to developers. Support module proposal dropped. |
Overview |
It is proposed that a simple 'Clipboard viewer' application, capable of a simple operations on the clipboard would be the first step toward more public awareness and developer take up of the protocol.
The current clipboard interface is too bulky for small applications to use, unless they already provide a means of saving files using the standard data transfer methods. It is felt that an easier to use programmer interface to the clipboard would make inter-application data transfer much simpler.
It is proposed that a SWI be used to provide a simpler means of using the clipboard, as a supplement to the current SWI interface. This will be used in a similar manner to the interaction of the DDEUtils module and Throwback messages.
User interface |
The Clipboard module (prior Acorn development) would provide a 'holding area' for applications that have exited. Alternatively, I have produced an application that performs the same job. This requires an extension to the Clipboard protocol which very few applications currently support.
Programmer interface |
Claim a user controlled entity
| Message block | ||||||||
|---|---|---|---|---|---|---|---|---|
| Offset | Contents | |||||||
| + 0 | Message size (24) | |||||||
| + 4 | Sender task handle | |||||||
| + 8 | My reference number | |||||||
| + 12 | Your reference number | |||||||
| + 16 | Message_ClaimEntity (15) | |||||||
| + 20 | Flags :
| |||||||
| Use | ||||||||
| Applications who have performed a 'cut' or 'copy' operation should broadcast this message to notify tasks of that the clipboard has been claimed. Any other application holding the clipboard should release any memory and mark internally that the clipboard is not held. | ||||||||
Request data from clipboard
| Message block | ||||||
|---|---|---|---|---|---|---|
| Offset | Contents | |||||
| + 0 | Message size | |||||
| + 4 | Sender task handle | |||||
| + 8 | My reference number | |||||
| + 12 | Your reference number | |||||
| + 16 | Message_DataRequest (16) | |||||
| + 20 | Window handle | |||||
| + 24 | Internal handle - something to recognise the paste by | |||||
| + 28 | x co-ordinate, or internal data | |||||
| + 32 | y co-ordinate, or internal data | |||||
| + 36 | Flags :
| |||||
| + 40 | Word list of filetypes in order of preference, terminated by -1 | |||||
| Use | ||||||
|
Applications wishing to paste the clipboard should broadcast this message
and await either a bounce, or a reply of DataSave. Applications receiving
this message and holding the clipboard should respond by copying the data
from bytes 20 to 35 to a DataSave message and replying.
Applications should supply data in the first format requested in the type list that they can support, or in their internal format if not. The filetype field on DataSave should be set to the type of data to be transfered. | ||||||
Application with clipboard is quitting, someone else should take over
| Message block | ||||||
|---|---|---|---|---|---|---|
| Offset | Contents | |||||
| + 0 | Message size (24) | |||||
| + 4 | Sender task handle | |||||
| + 8 | My reference number | |||||
| + 12 | Your reference number | |||||
| + 16 | Message_ReleaseEntity (19) | |||||
| + 20 | Flags :
| |||||
| Use | ||||||
| Applications that are quitting and have the clipboard claimed should broadcast this message. A 'holding' application will respond with a paste request which should be honoured before the application exits. | ||||||
Data formats |
External dependencies |
Testing scheme |
Non-compliance |
Outstanding issues |
| This document is issued under license and must not be copied, reproduced or disclosed in part or whole outside the terms of the license. | © RISCOS Ltd |