TWIN32 compatibility added; wxMotif uses wxGTK's wxPostScriptDC;
wxByte replaces byte (can conflict with windows.h) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -79,6 +79,10 @@
|
||||
#define __WIN95__
|
||||
#endif
|
||||
|
||||
#if defined(TWIN32) && !defined(__TWIN32__)
|
||||
#define __TWIN32__
|
||||
#endif
|
||||
|
||||
#endif // wxMSW
|
||||
|
||||
// Make sure the environment is set correctly
|
||||
@@ -134,9 +138,12 @@
|
||||
#endif
|
||||
|
||||
#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__)
|
||||
#define byte unsigned char
|
||||
// Not a good idea, because later system files (e.g. windows.h)
|
||||
// may try to define it. Use wxByte instead.
|
||||
// #define byte unsigned char
|
||||
#endif
|
||||
|
||||
typedef unsigned char wxByte;
|
||||
typedef short int WXTYPE;
|
||||
typedef int wxWindowID;
|
||||
|
||||
@@ -212,6 +219,10 @@ class WXDLLEXPORT wxEvent;
|
||||
// Error codes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef ERR_PARAM
|
||||
#undef ERR_PARAM
|
||||
#endif
|
||||
|
||||
/// Standard error codes
|
||||
enum ErrCode
|
||||
{
|
||||
|
@@ -16,10 +16,6 @@
|
||||
#pragma interface "wave.h"
|
||||
#endif
|
||||
|
||||
#ifndef byte
|
||||
#define byte unsigned char
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
#ifndef AUDIODEV
|
||||
@@ -31,14 +27,14 @@ class wxWave : public wxObject
|
||||
public:
|
||||
wxWave();
|
||||
wxWave(const wxString& fileName, bool isResource = FALSE);
|
||||
wxWave(int size, const byte* data);
|
||||
wxWave(int size, const wxByte* data);
|
||||
~wxWave();
|
||||
|
||||
public:
|
||||
// Create from resource or file
|
||||
bool Create(const wxString& fileName, bool isResource = FALSE);
|
||||
// Create from data
|
||||
bool Create(int size, const byte* data);
|
||||
bool Create(int size, const wxByte* data);
|
||||
|
||||
bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
|
||||
bool Play(bool async = TRUE, bool looped = FALSE);
|
||||
@@ -47,7 +43,7 @@ protected:
|
||||
bool Free();
|
||||
|
||||
private:
|
||||
byte* m_waveData;
|
||||
wxByte* m_waveData;
|
||||
int m_waveLength;
|
||||
bool m_isResource;
|
||||
|
||||
|
@@ -16,10 +16,6 @@
|
||||
#pragma interface "wave.h"
|
||||
#endif
|
||||
|
||||
#ifndef byte
|
||||
#define byte unsigned char
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
#ifndef AUDIODEV
|
||||
@@ -31,14 +27,14 @@ class wxWave : public wxObject
|
||||
public:
|
||||
wxWave();
|
||||
wxWave(const wxString& fileName, bool isResource = FALSE);
|
||||
wxWave(int size, const byte* data);
|
||||
wxWave(int size, const wxByte* data);
|
||||
~wxWave();
|
||||
|
||||
public:
|
||||
// Create from resource or file
|
||||
bool Create(const wxString& fileName, bool isResource = FALSE);
|
||||
// Create from data
|
||||
bool Create(int size, const byte* data);
|
||||
bool Create(int size, const wxByte* data);
|
||||
|
||||
bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
|
||||
bool Play(bool async = TRUE, bool looped = FALSE);
|
||||
@@ -47,7 +43,7 @@ protected:
|
||||
bool Free();
|
||||
|
||||
private:
|
||||
byte* m_waveData;
|
||||
wxByte* m_waveData;
|
||||
int m_waveLength;
|
||||
bool m_isResource;
|
||||
|
||||
|
@@ -162,10 +162,10 @@ public:
|
||||
inline wxPalette *GetColourMap(void) const { return GetPalette(); }
|
||||
void SetColourMap(wxPalette *cmap) { SetPalette(*cmap); };
|
||||
#endif
|
||||
inline wxPalette* GetPalette(void) const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : NULL); }
|
||||
inline wxPalette* GetPalette(void) const { return (M_BITMAPDATA ? (& M_BITMAPDATA->m_bitmapPalette) : (wxPalette*) NULL); }
|
||||
void SetPalette(const wxPalette& palette);
|
||||
|
||||
inline wxMask *GetMask(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : NULL); }
|
||||
inline wxMask *GetMask(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_bitmapMask : (wxMask*) NULL); }
|
||||
void SetMask(wxMask *mask) ;
|
||||
|
||||
inline wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; }
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
void SetHBITMAP(WXHBITMAP bmp);
|
||||
inline WXHBITMAP GetHBITMAP(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hBitmap : 0); }
|
||||
inline void SetSelectedInto(wxDC *dc) { if (M_BITMAPDATA) M_BITMAPDATA->m_selectedInto = dc; }
|
||||
inline wxDC *GetSelectedInto(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_selectedInto : NULL); }
|
||||
inline wxDC *GetSelectedInto(void) const { return (M_BITMAPDATA ? M_BITMAPDATA->m_selectedInto : (wxDC*) NULL); }
|
||||
bool FreeResource(bool force = FALSE);
|
||||
|
||||
// Creates a bitmap that matches the device context's depth, from
|
||||
|
@@ -79,10 +79,10 @@ public:
|
||||
inline int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
|
||||
inline int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
|
||||
inline int GetDashes(wxDash **ptr) const {
|
||||
*ptr = (M_PENDATA ? M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
|
||||
*ptr = (M_PENDATA ? M_PENDATA->m_dash : (wxDash*) NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0);
|
||||
}
|
||||
|
||||
inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); };
|
||||
inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); };
|
||||
|
||||
// Internal
|
||||
bool RealizeResource();
|
||||
|
@@ -182,11 +182,15 @@ inline bool wxStyleHasBorder(long style)
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__) && defined(__WXDEBUG__) && wxUSE_DBWIN32
|
||||
|
||||
#ifndef __TWIN32__
|
||||
#ifdef OutputDebugString
|
||||
#undef OutputDebugString
|
||||
#endif
|
||||
|
||||
#define OutputDebugString OutputDebugStringW95
|
||||
#endif
|
||||
|
||||
extern void OutputDebugStringW95(const char*, ...);
|
||||
#endif
|
||||
|
||||
|
@@ -268,6 +268,19 @@
|
||||
#define wxUSE_OWNER_DRAWN 0
|
||||
#endif
|
||||
|
||||
#ifdef __TWIN32__
|
||||
|
||||
#undef wxUSE_THREADS
|
||||
#define wxUSE_THREADS 0
|
||||
|
||||
#undef wxUSE_DBWIN32
|
||||
#define wxUSE_DBWIN32 0
|
||||
|
||||
#undef wxUSE_ODBC
|
||||
#define wxUSE_ODBC 0
|
||||
|
||||
#endif
|
||||
|
||||
// Minimal setup e.g. for compiling small utilities
|
||||
#define MINIMAL_WXWINDOWS_SETUP 0
|
||||
|
||||
|
@@ -44,9 +44,9 @@ class WXDLLEXPORT wxToolBar95: public wxToolBarBase
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
// Call default behaviour
|
||||
void OnPaint(wxPaintEvent& event) { Default() ; }
|
||||
void OnSize(wxSizeEvent& event) { Default() ; }
|
||||
void OnKillFocus(wxFocusEvent& event) { Default() ; }
|
||||
void OnPaint(wxPaintEvent& WXUNUSED(event)) { Default() ; }
|
||||
void OnSize(wxSizeEvent& WXUNUSED(event)) { Default() ; }
|
||||
void OnKillFocus(wxFocusEvent& WXUNUSED(event)) { Default() ; }
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
|
||||
// Handle wxToolBar95 events
|
||||
|
@@ -23,14 +23,14 @@ class WXDLLEXPORT wxWave : public wxObject
|
||||
public:
|
||||
wxWave();
|
||||
wxWave(const wxString& fileName, bool isResource = FALSE);
|
||||
wxWave(int size, const byte* data);
|
||||
wxWave(int size, const wxByte* data);
|
||||
~wxWave();
|
||||
|
||||
public:
|
||||
// Create from resource or file
|
||||
bool Create(const wxString& fileName, bool isResource = FALSE);
|
||||
// Create from data
|
||||
bool Create(int size, const byte* data);
|
||||
bool Create(int size, const wxByte* data);
|
||||
|
||||
bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
|
||||
bool Play(bool async = TRUE, bool looped = FALSE) const;
|
||||
@@ -39,7 +39,7 @@ protected:
|
||||
bool Free();
|
||||
|
||||
private:
|
||||
byte* m_waveData;
|
||||
wxByte* m_waveData;
|
||||
int m_waveLength;
|
||||
bool m_isResource;
|
||||
};
|
||||
|
@@ -462,7 +462,7 @@ public:
|
||||
// Does this window want to accept keyboard focus?
|
||||
virtual bool AcceptsFocus() const;
|
||||
|
||||
virtual void PrepareDC( wxDC &dc ) {};
|
||||
virtual void PrepareDC( wxDC& WXUNUSED(dc) ) {};
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// IMPLEMENTATION
|
||||
@@ -765,7 +765,7 @@ inline int wxWindow::GetId() const { return m_windowId; }
|
||||
inline void wxWindow::SetId(int id) { m_windowId = id; }
|
||||
inline wxWindow *wxWindow::GetParent() const { return m_windowParent; }
|
||||
inline void wxWindow::SetParent(wxWindow *p) { m_windowParent = p; }
|
||||
inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : NULL); }
|
||||
inline wxWindow *wxWindow::GetGrandParent() const { return (m_windowParent ? m_windowParent->m_windowParent : (wxWindow*) NULL); }
|
||||
inline wxList& wxWindow::GetChildren() const { return (wxList&) *m_children; }
|
||||
inline wxFont& wxWindow::GetFont() const { return (wxFont&) m_windowFont; }
|
||||
inline wxString wxWindow::GetName() const { return m_windowName; }
|
||||
|
@@ -29,7 +29,7 @@
|
||||
//
|
||||
//
|
||||
|
||||
#if defined( __GNUWIN32__ ) || defined(__MWERKS__)
|
||||
#if (defined( __GNUWIN32__ ) && !defined(__TWIN32__)) || defined(__MWERKS__)
|
||||
#include <wx/msw/gnuwin32/winresrc.h>
|
||||
#else
|
||||
#include <windows.h>
|
||||
|
@@ -43,7 +43,7 @@ public:
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
||||
|
||||
// wxGTK has its own wxPostscriptDC
|
||||
|
||||
|
@@ -59,6 +59,10 @@
|
||||
#undef FindResource
|
||||
#endif
|
||||
|
||||
#ifdef LoadAccelerators
|
||||
#undef LoadAccelerators
|
||||
#endif
|
||||
|
||||
#else
|
||||
// always include this file (under Unix it's generated by configure)
|
||||
#include "wx/setup.h"
|
||||
|
Reference in New Issue
Block a user