00001 #ifndef OSDL_SURFACE_H_
00002 #define OSDL_SURFACE_H_
00003
00004
00005 #include "OSDLImage.h"
00006 #include "OSDLUprightRectangle.h"
00007 #include "OSDLPalette.h"
00008
00009
00010 #include "Ceylan.h"
00011
00012 #include <string>
00013 #include <list>
00014
00015
00016
00017
00018 struct SDL_Surface ;
00019
00020
00021
00022 namespace OSDL
00023 {
00024
00025 namespace Video
00026 {
00027
00028
00029 namespace TwoDimensional
00030 {
00031
00032
00033 class Point2D ;
00034
00035
00036 class Widget ;
00037
00038 }
00039
00040
00041
00042 class Palette ;
00043
00044 using namespace Pixels ;
00045
00046
00052 class OSDL_DLL SurfaceEvent : public Ceylan::Event
00053 {
00054
00055 public:
00056
00057 explicit SurfaceEvent( Ceylan::EventSource & source ) throw() ;
00058 SurfaceEvent() throw() ;
00059
00060 virtual ~SurfaceEvent() throw() ;
00061
00062 } ;
00063
00064
00065
00067 class OSDL_DLL VideoMemoryLostException : public VideoException
00068 {
00069
00070 public:
00071
00072 VideoMemoryLostException( const std::string & message )
00073 throw() ;
00074
00080 VideoMemoryLostException() throw() ;
00081
00082 virtual ~VideoMemoryLostException() throw() ;
00083
00084 } ;
00085
00086
00087
00178 class OSDL_DLL Surface :
00179 public TwoDimensional::UprightRectangle,
00180 public Ceylan::EventSource,
00181 public Ceylan::Lockable,
00182 public Ceylan::SmartResource
00183 {
00184
00185
00186 public:
00187
00188
00197 enum DisplayType {
00198 BackBuffer,
00199 ClassicalScreenSurface,
00200 OpenGLScreenSurface
00201 } ;
00202
00203
00204
00205
00206
00207
00208
00209
00210
00212 static const Ceylan::Flags Software ;
00213
00214
00216 static const Ceylan::Flags Hardware ;
00217
00218
00224 static const Ceylan::Flags AsynchronousBlit ;
00225
00226
00228 static const Ceylan::Flags ExclusivePalette ;
00229
00230
00236 static const Ceylan::Flags HardwareAcceleratedBlit ;
00237
00238
00240 static const Ceylan::Flags ColorkeyBlit ;
00241
00242
00248 static const Ceylan::Flags RLEColorkeyBlit ;
00249
00250
00252 static const Ceylan::Flags AlphaBlendingBlit ;
00253
00255 static const Ceylan::Flags Preallocated ;
00256
00257
00266 static const Ceylan::Flags RLEColorkeyBlitAvailable ;
00267
00268
00269
00270
00271
00272
00273
00274
00275
00281 static const Ceylan::Flags AnyPixelFormat ;
00282
00283
00289 static const Ceylan::Flags DoubleBuffered ;
00290
00291
00297 static const Ceylan::Flags FullScreen ;
00298
00299
00305 static const Ceylan::Flags OpenGL ;
00306
00312 static const Ceylan::Flags Resizable ;
00313
00314
00326 explicit Surface( SDL_Surface & surface,
00327 DisplayType displayType = BackBuffer ) throw() ;
00328
00329
00330
00397 Surface( Ceylan::Flags flags, Length width, Length height,
00398 BitsPerPixel depth = 32,
00399 Pixels::ColorMask redMask = 0,
00400 Pixels::ColorMask greenMask = 0,
00401 Pixels::ColorMask blueMask = 0,
00402 Pixels::ColorMask alphaMask = 0 )
00403 throw( VideoException ) ;
00404
00405
00406
00412 virtual ~Surface() throw() ;
00413
00414
00429 virtual Clonable & clone() const
00430 throw( Ceylan::ClonableException ) ;
00431
00432
00444 virtual SDL_Surface & getSDLSurface() const throw() ;
00445
00446
00459 virtual void setSDLSurface( SDL_Surface & newSurface,
00460 DisplayType displayType = BackBuffer ) throw() ;
00461
00462
00463
00469 virtual DisplayType getDisplayType() const throw() ;
00470
00471
00477 virtual void setDisplayType( DisplayType newDisplayType )
00478 throw() ;
00479
00480
00487 virtual Ceylan::Flags getFlags() const throw() ;
00488
00489
00498 virtual void setFlags( Ceylan::Flags newFlags ) throw() ;
00499
00500
00523 virtual void convertToDisplay( bool alphaChannelWanted = true )
00524 throw( VideoException ) ;
00525
00526
00550 virtual void setAlpha( Ceylan::Flags flags,
00551 Pixels::ColorElement newAlpha ) throw( VideoException ) ;
00552
00553
00580 virtual void setColorKey( Ceylan::Flags flags,
00581 Pixels::PixelColor keyPixelColor ) throw( VideoException ) ;
00582
00583
00607 virtual void setColorKey( Ceylan::Flags flags,
00608 Pixels::ColorDefinition keyColorDef )
00609 throw( VideoException ) ;
00610
00611
00623 virtual void convertFromColorKeyToAlphaChannel()
00624 throw( VideoException ) ;
00625
00626
00649 virtual bool setPalette( Palette & newPalette,
00650 ColorCount startingColorIndex = 0,
00651 ColorCount numberOfColors = 0,
00652 Ceylan::Flags targettedPalettes =
00653 Palette::Logical | Palette::Physical )
00654 throw() ;
00655
00656
00657
00659 virtual PixelFormat & getPixelFormat() const throw() ;
00660
00662 virtual void setPixelFormat( PixelFormat & newFormat ) throw() ;
00663
00664
00665
00667 virtual Pitch getPitch() const throw() ;
00668
00670 virtual void setPitch( Pitch newPitch ) throw() ;
00671
00672
00674 virtual Length getWidth() const throw() ;
00675
00676
00685 virtual void setWidth( Length newWidth ) throw() ;
00686
00687
00688
00690 virtual Length getHeight() const throw() ;
00691
00692
00701 virtual void setHeight( Length newHeight ) throw() ;
00702
00703
00726 virtual void resize( Length newWidth, Length newHeight,
00727 bool scaleContent = false ) throw() ;
00728
00729
00738 virtual BitsPerPixel getBitsPerPixel() const throw() ;
00739
00740
00748 virtual void setBitsPerPixel( BitsPerPixel newBitsPerPixel )
00749 throw() ;
00750
00751
00761 virtual BytesPerPixel getBytesPerPixel() const throw() ;
00762
00763
00771 virtual void setBytesPerPixel( BytesPerPixel newBytesPerPixel )
00772 throw() ;
00773
00774
00775
00781 virtual void * getPixels() const throw() ;
00782
00783
00789 virtual void setPixels( void * newPixels ) throw() ;
00790
00791
00792
00806 virtual bool fill(
00807 Pixels::ColorDefinition colorDef = Pixels::Black )
00808 throw() ;
00809
00810
00821 virtual bool clear() throw() ;
00822
00823
00840 virtual Surface & flipVertical() const throw() ;
00841
00842
00859 virtual Surface & flipHorizontal() const throw() ;
00860
00861
00862
00875 virtual std::string describePixelAt(
00876 Coordinate x, Coordinate y ) throw() ;
00877
00878
00879
00893 virtual Pixels::PixelColor getPixelColorAt(
00894 Coordinate x, Coordinate y ) const
00895 throw ( VideoException ) ;
00896
00897
00912 virtual Pixels::ColorDefinition getColorDefinitionAt(
00913 Coordinate x, Coordinate y )
00914 const throw ( VideoException ) ;
00915
00916
00959 virtual void putRGBAPixelAt(
00960 Coordinate x, Coordinate y,
00961 ColorElement red, ColorElement green, ColorElement blue,
00962 ColorElement alpha = AlphaOpaque,
00963 bool blending = true, bool clipping = true,
00964 bool locking = false ) throw( VideoException ) ;
00965
00966
01004 virtual void putColorDefinitionAt( Coordinate x, Coordinate y,
01005 ColorDefinition colorDef,
01006 bool blending = true, bool clipping = true,
01007 bool locking = false ) throw( VideoException ) ;
01008
01009
01034 virtual void putPixelColorAt( Coordinate x, Coordinate y,
01035 PixelColor convertedColor, ColorElement alpha,
01036 bool blending = true, bool clipping = true,
01037 bool locking = false ) throw( VideoException ) ;
01038
01039
01064 virtual bool setAlphaForColor( Pixels::ColorDefinition colorDef,
01065 Pixels::ColorElement newAlpha ) throw() ;
01066
01067
01090 virtual bool drawHorizontalLine(
01091 Coordinate xStart, Coordinate xStop, Coordinate y,
01092 Pixels::ColorElement red, Pixels::ColorElement green,
01093 Pixels::ColorElement blue,
01094 Pixels::ColorElement alpha = Pixels::AlphaOpaque )
01095 throw() ;
01096
01097
01120 virtual bool drawHorizontalLine(
01121 Coordinate xStart, Coordinate xStop, Coordinate y,
01122 Pixels::PixelColor actualColor ) throw() ;
01123
01124
01147 virtual bool drawHorizontalLine(
01148 Coordinate xStart, Coordinate xStop, Coordinate y,
01149 Pixels::ColorDefinition colorDef = Pixels::White )
01150 throw() ;
01151
01152
01175 virtual bool drawVerticalLine(
01176 Coordinate x, Coordinate yStart, Coordinate yStop,
01177 Pixels::ColorElement red, Pixels::ColorElement green,
01178 Pixels::ColorElement blue,
01179 Pixels::ColorElement alpha = Pixels::AlphaOpaque )
01180 throw() ;
01181
01182
01205 virtual bool drawVerticalLine(
01206 Coordinate x, Coordinate yStart, Coordinate yStop,
01207 Pixels::ColorDefinition colorDef = Pixels::White )
01208 throw() ;
01209
01210
01232 virtual bool drawLine(
01233 Coordinate xStart, Coordinate yStart,
01234 Coordinate xStop, Coordinate yStop,
01235 Pixels::ColorElement red, Pixels::ColorElement green,
01236 Pixels::ColorElement blue,
01237 Pixels::ColorElement alpha = Pixels::AlphaOpaque )
01238 throw() ;
01239
01240
01263 virtual bool drawLine(
01264 Coordinate xStart, Coordinate yStart,
01265 Coordinate xStop, Coordinate yStop,
01266 Pixels::ColorDefinition = Pixels::White )
01267 throw() ;
01268
01269
01284 virtual bool drawCross( const TwoDimensional::Point2D & center,
01285 Pixels::ColorDefinition colorDef = Pixels::White,
01286 Length squareEdge = 5 )
01287 throw() ;
01288
01289
01304 virtual bool drawCross( Coordinate xCenter, Coordinate yCenter,
01305 Pixels::ColorDefinition colorDef = Pixels::White,
01306 Length squareEdge = 5 )
01307 throw() ;
01308
01309
01323 virtual bool drawEdges(
01324 Pixels::ColorDefinition edgeColor = Pixels::White,
01325 Length edgeWidth = 1 ) throw() ;
01326
01327
01338 virtual bool drawBox( const UprightRectangle & rectangle,
01339 Pixels::ColorElement red, Pixels::ColorElement green,
01340 Pixels::ColorElement blue,
01341 Pixels::ColorElement alpha = Pixels::AlphaOpaque,
01342 bool filled = true ) throw() ;
01343
01344
01359 virtual bool drawBox( const UprightRectangle & rectangle,
01360 Pixels::ColorDefinition colorDef = Pixels::White,
01361 bool filled = true )
01362 throw() ;
01363
01364
01393 virtual bool drawCircle(
01394 Coordinate xCenter, Coordinate yCenter,
01395 Length radius,
01396 Pixels::ColorElement red, Pixels::ColorElement green,
01397 Pixels::ColorElement blue,
01398 Pixels::ColorElement alpha = Pixels::AlphaOpaque,
01399 bool filled = true, bool blended = true ) throw() ;
01400
01401
01402
01432 virtual bool drawCircle(
01433 Coordinate xCenter, Coordinate yCenter,
01434 Length radius,
01435 Pixels::ColorDefinition colorDef = Pixels::White,
01436 bool filled = true, bool blended = true ) throw() ;
01437
01438
01480 virtual bool drawDiscWithEdge(
01481 Coordinate xCenter, Coordinate yCenter,
01482 Length outerRadius, Length innerRadius,
01483 Pixels::ColorDefinition ringColorDef = Pixels::Blue,
01484 Pixels::ColorDefinition discColorDef = Pixels::White,
01485 bool blended = true )
01486 throw() ;
01487
01488
01489
01510 virtual bool drawEllipse(
01511 Coordinate xCenter, Coordinate yCenter,
01512 Length horizontalRadius, Length verticalRadius,
01513 Pixels::ColorElement red, Pixels::ColorElement green,
01514 Pixels::ColorElement blue,
01515 Pixels::ColorElement alpha = Pixels::AlphaOpaque,
01516 bool filled = true ) throw() ;
01517
01518
01519
01540 virtual bool drawEllipse(
01541 Coordinate xCenter, Coordinate yCenter,
01542 Length horizontalRadius, Length verticalRadius,
01543 Pixels::ColorDefinition colorDef, bool filled = true )
01544 throw() ;
01545
01546
01547
01583 virtual bool drawPie(
01584 Coordinate xCenter, Coordinate yCenter,
01585 Length radius,
01586 Ceylan::Maths::AngleInDegrees angleStart,
01587 Ceylan::Maths::AngleInDegrees angleStop,
01588 Pixels::ColorElement red, Pixels::ColorElement green,
01589 Pixels::ColorElement blue,
01590 Pixels::ColorElement alpha = Pixels::AlphaOpaque )
01591 throw() ;
01592
01593
01594
01623 virtual bool drawPie(
01624 Coordinate xCenter, Coordinate yCenter,
01625 Length radius,
01626 Ceylan::Maths::AngleInDegrees angleStart,
01627 Ceylan::Maths::AngleInDegrees angleStop,
01628 Pixels::ColorDefinition colorDef ) throw() ;
01629
01630
01631
01651 virtual bool drawTriangle(
01652 Coordinate x1, Coordinate y1,
01653 Coordinate x2, Coordinate y2,
01654 Coordinate x3, Coordinate y3,
01655 Pixels::ColorElement red, Pixels::ColorElement green,
01656 Pixels::ColorElement blue,
01657 Pixels::ColorElement alpha = Pixels::AlphaOpaque,
01658 bool filled = true ) throw() ;
01659
01660
01661
01681 virtual bool drawTriangle(
01682 Coordinate x1, Coordinate y1,
01683 Coordinate x2, Coordinate y2,
01684 Coordinate x3, Coordinate y3,
01685 Pixels::ColorDefinition colorDef,
01686 bool filled = true ) throw() ;
01687
01688
01689
01709 virtual bool drawTriangle(
01710 const TwoDimensional::Point2D & p1,
01711 const TwoDimensional::Point2D & p2,
01712 const TwoDimensional::Point2D & p3,
01713 Pixels::ColorElement red, Pixels::ColorElement green,
01714 Pixels::ColorElement blue,
01715 Pixels::ColorElement alpha = Pixels::AlphaOpaque,
01716 bool filled = true ) throw() ;
01717
01718
01719
01739 virtual bool drawTriangle(
01740 const TwoDimensional::Point2D & p1,
01741 const TwoDimensional::Point2D & p2,
01742 const TwoDimensional::Point2D & p3,
01743 Pixels::ColorDefinition colorDef, bool filled = true )
01744 throw() ;
01745
01746
01747
01777 virtual bool drawPolygon(
01778 const std::list<TwoDimensional::Point2D *> summits,
01779 Coordinate x, Coordinate y,
01780 Pixels::ColorElement red, Pixels::ColorElement green,
01781 Pixels::ColorElement blue,
01782 Pixels::ColorElement alpha = Pixels::AlphaOpaque,
01783 bool filled = true ) throw() ;
01784
01785
01786
01816 virtual bool drawPolygon(
01817 const std::list<TwoDimensional::Point2D *> summits,
01818 Coordinate x, Coordinate y,
01819 Pixels::ColorDefinition colorDef, bool filled = true )
01820 throw() ;
01821
01822
01845 virtual bool drawGrid(
01846 Length columnStride = 20,
01847 Length rowStride = 20,
01848 Pixels::ColorDefinition lineColor = Pixels::White,
01849 bool fillBackground = false,
01850 Pixels::ColorDefinition backgroundColor = Pixels::Black )
01851 throw() ;
01852
01853
01854
01864 virtual bool printText( const std::string & text,
01865 Coordinate x, Coordinate y,
01866 Pixels::ColorElement red, Pixels::ColorElement green,
01867 Pixels::ColorElement blue,
01868 Pixels::ColorElement alpha = Pixels::AlphaOpaque )
01869 throw() ;
01870
01871
01881 virtual bool printText( const std::string & text,
01882 Coordinate x, Coordinate y,
01883 ColorDefinition colorDef = Pixels::White )
01884 throw() ;
01885
01886
01887
01888
01889
01890
01891
01919 virtual bool blitTo( Surface & targetSurface )
01920 const throw( VideoException ) ;
01921
01922
01954 virtual bool blitTo( Surface & targetSurface,
01955 Coordinate x, Coordinate y ) const throw( VideoException ) ;
01956
01957
01977 virtual bool blitTo( Surface & targetSurface,
01978 const TwoDimensional::Point2D & location ) const
01979 throw( VideoException ) ;
01980
01981
02002 virtual bool blitTo(
02003 Surface & targetSurface,
02004 const TwoDimensional::UprightRectangle
02005 & sourceRectangle,
02006 const TwoDimensional::Point2D & destinationLocation )
02007 const throw( VideoException ) ;
02008
02009
02010
02011
02012
02013
02014
02015
02016
02017
02018
02019
02020
02021
02022
02023
02024
02025
02026
02065 virtual Surface & zoom(
02066 Ceylan::Maths::Real abscissaZoomFactor,
02067 Ceylan::Maths::Real ordinateZoomFactor,
02068 bool antialiasing = true )
02069 const throw( VideoException ) ;
02070
02071
02072
02110 virtual Surface & rotoZoom(
02111 Ceylan::Maths::AngleInDegrees angle,
02112 Ceylan::Maths::Real zoomFactor,
02113 bool antialiasing = true )
02114 const throw( VideoException ) ;
02115
02116
02117
02159 virtual Surface & rotoZoom(
02160 Ceylan::Maths::AngleInDegrees angle,
02161 Ceylan::Maths::Real abscissaZoomFactor,
02162 Ceylan::Maths::Real ordinateZoomFactor,
02163 bool antialiasing = true )
02164 const throw( VideoException ) ;
02165
02166
02167
02168
02169
02170
02171
02184 virtual UprightRectangle & getClippingArea() const throw() ;
02185
02186
02195 virtual void setClippingArea(
02196 UprightRectangle & newClippingArea ) throw() ;
02197
02198
02199
02237 virtual void loadImage( const std::string & filename,
02238 bool blitOnly = false,
02239 bool convertToDisplayFormat = true,
02240 bool convertWithAlpha = true )
02241 throw( TwoDimensional::ImageException ) ;
02242
02243
02244
02280 virtual void loadJPG( const std::string & filename,
02281 bool blitOnly = false,
02282 bool convertToDisplayFormat = true,
02283 bool convertWithAlpha = true )
02284 throw( TwoDimensional::ImageException ) ;
02285
02286
02287
02323 virtual void loadPNG( const std::string & filename,
02324 bool blitOnly = false,
02325 bool convertToDisplayFormat = true,
02326 bool convertWithAlpha = true )
02327 throw( TwoDimensional::ImageException ) ;
02328
02329
02330
02366 virtual void loadBMP( const std::string & filename,
02367 bool blitOnly = false,
02368 bool convertToDisplayFormat = true,
02369 bool convertWithAlpha = true )
02370 throw( TwoDimensional::ImageException ) ;
02371
02372
02373
02409 virtual void loadGIF( const std::string & filename,
02410 bool blitOnly = false,
02411 bool convertToDisplayFormat = true,
02412 bool convertWithAlpha = true )
02413 throw( TwoDimensional::ImageException ) ;
02414
02415
02416
02452 virtual void loadLBM( const std::string & filename,
02453 bool blitOnly = false,
02454 bool convertToDisplayFormat = true,
02455 bool convertWithAlpha = true )
02456 throw( TwoDimensional::ImageException ) ;
02457
02458
02459
02495 virtual void loadPCX( const std::string & filename,
02496 bool blitOnly = false,
02497 bool convertToDisplayFormat = true,
02498 bool convertWithAlpha = true )
02499 throw( TwoDimensional::ImageException ) ;
02500
02501
02502
02538 virtual void loadPNM( const std::string & filename,
02539 bool blitOnly = false,
02540 bool convertToDisplayFormat = true,
02541 bool convertWithAlpha = true )
02542 throw( TwoDimensional::ImageException ) ;
02543
02544
02545
02581 virtual void loadTGA( const std::string & filename,
02582 bool blitOnly = false,
02583 bool convertToDisplayFormat = true,
02584 bool convertWithAlpha = true )
02585 throw( TwoDimensional::ImageException ) ;
02586
02587
02588
02624 virtual void loadXPM( const std::string & filename,
02625 bool blitOnly = false,
02626 bool convertToDisplayFormat = true,
02627 bool convertWithAlpha = true )
02628 throw( TwoDimensional::ImageException ) ;
02629
02630
02631
02651 virtual void savePNG( const std::string & filename,
02652 bool overwrite = true )
02653 throw( TwoDimensional::ImageException ) ;
02654
02655
02656
02676 virtual void saveBMP( const std::string & filename,
02677 bool overwrite = true )
02678 throw( TwoDimensional::ImageException ) ;
02679
02680
02681
02715 virtual void update() throw( VideoException ) ;
02716
02717
02718
02748 virtual void updateRectangles(
02749 const std::list<UprightRectangle *> & listRects )
02750 throw( VideoException ) ;
02751
02752
02767 virtual void updateRectangle( const UprightRectangle & rect )
02768 throw( VideoException ) ;
02769
02770
02788 virtual void updateRectangle(
02789 Coordinate x, Coordinate y, Length width, Length height )
02790 throw( VideoException ) ;
02791
02792
02793
02802 virtual void setRedrawState( bool needsToBeRedrawn ) throw() ;
02803
02804
02806 virtual bool getRedrawState() const throw() ;
02807
02808
02809
02819 virtual void redraw() throw() ;
02820
02821
02830 virtual void redrawInternal() throw() ;
02831
02832
02841 virtual bool isInternalSurfaceAvailable() const throw() ;
02842
02843
02853 virtual void addWidget( TwoDimensional::Widget & widget )
02854 throw( VideoException ) ;
02855
02856
02865 Surface & getWidgetRenderTarget() throw() ;
02866
02867
02879 virtual void putWidgetToFront( TwoDimensional::Widget & widget )
02880 throw( VideoException ) ;
02881
02882
02893 virtual void putWidgetToBack( TwoDimensional::Widget & widget )
02894 throw( VideoException ) ;
02895
02896
02905 virtual void centerMousePosition() throw() ;
02906
02907
02916 virtual void setMousePosition(
02917 Coordinate newX = 0, Coordinate newY = 0 ) throw() ;
02918
02919
02920
02921
02922
02923
02937 virtual bool mustBeLocked() const throw() ;
02938
02939
02940
02941
02942
02943
02951 virtual Ceylan::System::Size getSizeInMemory() const throw() ;
02952
02953
02954
02974 virtual bool displayData(
02975 const Ceylan::Maths::IntegerData * dataArray,
02976 Ceylan::Uint32 dataCount,
02977 Pixels::ColorDefinition pencilColor,
02978 Pixels::ColorDefinition captionColor,
02979 Pixels::ColorDefinition backgroundColor,
02980 const std::string & caption = "",
02981 const UprightRectangle * inBox = 0 )
02982 throw() ;
02983
02984
02996 virtual const std::string toString(
02997 Ceylan::VerbosityLevels level = Ceylan::high )
02998 const throw() ;
02999
03000
03001
03002
03003
03004
03015 static Surface & LoadImage( const std::string & filename,
03016 bool convertToDisplayFormat = true,
03017 bool convertWithAlpha = true )
03018 throw( TwoDimensional::ImageException ) ;
03019
03020
03021
03034 static std::string InterpretFlags( Ceylan::Flags flags )
03035 throw() ;
03036
03037
03039 static const Length graphAbscissaOffset ;
03040
03042 static const Length graphOrdinateOffset ;
03043
03044
03046 static const Length captionAbscissaOffset ;
03047
03049 static const Length captionOrdinateOffset ;
03050
03051
03052
03053
03054 protected:
03055
03056
03057
03067 virtual void preUnlock() throw() ;
03068
03069
03078 virtual void postLock() throw() ;
03079
03080
03081
03083 typedef Ceylan::Sint16 Offset ;
03084
03085
03099 explicit Surface() throw() ;
03100
03101
03102
03104 inline Offset getOffset() const throw() ;
03105
03107 inline void setOffset( Offset offset ) throw() ;
03108
03109
03111 virtual void flush() throw() ;
03112
03113
03123 virtual void inconsistencyDetected(
03124 const std::string & message ) const throw() ;
03125
03126
03132 SDL_Surface * _surface ;
03133
03134
03146 DisplayType _displayType ;
03147
03148
03154 bool _mustBeLocked ;
03155
03156
03157
03158 private:
03159
03160
03169 bool _needsRedraw ;
03170
03171
03172
03181 Surface( const Surface & source ) throw() ;
03182
03183
03192 Surface & operator = ( const Surface & source ) throw() ;
03193
03194
03195 } ;
03196
03197 }
03198
03199 }
03200
03201
03202
03204 OSDL_DLL std::ostream & operator << ( std::ostream & os,
03205 OSDL::Video::Surface & s ) throw() ;
03206
03207
03208 #endif // OSDL_SURFACE_H_
03209