Clipboard extensions
Functional Specification

Document status

Distribution: Developers only
Title: Clipboard extensions
Date: 11 Jan 2000
Authors: Justin Fletcher
Issue: 1
Revision: 5

Contents

  1. Document Status
  2. History
  3. Overview
  4. User interface
  5. Programmer interface
    1. Current interface
  6. Data formats
  7. External dependencies
  8. Testing scheme
    1. Acceptance test
    2. Test strategy
  9. Non-compliance
  10. Outstanding issues

History

RevisionAuthorChanges
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

The Clipboard Protocol has been in public existance for about 6 years, and yet users are still unaware that RISC OS has it and cite it as a failing of the system. A more 'visible' use of this protocol would bring it to the front and be a plus point on a list of new features.

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.

Clipboard takeup

Known clipboard applications currently available are (information taken from informal request on comp.sys.acorn.programmer and via experimentation) :

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 'ClipView' application should provide :

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

Current interface

The interface messages listed below are the current situation with regard to the clipboard protocol. The ReleaseEntity documentation is not documented outside the developer site.
Message_ClaimEntity (Message 15)

Claim a user controlled entity

Message block
  Offset Contents
 + 0Message size (24)
 + 4Sender task handle
 + 8My reference number
 + 12Your reference number
 + 16Message_ClaimEntity (15)
 + 20Flags :
    BitMeaning if set
    0 and 1Caret or selection being claimed
    2Clipboard being claimed
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.

Message_DataRequest (Message 16)

Request data from clipboard

Message block
  Offset Contents
 + 0Message size
 + 4Sender task handle
 + 8My reference number
 + 12Your reference number
 + 16Message_DataRequest (16)
 + 20Window handle
 + 24Internal handle - something to recognise the paste by
 + 28x co-ordinate, or internal data
 + 32y co-ordinate, or internal data
 + 36Flags :
    BitMeaning if set
    2Clipboard being requested
 + 40Word 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.

Message_ReleaseEntity (Message 19)

Application with clipboard is quitting, someone else should take over

Message block
  Offset Contents
 + 0Message size (24)
 + 4Sender task handle
 + 8My reference number
 + 12Your reference number
 + 16Message_ReleaseEntity (19)
 + 20Flags :
    BitMeaning if set
    2Clipboard being released
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

No additional data formats are required by this specification.

External dependencies

The Choices module may be required for storage of the configuration.

Testing scheme

Acceptance test

Changes to the clipboard protocol should not affect current (or future) clipboard applications. The protocol suggested should be easier to use than the original specification without seriously impairing its usefulness.

Test strategy

This section has not been written.

Non-compliance

This section has not been written.

Outstanding issues

There are no 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

This page is maintained by RISCOS Ltd (support@riscos.com).
Last modified on 11 January, 2000.