blob: 1698b8afb2e55ae02c402406e963aafd1a261dfb [file] [log] [blame]
Jonathan Gordondb658d92010-06-17 08:36:28 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: skin_buffer.c 25962 2010-05-12 09:31:40Z jdgordon $
9 *
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
11 * Copyright (C) 2009 Jonathan Gordon
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22
23#include <stdio.h>
24#include <string.h>
25#include <stdlib.h>
26#ifndef _SKIN_BUFFFER_H_
27#define _SKIN_BUFFFER_H_
Jonathan Gordon2d31d772010-07-29 12:37:48 +000028void skin_buffer_init(char* buffer, size_t size);
Jonathan Gordondb658d92010-06-17 08:36:28 +000029/* Allocate size bytes from the buffer */
30void* skin_buffer_alloc(size_t size);
Jonathan Gordon95b0cef2010-06-17 13:54:09 +000031
32/* get the number of bytes currently being used */
33size_t skin_buffer_usage(void);
34size_t skin_buffer_freespace(void);
Jonathan Gordon2d31d772010-07-29 12:37:48 +000035
36/* save and restore a buffer position incase a skin fails to load */
37void skin_buffer_save_position(void);
38void skin_buffer_restore_position(void);
Jonathan Gordondb658d92010-06-17 08:36:28 +000039#endif