home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / User / Hdr / DrawFile < prev    next >
Encoding:
Text File  |  1995-08-21  |  14.7 KB  |  405 lines

  1. ;Assembler header file for DrawFile
  2. ;written by DefMod (Jun 30 1995) on Mon Aug 21 11:57:35 1995
  3. ;Jonathan Coxhead, Acorn Computers Ltd
  4.  
  5.         [       :LNOT: :DEF: Get_Types
  6.         GBLS    Get_Types
  7.         ]
  8.         [       :LNOT: :DEF: Types_Hdr
  9. Get_Types                       SETS    "GET OS:Hdr.Types"
  10.         |
  11. Get_Types                       SETS    ""
  12.         ]
  13.         $Get_Types
  14.  
  15.         [       :LNOT: :DEF: Get_OS
  16.         GBLS    Get_OS
  17.         ]
  18.         [       :LNOT: :DEF: OS_Hdr
  19. Get_OS                          SETS    "GET OS:Hdr.OS"
  20.         |
  21. Get_OS                          SETS    ""
  22.         ]
  23.         $Get_OS
  24.  
  25.         [       :LNOT: :DEF: Get_OSSpriteOp
  26.         GBLS    Get_OSSpriteOp
  27.         ]
  28.         [       :LNOT: :DEF: OSSpriteOp_Hdr
  29. Get_OSSpriteOp                  SETS    "GET OS:Hdr.OSSpriteOp"
  30.         |
  31. Get_OSSpriteOp                  SETS    ""
  32.         ]
  33.         $Get_OSSpriteOp
  34.  
  35.         [       :LNOT: :DEF: Get_Draw
  36.         GBLS    Get_Draw
  37.         ]
  38.         [       :LNOT: :DEF: Draw_Hdr
  39. Get_Draw                        SETS    "GET OS:Hdr.Draw"
  40.         |
  41. Get_Draw                        SETS    ""
  42.         ]
  43.         $Get_Draw
  44.  
  45.         [       :LNOT: :DEF: Get_Font
  46.         GBLS    Get_Font
  47.         ]
  48.         [       :LNOT: :DEF: Font_Hdr
  49. Get_Font                        SETS    "GET OS:Hdr.Font"
  50.         |
  51. Get_Font                        SETS    ""
  52.         ]
  53.         $Get_Font
  54.  
  55.         [       :LNOT: :DEF: Get_Wimp
  56.         GBLS    Get_Wimp
  57.         ]
  58.         [       :LNOT: :DEF: Wimp_Hdr
  59. Get_Wimp                        SETS    "GET OS:Hdr.Wimp"
  60.         |
  61. Get_Wimp                        SETS    ""
  62.         ]
  63.         $Get_Wimp
  64.  
  65.         [       :LNOT: :DEF: Get_JPEG
  66.         GBLS    Get_JPEG
  67.         ]
  68.         [       :LNOT: :DEF: JPEG_Hdr
  69. Get_JPEG                        SETS    "GET OS:Hdr.JPEG"
  70.         |
  71. Get_JPEG                        SETS    ""
  72.         ]
  73.         $Get_JPEG
  74.  
  75.         [       :LNOT: :DEF: DrawFile_Hdr
  76.         GBLS    DrawFile_Hdr
  77.  
  78. ;Symbols for constants
  79. Error_DrawFileNotDraw           *       &20C00
  80. Error_DrawFileVersion           *       &20C01
  81. Error_DrawFileFontTab           *       &20C02
  82. Error_DrawFileBadFontNo         *       &20C03
  83. Error_DrawFileBadMode           *       &20C04
  84. Error_DrawFileBadFile           *       &20C05
  85. Error_DrawFileBadGroup          *       &20C06
  86. Error_DrawFileBadTag            *       &20C07
  87. Error_DrawFileSyntax            *       &20C08
  88. Error_DrawFileFontNo            *       &20C09
  89. Error_DrawFileAreaVer           *       &20C0A
  90. Error_DrawFileNoAreaVer         *       &20C0B
  91. DrawFile_TypeFontTable          *       &0
  92. DrawFile_TypeText               *       &1
  93. DrawFile_TypePath               *       &2
  94. DrawFile_TypeSprite             *       &5
  95. DrawFile_TypeGroup              *       &6
  96. DrawFile_TypeTagged             *       &7
  97. DrawFile_TypeTextArea           *       &9
  98. DrawFile_TypeTextColumn         *       &A
  99. DrawFile_TypeOptions            *       &B
  100. DrawFile_TypeTrfmText           *       &C
  101. DrawFile_TypeTrfmSprite         *       &D
  102. DrawFile_TypeJPEG               *       &10
  103. DrawFile_PathMitred             *       &0
  104. DrawFile_PathRound              *       &1
  105. DrawFile_PathBevelled           *       &2
  106. DrawFile_PathButt               *       &0
  107. DrawFile_PathSquare             *       &2
  108. DrawFile_PathTriangle           *       &3
  109. DrawFile_PathJoinShift          *       0
  110. DrawFile_PathJoin               *       &3
  111. DrawFile_PathEndShift           *       2
  112. DrawFile_PathEnd                *       &C
  113. DrawFile_PathStartShift         *       4
  114. DrawFile_PathStart              *       &30
  115. DrawFile_PathWindingEvenOdd     *       &40
  116. DrawFile_PathDashed             *       &80
  117. DrawFile_PathCapWidthShift      *       16
  118. DrawFile_PathCapWidth           *       &FF0000
  119. DrawFile_PathCapLengthShift     *       24
  120. DrawFile_PathCapLength          *       &FF000000
  121. DrawFile_TextKern               *       &1
  122. DrawFile_TextRightToLeft        *       &2
  123. DrawFile_TextUnderline          *       &4
  124. DrawFile_RenderBBoxes           *       &1
  125. DrawFile_RenderSuppress         *       &2
  126. DrawFile_RenderGivenFlatness    *       &4
  127. DrawFile_NoDownload             *       &1
  128. DrawFile_PaperShow              *       &1
  129. DrawFile_PaperLandscape         *       &10
  130. DrawFile_PaperDefault           *       &100
  131. DrawFile_EntryModeLine          *       &1
  132. DrawFile_EntryModeClosedLine    *       &2
  133. DrawFile_EntryModeCurve         *       &4
  134. DrawFile_EntryModeClosedCurve   *       &8
  135. DrawFile_EntryModeRectangle     *       &10
  136. DrawFile_EntryModeEllipse       *       &20
  137. DrawFile_EntryModeTextLine      *       &40
  138. DrawFile_EntryModeSelect        *       &80
  139.  
  140. ;Symbols for structure offsets and sizes
  141. DrawFile_Type                   *       Int
  142.  
  143. DrawFile_PathStyleFlags         *       Byte
  144.  
  145. DrawFile_TextFlags              *       Bits
  146.  
  147. DrawFile_RenderFlags            *       Bits
  148.  
  149. DrawFile_DeclareFontsFlags      *       Bits
  150.  
  151. DrawFile_PaperOptions           *       Bits
  152.  
  153. DrawFile_EntryMode              *       Bits
  154.  
  155.                                 ^       0
  156. DrawFile_FontDef_font_index     #       Byte
  157. DrawFile_FontDef_font_name      #       Char
  158. DrawFile_FontDef                *       @
  159.  
  160.                                 ^       0
  161. DrawFile_TextStyle_font_index   #       Byte
  162. DrawFile_TextStyle_reserved     #       3*Byte
  163. DrawFile_TextStyle              *       @
  164.  
  165.                                 ^       0
  166. DrawFile_PathStyle_flags        #       DrawFile_PathStyleFlags
  167. DrawFile_PathStyle_reserved     #       Byte
  168. DrawFile_PathStyle_cap_width    #       Byte
  169. DrawFile_PathStyle_cap_length   #       Byte
  170. DrawFile_PathStyle              *       @
  171.  
  172.                                 ^       0
  173. DrawFile_FontTable_font_def     #       DrawFile_FontDef
  174. DrawFile_FontTable              *       @
  175.  
  176.                                 ^       0
  177. DrawFile_Text_bbox              #       OS_Box
  178. DrawFile_Text_fill              #       OS_Colour
  179. DrawFile_Text_bg_hint           #       OS_Colour
  180. DrawFile_Text_style             #       DrawFile_TextStyle
  181. DrawFile_Text_xsize             #       Int
  182. DrawFile_Text_ysize             #       Int
  183. DrawFile_Text_base              #       OS_Coord
  184. DrawFile_Text_text              #       Char
  185. DrawFile_Text                   *       @
  186.  
  187.                                 ^       0
  188. DrawFile_Path_bbox              #       OS_Box
  189. DrawFile_Path_fill              #       OS_Colour
  190. DrawFile_Path_outline           #       OS_Colour
  191. DrawFile_Path_width             #       Int
  192. DrawFile_Path_style             #       DrawFile_PathStyle
  193. DrawFile_Path_path              #       Draw_Path
  194. DrawFile_Path                   *       @
  195.  
  196.                                 ^       0
  197. DrawFile_PathWithPattern_bbox   #       OS_Box
  198. DrawFile_PathWithPattern_fill   #       OS_Colour
  199. DrawFile_PathWithPattern_outline #       OS_Colour
  200. DrawFile_PathWithPattern_width  #       Int
  201. DrawFile_PathWithPattern_style  #       DrawFile_PathStyle
  202. DrawFile_PathWithPattern_pattern #       Draw_DashPattern
  203. DrawFile_PathWithPattern_path   #       Draw_Path
  204. DrawFile_PathWithPattern        *       @
  205.  
  206.                                 ^       0
  207. DrawFile_Sprite_bbox            #       OS_Box
  208. DrawFile_Sprite_header          #       OSSpriteOp_Header
  209. DrawFile_Sprite_data            #       Byte
  210. DrawFile_Sprite                 *       @
  211.  
  212.                                 ^       0
  213. DrawFile_Group_bbox             #       OS_Box
  214. DrawFile_Group_name             #       12*Char
  215. DrawFile_Group_objects          #       Int
  216. DrawFile_Group                  *       @
  217.  
  218.                                 ^       0
  219. DrawFile_Tagged_bbox            #       OS_Box
  220. DrawFile_Tagged_tag             #       DrawFile_Type
  221. DrawFile_Tagged_object          #       Int
  222. DrawFile_Tagged                 *       @
  223.  
  224.                                 ^       0
  225. DrawFile_TextColumn_box         #       OS_Box
  226. DrawFile_TextColumn             *       @
  227.  
  228.                                 ^       0
  229. DrawFile_TextColumnList_columns_type #       DrawFile_Type
  230. DrawFile_TextColumnList_columns_size #       Int
  231. DrawFile_TextColumnList_columns_data #       DrawFile_TextColumn
  232. DrawFile_TextColumnList         *       @
  233.  
  234.                                 ^       0
  235. DrawFile_AreaText_type          #       DrawFile_Type
  236. DrawFile_AreaText_reserved      #       2*Int
  237. DrawFile_AreaText_fill          #       OS_Colour
  238. DrawFile_AreaText_bg_hint       #       OS_Colour
  239. DrawFile_AreaText_text          #       Char
  240. DrawFile_AreaText               *       @
  241.  
  242.                                 ^       0
  243. DrawFile_TextArea_bbox          #       OS_Box
  244. DrawFile_TextArea_header        #       DrawFile_TextColumnList
  245. DrawFile_TextArea_area_text     #       DrawFile_AreaText
  246. DrawFile_TextArea               *       @
  247.  
  248.                                 ^       0
  249. DrawFile_Options_bbox           #       OS_Box
  250. DrawFile_Options_paper_size     #       Int
  251. DrawFile_Options_paper_options  #       DrawFile_PaperOptions
  252. DrawFile_Options_grid_spacing   #       Float
  253. DrawFile_Options_grid_division  #       Int
  254. DrawFile_Options_isometric      #       Bool
  255. DrawFile_Options_auto_adjust    #       Bool
  256. DrawFile_Options_show           #       Bool
  257. DrawFile_Options_lock           #       Bool
  258. DrawFile_Options_cm             #       Bool
  259. DrawFile_Options_zoom_mul       #       Int
  260. DrawFile_Options_zoom_div       #       Int
  261. DrawFile_Options_zoom_lock      #       Bool
  262. DrawFile_Options_toolbox        #       Bool
  263. DrawFile_Options_entry_mode     #       DrawFile_EntryMode
  264. DrawFile_Options_undo_size      #       Int
  265. DrawFile_Options                *       @
  266.  
  267.                                 ^       0
  268. DrawFile_TrfmText_bbox          #       OS_Box
  269. DrawFile_TrfmText_trfm          #       OS_Trfm
  270. DrawFile_TrfmText_flags         #       DrawFile_TextFlags
  271. DrawFile_TrfmText_fill          #       OS_Colour
  272. DrawFile_TrfmText_bg_hint       #       OS_Colour
  273. DrawFile_TrfmText_style         #       DrawFile_TextStyle
  274. DrawFile_TrfmText_xsize         #       Int
  275. DrawFile_TrfmText_ysize         #       Int
  276. DrawFile_TrfmText_base          #       OS_Coord
  277. DrawFile_TrfmText_text          #       Char
  278. DrawFile_TrfmText               *       @
  279.  
  280.                                 ^       0
  281. DrawFile_TrfmSprite_bbox        #       OS_Box
  282. DrawFile_TrfmSprite_trfm        #       OS_Trfm
  283. DrawFile_TrfmSprite_header      #       OSSpriteOp_Header
  284. DrawFile_TrfmSprite_data        #       Byte
  285. DrawFile_TrfmSprite             *       @
  286.  
  287.                                 ^       0
  288. DrawFile_JPEG_bbox              #       OS_Box
  289. DrawFile_JPEG_width             #       Int
  290. DrawFile_JPEG_height            #       Int
  291. DrawFile_JPEG_xdpi              #       Int
  292. DrawFile_JPEG_ydpi              #       Int
  293. DrawFile_JPEG_trfm              #       OS_Trfm
  294. DrawFile_JPEG_len               #       Int
  295. DrawFile_JPEG_image             #       JPEG_Image
  296. DrawFile_JPEG                   *       @
  297.  
  298.                                 ^       0
  299. DrawFile_Object_type            #       DrawFile_Type
  300. DrawFile_Object_size            #       Int
  301. DrawFile_Object_data            *       @
  302. DrawFile_Object_data_font_table #       DrawFile_FontTable
  303.                                 ^       DrawFile_Object_data
  304. DrawFile_Object_data_text       #       DrawFile_Text
  305.                                 ^       DrawFile_Object_data
  306. DrawFile_Object_data_path       #       DrawFile_Path
  307.                                 ^       DrawFile_Object_data
  308. DrawFile_Object_data_path_with_pattern #       DrawFile_PathWithPattern
  309.                                 ^       DrawFile_Object_data
  310. DrawFile_Object_data_sprite     #       DrawFile_Sprite
  311.                                 ^       DrawFile_Object_data
  312. DrawFile_Object_data_group      #       DrawFile_Group
  313.                                 ^       DrawFile_Object_data
  314. DrawFile_Object_data_tagged     #       DrawFile_Tagged
  315.                                 ^       DrawFile_Object_data
  316. DrawFile_Object_data_text_column #       DrawFile_TextColumn
  317.                                 ^       DrawFile_Object_data
  318. DrawFile_Object_data_text_area  #       DrawFile_TextArea
  319.                                 ^       DrawFile_Object_data
  320. DrawFile_Object_data_options    #       DrawFile_Options
  321.                                 ^       DrawFile_Object_data
  322. DrawFile_Object_data_trfm_text  #       DrawFile_TrfmText
  323.                                 ^       DrawFile_Object_data
  324. DrawFile_Object_data_trfm_sprite #       DrawFile_TrfmSprite
  325.                                 ^       DrawFile_Object_data
  326. DrawFile_Object_data_jpeg       #       DrawFile_JPEG
  327. DrawFile_Object                 *       @
  328.  
  329.                                 ^       0
  330. DrawFile_Diagram_tag            #       4*Char
  331. DrawFile_Diagram_major_version  #       Int
  332. DrawFile_Diagram_minor_version  #       Int
  333. DrawFile_Diagram_source         #       12*Char
  334. DrawFile_Diagram_bbox           #       OS_Box
  335. DrawFile_Diagram_objects        #       DrawFile_Object
  336. DrawFile_Diagram                *       @
  337.  
  338. DrawFile_BBoxFlags              *       Bits
  339.  
  340.                                 ^       0
  341. DrawFile_RenderState_object     #       Ptr
  342. DrawFile_RenderState_diagram    #       Ptr
  343. DrawFile_RenderState_font_table #       Ptr
  344. DrawFile_RenderState_flags      #       DrawFile_RenderFlags
  345. DrawFile_RenderState_trfm       #       Ptr
  346. DrawFile_RenderState_clip       #       Ptr
  347. DrawFile_RenderState_flatness   #       Int
  348. DrawFile_RenderState_error      #       Ptr
  349. DrawFile_RenderState            *       @
  350.  
  351.                                 ^       0
  352. DrawFile_DeclareFontsState_object #       Ptr
  353. DrawFile_DeclareFontsState_diagram #       Ptr
  354. DrawFile_DeclareFontsState_font_table #       Ptr
  355. DrawFile_DeclareFontsState_flags #       DrawFile_DeclareFontsFlags
  356. DrawFile_DeclareFontsState_error #       Ptr
  357. DrawFile_DeclareFontsState      *       @
  358.  
  359.  
  360. ;Symbols for SWI's and SWI reason codes
  361. XDrawFile_Render                *       &65540
  362. DrawFile_Render                 *       &45540
  363.    ;Entry
  364.    ;  R0 = flags (DrawFile_RenderFlags)
  365.    ;  R1 -> diagram (DrawFile_Diagram)
  366.    ;  R2 = size (Int)
  367.    ;  R3 -> trfm (OS_Trfm)
  368.    ;  R4 -> clip (OS_Box)
  369.    ;  R5 = flatness (Int)
  370.  
  371. XDrawFile_BBox                  *       &65541
  372. DrawFile_BBox                   *       &45541
  373.    ;Entry
  374.    ;  R0 = flags (DrawFile_BBoxFlags)
  375.    ;  R1 -> diagram (DrawFile_Diagram)
  376.    ;  R2 = size (Int)
  377.    ;  R3 -> trfm (OS_Trfm)
  378.    ;  R4 = bbox (pointer to OS_Box)
  379.  
  380. XDrawFile_DeclareFonts          *       &65542
  381. DrawFile_DeclareFonts           *       &45542
  382.    ;Entry
  383.    ;  R0 = flags (DrawFile_DeclareFontsFlags)
  384.    ;  R1 -> diagram (DrawFile_Diagram)
  385.    ;  R2 = size (Int)
  386.  
  387. Service_DrawObjectRender        *       &45540
  388.    ;Entry
  389.    ;  R0 = type (DrawFile_Type)
  390.    ;  R1 = &45540
  391.    ;  R2 = state (pointer to DrawFile_RenderState)
  392.    ;Exit
  393.    ;  R1 = unclaimed (Bool)
  394.  
  395. Service_DrawObjectDeclareFonts  *       &45541
  396.    ;Entry
  397.    ;  R0 = type (DrawFile_Type)
  398.    ;  R1 = &45541
  399.    ;  R2 = state (pointer to DrawFile_DeclareFontsState)
  400.    ;Exit
  401.    ;  R1 = unclaimed (Bool)
  402.  
  403.         ]
  404.         END
  405.