home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / colourtran < prev    next >
Encoding:
Text File  |  1994-09-07  |  40.4 KB  |  1,237 lines

  1. #ifndef colourtrans_H
  2. #define colourtrans_H
  3.  
  4. /* C header file for ColourTrans
  5.  * written by DefMod (Sep  7 1994) on Wed Sep  7 21:25:35 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. #ifndef osspriteop_H
  24.    #include "osspriteop.h"
  25. #endif
  26.  
  27. #ifndef font_H
  28.    #include "font.h"
  29. #endif
  30.  
  31. /**********************************
  32.  * SWI names and SWI reason codes *
  33.  **********************************/
  34. #undef  ColourTrans_SelectTable
  35. #define ColourTrans_SelectTable                 0x40740
  36. #undef  XColourTrans_SelectTable
  37. #define XColourTrans_SelectTable                0x60740
  38. #undef  ColourTrans_SelectTableForSprite
  39. #define ColourTrans_SelectTableForSprite        0x40740
  40. #undef  XColourTrans_SelectTableForSprite
  41. #define XColourTrans_SelectTableForSprite       0x60740
  42. #undef  ColourTrans_SelectGCOLTable
  43. #define ColourTrans_SelectGCOLTable             0x40741
  44. #undef  XColourTrans_SelectGCOLTable
  45. #define XColourTrans_SelectGCOLTable            0x60741
  46. #undef  ColourTrans_SelectGCOLTableForSprite
  47. #define ColourTrans_SelectGCOLTableForSprite    0x40741
  48. #undef  XColourTrans_SelectGCOLTableForSprite
  49. #define XColourTrans_SelectGCOLTableForSprite   0x60741
  50. #undef  ColourTrans_ReturnGCOL
  51. #define ColourTrans_ReturnGCOL                  0x40742
  52. #undef  XColourTrans_ReturnGCOL
  53. #define XColourTrans_ReturnGCOL                 0x60742
  54. #undef  ColourTrans_SetGCOL
  55. #define ColourTrans_SetGCOL                     0x40743
  56. #undef  XColourTrans_SetGCOL
  57. #define XColourTrans_SetGCOL                    0x60743
  58. #undef  ColourTrans_ReturnColourNumber
  59. #define ColourTrans_ReturnColourNumber          0x40744
  60. #undef  XColourTrans_ReturnColourNumber
  61. #define XColourTrans_ReturnColourNumber         0x60744
  62. #undef  ColourTrans_ReturnGCOLForMode
  63. #define ColourTrans_ReturnGCOLForMode           0x40745
  64. #undef  XColourTrans_ReturnGCOLForMode
  65. #define XColourTrans_ReturnGCOLForMode          0x60745
  66. #undef  ColourTrans_ReturnColourNumberForMode
  67. #define ColourTrans_ReturnColourNumberForMode   0x40746
  68. #undef  XColourTrans_ReturnColourNumberForMode
  69. #define XColourTrans_ReturnColourNumberForMode  0x60746
  70. #undef  ColourTrans_ReturnOppGCOL
  71. #define ColourTrans_ReturnOppGCOL               0x40747
  72. #undef  XColourTrans_ReturnOppGCOL
  73. #define XColourTrans_ReturnOppGCOL              0x60747
  74. #undef  ColourTrans_SetOppGCOL
  75. #define ColourTrans_SetOppGCOL                  0x40748
  76. #undef  XColourTrans_SetOppGCOL
  77. #define XColourTrans_SetOppGCOL                 0x60748
  78. #undef  ColourTrans_ReturnOppColourNumber
  79. #define ColourTrans_ReturnOppColourNumber       0x40749
  80. #undef  XColourTrans_ReturnOppColourNumber
  81. #define XColourTrans_ReturnOppColourNumber      0x60749
  82. #undef  ColourTrans_ReturnOppGCOLForMode
  83. #define ColourTrans_ReturnOppGCOLForMode        0x4074A
  84. #undef  XColourTrans_ReturnOppGCOLForMode
  85. #define XColourTrans_ReturnOppGCOLForMode       0x6074A
  86. #undef  ColourTrans_ReturnOppColourNumberForMode
  87. #define ColourTrans_ReturnOppColourNumberForMode 0x4074B
  88. #undef  XColourTrans_ReturnOppColourNumberForMode
  89. #define XColourTrans_ReturnOppColourNumberForMode 0x6074B
  90. #undef  ColourTrans_GCOLToColourNumber
  91. #define ColourTrans_GCOLToColourNumber          0x4074C
  92. #undef  XColourTrans_GCOLToColourNumber
  93. #define XColourTrans_GCOLToColourNumber         0x6074C
  94. #undef  ColourTrans_ColourNumberToGCOL
  95. #define ColourTrans_ColourNumberToGCOL          0x4074D
  96. #undef  XColourTrans_ColourNumberToGCOL
  97. #define XColourTrans_ColourNumberToGCOL         0x6074D
  98. #undef  ColourTrans_ReturnFontColours
  99. #define ColourTrans_ReturnFontColours           0x4074E
  100. #undef  XColourTrans_ReturnFontColours
  101. #define XColourTrans_ReturnFontColours          0x6074E
  102. #undef  ColourTrans_SetFontColours
  103. #define ColourTrans_SetFontColours              0x4074F
  104. #undef  XColourTrans_SetFontColours
  105. #define XColourTrans_SetFontColours             0x6074F
  106. #undef  ColourTrans_InvalidateCache
  107. #define ColourTrans_InvalidateCache             0x40750
  108. #undef  XColourTrans_InvalidateCache
  109. #define XColourTrans_InvalidateCache            0x60750
  110. #undef  ColourTrans_SetCalibration
  111. #define ColourTrans_SetCalibration              0x40751
  112. #undef  XColourTrans_SetCalibration
  113. #define XColourTrans_SetCalibration             0x60751
  114. #undef  ColourTrans_ReadCalibration
  115. #define ColourTrans_ReadCalibration             0x40752
  116. #undef  XColourTrans_ReadCalibration
  117. #define XColourTrans_ReadCalibration            0x60752
  118. #undef  ColourTrans_ConvertDeviceColour
  119. #define ColourTrans_ConvertDeviceColour         0x40753
  120. #undef  XColourTrans_ConvertDeviceColour
  121. #define XColourTrans_ConvertDeviceColour        0x60753
  122. #undef  ColourTrans_ConvertDevicePalette
  123. #define ColourTrans_ConvertDevicePalette        0x40754
  124. #undef  XColourTrans_ConvertDevicePalette
  125. #define XColourTrans_ConvertDevicePalette       0x60754
  126. #undef  ColourTrans_ConvertRGBToCIE
  127. #define ColourTrans_ConvertRGBToCIE             0x40755
  128. #undef  XColourTrans_ConvertRGBToCIE
  129. #define XColourTrans_ConvertRGBToCIE            0x60755
  130. #undef  ColourTrans_ConvertCIEToRGB
  131. #define ColourTrans_ConvertCIEToRGB             0x40756
  132. #undef  XColourTrans_ConvertCIEToRGB
  133. #define XColourTrans_ConvertCIEToRGB            0x60756
  134. #undef  ColourTrans_WriteCalibrationToFile
  135. #define ColourTrans_WriteCalibrationToFile      0x40757
  136. #undef  XColourTrans_WriteCalibrationToFile
  137. #define XColourTrans_WriteCalibrationToFile     0x60757
  138. #undef  ColourTrans_ConvertRGBToHSV
  139. #define ColourTrans_ConvertRGBToHSV             0x40758
  140. #undef  XColourTrans_ConvertRGBToHSV
  141. #define XColourTrans_ConvertRGBToHSV            0x60758
  142. #undef  ColourTrans_ConvertHSVToRGB
  143. #define ColourTrans_ConvertHSVToRGB             0x40759
  144. #undef  XColourTrans_ConvertHSVToRGB
  145. #define XColourTrans_ConvertHSVToRGB            0x60759
  146. #undef  ColourTrans_ConvertRGBToCMYK
  147. #define ColourTrans_ConvertRGBToCMYK            0x4075A
  148. #undef  XColourTrans_ConvertRGBToCMYK
  149. #define XColourTrans_ConvertRGBToCMYK           0x6075A
  150. #undef  ColourTrans_ConvertCMYKToRGB
  151. #define ColourTrans_ConvertCMYKToRGB            0x4075B
  152. #undef  XColourTrans_ConvertCMYKToRGB
  153. #define XColourTrans_ConvertCMYKToRGB           0x6075B
  154. #undef  ColourTrans_ReadPalette
  155. #define ColourTrans_ReadPalette                 0x4075C
  156. #undef  XColourTrans_ReadPalette
  157. #define XColourTrans_ReadPalette                0x6075C
  158. #undef  ColourTrans_WritePalette
  159. #define ColourTrans_WritePalette                0x4075D
  160. #undef  XColourTrans_WritePalette
  161. #define XColourTrans_WritePalette               0x6075D
  162. #undef  ColourTrans_SetColour
  163. #define ColourTrans_SetColour                   0x4075E
  164. #undef  XColourTrans_SetColour
  165. #define XColourTrans_SetColour                  0x6075E
  166. #undef  ColourTrans_MiscOp
  167. #define ColourTrans_MiscOp                      0x4075F
  168. #undef  XColourTrans_MiscOp
  169. #define XColourTrans_MiscOp                     0x6075F
  170. #undef  ColourTransMiscOp_SetWeights
  171. #define ColourTransMiscOp_SetWeights            0x0
  172. #undef  ColourTrans_WriteLoadingsToFile
  173. #define ColourTrans_WriteLoadingsToFile         0x40760
  174. #undef  XColourTrans_WriteLoadingsToFile
  175. #define XColourTrans_WriteLoadingsToFile        0x60760
  176. #undef  ColourTrans_SetTextColour
  177. #define ColourTrans_SetTextColour               0x40761
  178. #undef  XColourTrans_SetTextColour
  179. #define XColourTrans_SetTextColour              0x60761
  180. #undef  ColourTrans_SetOppTextColour
  181. #define ColourTrans_SetOppTextColour            0x40762
  182. #undef  XColourTrans_SetOppTextColour
  183. #define XColourTrans_SetOppTextColour           0x60762
  184. #undef  ColourTrans_GenerateTable
  185. #define ColourTrans_GenerateTable               0x40763
  186. #undef  XColourTrans_GenerateTable
  187. #define XColourTrans_GenerateTable              0x60763
  188. #undef  ColourTrans_GenerateTableForSprite
  189. #define ColourTrans_GenerateTableForSprite      0x40763
  190. #undef  XColourTrans_GenerateTableForSprite
  191. #define XColourTrans_GenerateTableForSprite     0x60763
  192. #undef  ColourV
  193. #define ColourV                                 0x22
  194. #undef  Service_CalibrationChanged
  195. #define Service_CalibrationChanged              0x5B
  196. #undef  Service_InvalidateCache
  197. #define Service_InvalidateCache                 0x82
  198.  
  199. /************************************
  200.  * Structure and union declarations *
  201.  ************************************/
  202. typedef struct colourtrans_gcol_list            colourtrans_gcol_list;
  203. typedef struct colourtrans_calibration_table    colourtrans_calibration_table;
  204.  
  205. /********************
  206.  * Type definitions *
  207.  ********************/
  208. struct colourtrans_gcol_list
  209.    {  os_gcol gcol [UNKNOWN];
  210.    };
  211.  
  212. #define colourtrans_GCOL_LIST(N) \
  213.    struct \
  214.       {  os_gcol gcol [N]; \
  215.       }
  216.  
  217. #define colourtrans_SIZEOF_GCOL_LIST(N) \
  218.    ((N)*sizeof ((colourtrans_gcol_list *) NULL)->gcol)
  219.  
  220. struct colourtrans_calibration_table
  221.    {  byte c [UNKNOWN];
  222.    };
  223.  
  224. #define colourtrans_CALIBRATION_TABLE(N) \
  225.    struct \
  226.       {  byte c [N]; \
  227.       }
  228.  
  229. #define colourtrans_SIZEOF_CALIBRATION_TABLE(N) \
  230.    ((N)*sizeof ((colourtrans_calibration_table *) NULL)->c)
  231.  
  232. /************************
  233.  * Constant definitions *
  234.  ************************/
  235. #define colourtrans_COLOUR_RANGE                65536
  236. #define colourtrans_SET_FG                      0x0u
  237. #define colourtrans_SET_BG                      0x80u
  238. #define colourtrans_USE_ECFS                    0x100u
  239. #define colourtrans_SET_TEXT                    0x200u
  240. #define colourtrans_GIVEN_SPRITE                0x1u
  241. #define colourtrans_CURRENT_IF_ABSENT           0x2u
  242. #define colourtrans_GIVEN_FLASHING              0x2u
  243. #define colourtrans_GIVEN_TRANSFER_FN           0x4u
  244. #define colourtrans_RETURN_PALETTE_TABLE        0x1000000u
  245. #define colourtrans_CURRENT_PALETTE             ((os_palette *) -1)
  246. #define colourtrans_DEFAULT_PALETTE             ((os_palette *) 0)
  247. #define colourtrans_CURRENT_FONT                ((font_f) 0)
  248. #define colourtrans_CURRENT_MODE                ((os_mode) -1)
  249. #define error_COLOUR_TRANS_BAD_CALIB            0xA00u
  250. #define error_COLOUR_TRANS_CONV_OVER            0xA01u
  251. #define error_COLOUR_TRANS_BAD_HSV              0xA02u
  252. #define error_COLOUR_TRANS_SWITCHED             0xA03u
  253. #define error_COLOUR_TRANS_BAD_MISC_OP          0xA04u
  254. #define error_COLOUR_TRANS_BAD_FLAGS            0xA05u
  255. #define error_COLOUR_TRANS_BUFF_OVER            0xA06u
  256. #define error_COLOUR_TRANS_BAD_DEPTH            0xA07u
  257.  
  258. /*************************
  259.  * Function declarations *
  260.  *************************/
  261.  
  262. #ifdef __cplusplus
  263.    extern "C" {
  264. #endif
  265.  
  266. /*************************************************************
  267.  * NOTE: The following functions provide direct access to    *
  268.  *       the SWI's noted in the function description.        *
  269.  *       Please read the relevant PRM section for more       *
  270.  *       information on their input/output parameters.       *
  271.  *************************************************************/
  272.  
  273. /* ------------------------------------------------------------------------
  274.  * Function:      colourtrans_select_table()
  275.  *
  276.  * Description:   Sets up a translation table in a buffer
  277.  *
  278.  * Input:         source_mode - value of R0 on entry
  279.  *                source_palette - value of R1 on entry
  280.  *                dest_mode - value of R2 on entry
  281.  *                dest_palette - value of R3 on entry
  282.  *                trans_tab - value of R4 on entry
  283.  *
  284.  * Other notes:   Calls SWI 0x40740.
  285.  */
  286.  
  287. extern os_error *xcolourtrans_select_table (os_mode source_mode,
  288.       os_palette *source_palette,
  289.       os_mode dest_mode,
  290.       os_palette *dest_palette,
  291.       osspriteop_trans_tab *trans_tab);
  292. extern void colourtrans_select_table (os_mode source_mode,
  293.       os_palette *source_palette,
  294.       os_mode dest_mode,
  295.       os_palette *dest_palette,
  296.       osspriteop_trans_tab *trans_tab);
  297.  
  298. /* ------------------------------------------------------------------------
  299.  * Function:      colourtrans_select_table_for_sprite()
  300.  *
  301.  * Description:   Sets up a translation table for a sprite in a buffer
  302.  *
  303.  * Input:         source_area - value of R0 on entry
  304.  *                source_id - value of R1 on entry
  305.  *                dest_mode - value of R2 on entry
  306.  *                dest_palette - value of R3 on entry
  307.  *                trans_tab - value of R4 on entry
  308.  *                flags - value of R5 on entry
  309.  *
  310.  * Other notes:   Calls SWI 0x40740.
  311.  */
  312.  
  313. extern os_error *xcolourtrans_select_table_for_sprite (osspriteop_area *source_area,
  314.       osspriteop_id source_id,
  315.       os_mode dest_mode,
  316.       os_palette *dest_palette,
  317.       osspriteop_trans_tab *trans_tab,
  318.       bits flags);
  319. extern void colourtrans_select_table_for_sprite (osspriteop_area *source_area,
  320.       osspriteop_id source_id,
  321.       os_mode dest_mode,
  322.       os_palette *dest_palette,
  323.       osspriteop_trans_tab *trans_tab,
  324.       bits flags);
  325.  
  326. /* ------------------------------------------------------------------------
  327.  * Function:      colourtrans_select_gcol_table()
  328.  *
  329.  * Description:   Sets up a list of GCOL's in a buffer
  330.  *
  331.  * Input:         source_mode - value of R0 on entry
  332.  *                source_palette - value of R1 on entry
  333.  *                dest_mode - value of R2 on entry
  334.  *                dest_palette - value of R3 on entry
  335.  *                gcol_list - value of R4 on entry
  336.  *
  337.  * Other notes:   Calls SWI 0x40741.
  338.  */
  339.  
  340. extern os_error *xcolourtrans_select_gcol_table (os_mode source_mode,
  341.       os_palette *source_palette,
  342.       os_mode dest_mode,
  343.       os_palette *dest_palette,
  344.       colourtrans_gcol_list *gcol_list);
  345. extern void colourtrans_select_gcol_table (os_mode source_mode,
  346.       os_palette *source_palette,
  347.       os_mode dest_mode,
  348.       os_palette *dest_palette,
  349.       colourtrans_gcol_list *gcol_list);
  350.  
  351. /* ------------------------------------------------------------------------
  352.  * Function:      colourtrans_select_gcol_table_for_sprite()
  353.  *
  354.  * Description:   Sets up a list of GCOL's for a sprite in a buffer
  355.  *
  356.  * Input:         source_area - value of R0 on entry
  357.  *                source_id - value of R1 on entry
  358.  *                dest_mode - value of R2 on entry
  359.  *                dest_palette - value of R3 on entry
  360.  *                gcol_list - value of R4 on entry
  361.  *                flags - value of R5 on entry
  362.  *
  363.  * Other notes:   Calls SWI 0x40741.
  364.  */
  365.  
  366. extern os_error *xcolourtrans_select_gcol_table_for_sprite (osspriteop_area *source_area,
  367.       osspriteop_id source_id,
  368.       os_mode dest_mode,
  369.       os_palette *dest_palette,
  370.       colourtrans_gcol_list *gcol_list,
  371.       bits flags);
  372. extern void colourtrans_select_gcol_table_for_sprite (osspriteop_area *source_area,
  373.       osspriteop_id source_id,
  374.       os_mode dest_mode,
  375.       os_palette *dest_palette,
  376.       colourtrans_gcol_list *gcol_list,
  377.       bits flags);
  378.  
  379. /* ------------------------------------------------------------------------
  380.  * Function:      colourtrans_return_gcol()
  381.  *
  382.  * Description:   Gets the closest GCOL for a palette entry
  383.  *
  384.  * Input:         colour - value of R0 on entry
  385.  *
  386.  * Output:        gcol - value of R0 on exit (X version only)
  387.  *
  388.  * Returns:       R0 (non-X version only)
  389.  *
  390.  * Other notes:   Calls SWI 0x40742.
  391.  */
  392.  
  393. extern os_error *xcolourtrans_return_gcol (os_colour colour,
  394.       os_gcol *gcol);
  395. extern os_gcol colourtrans_return_gcol (os_colour colour);
  396.  
  397. /* ------------------------------------------------------------------------
  398.  * Function:      colourtrans_set_gcol()
  399.  *
  400.  * Description:   Sets the closest GCOL for a palette entry
  401.  *
  402.  * Input:         colour - value of R0 on entry
  403.  *                flags - value of R3 on entry
  404.  *                action - value of R4 on entry
  405.  *
  406.  * Output:        gcol - value of R0 on exit (X version only)
  407.  *                log2_bpp - value of R2 on exit
  408.  *
  409.  * Returns:       R0 (non-X version only)
  410.  *
  411.  * Other notes:   Calls SWI 0x40743.
  412.  */
  413.  
  414. extern os_error *xcolourtrans_set_gcol (os_colour colour,
  415.       bits flags,
  416.       os_action action,
  417.       os_gcol *gcol,
  418.       int *log2_bpp);
  419. extern os_gcol colourtrans_set_gcol (os_colour colour,
  420.       bits flags,
  421.       os_action action,
  422.       int *log2_bpp);
  423.  
  424. /* ------------------------------------------------------------------------
  425.  * Function:      colourtrans_return_colour_number()
  426.  *
  427.  * Description:   Gets the closest colour for a palette entry
  428.  *
  429.  * Input:         colour - value of R0 on entry
  430.  *
  431.  * Output:        colour_number - value of R0 on exit (X version only)
  432.  *
  433.  * Returns:       R0 (non-X version only)
  434.  *
  435.  * Other notes:   Calls SWI 0x40744.
  436.  */
  437.  
  438. extern os_error *xcolourtrans_return_colour_number (os_colour colour,
  439.       os_colour_number *colour_number);
  440. extern os_colour_number colourtrans_return_colour_number (os_colour colour);
  441.  
  442. /* ------------------------------------------------------------------------
  443.  * Function:      colourtrans_return_gcol_for_mode()
  444.  *
  445.  * Description:   Sets the closest GCOL for a palette entry
  446.  *
  447.  * Input:         colour - value of R0 on entry
  448.  *                mode - value of R1 on entry
  449.  *                dest_palette - value of R2 on entry
  450.  *
  451.  * Output:        gcol - value of R0 on exit (X version only)
  452.  *
  453.  * Returns:       R0 (non-X version only)
  454.  *
  455.  * Other notes:   Calls SWI 0x40745.
  456.  */
  457.  
  458. extern os_error *xcolourtrans_return_gcol_for_mode (os_colour colour,
  459.       os_mode mode,
  460.       os_palette *dest_palette,
  461.       os_gcol *gcol);
  462. extern os_gcol colourtrans_return_gcol_for_mode (os_colour colour,
  463.       os_mode mode,
  464.       os_palette *dest_palette);
  465.  
  466. /* ------------------------------------------------------------------------
  467.  * Function:      colourtrans_return_colour_number_for_mode()
  468.  *
  469.  * Description:   Gets the closest colour for a palette entry
  470.  *
  471.  * Input:         colour - value of R0 on entry
  472.  *                mode - value of R1 on entry
  473.  *                dest_palette - value of R2 on entry
  474.  *
  475.  * Output:        colour_number - value of R0 on exit (X version only)
  476.  *
  477.  * Returns:       R0 (non-X version only)
  478.  *
  479.  * Other notes:   Calls SWI 0x40746.
  480.  */
  481.  
  482. extern os_error *xcolourtrans_return_colour_number_for_mode (os_colour colour,
  483.       os_mode mode,
  484.       os_palette *dest_palette,
  485.       os_colour_number *colour_number);
  486. extern os_colour_number colourtrans_return_colour_number_for_mode (os_colour colour,
  487.       os_mode mode,
  488.       os_palette *dest_palette);
  489.  
  490. /* ------------------------------------------------------------------------
  491.  * Function:      colourtrans_return_opp_gcol()
  492.  *
  493.  * Description:   Gets the furthest GCOL for a palette entry
  494.  *
  495.  * Input:         colour - value of R0 on entry
  496.  *
  497.  * Output:        gcol - value of R0 on exit (X version only)
  498.  *
  499.  * Returns:       R0 (non-X version only)
  500.  *
  501.  * Other notes:   Calls SWI 0x40747.
  502.  */
  503.  
  504. extern os_error *xcolourtrans_return_opp_gcol (os_colour colour,
  505.       os_gcol *gcol);
  506. extern os_gcol colourtrans_return_opp_gcol (os_colour colour);
  507.  
  508. /* ------------------------------------------------------------------------
  509.  * Function:      colourtrans_set_opp_gcol()
  510.  *
  511.  * Description:   Sets the furthest GCOL for a palette entry
  512.  *
  513.  * Input:         colour - value of R0 on entry
  514.  *                flags - value of R3 on entry
  515.  *                action - value of R4 on entry
  516.  *
  517.  * Output:        gcol - value of R0 on exit (X version only)
  518.  *                log2_bpp - value of R2 on exit
  519.  *
  520.  * Returns:       R0 (non-X version only)
  521.  *
  522.  * Other notes:   Calls SWI 0x40748.
  523.  */
  524.  
  525. extern os_error *xcolourtrans_set_opp_gcol (os_colour colour,
  526.       bits flags,
  527.       os_action action,
  528.       os_gcol *gcol,
  529.       int *log2_bpp);
  530. extern os_gcol colourtrans_set_opp_gcol (os_colour colour,
  531.       bits flags,
  532.       os_action action,
  533.       int *log2_bpp);
  534.  
  535. /* ------------------------------------------------------------------------
  536.  * Function:      colourtrans_return_opp_colour_number()
  537.  *
  538.  * Description:   Gets the furthest colour for a palette entry
  539.  *
  540.  * Input:         colour - value of R0 on entry
  541.  *
  542.  * Output:        colour_number - value of R0 on exit (X version only)
  543.  *
  544.  * Returns:       R0 (non-X version only)
  545.  *
  546.  * Other notes:   Calls SWI 0x40749.
  547.  */
  548.  
  549. extern os_error *xcolourtrans_return_opp_colour_number (os_colour colour,
  550.       os_colour_number *colour_number);
  551. extern os_colour_number colourtrans_return_opp_colour_number (os_colour colour);
  552.  
  553. /* ------------------------------------------------------------------------
  554.  * Function:      colourtrans_return_opp_gcol_for_mode()
  555.  *
  556.  * Description:   Gets the furthest GCOL for a palette entry
  557.  *
  558.  * Input:         colour - value of R0 on entry
  559.  *                mode - value of R1 on entry
  560.  *                dest_palette - value of R2 on entry
  561.  *
  562.  * Output:        gcol - value of R0 on exit (X version only)
  563.  *
  564.  * Returns:       R0 (non-X version only)
  565.  *
  566.  * Other notes:   Calls SWI 0x4074A.
  567.  */
  568.  
  569. extern os_error *xcolourtrans_return_opp_gcol_for_mode (os_colour colour,
  570.       os_mode mode,
  571.       os_palette *dest_palette,
  572.       os_gcol *gcol);
  573. extern os_gcol colourtrans_return_opp_gcol_for_mode (os_colour colour,
  574.       os_mode mode,
  575.       os_palette *dest_palette);
  576.  
  577. /* ------------------------------------------------------------------------
  578.  * Function:      colourtrans_return_opp_colour_number_for_mode()
  579.  *
  580.  * Description:   Gets the furthest colour for a palette entry
  581.  *
  582.  * Input:         colour - value of R0 on entry
  583.  *                mode - value of R1 on entry
  584.  *                dest_palette - value of R2 on entry
  585.  *
  586.  * Output:        colour_number - value of R0 on exit (X version only)
  587.  *
  588.  * Returns:       R0 (non-X version only)
  589.  *
  590.  * Other notes:   Calls SWI 0x4074B.
  591.  */
  592.  
  593. extern os_error *xcolourtrans_return_opp_colour_number_for_mode (os_colour colour,
  594.       os_mode mode,
  595.       os_palette *dest_palette,
  596.       os_colour_number *colour_number);
  597. extern os_colour_number colourtrans_return_opp_colour_number_for_mode (os_colour colour,
  598.       os_mode mode,
  599.       os_palette *dest_palette);
  600.  
  601. /* ------------------------------------------------------------------------
  602.  * Function:      colourtrans_gcol_to_colour_number()
  603.  *
  604.  * Description:   Translates a GCOL to a colour number
  605.  *
  606.  * Input:         gcol - value of R0 on entry
  607.  *
  608.  * Output:        colour_number - value of R0 on exit (X version only)
  609.  *
  610.  * Returns:       R0 (non-X version only)
  611.  *
  612.  * Other notes:   Calls SWI 0x4074C.
  613.  */
  614.  
  615. extern os_error *xcolourtrans_gcol_to_colour_number (os_gcol gcol,
  616.       os_colour_number *colour_number);
  617. extern os_colour_number colourtrans_gcol_to_colour_number (os_gcol gcol);
  618.  
  619. /* ------------------------------------------------------------------------
  620.  * Function:      colourtrans_colour_number_to_gcol()
  621.  *
  622.  * Description:   Translates a colour number to a GCOL
  623.  *
  624.  * Input:         colour_number - value of R0 on entry
  625.  *
  626.  * Output:        gcol - value of R0 on exit (X version only)
  627.  *
  628.  * Returns:       R0 (non-X version only)
  629.  *
  630.  * Other notes:   Calls SWI 0x4074D.
  631.  */
  632.  
  633. extern os_error *xcolourtrans_colour_number_to_gcol (os_colour_number colour_number,
  634.       os_gcol *gcol);
  635. extern os_gcol colourtrans_colour_number_to_gcol (os_colour_number colour_number);
  636.  
  637. /* ------------------------------------------------------------------------
  638.  * Function:      colourtrans_return_font_colours()
  639.  *
  640.  * Description:   Finds the best range of anti-alias colours to match a
  641.  *                pair of palette entries
  642.  *
  643.  * Input:         font - value of R0 on entry
  644.  *                bg_hint - value of R1 on entry
  645.  *                fill - value of R2 on entry
  646.  *                offset - value of R3 on entry
  647.  *
  648.  * Output:        bg_hint_out - value of R1 on exit
  649.  *                fill_out - value of R2 on exit
  650.  *                offset_out - value of R3 on exit
  651.  *
  652.  * Other notes:   Calls SWI 0x4074E.
  653.  */
  654.  
  655. extern os_error *xcolourtrans_return_font_colours (font_f font,
  656.       os_colour bg_hint,
  657.       os_colour fill,
  658.       int offset,
  659.       os_colour *bg_hint_out,
  660.       os_colour *fill_out,
  661.       int *offset_out);
  662. extern void colourtrans_return_font_colours (font_f font,
  663.       os_colour bg_hint,
  664.       os_colour fill,
  665.       int offset,
  666.       os_colour *bg_hint_out,
  667.       os_colour *fill_out,
  668.       int *offset_out);
  669.  
  670. /* ------------------------------------------------------------------------
  671.  * Function:      colourtrans_set_font_colours()
  672.  *
  673.  * Description:   Sets the best range of anti-alias colours to match a pair
  674.  *                of palette entries
  675.  *
  676.  * Input:         font - value of R0 on entry
  677.  *                bg_hint - value of R1 on entry
  678.  *                fill - value of R2 on entry
  679.  *                offset - value of R3 on entry
  680.  *
  681.  * Output:        bg_hint_out - value of R1 on exit
  682.  *                fill_out - value of R2 on exit
  683.  *                offset_out - value of R3 on exit
  684.  *
  685.  * Other notes:   Calls SWI 0x4074F.
  686.  */
  687.  
  688. extern os_error *xcolourtrans_set_font_colours (font_f font,
  689.       os_colour bg_hint,
  690.       os_colour fill,
  691.       int offset,
  692.       os_colour *bg_hint_out,
  693.       os_colour *fill_out,
  694.       int *offset_out);
  695. extern void colourtrans_set_font_colours (font_f font,
  696.       os_colour bg_hint,
  697.       os_colour fill,
  698.       int offset,
  699.       os_colour *bg_hint_out,
  700.       os_colour *fill_out,
  701.       int *offset_out);
  702.  
  703. /* ------------------------------------------------------------------------
  704.  * Function:      colourtrans_invalidate_cache()
  705.  *
  706.  * Description:   Informs ColourTrans that the palette has been changed by
  707.  *                some other means
  708.  *
  709.  * Other notes:   Calls SWI 0x40750.
  710.  */
  711.  
  712. extern os_error *xcolourtrans_invalidate_cache (void);
  713. extern void colourtrans_invalidate_cache (void);
  714.  
  715. /* ------------------------------------------------------------------------
  716.  * Function:      colourtrans_set_calibration()
  717.  *
  718.  * Description:   Sets the calibration table for the screen
  719.  *
  720.  * Input:         calibration_table - value of R0 on entry
  721.  *
  722.  * Other notes:   Calls SWI 0x40751.
  723.  */
  724.  
  725. extern os_error *xcolourtrans_set_calibration (colourtrans_calibration_table *calibration_table);
  726. extern void colourtrans_set_calibration (colourtrans_calibration_table *calibration_table);
  727.  
  728. /* ------------------------------------------------------------------------
  729.  * Function:      colourtrans_read_calibration()
  730.  *
  731.  * Description:   Reads the calibration table for the screen
  732.  *
  733.  * Input:         calibration_table - value of R0 on entry
  734.  *
  735.  * Output:        size - value of R1 on exit
  736.  *
  737.  * Other notes:   Calls SWI 0x40752.
  738.  */
  739.  
  740. extern os_error *xcolourtrans_read_calibration (colourtrans_calibration_table *calibration_table,
  741.       int *size);
  742. extern void colourtrans_read_calibration (colourtrans_calibration_table *calibration_table,
  743.       int *size);
  744.  
  745. /* ------------------------------------------------------------------------
  746.  * Function:      colourtrans_convert_device_colour()
  747.  *
  748.  * Description:   Converts a device colour to a standard colour
  749.  *
  750.  * Input:         colour - value of R1 on entry
  751.  *                calibration_table - value of R3 on entry
  752.  *
  753.  * Output:        colour_out - value of R2 on exit (X version only)
  754.  *
  755.  * Returns:       R2 (non-X version only)
  756.  *
  757.  * Other notes:   Calls SWI 0x40753.
  758.  */
  759.  
  760. extern os_error *xcolourtrans_convert_device_colour (os_colour colour,
  761.       colourtrans_calibration_table *calibration_table,
  762.       os_colour *colour_out);
  763. extern os_colour colourtrans_convert_device_colour (os_colour colour,
  764.       colourtrans_calibration_table *calibration_table);
  765.  
  766. /* ------------------------------------------------------------------------
  767.  * Function:      colourtrans_convert_device_palette()
  768.  *
  769.  * Description:   Converts a device palette to standard colours
  770.  *
  771.  * Input:         colour_count - value of R0 on entry
  772.  *                list - value of R1 on entry
  773.  *                buffer - value of R2 on entry
  774.  *                calibration_table - value of R3 on entry
  775.  *
  776.  * Other notes:   Calls SWI 0x40754.
  777.  */
  778.  
  779. extern os_error *xcolourtrans_convert_device_palette (int colour_count,
  780.       os_colour *list,
  781.       os_colour *buffer,
  782.       colourtrans_calibration_table *calibration_table);
  783. extern void colourtrans_convert_device_palette (int colour_count,
  784.       os_colour *list,
  785.       os_colour *buffer,
  786.       colourtrans_calibration_table *calibration_table);
  787.  
  788. /* ------------------------------------------------------------------------
  789.  * Function:      colourtrans_convert_rgb_to_cie()
  790.  *
  791.  * Description:   Converts an RGB colour to CIE representation
  792.  *
  793.  * Input:         r - value of R0 on entry
  794.  *                g - value of R1 on entry
  795.  *                b - value of R2 on entry
  796.  *
  797.  * Output:        x - value of R0 on exit
  798.  *                y - value of R1 on exit
  799.  *                z - value of R2 on exit
  800.  *
  801.  * Other notes:   Calls SWI 0x40755.
  802.  */
  803.  
  804. extern os_error *xcolourtrans_convert_rgb_to_cie (int r,
  805.       int g,
  806.       int b,
  807.       int *x,
  808.       int *y,
  809.       int *z);
  810. extern void colourtrans_convert_rgb_to_cie (int r,
  811.       int g,
  812.       int b,
  813.       int *x,
  814.       int *y,
  815.       int *z);
  816.  
  817. /* ------------------------------------------------------------------------
  818.  * Function:      colourtrans_convert_cie_to_rgb()
  819.  *
  820.  * Description:   Converts a CIE colour to RGB representation
  821.  *
  822.  * Input:         x - value of R0 on entry
  823.  *                y - value of R1 on entry
  824.  *                z - value of R2 on entry
  825.  *
  826.  * Output:        r - value of R0 on exit
  827.  *                g - value of R1 on exit
  828.  *                b - value of R2 on exit
  829.  *
  830.  * Other notes:   Calls SWI 0x40756.
  831.  */
  832.  
  833. extern os_error *xcolourtrans_convert_cie_to_rgb (int x,
  834.       int y,
  835.       int z,
  836.       int *r,
  837.       int *g,
  838.       int *b);
  839. extern void colourtrans_convert_cie_to_rgb (int x,
  840.       int y,
  841.       int z,
  842.       int *r,
  843.       int *g,
  844.       int *b);
  845.  
  846. /* ------------------------------------------------------------------------
  847.  * Function:      colourtrans_write_calibration_to_file()
  848.  *
  849.  * Description:   Saves the current calibration to a file
  850.  *
  851.  * Input:         flags - value of R0 on entry
  852.  *                file - value of R1 on entry
  853.  *
  854.  * Other notes:   Calls SWI 0x40757.
  855.  */
  856.  
  857. extern os_error *xcolourtrans_write_calibration_to_file (bits flags,
  858.       os_f file);
  859. extern void colourtrans_write_calibration_to_file (bits flags,
  860.       os_f file);
  861.  
  862. /* ------------------------------------------------------------------------
  863.  * Function:      colourtrans_convert_rgb_to_hsv()
  864.  *
  865.  * Description:   Converts an RGB colour to HSV representation
  866.  *
  867.  * Input:         r - value of R0 on entry
  868.  *                g - value of R1 on entry
  869.  *                b - value of R2 on entry
  870.  *
  871.  * Output:        h - value of R0 on exit
  872.  *                s - value of R1 on exit
  873.  *                v - value of R2 on exit
  874.  *
  875.  * Other notes:   Calls SWI 0x40758.
  876.  */
  877.  
  878. extern os_error *xcolourtrans_convert_rgb_to_hsv (int r,
  879.       int g,
  880.       int b,
  881.       int *h,
  882.       int *s,
  883.       int *v);
  884. extern void colourtrans_convert_rgb_to_hsv (int r,
  885.       int g,
  886.       int b,
  887.       int *h,
  888.       int *s,
  889.       int *v);
  890.  
  891. /* ------------------------------------------------------------------------
  892.  * Function:      colourtrans_convert_hsv_to_rgb()
  893.  *
  894.  * Description:   Converts an HSV colour to RGB representation
  895.  *
  896.  * Input:         h - value of R0 on entry
  897.  *                s - value of R1 on entry
  898.  *                v - value of R2 on entry
  899.  *
  900.  * Output:        r - value of R0 on exit
  901.  *                g - value of R1 on exit
  902.  *                b - value of R2 on exit
  903.  *
  904.  * Other notes:   Calls SWI 0x40759.
  905.  */
  906.  
  907. extern os_error *xcolourtrans_convert_hsv_to_rgb (int h,
  908.       int s,
  909.       int v,
  910.       int *r,
  911.       int *g,
  912.       int *b);
  913. extern void colourtrans_convert_hsv_to_rgb (int h,
  914.       int s,
  915.       int v,
  916.       int *r,
  917.       int *g,
  918.       int *b);
  919.  
  920. /* ------------------------------------------------------------------------
  921.  * Function:      colourtrans_convert_rgb_to_cmyk()
  922.  *
  923.  * Description:   Converts an RGB colour to CMYK representation
  924.  *
  925.  * Input:         r - value of R0 on entry
  926.  *                g - value of R1 on entry
  927.  *                b - value of R2 on entry
  928.  *
  929.  * Output:        c - value of R0 on exit
  930.  *                m - value of R1 on exit
  931.  *                y - value of R2 on exit
  932.  *                k - value of R3 on exit
  933.  *
  934.  * Other notes:   Calls SWI 0x4075A.
  935.  */
  936.  
  937. extern os_error *xcolourtrans_convert_rgb_to_cmyk (int r,
  938.       int g,
  939.       int b,
  940.       int *c,
  941.       int *m,
  942.       int *y,
  943.       int *k);
  944. extern void colourtrans_convert_rgb_to_cmyk (int r,
  945.       int g,
  946.       int b,
  947.       int *c,
  948.       int *m,
  949.       int *y,
  950.       int *k);
  951.  
  952. /* ------------------------------------------------------------------------
  953.  * Function:      colourtrans_convert_cmyk_to_rgb()
  954.  *
  955.  * Description:   Converts a CMYK colour to RGB representation
  956.  *
  957.  * Input:         c - value of R0 on entry
  958.  *                m - value of R1 on entry
  959.  *                y - value of R2 on entry
  960.  *                k - value of R3 on entry
  961.  *
  962.  * Output:        r - value of R0 on exit
  963.  *                g - value of R1 on exit
  964.  *                b - value of R2 on exit
  965.  *
  966.  * Other notes:   Calls SWI 0x4075B.
  967.  */
  968.  
  969. extern os_error *xcolourtrans_convert_cmyk_to_rgb (int c,
  970.       int m,
  971.       int y,
  972.       int k,
  973.       int *r,
  974.       int *g,
  975.       int *b);
  976. extern void colourtrans_convert_cmyk_to_rgb (int c,
  977.       int m,
  978.       int y,
  979.       int k,
  980.       int *r,
  981.       int *g,
  982.       int *b);
  983.  
  984. /* ------------------------------------------------------------------------
  985.  * Function:      colourtrans_read_palette()
  986.  *
  987.  * Description:   Reads either the screen's palette, or a sprite's palette
  988.  *
  989.  * Input:         area - value of R0 on entry
  990.  *                id - value of R1 on entry
  991.  *                palette - value of R2 on entry
  992.  *                size - value of R3 on entry
  993.  *                flags - value of R4 on entry
  994.  *
  995.  * Output:        used - value of R3 on exit
  996.  *
  997.  * Other notes:   Calls SWI 0x4075C.
  998.  */
  999.  
  1000. extern os_error *xcolourtrans_read_palette (osspriteop_area *area,
  1001.       osspriteop_id id,
  1002.       os_palette *palette,
  1003.       int size,
  1004.       bits flags,
  1005.       int *used);
  1006. extern void colourtrans_read_palette (osspriteop_area *area,
  1007.       osspriteop_id id,
  1008.       os_palette *palette,
  1009.       int size,
  1010.       bits flags,
  1011.       int *used);
  1012.  
  1013. /* ------------------------------------------------------------------------
  1014.  * Function:      colourtrans_write_palette()
  1015.  *
  1016.  * Description:   Writes to either the screen's palette, or to a sprite's
  1017.  *                palette
  1018.  *
  1019.  * Input:         area - value of R0 on entry
  1020.  *                id - value of R1 on entry
  1021.  *                palette - value of R2 on entry
  1022.  *                flags - value of R4 on entry
  1023.  *
  1024.  * Other notes:   Calls SWI 0x4075D with R3 = 0x0.
  1025.  */
  1026.  
  1027. extern os_error *xcolourtrans_write_palette (osspriteop_area *area,
  1028.       osspriteop_id id,
  1029.       os_palette *palette,
  1030.       bits flags);
  1031. extern void colourtrans_write_palette (osspriteop_area *area,
  1032.       osspriteop_id id,
  1033.       os_palette *palette,
  1034.       bits flags);
  1035.  
  1036. /* ------------------------------------------------------------------------
  1037.  * Function:      colourtrans_set_colour()
  1038.  *
  1039.  * Description:   Changes the foreground or background colour to a GCOL
  1040.  *                number
  1041.  *
  1042.  * Input:         gcol - value of R0 on entry
  1043.  *                flags - value of R3 on entry
  1044.  *                action - value of R4 on entry
  1045.  *
  1046.  * Other notes:   Calls SWI 0x4075E.
  1047.  */
  1048.  
  1049. extern os_error *xcolourtrans_set_colour (os_gcol gcol,
  1050.       bits flags,
  1051.       os_action action);
  1052. extern void colourtrans_set_colour (os_gcol gcol,
  1053.       bits flags,
  1054.       os_action action);
  1055.  
  1056. /* ------------------------------------------------------------------------
  1057.  * Function:      colourtransmiscop_set_weights()
  1058.  *
  1059.  * Description:   This call is for internal use only
  1060.  *
  1061.  * Input:         rweight - value of R1 on entry
  1062.  *                gweight - value of R2 on entry
  1063.  *                bweight - value of R3 on entry
  1064.  *
  1065.  * Other notes:   Calls SWI 0x4075F with R0 = 0x0.
  1066.  */
  1067.  
  1068. extern os_error *xcolourtransmiscop_set_weights (int rweight,
  1069.       int gweight,
  1070.       int bweight);
  1071. extern void colourtransmiscop_set_weights (int rweight,
  1072.       int gweight,
  1073.       int bweight);
  1074.  
  1075. /* ------------------------------------------------------------------------
  1076.  * Function:      colourtrans_write_loadings_to_file()
  1077.  *
  1078.  * Description:   Writes to a file a *command that would set the
  1079.  *                ColourTrans error loadings
  1080.  *
  1081.  * Input:         file - value of R1 on entry
  1082.  *
  1083.  * Other notes:   Calls SWI 0x40760.
  1084.  */
  1085.  
  1086. extern os_error *xcolourtrans_write_loadings_to_file (os_f file);
  1087. extern void colourtrans_write_loadings_to_file (os_f file);
  1088.  
  1089. /* ------------------------------------------------------------------------
  1090.  * Function:      colourtrans_set_text_colour()
  1091.  *
  1092.  * Description:   Changes the text foreground or background colour to a
  1093.  *                GCOL number
  1094.  *
  1095.  * Input:         colour - value of R0 on entry
  1096.  *                flags - value of R3 on entry
  1097.  *
  1098.  * Output:        gcol - value of R0 on exit (X version only)
  1099.  *
  1100.  * Returns:       R0 (non-X version only)
  1101.  *
  1102.  * Other notes:   Calls SWI 0x40761.
  1103.  */
  1104.  
  1105. extern os_error *xcolourtrans_set_text_colour (os_colour colour,
  1106.       bits flags,
  1107.       os_gcol *gcol);
  1108. extern os_gcol colourtrans_set_text_colour (os_colour colour,
  1109.       bits flags);
  1110.  
  1111. /* ------------------------------------------------------------------------
  1112.  * Function:      colourtrans_set_opp_text_colour()
  1113.  *
  1114.  * Description:   Changes the text foreground or background colour to a
  1115.  *                GCOL number
  1116.  *
  1117.  * Input:         colour - value of R0 on entry
  1118.  *                flags - value of R3 on entry
  1119.  *
  1120.  * Output:        gcol - value of R0 on exit (X version only)
  1121.  *
  1122.  * Returns:       R0 (non-X version only)
  1123.  *
  1124.  * Other notes:   Calls SWI 0x40762.
  1125.  */
  1126.  
  1127. extern os_error *xcolourtrans_set_opp_text_colour (os_colour colour,
  1128.       bits flags,
  1129.       os_gcol *gcol);
  1130. extern os_gcol colourtrans_set_opp_text_colour (os_colour colour,
  1131.       bits flags);
  1132.  
  1133. /* ------------------------------------------------------------------------
  1134.  * Function:      colourtrans_generate_table()
  1135.  *
  1136.  * Description:   Sets up a translation table in a buffer
  1137.  *
  1138.  * Input:         source_mode - value of R0 on entry
  1139.  *                source_palette - value of R1 on entry
  1140.  *                dest_mode - value of R2 on entry
  1141.  *                dest_palette - value of R3 on entry
  1142.  *                trans_tab - value of R4 on entry
  1143.  *                flags - value of R5 on entry
  1144.  *                workspace - value of R6 on entry
  1145.  *                transfer_fn - value of R7 on entry
  1146.  *
  1147.  * Output:        size - value of R4 on exit
  1148.  *
  1149.  * Other notes:   Calls SWI 0x40763.
  1150.  */
  1151.  
  1152. extern os_error *xcolourtrans_generate_table (os_mode source_mode,
  1153.       os_palette *source_palette,
  1154.       os_mode dest_mode,
  1155.       os_palette *dest_palette,
  1156.       osspriteop_trans_tab *trans_tab,
  1157.       bits flags,
  1158.       void *workspace,
  1159.       void *transfer_fn,
  1160.       int *size);
  1161. extern void colourtrans_generate_table (os_mode source_mode,
  1162.       os_palette *source_palette,
  1163.       os_mode dest_mode,
  1164.       os_palette *dest_palette,
  1165.       osspriteop_trans_tab *trans_tab,
  1166.       bits flags,
  1167.       void *workspace,
  1168.       void *transfer_fn,
  1169.       int *size);
  1170.  
  1171. /* ------------------------------------------------------------------------
  1172.  * Function:      colourtrans_generate_table_for_sprite()
  1173.  *
  1174.  * Description:   Sets up a translation table for a sprite in a buffer
  1175.  *
  1176.  * Input:         source_area - value of R0 on entry
  1177.  *                source_id - value of R1 on entry
  1178.  *                dest_mode - value of R2 on entry
  1179.  *                dest_palette - value of R3 on entry
  1180.  *                trans_tab - value of R4 on entry
  1181.  *                flags - value of R5 on entry
  1182.  *                workspace - value of R6 on entry
  1183.  *                transfer_fn - value of R7 on entry
  1184.  *
  1185.  * Output:        size - value of R4 on exit
  1186.  *
  1187.  * Other notes:   Calls SWI 0x40763.
  1188.  */
  1189.  
  1190. extern os_error *xcolourtrans_generate_table_for_sprite (osspriteop_area *source_area,
  1191.       osspriteop_id source_id,
  1192.       os_mode dest_mode,
  1193.       os_palette *dest_palette,
  1194.       osspriteop_trans_tab *trans_tab,
  1195.       bits flags,
  1196.       void *workspace,
  1197.       void *transfer_fn,
  1198.       int *size);
  1199. extern void colourtrans_generate_table_for_sprite (osspriteop_area *source_area,
  1200.       osspriteop_id source_id,
  1201.       os_mode dest_mode,
  1202.       os_palette *dest_palette,
  1203.       osspriteop_trans_tab *trans_tab,
  1204.       bits flags,
  1205.       void *workspace,
  1206.       void *transfer_fn,
  1207.       int *size);
  1208.  
  1209. /* ------------------------------------------------------------------------
  1210.  * Function:      service_calibration_changed()
  1211.  *
  1212.  * Description:   Screen calibration has changed
  1213.  *
  1214.  * Other notes:   Calls SWI 0x30 with R1 = 0x5B.
  1215.  */
  1216.  
  1217. extern os_error *xservice_calibration_changed (void);
  1218. extern void service_calibration_changed (void);
  1219.  
  1220. /* ------------------------------------------------------------------------
  1221.  * Function:      service_invalidate_cache()
  1222.  *
  1223.  * Description:   Broadcast whenever the cache is flushed within
  1224.  *                ColourTrans
  1225.  *
  1226.  * Other notes:   Calls SWI 0x30 with R1 = 0x82.
  1227.  */
  1228.  
  1229. extern os_error *xservice_invalidate_cache (void);
  1230. extern void service_invalidate_cache (void);
  1231.  
  1232. #ifdef __cplusplus
  1233.    }
  1234. #endif
  1235.  
  1236. #endif
  1237.