Back to index

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