Win16 compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-16 21:29:54 +00:00
parent b4d1ebf058
commit 8f177c8e73
24 changed files with 798 additions and 450 deletions

View File

@@ -328,7 +328,7 @@ typedef int wxWindowID;
// wxCALLBACK should be used for the functions which are called back by
// Windows (such as compare function for wxListCtrl)
#if defined(__WXMSW__)
#if defined(__WIN32__)
#if defined(__MINGW32__) || defined(__GNUWIN32__)
#define wxCALLBACK __attribute__((stdcall))
#else
@@ -336,7 +336,7 @@ typedef int wxWindowID;
#define wxCALLBACK _stdcall
#endif
#else
// no stdcall under Unix
// no stdcall under Unix nor Win16
#define wxCALLBACK
#endif // platform

View File

@@ -45,12 +45,12 @@ public:
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual int GetImageCount( wxInputStream& stream );
bool CanRead( wxInputStream& stream ) { return DoCanRead(stream); }
bool CanRead( const wxString& name );
#endif
#endif // wxUSE_STREAMS
void SetName(const wxString& name) { m_name = name; }
void SetExtension(const wxString& ext) { m_extension = ext; }
@@ -62,17 +62,176 @@ public:
wxString GetMimeType() const { return m_mime; }
protected:
#if wxUSE_STREAMS
virtual bool DoCanRead( wxInputStream& stream ) = 0;
#endif // wxUSE_STREAMS
wxString m_name;
wxString m_extension;
wxString m_mime;
long m_type;
};
//-----------------------------------------------------------------------------
// wxPNGHandler
//-----------------------------------------------------------------------------
#if wxUSE_LIBPNG
class WXDLLEXPORT wxPNGHandler: public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxPNGHandler)
public:
inline wxPNGHandler()
{
m_name = "PNG file";
m_extension = "png";
m_type = wxBITMAP_TYPE_PNG;
m_mime = "image/png";
};
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool DoCanRead( wxInputStream& stream );
#endif
};
#endif
//-----------------------------------------------------------------------------
// wxJPEGHandler
//-----------------------------------------------------------------------------
#if wxUSE_LIBJPEG
class WXDLLEXPORT wxJPEGHandler: public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxJPEGHandler)
public:
inline wxJPEGHandler()
{
m_name = "JPEG file";
m_extension = "jpg";
m_type = wxBITMAP_TYPE_JPEG;
m_mime = "image/jpeg";
};
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool DoCanRead( wxInputStream& stream );
#endif
};
#endif
//-----------------------------------------------------------------------------
// wxTIFFHandler
//-----------------------------------------------------------------------------
#if wxUSE_LIBTIFF
class WXDLLEXPORT wxTIFFHandler: public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxTIFFHandler)
public:
inline wxTIFFHandler()
{
m_name = "TIFF file";
m_extension = "tif";
m_type = wxBITMAP_TYPE_TIF;
m_mime = "image/tiff";
};
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream );
#endif
};
#endif
//-----------------------------------------------------------------------------
// wxBMPHandler
//-----------------------------------------------------------------------------
class WXDLLEXPORT wxBMPHandler: public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxBMPHandler)
public:
inline wxBMPHandler()
{
m_name = "BMP file";
m_extension = "bmp";
m_type = wxBITMAP_TYPE_BMP;
m_mime = "image/bmp";
};
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool DoCanRead( wxInputStream& stream );
#endif
};
//-----------------------------------------------------------------------------
#if wxUSE_PNM
class WXDLLEXPORT wxPNMHandler : public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxPNMHandler)
public:
inline wxPNMHandler()
{
m_name = "PNM file";
m_extension = "pnm";
m_type = wxBITMAP_TYPE_PNM;
m_mime = "image/pnm";
};
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool DoCanRead( wxInputStream& stream );
#endif
};
#endif
//-----------------------------------------------------------------------------
// wxPCXHandler
//-----------------------------------------------------------------------------
#if wxUSE_PCX
class WXDLLEXPORT wxPCXHandler : public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxPCXHandler)
public:
inline wxPCXHandler()
{
m_name = "PCX file";
m_extension = "pcx";
m_type = wxBITMAP_TYPE_PCX;
m_mime = "image/pcx";
};
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS
};
#endif // wxUSE_PCX
//-----------------------------------------------------------------------------
// wxImage
//-----------------------------------------------------------------------------

View File

@@ -284,9 +284,7 @@ public:
inline long GetMask() { return m_item.m_mask; }
inline const wxListItem &GetItem() const { return m_item; }
#ifndef __WXMSW__
void CopyObject(wxObject& object_dest) const;
#endif
private:
DECLARE_DYNAMIC_CLASS(wxListEvent)

View File

@@ -104,8 +104,8 @@ protected:
};
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance, WXHINSTANCE hPrevInstance, char *lpszCmdLine,
int nCmdShow, bool enterLoop = TRUE);
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance, WXHINSTANCE hPrevInstance,
char *lpszCmdLine, int nCmdShow, bool enterLoop = TRUE);
#else
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance);
#endif

View File

@@ -6,7 +6,7 @@
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COLOUR_H_
@@ -75,8 +75,11 @@ public:
WXCOLORREF GetPixel() const { return m_pixel; };
public:
WXCOLORREF m_pixel;
private:
bool m_isInit;
bool m_isInit;
unsigned char m_red;
unsigned char m_blue;
unsigned char m_green;
@@ -84,12 +87,9 @@ private:
// helper func
void InitFromName(const wxString& colourName);
public:
WXCOLORREF m_pixel ;
private:
DECLARE_DYNAMIC_CLASS(wxColour)
};
#endif
// _WX_COLOUR_H_
// _WX_COLOUR_H_

View File

@@ -16,7 +16,7 @@
#pragma interface "tbarmsw.h"
#endif
#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR
#if wxUSE_TOOLBAR
#include "wx/tbarbase.h"
@@ -144,7 +144,7 @@ private:
DECLARE_DYNAMIC_CLASS(wxToolBar)
};
#endif // wxUSE_TOOL/BUTTONBAR
#endif // wxUSE_TOOLBAR
#endif
// _WX_TBARMSW_H_