render_raw.h
author Tero Marttila <terom@fixme.fi>
Wed, 27 Aug 2008 21:30:32 +0300
changeset 41 540737bf6bac
parent 17 8e8b56b0e0f5
permissions -rw-r--r--
sending requests, and partial support for receiving -- incomplete, not tested
13
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
#ifndef RENDER_RAW_H
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
#define RENDER_RAW_H
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
#include "render.h"
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
/*
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
 * For rendering raw pixel data
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
 */
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
struct render_raw;
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
/*
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
 * Build and return a render_raw that can be used to handle the raw rendered pixel data.
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
 *
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
 * If render's I/O was set up with render_io_stream, the raw pixels will simply
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
 * be fwritten to that stream (and fflushed at the end). If I/O was set up with
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
 * render_io_custom, write_fn will be called with a row of pixel data (a buffer
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
 * img_w bytes long) for every row that's written. Flush_fn will be called once
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    18
 * all the pixels have been "written".
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    19
 *
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    20
 * returns NULL on failure.
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
 */
17
8e8b56b0e0f5 a half-working render_slices. Render_multi is currently semantically broken/buggy, but it's time to go to sleep
Tero Marttila <terom@fixme.fi>
parents: 13
diff changeset
    22
struct render_raw *render_raw_alloc (struct render *render);
13
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    23
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    24
/*
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    25
 * Feed a full row of raw pixel data to be handled
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    26
 *
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    27
 * buf must be render.img_w bytes wide.
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    28
 */
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    29
int render_raw_row (struct render_raw *ctx, unsigned char *rowbuf);
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    30
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    31
/*
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    32
 * Mark the render as complete and free the render_raw, flushing out any remaining data.
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    33
 */
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    34
int render_raw_done (struct render_raw *ctx);
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    35
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    36
/*
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    37
 * Abort the render, free the render_raw, and discard any remaining data.
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    38
 */
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    39
int render_raw_abort (struct render_raw *ctx);
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    40
ee426f453cf5 * fix some (of the) stupid things in Makefile
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    41
#endif /* RENDER_RAW_H */