2004-09-04 20:41:28 +04:00
|
|
|
/*
|
|
|
|
* This file is part of NetSurf, http://netsurf.sourceforge.net/
|
|
|
|
* Licensed under the GNU General Public License,
|
2005-06-23 21:22:28 +04:00
|
|
|
* http://www.opensource.org/licenses/gpl-license
|
2004-09-04 20:41:28 +04:00
|
|
|
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETSURF_RISCOS_BITMAP_H_
|
|
|
|
#define _NETSURF_RISCOS_BITMAP_H_
|
|
|
|
|
2005-06-23 21:22:28 +04:00
|
|
|
#include "oslib/osspriteop.h"
|
|
|
|
|
2004-09-04 20:41:28 +04:00
|
|
|
struct osspriteop_area;
|
|
|
|
|
2006-01-25 02:05:22 +03:00
|
|
|
typedef enum {
|
|
|
|
BITMAP_INITIALISE_DONE, /** Initialisation has been done */
|
|
|
|
BITMAP_INITIALISE_QUICK, /** Just allocate memory */
|
|
|
|
BITMAP_INITIALISE_FULL /** Clear the sprite buffer */
|
|
|
|
} bitmap_initialisation;
|
|
|
|
|
2004-09-04 20:41:28 +04:00
|
|
|
struct bitmap {
|
2004-10-18 01:16:00 +04:00
|
|
|
int width;
|
|
|
|
int height;
|
2005-06-23 21:22:28 +04:00
|
|
|
bool opaque;
|
|
|
|
bool modified;
|
|
|
|
bool persistent;
|
2006-01-25 02:05:22 +03:00
|
|
|
bitmap_initialisation init;
|
2005-06-23 21:22:28 +04:00
|
|
|
|
|
|
|
osspriteop_area *sprite_area; /** Uncompressed data, or NULL */
|
|
|
|
char *compressed; /** Compressed data, or NULL */
|
|
|
|
char filename[12]; /** Data filename, or '/0' */
|
|
|
|
|
|
|
|
struct bitmap *previous; /** Previous bitmap */
|
|
|
|
struct bitmap *next; /** Next bitmap */
|
|
|
|
|
2004-09-04 20:41:28 +04:00
|
|
|
};
|
|
|
|
|
2005-12-31 07:29:00 +03:00
|
|
|
struct bitmap *bitmap_create_file(char *file);
|
2005-06-23 21:22:28 +04:00
|
|
|
void bitmap_initialise_memory(void);
|
|
|
|
void bitmap_quit(void);
|
|
|
|
void bitmap_maintain(void);
|
|
|
|
|
|
|
|
/** Whether maintenance of the pool states is needed
|
|
|
|
*/
|
|
|
|
extern bool bitmap_maintenance;
|
|
|
|
|
|
|
|
/** Whether maintenance of the pool is high priority
|
|
|
|
*/
|
|
|
|
extern bool bitmap_maintenance_priority;
|
|
|
|
|
2006-01-02 05:52:53 +03:00
|
|
|
/** Maximum amount of memory for direct images
|
|
|
|
*/
|
|
|
|
extern unsigned int bitmap_direct_size;
|
|
|
|
|
|
|
|
/** Total size of compressed area
|
|
|
|
*/
|
|
|
|
extern unsigned int bitmap_compressed_size;
|
|
|
|
|
2005-06-23 21:22:28 +04:00
|
|
|
|
2004-09-04 20:41:28 +04:00
|
|
|
#endif
|