2005-06-24 07:31:41 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2001-2005, Haiku.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* DarkWyrm <bpmagic@columbus.rr.com>
|
|
|
|
*/
|
2003-07-25 19:44:59 +04:00
|
|
|
#ifndef BITMAP_MANAGER_H_
|
|
|
|
#define BITMAP_MANAGER_H_
|
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
|
2003-07-25 19:44:59 +04:00
|
|
|
#include <GraphicsDefs.h>
|
|
|
|
#include <List.h>
|
2005-11-14 22:46:20 +03:00
|
|
|
#include <Locker.h>
|
2003-07-25 19:44:59 +04:00
|
|
|
#include <OS.h>
|
2005-06-24 03:14:40 +04:00
|
|
|
#include <Rect.h>
|
|
|
|
|
|
|
|
#include "BGet++.h"
|
2003-07-25 19:44:59 +04:00
|
|
|
|
|
|
|
class ServerBitmap;
|
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
|
2005-06-24 03:14:40 +04:00
|
|
|
class BitmapManager {
|
2005-11-14 22:46:20 +03:00
|
|
|
public:
|
2005-07-11 01:16:43 +04:00
|
|
|
BitmapManager();
|
2005-11-14 22:46:20 +03:00
|
|
|
virtual ~BitmapManager();
|
2005-07-11 01:16:43 +04:00
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
ServerBitmap* CreateBitmap(BRect bounds, color_space space,
|
|
|
|
int32 flags, int32 bytesPerRow = -1,
|
|
|
|
screen_id screen = B_MAIN_SCREEN_ID);
|
2005-07-11 01:16:43 +04:00
|
|
|
void DeleteBitmap(ServerBitmap* bitmap);
|
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
protected:
|
2005-07-11 01:16:43 +04:00
|
|
|
BList fBitmapList;
|
2005-11-14 22:46:20 +03:00
|
|
|
int8* fBuffer;
|
2005-07-11 01:16:43 +04:00
|
|
|
BLocker fLock;
|
|
|
|
AreaPool fMemPool;
|
2003-07-25 19:44:59 +04:00
|
|
|
};
|
|
|
|
|
2005-06-24 07:31:41 +04:00
|
|
|
extern BitmapManager *gBitmapManager;
|
2003-07-25 19:44:59 +04:00
|
|
|
|
2005-06-24 07:31:41 +04:00
|
|
|
#endif /* BITMAP_MANAGER_H_ */
|