www.riscos.com Technical Support: |
|
This chapter lists calls, often provided for backwards compatibility, that are now deprecated in favour of other calls. Much of this information is already in other parts of the PRM, but has been gathered together for reference.
Many of the VDU calls that are present in RISC OS have been superseded by either the OS_Plot call or other SWIs. Instead of using the VDU call, you should call the relevant SWI.
Many of the OS_Byte and OS_Word calls are very archaic, and are only present in RISC OS for backwards compatibility with older 8 bit machines. Many of these calls have been superseded by RISC OS SWIs which you should use instead.
It is worth noting that many of the OS_Byte calls are either not necessary or there are SWI equivalents. In future versions of the operating system OS_Byte may be removed altogether, and the useful calls be coded as proper RISC OS SWIs. The same applies to OS_Word calls.
Service_StartUpFS has been removed.
As noted before, OS_Byte calls are deprecated. For example:
Many OS_GBPB calls are also deprecated:
Finally, as hinted above, you should use OS_FSControl 48 in preference to OS_FSControl 10.
RISC OS implements many SWIs for application and system extension (ie modules) development. Although theses SWIs are present and usable in the OS, some of them are archaic and have alternatives that should be used.
With the event of AUN, most of the immediate operations are no longer supported. The only immediate operation supported under AUN is Econet_MachinePeek. If an application wishes to be AUN compatible then they should not attempt to implement the other immediate operations.
You should no longer use SWIs such as OS_ConvertDateAndTime and OS_ConvertStandardDateAndTime. You should instead use the SWIs provided by the Territory manager.
When scanning a string for information (eg the width of the string or the caret position) you should call Font_ScanString instead of calls such as Font_StringWidth, Font_Caret, Font_StringBBox etc. However, Font_ScanString is a RISC OS 3 only SWI.
When setting font colours you should use ColourTrans_SetFontColours instead of Font_SetFontColours.
When calling Font_Paint with control sequences to set the colour, you should use control sequence 19 instead of 17 and 18. Again, control sequence 19 is only available with RISC OS 3.
You should not normally use the calls Font_SetFontMax (and the equivalent *Configure FontMax), Font_ReadFontMax, Font_SetScaleFactor, Font_ReadScaleFactor, and Font_SetThresholds. In doing so, you would be overriding the values set up by users and/or managed by the Wimp.
Applications should not use GCOLs; they should instead deal with RGB palette entries and colour numbers.
If you must set a GCOL you should call ColourTrans_SetGCOL, or ColourTrans_ReturnColourNumber and OS_SetColour; you should not call ColourTrans_ReturnGCOL and then set the colour.