home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-12 | 1.2 KB | 52 lines | [TEXT/CWIE] |
- // BufferAccessor.h, the BufferAccessor abstract base class, to be used for direct
- // access to GWorld pixel-maps, window pixel-maps, and video pixel-maps.
-
- // copyright © 1995, Macneil Shonle. All rights reserved.
-
- #ifndef __BUFFERACCESSOR__
- #define __BUFFERACCESSOR__
-
- #ifndef __PIXELTYPES__
- #include <PixelTypes.h>
- #endif
-
- #include <new>
-
- // class QuickRowArray
- class QuickRowArray {
- private:
- friend class BufferAccessor;
- QuickRowArray();
- ~QuickRowArray();
- void setArray(PixelPtr base, RowBytes rowBytes, PixelCord height) throw(xalloc);
- PixelPtr *array;
- };
-
- // class BufferAccessor
- class BufferAccessor {
- public:
- BufferAccessor();
- virtual ~BufferAccessor();
- BufferAccessor& operator=(const BufferAccessor&) throw(xalloc);
-
- PixelPtr baseAddr() const;
- RowBytes rowBytes() const;
- PixelCord height() const;
- PixelCord width() const;
- PixelPtr pixelAddr(PixelCord h, PixelCord v) const;
- PixelPtr rowAddr(PixelCord) const;
- int use32Bit() const;
-
- void setPixel(PixelCord h, PixelCord v, Pixel);
-
- protected:
- PixelCord theHeight;
- PixelCord theWidth;
- RowBytes theRowBytes;
- QuickRowArray rowAddrs;
- int mmuMode;
-
- void setArray(PixelPtr base, RowBytes rb, PixelCord high) throw(xalloc);
- };
-
- #endif