diff --git a/headers/private/servers/app/DisplayDriver.h b/headers/private/servers/app/DisplayDriver.h index c1868f29fc..f7591bd3fe 100644 --- a/headers/private/servers/app/DisplayDriver.h +++ b/headers/private/servers/app/DisplayDriver.h @@ -315,12 +315,13 @@ protected: bool _is_cursor_obscured; ServerCursor *_cursor; - ServerBitmap *_cursorsave; + UtilityBitmap *_cursorsave; uint32 _dpms_state; uint32 _dpms_caps; accelerant_device_info _acc_device_info; - + display_mode _displaymode; + BRect oldcursorframe, cursorframe, saveframe; DrawData _drawdata; }; diff --git a/headers/private/servers/app/ServerBitmap.h b/headers/private/servers/app/ServerBitmap.h index 41b1bd33f9..7668304a02 100644 --- a/headers/private/servers/app/ServerBitmap.h +++ b/headers/private/servers/app/ServerBitmap.h @@ -55,26 +55,26 @@ public: - \c B_ERROR if the buffer is not allocated in an area - area_id for the buffer */ - area_id Area(void) { return _area; } + area_id Area(void) const { return _area; } // Returns the offset of the bitmap in its area int32 AreaOffset(void) { return _offset; } //! Returns the bitmap's buffer - uint8 *Bits(void) { return _buffer; } - uint32 BitsLength(void); + uint8 *Bits(void) const { return _buffer; } + uint32 BitsLength(void) const; //! Returns the size of the bitmap - BRect Bounds() { return BRect(0,0,_width-1,_height-1); }; + BRect Bounds() const { return BRect(0,0,_width-1,_height-1); }; //! Returns the number of bytes in each row, including padding - int32 BytesPerRow(void) { return _bytesperrow; }; + int32 BytesPerRow(void) const { return _bytesperrow; }; //! Returns the pixel color depth - uint8 BitsPerPixel(void) { return _bpp; } + uint8 BitsPerPixel(void) const { return _bpp; } //! Returns the color space of the bitmap - color_space ColorSpace(void) { return _space; } + color_space ColorSpace(void) const { return _space; } //! Returns the width of the bitmap int32 Width(void) const { return _width; } @@ -83,10 +83,10 @@ public: int32 Height(void) const { return _height; } //! Returns whether the bitmap is valid - bool InitCheck(void) { return _initialized; } + bool InitCheck(void) const { return _initialized; } //! Returns the identifier token for the bitmap - int32 Token(void) { return _token; } + int32 Token(void) const { return _token; } protected: friend class BitmapManager; @@ -115,4 +115,13 @@ protected: int32 _offset; }; +class UtilityBitmap : public ServerBitmap +{ +public: + UtilityBitmap(BRect rect,color_space space, int32 flags, + int32 bytesperline=-1, screen_id screen=B_MAIN_SCREEN_ID); + UtilityBitmap(const ServerBitmap *bmp); + ~UtilityBitmap(void); +}; + #endif