X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/284f2b59db428e6ab05d31ff26b12043b6d42ff3..e0608d9fc264305a15e02dec72a487e8332cb0af:/include/wx/rawbmp.h?ds=sidebyside diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index 0815f09f17..1a8551ca19 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -76,6 +76,13 @@ #pragma warning(disable: 4355) // 'this' used in initializer list #endif +/* + Note: we do not use WXDLLEXPORT with classes in this file because VC++ has + problems with exporting inner class defined inside a specialization of a + template class from a DLL. Besides, as all the methods are inline it's not + really necessary to put them in DLL at all. + */ + // ---------------------------------------------------------------------------- // wxPixelFormat // ---------------------------------------------------------------------------- @@ -107,7 +114,7 @@ template -struct WXDLLEXPORT wxPixelFormat +struct wxPixelFormat { // iterator over pixels is usually of type "ChannelType *" typedef Channel ChannelType; @@ -186,7 +193,7 @@ template struct wxPixelFormatFor; // classes (wxBitmap...) will result in compile errors which is exactly what we // want template <> -struct WXDLLEXPORT wxPixelFormatFor +struct wxPixelFormatFor { typedef wxImagePixelFormat Format; }; @@ -200,7 +207,7 @@ struct WXDLLEXPORT wxPixelFormatFor wxPixelDataBase is just a helper for wxPixelData: it contains things common to both wxImage and wxBitmap specializations. */ -class WXDLLEXPORT wxPixelDataBase +class wxPixelDataBase { public: // origin of the rectangular region we represent @@ -268,10 +275,10 @@ protected: // we need to define this skeleton template to mollify VC++ template -struct WXDLLEXPORT wxPixelDataOut +struct wxPixelDataOut { template - class WXDLLEXPORT wxPixelDataIn + class wxPixelDataIn { public: class Iterator { }; @@ -282,13 +289,14 @@ struct WXDLLEXPORT wxPixelDataOut // wxPixelData specialization for wxImage: this is the simplest case as we // don't have to care about different pixel formats here template <> -struct WXDLLEXPORT wxPixelDataOut +struct wxPixelDataOut { // NB: this is a template class even though it doesn't use its template // parameter because otherwise wxPixelData couldn't compile template - class WXDLLEXPORT wxPixelDataIn : public wxPixelDataBase + class wxPixelDataIn : public wxPixelDataBase { + public: // the type of the class we're working with typedef wxImage ImageType; @@ -469,16 +477,16 @@ struct WXDLLEXPORT wxPixelDataOut // wxPixelData specialization for wxBitmap: here things are more interesting as // we also have to support different pixel formats template <> -struct WXDLLEXPORT wxPixelDataOut +struct wxPixelDataOut { template - class WXDLLEXPORT wxPixelDataIn : public wxPixelDataBase + class wxPixelDataIn : public wxPixelDataBase { public: // the type of the class we're working with typedef wxBitmap ImageType; - class WXDLLEXPORT Iterator + class Iterator { public: // the pixel format we use @@ -684,6 +692,7 @@ typedef wxPixelData wxImagePixelData; #if wxUSE_GUI typedef wxPixelData wxNativePixelData; typedef wxPixelData wxAlphaPixelData; + #endif //wxUSE_GUI // ---------------------------------------------------------------------------- @@ -703,7 +712,7 @@ typedef wxPixelData wxAlphaPixelData; partial template specialization then and neither VC6 nor VC7 provide it. */ template < class Image, class PixelFormat = wxPixelFormatFor > -struct WXDLLEXPORT wxPixelIterator : wxPixelData::Iterator +struct wxPixelIterator : wxPixelData::Iterator { };