home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / desklib / !DeskLib / h_doc / Clear < prev    next >
Encoding:
Text File  |  1996-05-21  |  1.9 KB  |  85 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Clear.h
  12.     Author:  Copyright © 1994 Jason Howat
  13.     Version: 1.01 (30 Jun 1994)
  14.     Purpose: Clear file manipulation routines.
  15. */
  16.  
  17.  
  18. #ifndef __Desk_Clear_h
  19. #define __Desk_Clear_h
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25.  
  26. #ifndef __Desk_Wimp_h
  27. #include "Wimp.h"
  28. #endif
  29.  
  30.  
  31. typedef struct
  32. {
  33.   char          *creator;
  34.   unsigned      creatorversion;
  35.  
  36.   unsigned      width,
  37.                 height;
  38.   unsigned      bpp;
  39.  
  40.   Desk_palette_entry *palette;
  41.   unsigned char *bitmap;
  42. } Desk_clear_picture;
  43.  
  44.  
  45. void Desk_Clear_Init(char *creator, unsigned version);
  46. /*
  47. Initialises the Clear library with details of the Clear file creating
  48. program -- only needed if you use Desk_Clear_Save().  creator is the name of
  49. the program.  version is the version number of the program * 100.
  50. */
  51.  
  52.  
  53. Desk_clear_picture *Desk_Clear_Load(char *filename);
  54. /*
  55. Attempt to read a picture from the given Clear file.  Returns NULL if
  56. there is an error.
  57. */
  58.  
  59.  
  60. void Desk_Clear_Save(Desk_clear_picture *picture, char *filename);
  61. /*
  62. Write the given picture to a file.
  63. */
  64.  
  65.  
  66. Desk_clear_picture *Desk_Clear_Create(unsigned width, unsigned height, unsigned bpp);
  67. /*
  68. Allocate memory for a picture of the given dimensions.  Returns NULL if
  69. it fails.
  70. */
  71.  
  72.  
  73. void Desk_Clear_Free(Desk_clear_picture *picture);
  74. /*
  75. Deallocate all memory used by the given picture.
  76. */
  77.  
  78.  
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.  
  83.  
  84. #endif
  85.