On Wed, 30 Aug 2000, Jon M. Taylor wrote:

> On Tue, 29 Aug 2000, Christoph Egger wrote:
> 
> > > Tell us what you need, tell us _that_ you need it, give us a hand
> > > implementing it, report bugs, and so on !
> > 
> > Well, I need GGI for OS indepence. And I need a working libgpf (Andreas?), 
> 
>       I assume LibGPF == GGI font support?

No. LibGPF == Generic Picture Format

>  Don't let me forget to send
> you that code, Andy.  We could produce a quite nice LibGPF fairly quickly.

The API does exist. I designed it together with Andy some time ago. I've
attached it.

 
> > a
> > working libggi3d (Jon?) 
> 
>       What needs to be done, other than nailing down a few loose ends (I
> haven't touched LibGGI3D in a long time)?  Are there architectural
> problems, or do you just need it to build properly? |->.

Both. libggi3d is _not_ in an useable state. It lacks of completness.

You said, libggi3d should have a dynamic retargetting-system. Is that
finished? Or did I get something wrong?

 
> > and a working libxmi (Jon?) ...
> 
>       Again, what's missing?  LibXMI doesn't yet have an accelerated
> target, but the API functionality should be close to complete.  And I
> built and tested LibXMI yesterday, so....

Yes, the API is functional. But: It misses some features like Z-Buffer-support
used by 3d-libs...

We discussed about that some month ago according to 3DtoolKit. Do you remember?


CU, 

Christoph Egger
E-Mail: [EMAIL PROTECTED]
/*
******************************************************************************

   LibGPF API header file

   Copyright (C) 2000 Christoph Egger   [[EMAIL PROTECTED]]
   Copyright (C) 2000 Andreas Beck      [[EMAIL PROTECTED]]

   Permission is hereby granted, free of charge, to any person obtaining a
   copy of this software and associated documentation files (the "Software"),
   to deal in the Software without restriction, including without limitation
   the rights to use, copy, modify, merge, publish, distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the
   Software is furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
   THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
   IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

******************************************************************************
*/


#ifndef _GPF_H
#define _GPF_H


#include <stdio.h>
#include <stdlib.h>

/* Startup/Shutdown:
 */

int gpfInit(void);
int gpfExit(void);
int gpfPanic(const char *format,...);

/* Opening and Closing picture sources
 */

typedef struct gpf_handle_t {
        FILE *f;
} gpf_handle_t;


gpf_handle_t gpfOpen(const char *URL, const char *driverandoptions, ...);

/* This really is:
    gpf_handle_t gpfOpen(const char *URL, const char *driverandoptions,
             void *URLoptions,void *driveroptions);
    The void * allows to give arbitrarily complex stuff to both the
    URL decoding and loading driver and the fileformat driver. */

/* These are wrappers to conveniently access some common cases */
gpf_handle_t gpfOpenTcpStream(const char *socket, const char *driverandoptions, ...);
gph_handle_t gpfOpenCallback(void *cb, const char *driverandoptions, ...);

/* Open a file of a given type (NULL in driverandoptions for autoselect).
 */


gpfClose (gpf_handle_t handle);

/* Close a given stream, flush buffers and free ressources.
 */

int gpfSelectImage(gpf_handle_t handle,int imagenumber);

/* for multiimage Formats
*/

#define GPF_MAXNUMBITS  128

typedef struct gpf_pixelformat_t {
        char channel;   /* r,g,b,a, y,u,v, C,M,Y,K... */
        char bitnumber; /* bit # of channel */
};

typedef struct {
        int width,height;
        gpf_pixelformat_t pixelformat[GPF_MAXNUMBITS];  /* We can probably borrow from 
DirectBuffer here */
} gpf_imageinfo_t;

int gpfGetImageInfo(gpf_handle_t handle,gpf_imageinfo_t *info);

/* get the most important image data */


/* high-level stuff */

typedef void (*gpfIndicatorCallback)(int current, int total);

typedef int (*gpfReadCallback)(int x,int y, int width,int height, void *data, int 
pixelwidth);
typedef int (*gpfWriteCallback)(int x,int y, int width,int height, void *data, int 
pixelwidth);

gpfRead(gpf_handle_t handle,gpfReadCallback cbR, gpfIndicatorCallback cbI);

/* Try to read the selected image. the callback will be used like you would use
 * write() and PutBox(); I.e. you call it with the rectangle you have data for
 * and it returns the number of pixels it processed. This gives a small complication,
 * if it doesn't accept whole lines, but that can be taken care of by a single
 * glue function that handles the case by trying to first send the rest of
 * incomplete lines.
 *
 * The reader-libs should use reasonably sized buffers, like one line for simple
 * format, or 8 lines for JPG. Don't know yet what to do about interlaced or
 * progressive formats.
 *
 * If the cbI callback function is not NULL, it will be called 100 times
 * during the reading, allowing you to display a progress indicator.
 */

gpfWrite(gpf_handle_t handle, gpfWriteCallback cbW, gpfIndicatorCallback cbI);

/* Similar to gpfRead.
 */


#endif  /* _GPF_H */
/*
******************************************************************************

   LibGPF lowlevel API header file

   Copyright (C) 2000 Christoph Egger   [[EMAIL PROTECTED]]
   Copyright (C) 2000 Andreas Beck      [[EMAIL PROTECTED]]

   Permission is hereby granted, free of charge, to any person obtaining a
   copy of this software and associated documentation files (the "Software"),
   to deal in the Software without restriction, including without limitation
   the rights to use, copy, modify, merge, publish, distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the
   Software is furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
   THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
   IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

******************************************************************************
*/

#ifndef _GPF_LOW_LEVEL_H
#define _GPF_LOW_LEVEL_H

#include <stdlib.h>     /* need "size_t" */
#include <gpf/gpf.h>


int gpfStartReadImage(gpf_handle_t handle);

/* start to read the image. Returns 0 on success, otherwise the returnvalue is < 0.
 */

int gpfReadNextTile(gpf_handle_t handle, void *buf, size_t bufsize, gpfReadCallback 
cbR);

/* read the next tile of the image into "buf". If the cbR callback function is not 
 * NULL, it will be called "count" times. The read data is stored in "buf".
 */

int gpfReadStop(gpf_handle_t handle);

/* stop to read and frees the buffers
 */


int gpfStartWriteImage(gpf_handle_t handle)

/* start to write the image. Returns 0 on success, otherwise the returnvalue is < 0.
 */

int gpfWriteNextTile(gpf_handle_t handle, void *buf, size_t bufsize, gpfWriteCallback 
cbW);

/* write the next tile of the image from "buf". If the cbW callback function is not
 * NULL, it will be called "count" times. The data from "buf" will be written.
 */

int gpfWriteStop(gpf_handle_t handle);

/* stop to write and frees the buffers
 */


#endif  /* _GPF_LOW_LEVEL_H */

Reply via email to