X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fimageloader.h;h=cb3f54ac204f303afe23e5bfc30b111ece28f33a;hb=2ebdf45974a0a7649b3488f9da4b8cf90a1db584;hp=f0b8d52c36412ec6cf3e9901d5b2a43c51aefdd6;hpb=d3bc6c9c2cfaaedaabfd4b5b7bf4e1da2de51331;p=libs%2Fgui.git diff --git a/source/graphics/imageloader.h b/source/graphics/imageloader.h index f0b8d52..cb3f54a 100644 --- a/source/graphics/imageloader.h +++ b/source/graphics/imageloader.h @@ -23,6 +23,13 @@ public: class ImageLoader { +public: + enum State + { + INITIAL, + FINISHED + }; + protected: class RegisterBase { @@ -56,6 +63,7 @@ protected: private: IO::Base *source; + State state; protected: ImageLoader(); @@ -66,8 +74,11 @@ public: static ImageLoader *open_io(IO::Seekable &); virtual void load(Image::Data &); - virtual void load_headers(Image::Data &) { } - virtual void load_data(Image::Data &) { } +protected: + virtual void load_(Image::Data &) = 0; + +public: + State get_state() const { return state; } template static void register_loader();