![]() |
Acorn Plug-In Protocol
|
![]() |
Distribution: | General Release |
Title: | Acorn Plug-In Protocol Functional Specification |
Drawing Number: | 1116,010/FS |
Issue: | 2 |
Author(s): | Simon Middleton |
Piers Wombwell | |
Andrew Hodgkinson | |
Date: | 26/03/98 |
Revision: | 1.3 |
Change Number: | ECO 4049 |
Last Issue: | N/A |
2107,740 issue 1 | (Developers only) | |
0.01 | 09/01/97 | Created from 2103,740 and added BUSY notification protocol (SJM) |
1.2 | 06/02/97 | New format (SJM) |
1.3 | 07/02/97 | Fixed errors in Message numbers (SJM) |
1.4 | 14/02/97 | Added PASSWORDS. Changed API version. Added Glossary (SJM) |
1.5 | 18/02/97 | Changed PASSWORDS to file. Added Message_PlugIn_Action. Added Helper app info (SJM) |
1.6 | 24/02/97 | Added ABORT message to replace some uses of STOP (SJM) |
1.7 | 24/02/97 | Fixed error in states. Changed API info (SJM) |
1.9 | 26/02/97 | Added mute (SJM) |
1.12 | 09/04/97 | Added missing history comments for 1.10 and 1.11, updated with comments from SG. Added glossary, references and development test strategy. Added Helper launching system variable (SJM) |
1.13 | 11/04/97 | Fixed typos after review (SJM) |
1.14 | 11/04/97 | Fixed some links (SJM) |
2.1 | 11/04/97 | Signed off, AMR allocated |
3.1 | 11/08/97 | Few small changes; then signed off, ECO 3995 allocated |
1116,010/FS issue 1 |
(Developers only) |
|
1.0 | 26/01/98 | Added "About Plug-in" (PW) |
1.1 | 06/02/98 | Added BGCOLOR special parameter (PW); AMR 4903 allocated |
1116,010/FS Issue 2 |
(General release) |
|
1.0 | 20/02/98 | HTML style changes for publishing on the Web; some clarifications here and there in the body content. Various minor 'tweaks' such as changing, for example, "Netscape" to read "Navigator™". There are a few more in-document links to make finding things easier. Some typos corrected (e.g. 'data' changed to 'date'). A few history and references bits removed ready for general public release (that's why the revision list given here has gaps in it). |
1.1 | 23/02/98 | AMR allocation details corrected in this history section |
1.2 | 25/02/98 | ECO 4049 allocated. |
1.3 | 26/03/98 | Created revision 1.3 purely to fix the erroneous reference to the Nested Wimp specification which gave an incorrect drawing number. No ECO allocated for such a trivial change. |
The World Wide Web is gradually being extended to offer better support for embedding multimedia data inside Web pages. A well-established mechanism known as "helpers" allows a browser to delegate the display of unsupported data types to other applications. However, the helper application displays this data independently, usually in its own window.
The idea of a "plug-in" is to integrate the display of such
data into the WWW browser's own window. A
number of proposed HTML
extensions are being promoted, such as <APPLET>
(by Sun for Java),
<EMBED>
(by
Netscape) and
<OBJECT>
(by W3C).
This protocol is described from the point of view of a web browser and plug-in however it is applicable to any application that needs to embed another application's windows within its own.
There are no outstanding issues.
This model does not fit well with RISC OS practices. It does not have a standard scheme for DLLs, and the alternative - using relocatable modules - is not practical for very large playback engines for systems like Java and Director. Therefore plug-ins are implemented as separate tasks, with a special message protocol between the browser and the plug-in to permit communication and control.
In order to display the data inside the browser's own window, the plug-in needs to be made responsible for updating a certain portion of the browser's work area. This could be done by the browser instructing the plug-in to redraw parts of the window. However, this approach is rejected because it introduces significant differences between a plug-in and a normal application. Instead, we utilise a new facility added to the Window Manager, whereby windows can be created "inside" a parent window. The Window Manager takes care of event distribution to the plug-in, and also ensures that the "child" window is in a fixed position relative to the work-area of the parent - so the plug-in's display area will be scrolled within the browser window if the user manipulates the browser window's scrollbars.
There is no user interface component to this specification.
A plug-in accepts one or more types of data, specified using normal RISC OS filetypes. It is the responsibility of the browser to map MIME types to RISC OS filetypes.
Just as other RISC OS applications may be "single document" or "multiple document", a plug-in implementor may choose whether to handle multiple items at once or not. Ideally, plug-ins should be able to cope with multiple pieces of data, potentially owned by multiple client applications. However, for ease of implementation it may sometimes be preferred to restrict each instance of a plug-in to displaying one piece of data. In this case, were two such pieces of data to be displayed at once, it would be necessary to invoke the plug-in twice.
Alias$@PlugInType_xxx
where xxx
is the
hexadecimal type value. If this variable is not found, no suitable
plug-in is available, and the browser regards the attempt to display
the data as unsuccessful. If the variable is found, then the browser
launches it by calling Wimp_StartTask.
If further data of the same type needs to be displayed, either simultaneously or sequentially, then the browser should repeat the whole process starting with the broadcast.
OBJECT
, EMBED
or
APPLET
tag, and is used by the plug-in to initialise
itself. The plug-in may have to fetch the contents of more
URLs in order
to do this; it may get the browser to do this on its behalf by using
Message_PlugIn_URL_Access.
The Window Manager's nested window mechanism handles all subwindow positioning issues automatically. If a browser window is closed, then the subwindow is removed from view, and is reinstated when the parent window is reopened. If the browser window is scrolled, the Window Manager ensures that the plug-in window stays at the same position relative to the browser's work area, if necessary it repositions the subwindow and clips it if it has scrolled partiallly or entirely out of view. Repositioning is done by the Window Manager without sending Open_Window_Request events to the plug-in.
If the plug-in receives a keypress or mouse button click that it does not want to handle, it must pass it on to the browser by means of Wimp_SendMessage. It must set the window handle field of the message to the handle of its parent window. Note that this should be used instead of Wimp_ProcessKey.
If the browser wishes to forcibly resize or reposition the subwindow, it sends a Message_PlugIn_Reshape to the plug-in, quoting the plug-in instance handle. The plug-in must honour this request by re-opening itself at the new position. The coordinates in this request are work-area coordinates of the parent window. The parent window handle in this message may be different to the original one. The plug-in should be prepared to check for this, and re-create its window as a child of the new parent if necessary.
If the plug-in wishes to alter its size, it cannot simply resize its window. Instead it must send a Message_PlugIn_Reshape_Request to the browser. The browser responds by reformatting the page (if necessary) and then replying with a suitable Message_PlugIn_Reshape. The plug-in must act on this in the normal way.
Many of the strings passed around in this protocol are of unspecified size and may, especially in the case of URLs, be larger than could fit within the body of a Wimp message. Therefore they are defined in this spec as string_values. These are defined as being either offsets from the start of the message body (if less than 256) or as pointers to data held in shared memory (i.e. the RMA or a dynamic area). It is always the responsibility of the sender to free the memory used for any such pointers. The protocol is defined in such a way that there should always be a reply received or the message will be bounced by the Window Manager. In either case it is then safe for the sender to free the memory allocated.
However to avoid memory leaks it is recommended that careful track is kept of such pointers so that they can be freed when a plug-in instance is closed.
All strings must be null terminated but need not start at a word-aligned address.
Some plug-ins may wish the browser to fetch data from the net for them rather than having to implement their own fetching code. A flexible interface is provided for this based, in part, on the API used in the de facto standard plug-in API created by Netscape, in order to facilitate porting plug-ins to RISC OS.
N.B. Take note of the non-compliances section.
There are several ways a stream can be instigated, as follows
Browser fills in flags, mime type, stream data and sends Message_PlugIn_StreamNew.
The plug-in returns the same message
If mode is applicable
Browser sends Message_PlugIn_Stream_Destroy with appropriate reason code.
Plug-in fills in MIME type, target, plug-in stream instance and sends Message_PlugIn_Stream_New.
The browser returns the same message
The plug-in writes data;
This is repeated until all data is transferred or an error occurs.
Plug-in sends Message_PlugIn_Stream_Destroy with appropriate reason code.
For a plug-in yyyy
whose file type is xxx
the variables
which the plug-in must set are:
yyyy$Dir
PlugIn$Type_xxx
Alias$@PlugInType_xxx
The plug-in can optionally set these variables:
PlugIn$About_xxx
If the plug-in is capable of being launched as a stand-alone application without the browser involvement it must define these variables:
File$Type_xxx
Alias$@RunType_xxx
If the plug-in can also be used as a helper application then this variable must also be set:
Alias$@HelperType_xxx
For example a sample !Boot file might contain the following:
Set Java$Dir <Obey$Dir> Set File$Type_AE4 Java Set PlugIn$Type_AE4 Java Set PlugIn$About_AE4 <Java$Dir>.About SetMacro Alias$@RunType_AE4 /<Java$Dir>.!RunImage -standalone %%*0 SetMacro Alias$@PlugInType_AE4 /<Java$Dir>.!RunImage -plug-in %%*0
If a file is embedded with APPLET
, EMBED
or
OBJECT
then the Alias$@PlugInType_xxx
variable
is used to start the application.
If a file is pointed to with an anchor (eg <A
HREF="applets/myapplet.class">
) then the file is downloaded
and the Alias$@Runtype_xxx
variable is used.
OBJECT
tag
Note that plug-ins can be launched from an OBJECT
tag as well
as EMBED
or APPLET
. When this happens there are
some minor differences to the values in the parameter file.
The following table also describes how the attribute names in the
HTML tag get mapped to the entries in the parameters file:
EMBED | APPLET |
---|---|
The SRC attribute is named DATA
|
The ALT attribute is named STANDBY The CODE attribute is named CLASSID The value of CLASSID may not have the ".class" suffixThe value of CLASSID may have a prefix "java:"
|
This same interface is also used for helper applications. Helper applications are very like plug-ins except that they open their windows external to the parent rather than embedded in the parent's window. This means that they are not constrained to close down when the parent window is closed (e.g. when the browser follows a link to another page) but can still benefit from the communication protocols with the parent. There is a flag in Message_PlugIn_Opening to inform the parent whether a window was embedded or not.
When trying to launch a helper application the process
described in the Invocation
section is used except that if the initial
Message_PlugIn_Opening is not claimed the system
variable Alias$@HelperType_xxx
is used to start
the helper task.
A plug-in may support the Wimp Help protocol. If they do then help mesages are displayed in the browser status bar (if configured). Messages must be limited to at most 40 characters.
A plug-in may display a logo and some associated text (e.g. copyright
information) in a browser's window at the user's request. The
suggested URL for this is 'about:'. The system variable
PlugIn$About_xxx
points to a directory containing text
files with optional image
(PNG,
GIF or
JPEG) files.
Each file has a two digit reference number to allow a single plug-in to have multiple logos and copyright entries (e.g. each Replay codec). The file 'Aboutyy', where yy is the two digit reference number, contains the text suitable for inclusion inside a table cell of an HTML document. For each About file there is an optional image file, of the name 'yywwwwhhhh', where wwww and hhhh are each four digits for the size that the image will be scaled to (usually the same as the actual image size). It is strongly recommended that the width and height are specified, but a filename of just 'yy' is accepted.
If the plug-in has a single copyright message and logo, the filename 'About' can be used as a shortcut for 'About00'. The optional logo must still be called '00wwwwhhhh' or '00'.
It is the browser's responsibility to enumerate all the
PlugIn$About_*
system variables and compile an
HTML document containing all available plug-in
details.
Message &4D540: Message_PlugIn_Open |
Sent by the browser to create a plug-in instance |
R1+16 | Message_PlugIn_Open | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0 | Open the file as a helper (else open it as a plug-in) | |
1-31 | reserved (0) | |
![]() |
||
R1+24 | Reserved (0) | |
![]() |
||
R1+28 | Browser instance handle (provided by the browser) | |
![]() |
||
R1+32 | Parent window handle | |
R1+36 | Bounding box in parent window's work area co-ordinates; 16 bytes (left, bottom, right, top). | |
![]() |
||
R1+52 | File type | |
R1+56 | Filename (string_value) |
APPLET
, OBJECT
or
EMBED
tag - see their respective definitions. This data is
used by the plug-in to understand what is being requested of it. There
are more details in the Data formats section.
If bit 0 of the flags word at R1+20 is set then this is a request to open the file as a helper application, i.e. external to the parent application. In this case the bounding box (offset bytes 36 to 51) are invalid. The parent window handle may be valid or 0 depending on how the file is launched.
Message &4D541: Message_PlugIn_Opening |
Sent by the plug-in task to say an instance has been created |
R1+12 | my_ref field from Message_PlugIn_Open | |
![]() |
||
R1+16 | Message_PlugIn_Opening | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0 | Plug-in can accept input focus (else it cannot use input focus) | |
1 | Plug-in wants the code resource fetched for it (else it will fetch this itself) | |
2 | Plug-in wants the data resource fetched for it (else it will fetch this itself) | |
3 | Plug-in will delete the parameters file itself (else the browser should delete this file now) | |
4 | Plug-in has more work to do, keep showing a busy indicator in the browser (if appropriate) | |
5 | Plug-in does understand the PlugIn_Action message beyond only the STOP reason code | |
6 | Plug-in task has actually opened a helper window (else it embedded itself in the parent) | |
7-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle (invented by the plug-in) | |
R1+28 | Browser instance handle (copied from the Message_PlugIn_Open) |
Message &4D542: Message_PlugIn_Close |
Tell a plug-in instance to close down |
R1+16 | Message_PlugIn_Close | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0 | Browser would also like plug-in to exit | |
1-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle to close | |
R1+28 | Browser instance handle |
Message &4D543: Message_PlugIn_Closed |
A plug-in [instance] has closed down |
R1+12 | my_ref field from Message_PlugIn_Close, unless bit 1 of the flags word at R1+20 is set. | |
![]() |
||
R1+16 | Message_PlugIn_Closed | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0 | Plug-in itself will exit after this message | |
1 | The message is not in reply to a Message_PlugIn_Close (so R1+12 is irrelevant). | |
2 | There is an error message at R1+32 as detailed below. | |
3-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle of the closed instance | |
R1+28 | Browser instance handle of the closed instance | |
![]() |
||
If bit 2 of the flags word at R1+20 is set: | ||
![]() |
||
R1+32 | Error number. | |
R1+36 | Zero terminated message to be displayed by the browser (N.B. this message is always embedded here as the plug-in may be exitting itself). |
Message &4D544: Message_PlugIn_Reshape |
Move or resize a plug-in instance |
R1+12 | my_ref field from Message_PlugIn_Reshape_Request (if applicable) | |
![]() |
||
R1+16 | Message_PlugIn_Reshape | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle | |
![]() |
||
R1+32 | Parent window handle | |
R1+36 | Bounding box in parent window's work area co-ordinates; 16 bytes (left, bottom, right, top). |
Some plug-in types may want to resize the windows themselves (for example, some Java applets do this). In that case, they will send Message_PlugIn_Reshape_Request to the browser and it should reply with Message_PlugIn_Reshape once it has determined where the plug-in should be moved to (since the resizing may affect page formatting and therefore the coordinates of the embedded plug-in window). A plug-in should therefore not expect an immediate reply to the message.
Message &4D545: Message_PlugIn_Reshape_Request |
A plug-in instance wants to resize |
R1+16 | Message_PlugIn_Reshape_Request | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle | |
![]() |
||
R1+32 | Width (in OS units) | |
R1+36 | Height (in OS units) |
On sending this message a plug-in may immediately resize its window, or it may wait; this is undefined. The browser should not assume either. To be sure that the plug-in embedded window ends up in a sensible position, the browser must eventually reply to the message.
Message &4D546: Message_PlugIn_Focus |
Move the input focus between plug-in and parent |
R1+16 | Message_PlugIn_Focus | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle |
Message &4D547: Message_PlugIn_Unlock |
[Reserved] |
R1+16 | Message_PlugIn_Unlock | |
![]() |
||
R1+20 = flags: | bit | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle | |
![]() |
||
R1+32 | URL for which to unlock the cache file (string_value) |
Message &4D548: Message_PlugIn_Stream_New |
Create a new stream |
R1+16 | Message_PlugIn_Stream_New | |||||||||||
![]() |
||||||||||||
R1+20 = flags: | bit(s) | meaning if set | ||||||||||
![]() |
||||||||||||
0-3 |
Stream type field:
Other values are reserved, and must not be used. |
|||||||||||
![]() |
||||||||||||
4 | Stream is seekable | |||||||||||
5-31 | reserved (0) | |||||||||||
![]() |
||||||||||||
R1+24 | Plug-in instance handle | |||||||||||
R1+28 | Browser instance handle | |||||||||||
![]() |
||||||||||||
R1+32 | Plug-in stream instance handle | |||||||||||
R1+36 | Browser stream instance handle | |||||||||||
![]() |
||||||||||||
R1+40 | URL of stream source / destination (string_value) | |||||||||||
R1+44 | End of stream in bytes, or 0 if unknown | |||||||||||
R1+48 | Last modified date of URL (in Unix time) | |||||||||||
R1+52 | Notify data | |||||||||||
![]() |
||||||||||||
R1+56 | MIME type of URL (string_value) | |||||||||||
![]() |
||||||||||||
R1+60 | Window target (string_value) |
Message &4D549: Message_PlugIn_Stream_Destroy |
Destroy a stream |
R1+16 | Message_PlugIn_Stream_Destroy | |||||||||
![]() |
||||||||||
R1+20 = flags: | bit(s) | meaning if set | ||||||||
![]() |
||||||||||
0-31 | reserved (0) | |||||||||
![]() |
||||||||||
R1+24 | Plug-in instance handle | |||||||||
R1+28 | Browser instance handle | |||||||||
![]() |
||||||||||
R1+32 | Plug-in stream instance handle | |||||||||
R1+36 | Browser stream instance handle | |||||||||
![]() |
||||||||||
R1+40 |
URL of stream source / destination
(string_value)
|
|||||||||
R1+44 | End of stream in bytes, or 0 if unknown | |||||||||
R1+48 | Last modified date of URL (in Unix time) | |||||||||
R1+52 | Notify data | |||||||||
![]() |
||||||||||
R1+56 |
Reason code:
Other values are reserved, and must not be used. |
Message &4D54A: Message_PlugIn_Stream_Write |
Write data to a stream |
R1+16 | Message_PlugIn_Stream_Write | |||||||||
![]() |
||||||||||
R1+20 = flags: | bit(s) | meaning if set | ||||||||
![]() |
||||||||||
0-3 |
Data type field:
Other values are reserved, and must not be used. |
|||||||||
![]() |
||||||||||
4-31 | reserved (0) | |||||||||
![]() |
||||||||||
R1+24 | Plug-in instance handle | |||||||||
R1+28 | Browser instance handle | |||||||||
![]() |
||||||||||
R1+32 | Plug-in stream instance handle | |||||||||
R1+36 | Browser stream instance handle | |||||||||
![]() |
||||||||||
R1+40 | URL of stream source / destination (string_value) | |||||||||
R1+44 | End of stream in bytes, or 0 if unknown | |||||||||
R1+48 | Last modified date of URL (in Unix time) | |||||||||
R1+52 | Notify data | |||||||||
![]() |
||||||||||
R1+56 | Logical offset in stream of data | |||||||||
R1+60 | Length of data | |||||||||
R1+64 | Data pointer |
Message &4D54B: Message_PlugIn_Stream_Written |
Accept data that was written to a stream |
R1+12 | my_ref field from Message_PlugIn_Stream_Write | |
R1+16 | Message_PlugIn_Stream_Written | |
![]() |
||
R1+20 = flags: | bit(s) | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle | |
![]() |
||
R1+32 | Plug-in stream instance handle | |
R1+36 | Browser stream instance handle | |
![]() |
||
R1+40 | URL of stream source / destination (string_value) | |
R1+44 | End of stream in bytes, or 0 if unknown | |
R1+48 | Last modified date of URL (in Unix time) | |
R1+52 | Notify data | |
![]() |
||
R1+56 | Length of data consumed; less than zero if the plug-in experienced an error. |
Message &4D54C: Message_PlugIn_Stream_As_File |
Send stream data as a file |
R1+16 | Message_PlugIn_Stream_As_File | |
![]() |
||
R1+20 = flags: | bit(s) | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle | |
![]() |
||
R1+32 | Plug-in stream instance handle | |
R1+36 | Browser stream instance handle | |
![]() |
||
R1+40 | URL of stream source / destination (string_value) | |
R1+44 | End of stream in bytes, or 0 if unknown | |
R1+48 | Last modified date of URL (in Unix time) | |
R1+52 | Notify data | |
![]() |
||
R1+52 | Filename of stream data (string_value) |
Message &4D54D: Message_PlugIn_URL_Access |
Ask the browser to deal with a URL |
R1+16 | Message_PlugIn_URL_Access | |
![]() |
||
R1+20 = flags: | bit(s) | meaning if set |
![]() |
||
0 | Return a Message_PlugIn_Notify on completion. | |
1 | Fetch by POST, else fetch by GET. | |
2 |
Should be 0 if bit 1 is unset.
If bit 1 is set, bit 2 means POST a file if set, else POST a block of memory. |
|
3-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle | |
![]() |
||
R1+32 | URL to access (string_value) | |
R1+36 | Window target (string_value) | |
![]() |
||
R1+40 | Notify data to be returned (if bit 0 of the flags word at R1+20 is set) | |
R1+44 | Length of data to be posted | |
![]() |
||
If bit 2 of the flags word at R1+20 is set: | ||
![]() |
||
R1+48 | Filename (string_value) | |
![]() |
||
If bit 2 of the flags word at R1+20 is unset: | ||
![]() |
||
R1+48 | Pointer to data (string_value) |
If the window target is non-zero then the URL is fetched to the given window name. Otherwise, a stream is opened and the data is sent to the plug-in.
Message &4D54E: Message_PlugIn_Notify |
Signal completion of handling a URL to a plug-in |
R1+16 | Message_PlugIn_Notify | |||||||||
![]() |
||||||||||
R1+20 = flags: | bit(s) | meaning if set | ||||||||
![]() |
||||||||||
0-31 | reserved (0) | |||||||||
![]() |
||||||||||
R1+24 | Plug-in instance handle | |||||||||
R1+28 | Browser instance handle | |||||||||
![]() |
||||||||||
R1+32 | URL accessed (string_value) | |||||||||
![]() |
||||||||||
R1+36 |
Reason for notify:
Other values are reserved, and must not be used. |
|||||||||
![]() |
||||||||||
R1+40 | Notify data |
Message &4D54F: Message_PlugIn_Status |
Send a status message to the browser |
R1+16 | Message_PlugIn_Status | |
![]() |
||
R1+20 = flags: | bit(s) | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle | |
![]() |
||
R1+32 | Status message (string_value) |
Message &4D550: Message_PlugIn_Busy |
Signal a plug-in state change to the parent |
R1+16 | Message_PlugIn_Busy | |||||||||||||||
![]() |
||||||||||||||||
R1+20 = flags: | bit(s) | meaning if set | ||||||||||||||
![]() |
||||||||||||||||
0 | Plug-in is busy | |||||||||||||||
1 | Word at R1+32 has some meaning, else ignore it. | |||||||||||||||
2-31 | reserved (0) | |||||||||||||||
![]() |
||||||||||||||||
R1+24 | Plug-in instance handle | |||||||||||||||
R1+28 | Browser instance handle | |||||||||||||||
![]() |
||||||||||||||||
If bit 1 of the flags word at R1+20 is set: | ||||||||||||||||
![]() |
||||||||||||||||
R1+32 |
Plug-in's new state:
Other values are reserved, and must not be used. |
This is also used to notify the parent of any state change by the plug-in in case it needs to update any user interface.
Message &4D551: Message_PlugIn_Action |
Send a command to a plug-in |
R1+16 | Message_PlugIn_Action | |||||||||||||||||||
![]() |
||||||||||||||||||||
R1+20 = flags: | bit(s) | meaning if set | ||||||||||||||||||
![]() |
||||||||||||||||||||
0-31 | reserved (0) | |||||||||||||||||||
![]() |
||||||||||||||||||||
R1+24 | Plug-in instance handle | |||||||||||||||||||
R1+28 | Browser instance handle | |||||||||||||||||||
![]() |
||||||||||||||||||||
If bit 1 of the flags word at R1+20 is set: | ||||||||||||||||||||
![]() |
||||||||||||||||||||
R1+32 |
State the plug-in should move to:
Other values are reserved, and must not be used. |
The new state sent is the state the plug-in should enter. If it is already in that state then it should ignore the message.
After entering the state it should send back a Message_PlugIn_Busy confirming the new state, except for the Mute and Unmute actions.
Message &4D552: Message_PlugIn_Abort |
Stop activity for a plug-in instance |
R1+16 | Message_PlugIn_Abort | |
![]() |
||
R1+20 = flags: | bit(s) | meaning if set |
![]() |
||
0-31 | reserved (0) | |
![]() |
||
R1+24 | Plug-in instance handle | |
R1+28 | Browser instance handle |
Note that this message is sent to each plug-in instance individually and should be treated as such.
The file contains the concatenation of one or more binary records of the following form:
Record size | Record contents |
---|---|
4 bytes |
Type: 0 = terminator (this is the last word in the file) 1 = data from PARAM 2 = URL from PARAM 3 = object ref PARAM 4 = special parameter from browser |
4 bytes |
Size of record (without header): (4+n+p) + (4+s+q) + (4+t+r) bytes |
4 bytes n bytes p bytes |
n = size of name (unpadded) Name Padding to word boundary |
4 bytes s bytes q bytes |
s = size of data (unpadded) Data Padding to word boundary |
4 bytes t bytes r bytes |
t = size of mime type (unpadded) Mime type Padding to word boundary |
Integers are stored in little-endian order.
Flags (parameters with void value whose presence or absence only is significant) are represented by a parameter of type DATA with zero length.
The parameters include:
OBJECT
(or other) element
that references this plug-in
PARAM
elements enclosed within it
These parameters are passed exactly as seen in the HTML without any
conversions. The data/url/ref distinction is as given in the
DTD (for
OBJECT
attributes) or in the VALUETYPE
attribute of the PARAM
element.
The plug-in may implement its own URL fetching code, or it may have the browser fetch URLs on its behalf by issuing a Message_URL_Access message to the browser.
Special parameters are created by the browser (rather than being part of the object element). They are:
Released versions of this API about are listed below. A plug-in can use this information to alter its behaviour if used with an application supporting an older version of the protocol.
This specification relies on the existence of a Window Manager with nested window support.
The protocol must be able to cater for the needs of Shockwave and Java plug-ins.
At the time of writing, neither the NCBrowser nor Browse support all of the variations of the STREAM protocol. They do not support POSTing from a plug-in or streaming data from a plug-in to a browser window.
The protocol has been tested during the development testing of a browser and during the creation of plug-ins. Each plug-in listed in the acceptance criteria tested that its interactions with the browser through this protocol performed as expected by this specification. This included deliberately generating errors to check the error recovery of the plug-in and the browser.
API | Application Programmer Interface. |
Applet | Small application, usually written in Java, embedded in a web page. |
ARM | Acorn RISC Machine OR Advanced RISC Machines Ltd. |
Cache | Area of disk or memory used to store recently accessed files. |
Caret | Text cursor. |
Codec | COder-DECoder. |
Director Player | MacroMedia multi-media animation player. |
DLL | Dynamically linked library (loaded at runtime). |
Frame | An independently scrollable portion of an HTML page. |
GUI | Graphical User Interface. |
HTML | HyperText Markup Language. |
HTML 4 | The current base-line HTML standard. |
Java | Machine independent interpreted programming language. |
MIME | Multipurpose Internet Mail Extensions. |
NC | Network Computer. |
OS | Operating System. |
Plug-in | A program that extends the browser by handling a particular type of file embedded in an HTML page. |
PRM | Programmers Reference Manual. |
RAM | Random Access Memory. |
RISC | Reduced Instruction Set Computer. |
RISC OS | Acorn's operating system, the basis of RISC OS. |
ROM | Read Only Memory. |
Shockwave | MacroMedia multi-media browser plug-in player. |
Sprite | An Acorn proprietary bitmap graphics file format. |
SWI | Software Interrupt. |
UI | User Interface. |
URL | Uniform Resource Locator (HTML link). |
Wimp | Colloquialism for Window Manager. |
Last updated 12 November 1998 © Acorn Computers Limited, 1997 |
|