Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
3.6 KiB

  1. /****************************************************************************
  2. Unit GetData; Interface
  3. *****************************************************************************
  4. GetData implements the structured reading of the imput stream. As such, it
  5. will handle the necessary byte-swapping that must occur when reading a
  6. native Macintosh file. It will also perform some data validation and
  7. perform limited coordinate transformations on the input data.
  8. Module Prefix: Get
  9. *****************************************************************************/
  10. /*********************** Exported Function Definitions **********************/
  11. #define /* void */ GetByte( /* Byte far * */ byteLPtr ) \
  12. /* Retrieves an 8-bit unsigned byte from the input stream */ \
  13. IOGetByte( byteLPtr )
  14. void GetWord( Word far * wordLPtr );
  15. /* Clears destination then retrieves an 16-bit unsigned integer from the input
  16. stream */
  17. void GetDWord( DWord far * dwordLPtr );
  18. /* Retrieves a 32-bit unsigned long from the input stream */
  19. void GetBoolean( Boolean far * bool );
  20. /* Retrieves an 8-bit Mac boolean and coverts to 16-bit Windows Boolean */
  21. #define /* void */ GetFixed( /* Fixed far * */ fixedLPtr ) \
  22. /* Retrieved a fixed point number consisting of 16-bit whole \
  23. and 16-bit fraction */ \
  24. GetDWord( (DWord far *)fixedLPtr )
  25. /* Retrieves POINT structure without coordinate transforms */
  26. #ifdef WIN32
  27. void GetPoint( Point * pointLPtr );
  28. #else
  29. #define /* void */ GetPoint( /* Point far * */ pointLPtr ) \
  30. /* Retrieves POINT structure without coordinate transforms */ \
  31. GetDWord( (DWord far *)pointLPtr )
  32. #endif
  33. #ifdef WIN32
  34. void GetCoordinate( Point * pointLPtr );
  35. #else
  36. #define /* void */ GetCoordinate( /* Point far * */ pointLPtr ) \
  37. /* Retrieves POINT structure without coordinte transforms */ \
  38. GetDWord( (DWord far *)pointLPtr )
  39. #endif
  40. void GetRect( Rect far * rect);
  41. /* Returns a RECT structure consisting of upper left and lower right
  42. coordinate pair */
  43. void GetString( StringLPtr stringLPtr );
  44. /* Retrieves a Pascal-style string and formats it C-style. If the input
  45. parameter is NIL, then the ensuing data is simply skipped */
  46. void GetRGBColor( RGBColor far * rgbLPtr );
  47. /* Returns an RGB color */
  48. void GetOctochromeColor( RGBColor far * rgbLPtr );
  49. /* Returns an RGB color - this will be converted from a PICT octochrome
  50. color if this is a version 1 picture */
  51. Boolean GetPolygon( Handle far * polyHandleLPtr, Boolean check4Same );
  52. /* Retrieves a polygon definition from the I/O stream and places in the
  53. Handle passed down. If the handle is previously != NIL, then the
  54. previous data is de-allocated.
  55. If check4Same is TRUE, then the routine will compare the point list
  56. against the previous polygon definition, checking for equality. If
  57. pointlists match, then the routine returns TRUE, otherwise, it will
  58. always return FALSE. Use this to merge fill and frame operations. */
  59. void GetRegion( Handle far * rgnHandleLPtr );
  60. /* Retrieves a region definition from the I/O stream and places in the
  61. Handle passed down. If the handle is previously != NIL, then the
  62. previous data is de-allocated. */
  63. void GetPattern( Pattern far * patLPtr );
  64. /* Returns a Pattern structure */
  65. void GetColorTable( Handle far * colorHandleLPtr );
  66. void GetPixPattern( PixPatLPtr pixPatLPtr );
  67. /* Retrieves a Pixel Pattern structure. */
  68. void GetPixMap( PixMapLPtr pixMapLPtr, Boolean forcePixMap );
  69. /* Retrieves a Pixel Map from input stream */
  70. void GetPixData( PixMapLPtr pixMapLPtr, Handle far * pixDataHandle );
  71. /* Read a pixel map from the data stream */