home *** CD-ROM | disk | FTP | other *** search
- #ifndef __Shell_BlockRect_h
- #define __Shell_BlockRect_h
-
- #ifndef __Shell_h
- #include "Shell.Shell.h"
- #endif
-
-
-
-
- /*
- A 'blockrect' is a rectangle in a Shell_ window which is a rectangular array of blocks,
- which are different colours. It could be used to display an enlarged display of pixels.
-
- To use, call Shell_AddGeneralBlockRect, and provide a function which returns the colour
- of any block
-
- There are two types of blockrect: in the first
- Shell_AddGeneralBlockRect(...), you provide a function which returns an
- integer to be used in Wimp_SetColour. In the second,
- Shell_AddGeneralBlockRect2(...) you set the colour directly, allowing
- the use of ColourTrans etc.
- */
-
-
-
-
-
-
-
-
-
- typedef int (*Shell_GeneralBlockRectFn) ( int x, int y, int maxx, int maxy, void *data);
- /* You should provide a function like this */
- /* x, y specify the block whose colour you should return. */
- /* maxx, maxy give the size of the blockrect, which may be */
- /* useful. */
-
- Shell_rectblock *Shell_AddGeneralBlockRect(
- Shell_windblock *wind, /* Shell-window the block-rect is in */
- int x, /* Position of bottom-left of the */
- int y, /* block-rect. */
- int maxx, /* Number of blocks in each direction ( so there */
- int maxy, /* will be (maxx*maxy) blocks in total. */
- int width, /* width of each block in OS coors. */
- int height, /* height of each block in OS coors. */
- Shell_GeneralBlockRectFn fn, /* A function which returns the colour of any block */
- const void *reference /* data to be passed to 'fn' */
- );
-
-
-
-
-
-
-
-
-
-
- typedef void (*Shell_GeneralBlockRectFn2) ( int x, int y, int maxx, int maxy, void *data);
- /* You should provide a function like this. */
- /* x, y specify the block whose colour you should set with */
- /* ColourTrans_SetGcol or Wimp_SetColour. */
- /* maxx, maxy give the size of the blockrect, which may be */
- /* useful. */
-
- Shell_rectblock *Shell_AddGeneralBlockRect2(
- Shell_windblock *wind, /* Shell-window the block-rect is in */
- int x, /* Position of bottom-left of the */
- int y, /* block-rect. */
- int maxx, /* Number of blocks in each direction ( so there */
- int maxy, /* will be (maxx*maxy) blocks in total. */
- int width, /* width of each block in OS coors. */
- int height, /* height of each block in OS coors. */
- Shell_GeneralBlockRectFn2 fn, /* A function which sets the gcol for block x,y */
- const void *reference /* data to be passed to 'fn' */
- );
-
-
-
-
-
-
- #endif
-