#include "wx/mstream.h"
#include "wx/image.h"
-#include "gdk/gdk.h"
+#include <gdk/gdk.h>
//-------------------------------------------------------------------------
// global data
bool wxDataObject::IsSupportedFormat(const wxDataFormat& format, Direction dir) const
{
size_t nFormatCount = GetFormatCount(dir);
- if ( nFormatCount == 1 ) {
+ if ( nFormatCount == 1 )
+ {
return format == GetPreferredFormat();
}
- else {
+ else
+ {
wxDataFormat *formats = new wxDataFormat[nFormatCount];
GetAllFormats(formats,dir);
size_t n;
- for ( n = 0; n < nFormatCount; n++ ) {
+ for ( n = 0; n < nFormatCount; n++ )
+ {
if ( formats[n] == format )
break;
}
return res + 1;
}
-bool wxFileDataObject::SetData(size_t size, const void *buf)
+bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *buf)
{
// VZ: old format
#if 0
{
Clear();
+#if wxUSE_LIBPNG
m_pngSize = size;
m_pngData = malloc(m_pngSize);
m_bitmap = image.ConvertToBitmap();
return m_bitmap.Ok();
+#else
+ return FALSE;
+#endif
}
void wxBitmapDataObject::DoConvertToPng()
{
+#if wxUSE_LIBPNG
if (!m_bitmap.Ok())
return;
wxMemoryOutputStream mstream( (char*) m_pngData, m_pngSize );
handler.SaveFile( &image, mstream );
+#endif
}