Back to index

plt-scheme  4.2.1
Functions
CrIFrBuf.c File Reference
#include "xpmP.h"

Go to the source code of this file.

Functions

 LFUNC (OpenBuffer, void,(char *buffer, xpmData *mdata))
int XpmCreateImageFromBuffer (Display *display, char *buffer, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes)
int XpmCreateXpmImageFromBuffer (char *buffer, XpmImage *image, XpmInfo *info)
static void OpenBuffer (char *buffer, xpmData *mdata)

Function Documentation

LFUNC ( OpenBuffer  ,
void  ,
(char *buffer, xpmData *mdata)   
)
static void OpenBuffer ( char *  buffer,
xpmData mdata 
) [static]

Definition at line 104 of file CrIFrBuf.c.

{
    mdata->type = XPMBUFFER;
    mdata->cptr = buffer;
    mdata->CommentLength = 0;
}

Here is the caller graph for this function:

int XpmCreateImageFromBuffer ( Display *  display,
char *  buffer,
XImage **  image_return,
XImage **  shapeimage_return,
XpmAttributes attributes 
)

Definition at line 40 of file CrIFrBuf.c.

{
    XpmImage image;
    XpmInfo info;
    int ErrorStatus;

    /* create an XpmImage from the buffer */
    if (attributes) {
       xpmInitAttributes(attributes);
       xpmSetInfoMask(&info, attributes);
       ErrorStatus = XpmCreateXpmImageFromBuffer(buffer, &image, &info);
    } else
       ErrorStatus = XpmCreateXpmImageFromBuffer(buffer, &image, NULL);

    if (ErrorStatus != XpmSuccess)
       return (ErrorStatus);

    /* create the related ximages */
    ErrorStatus = XpmCreateImageFromXpmImage(display, &image,
                                        image_return, shapeimage_return,
                                        attributes);
    if (attributes) {
       if (ErrorStatus >= 0)              /* no fatal error */
           xpmSetAttributes(attributes, &image, &info);
       XpmFreeXpmInfo(&info);
    }
    /* free the XpmImage */
    XpmFreeXpmImage(&image);

    return (ErrorStatus);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XpmCreateXpmImageFromBuffer ( char *  buffer,
XpmImage image,
XpmInfo info 
)

Definition at line 79 of file CrIFrBuf.c.

{
    xpmData mdata;
    int ErrorStatus;

    /* init returned values */
    xpmInitXpmImage(image);
    xpmInitXpmInfo(info);

    /* open buffer to read */
    OpenBuffer(buffer, &mdata);

    /* create the XpmImage from the XpmData */
    ErrorStatus = xpmParseData(&mdata, image, info);

    return (ErrorStatus);
}

Here is the call graph for this function:

Here is the caller graph for this function: