home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / languages / progs / shell / h / BlockRct < prev    next >
Encoding:
Text File  |  1994-06-25  |  2.4 KB  |  85 lines

  1. #ifndef __Shell_BlockRect_h
  2. #define __Shell_BlockRect_h
  3.  
  4. #ifndef __Shell_h
  5. #include "Shell.Shell.h"
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. /*
  12. A 'blockrect' is a rectangle in a Shell_ window which is a rectangular array of blocks,
  13. which are different colours. It could be used to display an enlarged display of pixels.
  14.  
  15. To use, call Shell_AddGeneralBlockRect, and provide a function which returns the colour
  16. of any block
  17.  
  18. There are two types of blockrect: in the first
  19. Shell_AddGeneralBlockRect(...), you provide a function which returns an
  20. integer to be used in Wimp_SetColour. In the second,
  21. Shell_AddGeneralBlockRect2(...) you set the colour directly, allowing
  22. the use of ColourTrans etc.
  23. */
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. typedef int (*Shell_GeneralBlockRectFn) ( int x, int y, int maxx, int maxy, void *data);
  34.     /* You should provide a function like this            */
  35.     /* x, y specify the block whose colour you should return.    */
  36.     /* maxx, maxy give the size of the blockrect, which may be     */
  37.     /* useful.                            */
  38.  
  39. Shell_rectblock *Shell_AddGeneralBlockRect(
  40.     Shell_windblock    *wind,        /* Shell-window the block-rect is in            */
  41.     int        x,        /* Position of bottom-left of the            */
  42.     int        y,        /* block-rect.                        */
  43.     int         maxx,        /* Number of blocks in each direction ( so there    */
  44.     int        maxy,        /* will be (maxx*maxy) blocks in total.            */
  45.     int        width,        /* width of each block in OS coors.            */
  46.     int        height,        /* height of each block in OS coors.            */
  47.     Shell_GeneralBlockRectFn fn,    /* A function which returns the colour of any block    */
  48.     const void *reference         /* data to be passed to 'fn'                */
  49.     );
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. typedef void (*Shell_GeneralBlockRectFn2) ( int x, int y, int maxx, int maxy, void *data);
  61.     /* You should provide a function like this.            */
  62.     /* x, y specify the block whose colour you should set with     */
  63.     /* ColourTrans_SetGcol or Wimp_SetColour.            */
  64.     /* maxx, maxy give the size of the blockrect, which may be     */
  65.     /* useful.                            */
  66.  
  67. Shell_rectblock *Shell_AddGeneralBlockRect2(
  68.     Shell_windblock    *wind,        /* Shell-window the block-rect is in            */
  69.     int        x,        /* Position of bottom-left of the            */
  70.     int        y,        /* block-rect.                        */
  71.     int         maxx,        /* Number of blocks in each direction ( so there    */
  72.     int        maxy,        /* will be (maxx*maxy) blocks in total.            */
  73.     int        width,        /* width of each block in OS coors.            */
  74.     int        height,        /* height of each block in OS coors.            */
  75.     Shell_GeneralBlockRectFn2 fn,    /* A function which sets the gcol for block x,y        */
  76.     const void *reference         /* data to be passed to 'fn'                */
  77.     );
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. #endif
  85.