Who said I couldn't break the build?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16827 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2001-2005, Haiku, Inc.
|
||||
//
|
||||
// Distributed under the terms of the MIT license.
|
||||
//
|
||||
// File Name: Bitmap.h
|
||||
// Author: Ingo Weinhold ([email protected])
|
||||
// Description: BBitmap objects represent off-screen windows that
|
||||
// contain bitmap data.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* Copyright 2001-2006, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Ingo Weinhold ([email protected])
|
||||
*/
|
||||
#ifndef _BITMAP_H
|
||||
#define _BITMAP_H
|
||||
|
||||
|
||||
#include <Archivable.h>
|
||||
#include <InterfaceDefs.h>
|
||||
#include <Rect.h>
|
||||
@@ -33,105 +30,97 @@ enum {
|
||||
|
||||
#define B_ANY_BYTES_PER_ROW -1
|
||||
|
||||
//----------------------------------------------------------------//
|
||||
//----- BBitmap class --------------------------------------------//
|
||||
|
||||
class BBitmap : public BArchivable {
|
||||
public:
|
||||
BBitmap(BRect bounds, uint32 flags, color_space colorSpace,
|
||||
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
|
||||
screen_id screenID = B_MAIN_SCREEN_ID);
|
||||
BBitmap(BRect bounds, color_space colorSpace, bool acceptsViews = false,
|
||||
bool needsContiguous = false);
|
||||
BBitmap(const BBitmap *source, bool acceptsViews = false,
|
||||
bool needsContiguous = false);
|
||||
virtual ~BBitmap();
|
||||
public:
|
||||
BBitmap(BRect bounds, uint32 flags, color_space colorSpace,
|
||||
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
|
||||
screen_id screenID = B_MAIN_SCREEN_ID);
|
||||
BBitmap(BRect bounds, color_space colorSpace, bool acceptsViews = false,
|
||||
bool needsContiguous = false);
|
||||
BBitmap(const BBitmap *source, bool acceptsViews = false,
|
||||
bool needsContiguous = false);
|
||||
virtual ~BBitmap();
|
||||
|
||||
// Archiving
|
||||
BBitmap(BMessage *data);
|
||||
static BArchivable *Instantiate(BMessage *data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
// Archiving
|
||||
BBitmap(BMessage *data);
|
||||
static BArchivable *Instantiate(BMessage *data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
|
||||
status_t InitCheck() const;
|
||||
bool IsValid() const;
|
||||
status_t InitCheck() const;
|
||||
bool IsValid() const;
|
||||
|
||||
status_t LockBits(uint32 *state = NULL);
|
||||
void UnlockBits();
|
||||
status_t LockBits(uint32 *state = NULL);
|
||||
void UnlockBits();
|
||||
|
||||
area_id Area() const;
|
||||
void *Bits() const;
|
||||
int32 BitsLength() const;
|
||||
int32 BytesPerRow() const;
|
||||
color_space ColorSpace() const;
|
||||
BRect Bounds() const;
|
||||
area_id Area() const;
|
||||
void *Bits() const;
|
||||
int32 BitsLength() const;
|
||||
int32 BytesPerRow() const;
|
||||
color_space ColorSpace() const;
|
||||
BRect Bounds() const;
|
||||
|
||||
void SetBits(const void *data, int32 length, int32 offset,
|
||||
color_space colorSpace);
|
||||
void SetBits(const void *data, int32 length, int32 offset,
|
||||
color_space colorSpace);
|
||||
|
||||
// not part of the R5 API
|
||||
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
||||
int32 offset, color_space colorSpace);
|
||||
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
||||
color_space colorSpace, BPoint from, BPoint to,
|
||||
int32 width, int32 height);
|
||||
status_t ImportBits(const BBitmap *bitmap);
|
||||
status_t ImportBits(const BBitmap *bitmap, BPoint from, BPoint to,
|
||||
int32 width, int32 height);
|
||||
// not part of the R5 API
|
||||
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
||||
int32 offset, color_space colorSpace);
|
||||
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
||||
color_space colorSpace, BPoint from, BPoint to,
|
||||
int32 width, int32 height);
|
||||
status_t ImportBits(const BBitmap *bitmap);
|
||||
status_t ImportBits(const BBitmap *bitmap, BPoint from, BPoint to,
|
||||
int32 width, int32 height);
|
||||
|
||||
status_t GetOverlayRestrictions(overlay_restrictions *restrictions) const;
|
||||
status_t GetOverlayRestrictions(overlay_restrictions *restrictions) const;
|
||||
|
||||
// to mimic a BWindow
|
||||
virtual void AddChild(BView *view);
|
||||
virtual bool RemoveChild(BView *view);
|
||||
int32 CountChildren() const;
|
||||
BView *ChildAt(int32 index) const;
|
||||
BView *FindView(const char *viewName) const;
|
||||
BView *FindView(BPoint point) const;
|
||||
bool Lock();
|
||||
void Unlock();
|
||||
bool IsLocked() const;
|
||||
// to mimic a BWindow
|
||||
virtual void AddChild(BView *view);
|
||||
virtual bool RemoveChild(BView *view);
|
||||
int32 CountChildren() const;
|
||||
BView *ChildAt(int32 index) const;
|
||||
BView *FindView(const char *viewName) const;
|
||||
BView *FindView(BPoint point) const;
|
||||
bool Lock();
|
||||
void Unlock();
|
||||
bool IsLocked() const;
|
||||
|
||||
//----- Private or reserved -----------------------------------------//
|
||||
//----- Private or reserved -----------------------------------------//
|
||||
|
||||
virtual status_t Perform(perform_code d, void *arg);
|
||||
virtual status_t Perform(perform_code d, void *arg);
|
||||
|
||||
private:
|
||||
friend class BView;
|
||||
friend class BApplication;
|
||||
friend class BPrivateScreen;
|
||||
//friend void _get_screen_bitmap_(BBitmap *, BRect, bool);
|
||||
private:
|
||||
friend class BView;
|
||||
friend class BApplication;
|
||||
friend class BPrivateScreen;
|
||||
|
||||
virtual void _ReservedBitmap1();
|
||||
virtual void _ReservedBitmap2();
|
||||
virtual void _ReservedBitmap3();
|
||||
virtual void _ReservedBitmap1();
|
||||
virtual void _ReservedBitmap2();
|
||||
virtual void _ReservedBitmap3();
|
||||
|
||||
BBitmap(const BBitmap &);
|
||||
BBitmap &operator=(const BBitmap &);
|
||||
BBitmap(const BBitmap &);
|
||||
BBitmap &operator=(const BBitmap &);
|
||||
|
||||
char *get_shared_pointer() const;
|
||||
int32 get_server_token() const;
|
||||
void InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||
int32 bytesPerRow, screen_id screenID);
|
||||
void CleanUp();
|
||||
int32 _ServerToken() const;
|
||||
void _InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||
int32 bytesPerRow, screen_id screenID);
|
||||
void _CleanUp();
|
||||
void _AssertPointer();
|
||||
|
||||
void AssertPtr();
|
||||
|
||||
void *fBasePtr;
|
||||
int32 fSize;
|
||||
color_space fColorSpace;
|
||||
BRect fBounds;
|
||||
int32 fBytesPerRow;
|
||||
BWindow *fWindow;
|
||||
int32 fServerToken;
|
||||
int32 fAreaOffset;
|
||||
uint8 unused;
|
||||
area_id fArea;
|
||||
area_id fOrigArea;
|
||||
uint32 fFlags;
|
||||
status_t fInitError;
|
||||
uint8 *fBasePointer;
|
||||
int32 fSize;
|
||||
color_space fColorSpace;
|
||||
BRect fBounds;
|
||||
int32 fBytesPerRow;
|
||||
BWindow *fWindow;
|
||||
int32 fServerToken;
|
||||
int32 fAreaOffset;
|
||||
uint8 unused;
|
||||
area_id fArea;
|
||||
area_id fServerArea;
|
||||
uint32 fFlags;
|
||||
status_t fInitError;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------*/
|
||||
|
||||
#endif // _BITMAP_H
|
||||
|
||||
Reference in New Issue
Block a user