Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Functions | Variables
xpmP.h File Reference
#include "xpm.h"
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include "mzconfig.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xpmData
struct  xpmDataType
struct  xpmRgbName
struct  _xpmHashAtom
struct  xpmHashTable
union  xpmData.stream

Defines

#define XpmMalloc(size)   malloc((size))
#define XpmRealloc(ptr, size)   realloc((ptr), (size))
#define XpmCalloc(nelem, elsize)   calloc((nelem), (elsize))
#define XPMMAXCMTLEN   BUFSIZ
#define XPMARRAY   0
#define XPMFILE   1
#define XPMPIPE   2
#define XPMBUFFER   3
#define EOL   '\n'
#define TAB   '\t'
#define SPC   ' '
#define MAX_RGBNAMES   1024
#define TRANSPARENT_COLOR   "None" /* this must be a string! */
#define NKEYS   5
#define xpmGetC(mdata)
#define XYNORMALIZE(bp, img)
#define ZNORMALIZE(bp, img)
#define XYINDEX(x, y, img)
#define ZINDEX(x, y, img)
#define ZINDEX32(x, y, img)   ((y) * img->bytes_per_line) + ((x) << 2)
#define ZINDEX16(x, y, img)   ((y) * img->bytes_per_line) + ((x) << 1)
#define ZINDEX8(x, y, img)   ((y) * img->bytes_per_line) + (x)
#define ZINDEX1(x, y, img)   ((y) * img->bytes_per_line) + ((x) >> 3)
#define Const
#define HashAtomData(i)   ((void *)i)
#define HashColorIndex(slot)   ((unsigned int)((*slot)->data))
#define USE_HASHTABLE   (cpp > 2 && ncolors > 4)

Typedefs

typedef struct _xpmHashAtomxpmHashAtom

Functions

 FUNC (xpmParseData, int,(xpmData *data, XpmImage *image, XpmInfo *info))
 FUNC (xpmFreeColorTable, void,(XpmColor *colorTable, int ncolors))
 FUNC (xpmInitAttributes, void,(XpmAttributes *attributes))
 FUNC (xpmInitXpmImage, void,(XpmImage *image))
 FUNC (xpmInitXpmInfo, void,(XpmInfo *info))
 FUNC (xpmSetInfoMask, void,(XpmInfo *info, XpmAttributes *attributes))
 FUNC (xpmSetInfo, void,(XpmInfo *info, XpmAttributes *attributes))
 FUNC (xpmSetAttributes, void,(XpmAttributes *attributes, XpmImage *image, XpmInfo *info))
 FUNC (xpmCreatePixmapFromImage, void,(Display *display, Drawable d, XImage *ximage, Pixmap *pixmap_return))
 FUNC (xpmCreateImageFromPixmap, void,(Display *display, Pixmap pixmap, XImage **ximage_return, unsigned int *width, unsigned int *height))
 FUNC (xpmNextString, int,(xpmData *mdata))
 FUNC (xpmNextUI, int,(xpmData *mdata, unsigned int *ui_return))
 FUNC (xpmGetString, int,(xpmData *mdata, char **sptr, unsigned int *l))
 FUNC (xpmNextWord, unsigned int,(xpmData *mdata, char *buf, unsigned int buflen))
 FUNC (xpmGetCmt, int,(xpmData *mdata, char **cmt))
 FUNC (xpmParseHeader, int,(xpmData *mdata))
 FUNC (xpmReadRgbNames, int,(char *rgb_fname, xpmRgbName *rgbn))
 FUNC (xpmGetRgbName, char *,(xpmRgbName *rgbn, int rgbn_max, int red, int green, int blue))
 FUNC (xpmFreeRgbNames, void,(xpmRgbName *rgbn, int rgbn_max))
 FUNC (xpm_xynormalizeimagebits, void,(register unsigned char *bp, register XImage *img))
 FUNC (xpm_znormalizeimagebits, void,(register unsigned char *bp, register XImage *img))
 FUNC (xpmHashTableInit, int,(xpmHashTable *table))
 FUNC (xpmHashTableFree, void,(xpmHashTable *table))
 FUNC (xpmHashSlot, xpmHashAtom *,(xpmHashTable *table, char *s))
 FUNC (xpmHashIntern, int,(xpmHashTable *table, char *tag, void *data))
 FUNC (xpmatoui, unsigned int,(char *p, unsigned int l, unsigned int *ui_return))

Variables

xpmDataType xpmDataTypes []
char * xpmColorKeys []

Class Documentation

struct xpmData

Definition at line 112 of file xpmP.h.

Class Members
char * Bcmt
char Bos
char Comment
int CommentLength
char * cptr
char * Ecmt
char Eos
int format
unsigned int line
union xpmData stream
unsigned int type
struct xpmDataType

Definition at line 135 of file xpmP.h.

Class Members
char * Bcmt
char * Boa
char Bos
char * Dec
char * Ecmt
char * Eoa
char Eos
char * Strs
char * type
struct xpmRgbName

Definition at line 153 of file xpmP.h.

Class Members
int b
int g
char * name
int r
struct _xpmHashAtom

Definition at line 276 of file xpmP.h.

Class Members
void * data
char * name
struct xpmHashTable

Definition at line 281 of file xpmP.h.

Collaboration diagram for xpmHashTable:
Class Members
xpmHashAtom * atomTable
int limit
int size
int used
union xpmData.stream

Definition at line 114 of file xpmP.h.

Class Members
char ** data
FILE * file

Define Documentation

#define Const

Definition at line 269 of file xpmP.h.

#define EOL   '\n'

Definition at line 131 of file xpmP.h.

#define HashAtomData (   i)    ((void *)i)

Definition at line 293 of file xpmP.h.

#define HashColorIndex (   slot)    ((unsigned int)((*slot)->data))

Definition at line 294 of file xpmP.h.

#define MAX_RGBNAMES   1024

Definition at line 159 of file xpmP.h.

#define NKEYS   5

Definition at line 166 of file xpmP.h.

#define SPC   ' '

Definition at line 133 of file xpmP.h.

#define TAB   '\t'

Definition at line 132 of file xpmP.h.

#define TRANSPARENT_COLOR   "None" /* this must be a string! */

Definition at line 163 of file xpmP.h.

#define USE_HASHTABLE   (cpp > 2 && ncolors > 4)

Definition at line 295 of file xpmP.h.

#define XPMARRAY   0

Definition at line 126 of file xpmP.h.

#define XPMBUFFER   3

Definition at line 129 of file xpmP.h.

#define XpmCalloc (   nelem,
  elsize 
)    calloc((nelem), (elsize))

Definition at line 102 of file xpmP.h.

#define XPMFILE   1

Definition at line 127 of file xpmP.h.

#define xpmGetC (   mdata)
Value:
((!mdata->type || mdata->type == XPMBUFFER) ? \
        (*mdata->cptr++) : (getc(mdata->stream.file)))

Definition at line 199 of file xpmP.h.

#define XpmMalloc (   size)    malloc((size))

Definition at line 100 of file xpmP.h.

#define XPMMAXCMTLEN   BUFSIZ

Definition at line 111 of file xpmP.h.

#define XPMPIPE   2

Definition at line 128 of file xpmP.h.

#define XpmRealloc (   ptr,
  size 
)    realloc((ptr), (size))

Definition at line 101 of file xpmP.h.

#define XYINDEX (   x,
  y,
  img 
)
Value:
((y) * img->bytes_per_line) + \
    (((x) + img->xoffset) / img->bitmap_unit) * (img->bitmap_unit >> 3)

Definition at line 251 of file xpmP.h.

#define XYNORMALIZE (   bp,
  img 
)
Value:
if ((img->byte_order == MSBFirst) || (img->bitmap_bit_order == MSBFirst)) \
       xpm_xynormalizeimagebits((unsigned char *)(bp), img)

Definition at line 243 of file xpmP.h.

#define ZINDEX (   x,
  y,
  img 
)
Value:
((y) * img->bytes_per_line) + \
    (((x) * img->bits_per_pixel) >> 3)

Definition at line 255 of file xpmP.h.

#define ZINDEX1 (   x,
  y,
  img 
)    ((y) * img->bytes_per_line) + ((x) >> 3)

Definition at line 264 of file xpmP.h.

#define ZINDEX16 (   x,
  y,
  img 
)    ((y) * img->bytes_per_line) + ((x) << 1)

Definition at line 260 of file xpmP.h.

#define ZINDEX32 (   x,
  y,
  img 
)    ((y) * img->bytes_per_line) + ((x) << 2)

Definition at line 258 of file xpmP.h.

#define ZINDEX8 (   x,
  y,
  img 
)    ((y) * img->bytes_per_line) + (x)

Definition at line 262 of file xpmP.h.

#define ZNORMALIZE (   bp,
  img 
)
Value:
if (img->byte_order == MSBFirst) \
       xpm_znormalizeimagebits((unsigned char *)(bp), img)

Definition at line 247 of file xpmP.h.


Typedef Documentation


Function Documentation

FUNC ( xpmFreeColorTable  ,
void  ,
(XpmColor *colorTable, int ncolors)   
)
FUNC ( xpmInitAttributes  ,
void  ,
(XpmAttributes *attributes)   
)
FUNC ( xpmInitXpmImage  ,
void  ,
(XpmImage *image  
)
FUNC ( xpmInitXpmInfo  ,
void  ,
(XpmInfo *info  
)
FUNC ( xpmSetInfoMask  ,
void  ,
(XpmInfo *info, XpmAttributes *attributes)   
)
FUNC ( xpmSetInfo  ,
void  ,
(XpmInfo *info, XpmAttributes *attributes)   
)
FUNC ( xpmSetAttributes  ,
void  ,
(XpmAttributes *attributes, XpmImage *image, XpmInfo *info  
)
FUNC ( xpmCreatePixmapFromImage  ,
void  ,
(Display *display, Drawable d, XImage *ximage, Pixmap *pixmap_return)   
)
FUNC ( xpmCreateImageFromPixmap  ,
void  ,
(Display *display, Pixmap pixmap, XImage **ximage_return, unsigned int *width, unsigned int *height  
)
FUNC ( xpmNextString  ,
int  ,
(xpmData *mdata)   
)
FUNC ( xpmNextUI  ,
int  ,
(xpmData *mdata, unsigned int *ui_return)   
)
FUNC ( xpmGetString  ,
int  ,
(xpmData *mdata, char **sptr, unsigned int *l)   
)
FUNC ( xpmNextWord  ,
unsigned  int,
(xpmData *mdata, char *buf, unsigned int buflen)   
)
FUNC ( xpmGetCmt  ,
int  ,
(xpmData *mdata, char **cmt)   
)
FUNC ( xpmParseHeader  ,
int  ,
(xpmData *mdata)   
)
FUNC ( xpmReadRgbNames  ,
int  ,
(char *rgb_fname, xpmRgbName *rgbn)   
)
FUNC ( xpmGetRgbName  ,
char *  ,
(xpmRgbName *rgbn, int rgbn_max, int red, int green, int blue)   
)
FUNC ( xpmFreeRgbNames  ,
void  ,
(xpmRgbName *rgbn, int rgbn_max)   
)
FUNC ( xpm_xynormalizeimagebits  ,
void  ,
(register unsigned char *bp, register XImage *img)   
)
FUNC ( xpm_znormalizeimagebits  ,
void  ,
(register unsigned char *bp, register XImage *img)   
)
FUNC ( xpmHashTableInit  ,
int  ,
(xpmHashTable *table)   
)
FUNC ( xpmHashTableFree  ,
void  ,
(xpmHashTable *table)   
)
FUNC ( xpmHashSlot  ,
xpmHashAtom ,
(xpmHashTable *table, char *s)   
)
FUNC ( xpmHashIntern  ,
int  ,
(xpmHashTable *table, char *tag, void *data  
)
FUNC ( xpmatoui  ,
unsigned  int,
(char *p, unsigned int l, unsigned int *ui_return)   
)

Variable Documentation

char* xpmColorKeys[]

Definition at line 66 of file parse.c.

Definition at line 387 of file data.c.