Back to index

plt-scheme  4.2.1
wbmp.h
Go to the documentation of this file.
00001 /* WBMP
00002 ** ----
00003 ** WBMP Level 0: B/W, Uncompressed
00004 ** This implements the WBMP format as specified in WAPSpec 1.1 and 1.2.
00005 ** It does not support ExtHeaders as defined in the spec. The spec states
00006 ** that a WAP client does not need to implement ExtHeaders.
00007 **
00008 ** (c) 2000 Johan Van den Brande <johan@vandenbrande.com>
00009 **
00010 ** Header file
00011 */
00012 #ifndef __WBMP_H
00013 #define __WBMP_H     1
00014 
00015 
00016 /* WBMP struct
00017 ** -----------
00018 ** A Wireless bitmap structure
00019 **
00020 */
00021 
00022 typedef struct Wbmp_
00023 {
00024   int type;                 /* type of the wbmp */
00025   int width;                /* width of the image */
00026   int height;               /* height of the image */
00027   int *bitmap;                     /* pointer to data: 0 = WHITE , 1 = BLACK */
00028 }
00029 Wbmp;
00030 
00031 #define WBMP_WHITE  1
00032 #define WBMP_BLACK  0
00033 
00034 
00035 /* Proto's
00036 ** -------
00037 **
00038 */
00039 void putmbi (int i, void (*putout) (int c, void *out), void *out);
00040 int getmbi (int (*getin) (void *in), void *in);
00041 int skipheader (int (*getin) (void *in), void *in);
00042 Wbmp *createwbmp (int width, int height, int color);
00043 int readwbmp (int (*getin) (void *in), void *in, Wbmp ** wbmp);
00044 int writewbmp (Wbmp * wbmp, void (*putout) (int c, void *out), void *out);
00045 void freewbmp (Wbmp * wbmp);
00046 void printwbmp (Wbmp * wbmp);
00047 
00048 #endif