Use __WINDOWS__ for OS kind checks and reserve __WXMSW__ for GUI toolkit.

This change prepares the way for using wxGTK under Windows as this would
still define __WINDOWS__ but use __WXGTK__ instead of __WXMSW__.

Closes #14064.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-03-04 00:29:31 +00:00
parent 2e3407de5c
commit d98a58c543
55 changed files with 192 additions and 193 deletions

View File

@@ -32,10 +32,6 @@ always tested using @ifdef_ and not @if_.
@section page_cppconst_guisystem GUI system @section page_cppconst_guisystem GUI system
@beginDefList @beginDefList
@itemdef{__WINDOWS__, any Windows, you may also use __WXMSW__}
@itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
@itemdef{__WIN32__, Win32 API}
@itemdef{__WIN64__, Win64 (mostly same as Win32 but data type sizes are different)}
@itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI == 0)} @itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI == 0)}
@itemdef{__WXCOCOA__, OS X using wxCocoa Port} @itemdef{__WXCOCOA__, OS X using wxCocoa Port}
@itemdef{__WXDFB__, wxUniversal using DirectFB} @itemdef{__WXDFB__, wxUniversal using DirectFB}
@@ -49,7 +45,7 @@ always tested using @ifdef_ and not @if_.
@itemdef{__WXMAC__, old define for Mac OS X} @itemdef{__WXMAC__, old define for Mac OS X}
@itemdef{__WXMOTIF__, Motif} @itemdef{__WXMOTIF__, Motif}
@itemdef{__WXMOTIF20__, Motif 2.0 or higher} @itemdef{__WXMOTIF20__, Motif 2.0 or higher}
@itemdef{__WXMSW__, Any Windows} @itemdef{__WXMSW__, GUI using <a href="http://en.wikipedia.org/wiki/Windows_User">Windows Controls</a>}
@itemdef{__WXOSX__, any OS X} @itemdef{__WXOSX__, any OS X}
@itemdef{__WXOSX_IPHONE__, OS X iPhone} @itemdef{__WXOSX_IPHONE__, OS X iPhone}
@itemdef{__WXOSX_CARBON__, Mac OS X using Carbon} @itemdef{__WXOSX_CARBON__, Mac OS X using Carbon}
@@ -112,7 +108,10 @@ symbols, although this has not always been followed.
@itemdef{__UNIX__, any Unix} @itemdef{__UNIX__, any Unix}
@itemdef{__UNIX_LIKE__, Unix, BeOS or VMS} @itemdef{__UNIX_LIKE__, Unix, BeOS or VMS}
@itemdef{__VMS__, VMS} @itemdef{__VMS__, VMS}
@itemdef{__WINDOWS__, any Windows} @itemdef{__WINDOWS__, Any Windows platform, using any port (see also @c __WXMSW__)}
@itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
@itemdef{__WIN32__, Win32 API}
@itemdef{__WIN64__, Win64 (mostly same as Win32 but data type sizes are different)}
@itemdef{__WINE__, Wine} @itemdef{__WINE__, Wine}
@itemdef{_WIN32_WCE, Windows CE version} @itemdef{_WIN32_WCE, Windows CE version}
@endDefList @endDefList

View File

@@ -31,7 +31,7 @@
class WXDLLIMPEXP_FWD_BASE wxDateTime; class WXDLLIMPEXP_FWD_BASE wxDateTime;
class WXDLLIMPEXP_FWD_BASE wxTimeSpan; class WXDLLIMPEXP_FWD_BASE wxTimeSpan;
class WXDLLIMPEXP_FWD_BASE wxDateSpan; class WXDLLIMPEXP_FWD_BASE wxDateSpan;
#ifdef __WXMSW__ #ifdef __WINDOWS__
struct _SYSTEMTIME; struct _SYSTEMTIME;
#endif #endif
@@ -606,7 +606,7 @@ public:
wxDateTime_t minute = 0, wxDateTime_t minute = 0,
wxDateTime_t second = 0, wxDateTime_t second = 0,
wxDateTime_t millisec = 0); wxDateTime_t millisec = 0);
#ifdef __WXMSW__ #ifdef __WINDOWS__
wxDateTime(const struct _SYSTEMTIME& st) wxDateTime(const struct _SYSTEMTIME& st)
{ {
SetFromMSWSysTime(st); SetFromMSWSysTime(st);
@@ -928,7 +928,7 @@ public:
// SYSTEMTIME format // SYSTEMTIME format
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
#ifdef __WXMSW__ #ifdef __WINDOWS__
// convert SYSTEMTIME to wxDateTime // convert SYSTEMTIME to wxDateTime
wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st); wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st);
@@ -938,7 +938,7 @@ public:
// same as above but only take date part into account, time is always zero // same as above but only take date part into account, time is always zero
wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st); wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st);
void GetAsMSWSysDate(struct _SYSTEMTIME* st) const; void GetAsMSWSysDate(struct _SYSTEMTIME* st) const;
#endif // __WXMSW__ #endif // __WINDOWS__
// comparison (see also functions below for operator versions) // comparison (see also functions below for operator versions)
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------

View File

@@ -123,14 +123,14 @@ enum wxPluginCategory
#define wxDL_INIT_FUNC(pfx, name, dynlib) \ #define wxDL_INIT_FUNC(pfx, name, dynlib) \
pfx ## name = (name ## _t)(dynlib).RawGetSymbol(#name) pfx ## name = (name ## _t)(dynlib).RawGetSymbol(#name)
#ifdef __WXMSW__ #ifdef __WINDOWS__
// same as wxDL_INIT_FUNC() but appends 'A' or 'W' to the function name, see // same as wxDL_INIT_FUNC() but appends 'A' or 'W' to the function name, see
// wxDynamicLibrary::GetSymbolAorW() // wxDynamicLibrary::GetSymbolAorW()
#define wxDL_INIT_FUNC_AW(pfx, name, dynlib) \ #define wxDL_INIT_FUNC_AW(pfx, name, dynlib) \
pfx ## name = (name ## _t)(dynlib).GetSymbolAorW(#name) pfx ## name = (name ## _t)(dynlib).GetSymbolAorW(#name)
#endif // __WXMSW__ #endif // __WINDOWS__
// the following macros can be used to redirect a whole library to a class and // the following macros can be used to redirect a whole library to a class and
// check at run-time if the library is present and contains all required // check at run-time if the library is present and contains all required
@@ -304,7 +304,7 @@ public:
#endif #endif
} }
#ifdef __WXMSW__ #ifdef __WINDOWS__
// this function is useful for loading functions from the standard Windows // this function is useful for loading functions from the standard Windows
// DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or // DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or
// wide character build) suffix if they take string parameters // wide character build) suffix if they take string parameters
@@ -326,7 +326,7 @@ public:
{ {
return RawGetSymbolAorW(m_handle, name); return RawGetSymbolAorW(m_handle, name);
} }
#endif // __WXMSW__ #endif // __WINDOWS__
// return all modules/shared libraries in the address space of this process // return all modules/shared libraries in the address space of this process
// //
@@ -349,7 +349,7 @@ public:
static wxString GetPluginsDirectory(); static wxString GetPluginsDirectory();
#ifdef __WXMSW__ #ifdef __WINDOWS__
// return the handle (HMODULE/HINSTANCE) of the DLL with the given name // return the handle (HMODULE/HINSTANCE) of the DLL with the given name
// and/or containing the specified address: for XP and later systems only // and/or containing the specified address: for XP and later systems only
// the address is used and the name is ignored but for the previous systems // the address is used and the name is ignored but for the previous systems
@@ -360,7 +360,7 @@ public:
// need to be freed using FreeLibrary() but it also means that it can // need to be freed using FreeLibrary() but it also means that it can
// become invalid if the DLL is unloaded // become invalid if the DLL is unloaded
static WXHMODULE MSWGetModuleHandle(const char *name, void *addr); static WXHMODULE MSWGetModuleHandle(const char *name, void *addr);
#endif // __WXMSW__ #endif // __WINDOWS__
protected: protected:
// common part of GetSymbol() and HasSymbol() // common part of GetSymbol() and HasSymbol()
@@ -383,7 +383,7 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxDynamicLibrary); wxDECLARE_NO_COPY_CLASS(wxDynamicLibrary);
}; };
#ifdef __WXMSW__ #ifdef __WINDOWS__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind // wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind
@@ -404,7 +404,7 @@ public:
} }
}; };
#endif // __WXMSW__ #endif // __WINDOWS__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Interesting defines // Interesting defines

View File

@@ -200,7 +200,7 @@ enum wxPosixPermissions
#define wxCRT_RmDir _wrmdir #define wxCRT_RmDir _wrmdir
#define wxCRT_Stat _wstat #define wxCRT_Stat _wstat
#define wxStructStat struct _stat #define wxStructStat struct _stat
#elif (defined(__WXMSW__) || defined(__OS2__)) && \ #elif (defined(__WINDOWS__) || defined(__OS2__)) && \
( \ ( \
defined(__VISUALC__) || \ defined(__VISUALC__) || \
defined(__MINGW64__) || \ defined(__MINGW64__) || \

View File

@@ -40,7 +40,7 @@ class WXDLLIMPEXP_FWD_BASE wxFFile;
// this symbol is defined for the platforms where file systems use volumes in // this symbol is defined for the platforms where file systems use volumes in
// paths // paths
#if defined(__WXMSW__) || defined(__DOS__) || defined(__OS2__) #if defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__)
#define wxHAS_FILESYSTEM_VOLUMES #define wxHAS_FILESYSTEM_VOLUMES
#endif #endif

View File

@@ -341,7 +341,7 @@ protected:
#elif defined(wxHAS_KQUEUE) #elif defined(wxHAS_KQUEUE)
#include "wx/unix/fswatcher_kqueue.h" #include "wx/unix/fswatcher_kqueue.h"
#define wxFileSystemWatcher wxKqueueFileSystemWatcher #define wxFileSystemWatcher wxKqueueFileSystemWatcher
#elif defined(__WXMSW__) #elif defined(__WINDOWS__)
#include "wx/msw/fswatcher.h" #include "wx/msw/fswatcher.h"
#define wxFileSystemWatcher wxMSWFileSystemWatcher #define wxFileSystemWatcher wxMSWFileSystemWatcher
#else #else

View File

@@ -60,17 +60,17 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo
{ {
int Language; // wxLanguage id int Language; // wxLanguage id
wxString CanonicalName; // Canonical name, e.g. fr_FR wxString CanonicalName; // Canonical name, e.g. fr_FR
#ifdef __WXMSW__ #ifdef __WINDOWS__
wxUint32 WinLang, // Win32 language identifiers wxUint32 WinLang, // Win32 language identifiers
WinSublang; WinSublang;
#endif // __WXMSW__ #endif // __WINDOWS__
wxString Description; // human-readable name of the language wxString Description; // human-readable name of the language
wxLayoutDirection LayoutDirection; wxLayoutDirection LayoutDirection;
#ifdef __WXMSW__ #ifdef __WINDOWS__
// return the LCID corresponding to this language // return the LCID corresponding to this language
wxUint32 GetLCID() const; wxUint32 GetLCID() const;
#endif // __WXMSW__ #endif // __WINDOWS__
// return the locale name corresponding to this language usable with // return the locale name corresponding to this language usable with
// setlocale() on the current system // setlocale() on the current system
@@ -79,9 +79,9 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo
// for Unix systems GetLocaleName() is trivial so implement it inline here, for // for Unix systems GetLocaleName() is trivial so implement it inline here, for
// MSW it's implemented in intl.cpp // MSW it's implemented in intl.cpp
#ifndef __WXMSW__ #ifndef __WINDOWS__
inline wxString wxLanguageInfo::GetLocaleName() const { return CanonicalName; } inline wxString wxLanguageInfo::GetLocaleName() const { return CanonicalName; }
#endif // !__WXMSW__ #endif // !__WINDOWS__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -18,7 +18,7 @@
# include <iosfwd> # include <iosfwd>
#endif #endif
#ifdef __WXMSW__ #ifdef __WINDOWS__
# include "wx/msw/winundef.h" # include "wx/msw/winundef.h"
#endif #endif

View File

@@ -21,7 +21,7 @@
#include "wx/afterstd.h" #include "wx/afterstd.h"
#ifdef __WXMSW__ #ifdef __WINDOWS__
# include "wx/msw/winundef.h" # include "wx/msw/winundef.h"
#endif #endif

View File

@@ -16,7 +16,7 @@
// 0, or if the platform is not Windows, use TCP/IP for IPC implementation // 0, or if the platform is not Windows, use TCP/IP for IPC implementation
#if !defined(wxUSE_DDE_FOR_IPC) #if !defined(wxUSE_DDE_FOR_IPC)
#ifdef __WXMSW__ #ifdef __WINDOWS__
#define wxUSE_DDE_FOR_IPC 1 #define wxUSE_DDE_FOR_IPC 1
#else #else
#define wxUSE_DDE_FOR_IPC 0 #define wxUSE_DDE_FOR_IPC 0

View File

@@ -29,7 +29,7 @@ typedef unsigned long wxLogLevel;
#define wxTraceResAlloc 0x0004 // trace GDI resource allocation #define wxTraceResAlloc 0x0004 // trace GDI resource allocation
#define wxTraceRefCount 0x0008 // trace various ref counting operations #define wxTraceRefCount 0x0008 // trace various ref counting operations
#ifdef __WXMSW__ #ifdef __WINDOWS__
#define wxTraceOleCalls 0x0100 // OLE interface calls #define wxTraceOleCalls 0x0100 // OLE interface calls
#endif #endif
@@ -128,7 +128,7 @@ enum wxLogLevelValues
#define wxTRACE_ResAlloc wxT("resalloc") // trace GDI resource allocation #define wxTRACE_ResAlloc wxT("resalloc") // trace GDI resource allocation
#define wxTRACE_RefCount wxT("refcount") // trace various ref counting operations #define wxTRACE_RefCount wxT("refcount") // trace various ref counting operations
#ifdef __WXMSW__ #ifdef __WINDOWS__
#define wxTRACE_OleCalls wxT("ole") // OLE interface calls #define wxTRACE_OleCalls wxT("ole") // OLE interface calls
#endif #endif

View File

@@ -128,7 +128,7 @@
#endif /* __cplusplus */ #endif /* __cplusplus */
#if defined(__WXMSW__) && !defined(__WXWINCE__) #if defined(__WINDOWS__) && !defined(__WXWINCE__)
#define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c ) #define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c )
#else #else
#define wxMulDivInt32( a , b , c ) (wxRound((a)*(((wxDouble)b)/((wxDouble)c)))) #define wxMulDivInt32( a , b , c ) (wxRound((a)*(((wxDouble)b)/((wxDouble)c))))

View File

@@ -60,7 +60,7 @@ WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false);
// devik 2000-8-29: All new/delete ops are now inline because they can't // devik 2000-8-29: All new/delete ops are now inline because they can't
// be marked as dllexport/dllimport. It then leads to weird bugs when // be marked as dllexport/dllimport. It then leads to weird bugs when
// used on MSW as DLL // used on MSW as DLL
#if defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)) #if defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))
inline void * operator new (size_t size, wxChar * fileName, int lineNum) inline void * operator new (size_t size, wxChar * fileName, int lineNum)
{ {
return wxDebugAlloc(size, fileName, lineNum, false, false); return wxDebugAlloc(size, fileName, lineNum, false, false);
@@ -108,7 +108,7 @@ void * operator new[] (size_t size, wxChar * fileName, int lineNum);
void operator delete[] (void * buf); void operator delete[] (void * buf);
#endif // wxUSE_ARRAY_MEMORY_OPERATORS #endif // wxUSE_ARRAY_MEMORY_OPERATORS
#endif // defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)) #endif // defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))
// VC++ 6.0 and MWERKS // VC++ 6.0 and MWERKS
#if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) || defined(__MWERKS__) #if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) || defined(__MWERKS__)

View File

@@ -42,7 +42,7 @@ enum wxBatteryState
// compiling in the code for handling them which is never going to be invoked // compiling in the code for handling them which is never going to be invoked
// under the other platforms, we define wxHAS_POWER_EVENTS symbol if this event // under the other platforms, we define wxHAS_POWER_EVENTS symbol if this event
// is available, it should be used to guard all code using wxPowerEvent // is available, it should be used to guard all code using wxPowerEvent
#ifdef __WXMSW__ #ifdef __WINDOWS__
#define wxHAS_POWER_EVENTS #define wxHAS_POWER_EVENTS

View File

@@ -23,7 +23,7 @@
#define wxFSWatchEntry wxFSWatchEntryKq #define wxFSWatchEntry wxFSWatchEntryKq
WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxFSWatchEntry>,wxFSWatchEntries); WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxFSWatchEntry>,wxFSWatchEntries);
#include "wx/unix/private/fswatcher_kqueue.h" #include "wx/unix/private/fswatcher_kqueue.h"
#elif defined(__WXMSW__) #elif defined(__WINDOWS__)
class wxFSWatchEntryMSW; class wxFSWatchEntryMSW;
#define wxFSWatchEntry wxFSWatchEntryMSW #define wxFSWatchEntry wxFSWatchEntryMSW
WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxFSWatchEntry>,wxFSWatchEntries); WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxFSWatchEntry>,wxFSWatchEntries);

View File

@@ -11,7 +11,7 @@
#ifndef _WX_PRIVATE_SOCKADDR_H_ #ifndef _WX_PRIVATE_SOCKADDR_H_
#define _WX_PRIVATE_SOCKADDR_H_ #define _WX_PRIVATE_SOCKADDR_H_
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#if wxUSE_IPV6 #if wxUSE_IPV6

View File

@@ -61,7 +61,7 @@
// include the header defining timeval: under Windows this struct is used only // include the header defining timeval: under Windows this struct is used only
// with sockets so we need to include winsock.h which we do via windows.h // with sockets so we need to include winsock.h which we do via windows.h
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#else #else
#include <sys/time.h> // for timeval #include <sys/time.h> // for timeval
@@ -79,7 +79,7 @@
// define some symbols which winsock.h defines but traditional BSD headers // define some symbols which winsock.h defines but traditional BSD headers
// don't // don't
#ifndef __WXMSW__ #ifndef __WINDOWS__
#define SOCKET int #define SOCKET int
#endif #endif
@@ -367,7 +367,7 @@ private:
wxDECLARE_NO_COPY_CLASS(wxSocketImpl); wxDECLARE_NO_COPY_CLASS(wxSocketImpl);
}; };
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/private/sockmsw.h" #include "wx/msw/private/sockmsw.h"
#else #else
#include "wx/unix/private/sockunix.h" #include "wx/unix/private/sockunix.h"

View File

@@ -289,7 +289,7 @@ bool wxPrintfConvSpec<CharType>::Parse(const CharType *format)
CHECK_PREC CHECK_PREC
m_szFlags[flagofs++] = char(ch); m_szFlags[flagofs++] = char(ch);
break; break;
#ifdef __WXMSW__ #ifdef __WINDOWS__
// under Windows we support the special '%I64' notation as longlong // under Windows we support the special '%I64' notation as longlong
// integer conversion specifier for MSVC compatibility // integer conversion specifier for MSVC compatibility
// (it behaves exactly as '%lli' or '%Li' or '%qi') // (it behaves exactly as '%lli' or '%Li' or '%qi')
@@ -308,7 +308,7 @@ bool wxPrintfConvSpec<CharType>::Parse(const CharType *format)
break; break;
} }
// else: fall-through, 'I' is MSVC equivalent of C99 'z' // else: fall-through, 'I' is MSVC equivalent of C99 'z'
#endif // __WXMSW__ #endif // __WINDOWS__
case wxT('z'): case wxT('z'):
case wxT('Z'): case wxT('Z'):

View File

@@ -55,7 +55,7 @@ protected:
// wxSound class implementation // wxSound class implementation
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/sound.h" #include "wx/msw/sound.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#include "wx/cocoa/sound.h" #include "wx/cocoa/sound.h"

View File

@@ -146,7 +146,7 @@ protected:
virtual void OnStackFrame(const wxStackFrame& frame) = 0; virtual void OnStackFrame(const wxStackFrame& frame) = 0;
}; };
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/stackwalk.h" #include "wx/msw/stackwalk.h"
#elif defined(__UNIX__) #elif defined(__UNIX__)
#include "wx/unix/stackwalk.h" #include "wx/unix/stackwalk.h"

View File

@@ -171,7 +171,7 @@ protected:
}; };
#if wxUSE_STDPATHS #if wxUSE_STDPATHS
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/stdpaths.h" #include "wx/msw/stdpaths.h"
#define wxHAS_NATIVE_STDPATHS #define wxHAS_NATIVE_STDPATHS
// We want CoreFoundation paths on both CarbonLib and Darwin (for all ports) // We want CoreFoundation paths on both CarbonLib and Darwin (for all ports)

View File

@@ -69,7 +69,7 @@
// it would have to be re-tested and probably corrected // it would have to be re-tested and probably corrected
// CS: under OSX release builds the string destructor/cache cleanup sometimes // CS: under OSX release builds the string destructor/cache cleanup sometimes
// crashes, disable until we find the true reason or a better workaround // crashes, disable until we find the true reason or a better workaround
#if wxUSE_UNICODE_UTF8 && !defined(__WXMSW__) && !defined(__WXOSX__) #if wxUSE_UNICODE_UTF8 && !defined(__WINDOWS__) && !defined(__WXOSX__)
#define wxUSE_STRING_POS_CACHE 1 #define wxUSE_STRING_POS_CACHE 1
#else #else
#define wxUSE_STRING_POS_CACHE 0 #define wxUSE_STRING_POS_CACHE 0

View File

@@ -219,7 +219,7 @@ private:
// in order to avoid any overhead under platforms where critical sections are // in order to avoid any overhead under platforms where critical sections are
// just mutexes make all wxCriticalSection class functions inline // just mutexes make all wxCriticalSection class functions inline
#if !defined(__WXMSW__) #if !defined(__WINDOWS__)
#define wxCRITSECT_IS_MUTEX 1 #define wxCRITSECT_IS_MUTEX 1
#define wxCRITSECT_INLINE WXEXPORT inline #define wxCRITSECT_INLINE WXEXPORT inline
@@ -258,7 +258,7 @@ public:
private: private:
#if wxCRITSECT_IS_MUTEX #if wxCRITSECT_IS_MUTEX
wxMutex m_mutex; wxMutex m_mutex;
#elif defined(__WXMSW__) #elif defined(__WINDOWS__)
// we can't allocate any memory in the ctor, so use placement new - // we can't allocate any memory in the ctor, so use placement new -
// unfortunately, we have to hardcode the sizeof() here because we can't // unfortunately, we have to hardcode the sizeof() here because we can't
// include windows.h from this public header and we also have to use the // include windows.h from this public header and we also have to use the
@@ -844,7 +844,7 @@ public:
#if wxUSE_THREADS #if wxUSE_THREADS
#if defined(__WXMSW__) || defined(__OS2__) || defined(__EMX__) || defined(__WXOSX__) #if defined(__WINDOWS__) || defined(__OS2__) || defined(__EMX__) || defined(__WXOSX__)
// unlock GUI if there are threads waiting for and lock it back when // unlock GUI if there are threads waiting for and lock it back when
// there are no more of them - should be called periodically by the main // there are no more of them - should be called periodically by the main
// thread // thread

View File

@@ -76,7 +76,7 @@ wxMutexError wxMutex::Unlock()
// variables and their events/event semaphores have quite different semantics, // variables and their events/event semaphores have quite different semantics,
// so we reimplement the conditions from scratch using the mutexes and // so we reimplement the conditions from scratch using the mutexes and
// semaphores // semaphores
#if defined(__WXMSW__) || defined(__OS2__) || defined(__EMX__) #if defined(__WINDOWS__) || defined(__OS2__) || defined(__EMX__)
class wxConditionInternal class wxConditionInternal
{ {
@@ -223,7 +223,7 @@ wxCondError wxConditionInternal::Broadcast()
return wxCOND_NO_ERROR; return wxCOND_NO_ERROR;
} }
#endif // MSW or OS2 #endif // __WINDOWS__ || __OS2__ || __EMX__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCondition // wxCondition

View File

@@ -50,7 +50,7 @@
typedef void (*wxTlsDestructorFunction)(void*); typedef void (*wxTlsDestructorFunction)(void*);
} }
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/tls.h" #include "wx/msw/tls.h"
#elif defined(__OS2__) #elif defined(__OS2__)
#include "wx/os2/tls.h" #include "wx/os2/tls.h"

View File

@@ -410,12 +410,12 @@ WXDLLIMPEXP_BASE long wxExecute(const wxString& command,
int flags = 0, int flags = 0,
const wxExecuteEnv *env = NULL); const wxExecuteEnv *env = NULL);
#if defined(__WXMSW__) && wxUSE_IPC #if defined(__WINDOWS__) && wxUSE_IPC
// ask a DDE server to execute the DDE request with given parameters // ask a DDE server to execute the DDE request with given parameters
WXDLLIMPEXP_BASE bool wxExecuteDDE(const wxString& ddeServer, WXDLLIMPEXP_BASE bool wxExecuteDDE(const wxString& ddeServer,
const wxString& ddeTopic, const wxString& ddeTopic,
const wxString& ddeCommand); const wxString& ddeCommand);
#endif // __WXMSW__ && wxUSE_IPC #endif // __WINDOWS__ && wxUSE_IPC
enum wxSignal enum wxSignal
{ {
@@ -815,8 +815,8 @@ WXDLLIMPEXP_CORE bool wxYieldIfNeeded();
// Windows resources access // Windows resources access
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// MSW only: get user-defined resource from the .res file. // Windows only: get user-defined resource from the .res file.
#ifdef __WXMSW__ #ifdef __WINDOWS__
// default resource type for wxLoadUserResource() // default resource type for wxLoadUserResource()
extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxUserResourceStr; extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxUserResourceStr;
@@ -843,7 +843,7 @@ WXDLLIMPEXP_CORE bool wxYieldIfNeeded();
const wxString& resourceType = wxUserResourceStr, const wxString& resourceType = wxUserResourceStr,
int* pLen = NULL, int* pLen = NULL,
WXHINSTANCE module = 0); WXHINSTANCE module = 0);
#endif // MSW #endif // __WINDOWS__
#endif #endif
// _WX_UTILSH__ // _WX_UTILSH__

View File

@@ -25,7 +25,7 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" // includes windows.h for MessageBox() #include "wx/msw/wrapwin.h" // includes windows.h for MessageBox()
#endif #endif
#include "wx/list.h" #include "wx/list.h"
@@ -52,7 +52,7 @@
#include <typeinfo> #include <typeinfo>
#endif #endif
#if !defined(__WXMSW__) || defined(__WXMICROWIN__) #if !defined(__WINDOWS__) || defined(__WXMICROWIN__)
#include <signal.h> // for SIGTRAP used by wxTrap() #include <signal.h> // for SIGTRAP used by wxTrap()
#endif //Win/Unix #endif //Win/Unix
@@ -65,7 +65,7 @@
#if wxDEBUG_LEVEL #if wxDEBUG_LEVEL
#if wxUSE_STACKWALKER #if wxUSE_STACKWALKER
#include "wx/stackwalk.h" #include "wx/stackwalk.h"
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/debughlp.h" #include "wx/msw/debughlp.h"
#endif #endif
#endif // wxUSE_STACKWALKER #endif // wxUSE_STACKWALKER
@@ -896,12 +896,12 @@ wxString wxAppTraitsBase::GetAssertStackTrace()
{ {
#if wxDEBUG_LEVEL #if wxDEBUG_LEVEL
#if !defined(__WXMSW__) #if !defined(__WINDOWS__)
// on Unix stack frame generation may take some time, depending on the // on Unix stack frame generation may take some time, depending on the
// size of the executable mainly... warn the user that we are working // size of the executable mainly... warn the user that we are working
wxFprintf(stderr, "Collecting stack trace information, please wait..."); wxFprintf(stderr, "Collecting stack trace information, please wait...");
fflush(stderr); fflush(stderr);
#endif // !__WXMSW__ #endif // !__WINDOWS__
wxString stackTrace; wxString stackTrace;
@@ -1016,7 +1016,7 @@ void wxAbort()
// break into the debugger // break into the debugger
void wxTrap() void wxTrap()
{ {
#if defined(__WXMSW__) && !defined(__WXMICROWIN__) #if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
DebugBreak(); DebugBreak();
#elif defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS #elif defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS
Debugger(); Debugger();
@@ -1179,8 +1179,8 @@ static void LINKAGEMODE SetTraceMasks()
static static
bool DoShowAssertDialog(const wxString& msg) bool DoShowAssertDialog(const wxString& msg)
{ {
// under MSW we can show the dialog even in the console mode // under Windows we can show the dialog even in the console mode
#if defined(__WXMSW__) && !defined(__WXMICROWIN__) #if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
wxString msgDlg(msg); wxString msgDlg(msg);
// this message is intentionally not translated -- it is for developers // this message is intentionally not translated -- it is for developers
@@ -1203,9 +1203,9 @@ bool DoShowAssertDialog(const wxString& msg)
//case IDNO: nothing to do //case IDNO: nothing to do
} }
#else // !__WXMSW__ #else // !__WINDOWS__
wxUnusedVar(msg); wxUnusedVar(msg);
#endif // __WXMSW__/!__WXMSW__ #endif // __WINDOWS__/!__WINDOWS__
// continue with the asserts by default // continue with the asserts by default
return false; return false;

View File

@@ -63,7 +63,7 @@ bool wxConfigBase::ms_bAutoCreate = true;
wxConfigBase *wxAppTraitsBase::CreateConfig() wxConfigBase *wxAppTraitsBase::CreateConfig()
{ {
return new return new
#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE #if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName()); wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName());
#else // either we're under Unix or wish to use files even under Windows #else // either we're under Unix or wish to use files even under Windows
wxFileConfig(wxTheApp->GetAppName()); wxFileConfig(wxTheApp->GetAppName());
@@ -385,7 +385,7 @@ enum Bracket
Bracket_None, Bracket_None,
Bracket_Normal = ')', Bracket_Normal = ')',
Bracket_Curly = '}', Bracket_Curly = '}',
#ifdef __WXMSW__ #ifdef __WINDOWS__
Bracket_Windows = '%', // yeah, Windows people are a bit strange ;-) Bracket_Windows = '%', // yeah, Windows people are a bit strange ;-)
#endif #endif
Bracket_Max Bracket_Max
@@ -399,17 +399,17 @@ wxString wxExpandEnvVars(const wxString& str)
size_t m; size_t m;
for ( size_t n = 0; n < str.length(); n++ ) { for ( size_t n = 0; n < str.length(); n++ ) {
switch ( str[n].GetValue() ) { switch ( str[n].GetValue() ) {
#ifdef __WXMSW__ #ifdef __WINDOWS__
case wxT('%'): case wxT('%'):
#endif //WINDOWS #endif // __WINDOWS__
case wxT('$'): case wxT('$'):
{ {
Bracket bracket; Bracket bracket;
#ifdef __WXMSW__ #ifdef __WINDOWS__
if ( str[n] == wxT('%') ) if ( str[n] == wxT('%') )
bracket = Bracket_Windows; bracket = Bracket_Windows;
else else
#endif //WINDOWS #endif // __WINDOWS__
if ( n == str.length() - 1 ) { if ( n == str.length() - 1 ) {
bracket = Bracket_None; bracket = Bracket_None;
} }
@@ -453,7 +453,7 @@ wxString wxExpandEnvVars(const wxString& str)
#endif #endif
{ {
// variable doesn't exist => don't change anything // variable doesn't exist => don't change anything
#ifdef __WXMSW__ #ifdef __WINDOWS__
if ( bracket != Bracket_Windows ) if ( bracket != Bracket_Windows )
#endif #endif
if ( bracket != Bracket_None ) if ( bracket != Bracket_None )
@@ -470,10 +470,10 @@ wxString wxExpandEnvVars(const wxString& str)
// //
// under Unix, OTOH, this warning could be useful for the user to // under Unix, OTOH, this warning could be useful for the user to
// understand why isn't the variable expanded as intended // understand why isn't the variable expanded as intended
#ifndef __WXMSW__ #ifndef __WINDOWS__
wxLogWarning(_("Environment variables expansion failed: missing '%c' at position %u in '%s'."), wxLogWarning(_("Environment variables expansion failed: missing '%c' at position %u in '%s'."),
(char)bracket, (unsigned int) (m + 1), str.c_str()); (char)bracket, (unsigned int) (m + 1), str.c_str());
#endif // __WXMSW__ #endif // __WINDOWS__
} }
else { else {
// skip closing bracket unless the variables wasn't expanded // skip closing bracket unless the variables wasn't expanded

View File

@@ -63,7 +63,7 @@
#if !defined(wxUSE_DATETIME) || wxUSE_DATETIME #if !defined(wxUSE_DATETIME) || wxUSE_DATETIME
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
#include "wx/string.h" #include "wx/string.h"
@@ -2198,7 +2198,7 @@ WXDLLIMPEXP_BASE void wxPrevWDay(wxDateTime::WeekDay& wd)
: (wxDateTime::WeekDay)(wd - 1); : (wxDateTime::WeekDay)(wd - 1);
} }
#ifdef __WXMSW__ #ifdef __WINDOWS__
wxDateTime& wxDateTime::SetFromMSWSysTime(const SYSTEMTIME& st) wxDateTime& wxDateTime::SetFromMSWSysTime(const SYSTEMTIME& st)
{ {
@@ -2246,6 +2246,6 @@ void wxDateTime::GetAsMSWSysDate(SYSTEMTIME* st) const
st->wMilliseconds = 0; st->wMilliseconds = 0;
} }
#endif // __WXMSW__ #endif // __WINDOWS__
#endif // wxUSE_DATETIME #endif // wxUSE_DATETIME

View File

@@ -34,7 +34,7 @@
#if !defined(wxUSE_DATETIME) || wxUSE_DATETIME #if !defined(wxUSE_DATETIME) || wxUSE_DATETIME
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
#include "wx/string.h" #include "wx/string.h"
@@ -326,7 +326,7 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const
time_t time = GetTicks(); time_t time = GetTicks();
if ( (time != (time_t)-1) && !wxStrstr(format, wxT("%l")) if ( (time != (time_t)-1) && !wxStrstr(format, wxT("%l"))
#ifdef __WXMSW__ #ifdef __WINDOWS__
&& !wxStrstr(format, wxT("%z")) && !wxStrstr(format, wxT("%z"))
#endif #endif
) )

View File

@@ -23,7 +23,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/msvcrt.h" #include "wx/msw/msvcrt.h"
#endif #endif

View File

@@ -59,7 +59,7 @@ WX_DEFINE_USER_EXPORTED_OBJARRAY(wxDynamicLibraryDetailsArray)
#endif #endif
// for MSW/Unix it is defined in platform-specific file // for MSW/Unix it is defined in platform-specific file
#if !(defined(__WXMSW__) || defined(__UNIX__)) || defined(__EMX__) #if !(defined(__WINDOWS__) || defined(__UNIX__)) || defined(__EMX__)
wxDllType wxDynamicLibrary::GetProgramHandle() wxDllType wxDynamicLibrary::GetProgramHandle()
{ {
@@ -67,7 +67,7 @@ wxDllType wxDynamicLibrary::GetProgramHandle()
return 0; return 0;
} }
#endif // __WXMSW__ || __UNIX__ #endif // __WINDOWS__ || __UNIX__
bool wxDynamicLibrary::Load(const wxString& libnameOrig, int flags) bool wxDynamicLibrary::Load(const wxString& libnameOrig, int flags)
@@ -112,7 +112,7 @@ bool wxDynamicLibrary::Load(const wxString& libnameOrig, int flags)
// for MSW and Unix this is implemented in the platform-specific file // for MSW and Unix this is implemented in the platform-specific file
// //
// TODO: move the rest to os2/dlpm.cpp and mac/dlmac.cpp! // TODO: move the rest to os2/dlpm.cpp and mac/dlmac.cpp!
#if (!defined(__WXMSW__) && !defined(__UNIX__)) || defined(__EMX__) #if (!defined(__WINDOWS__) && !defined(__UNIX__)) || defined(__EMX__)
/* static */ /* static */
void wxDynamicLibrary::Unload(wxDllType handle) void wxDynamicLibrary::Unload(wxDllType handle)
@@ -124,7 +124,7 @@ void wxDynamicLibrary::Unload(wxDllType handle)
#endif #endif
} }
#endif // !(__WXMSW__ || __UNIX__) #endif // !(__WINDOWS__ || __UNIX__)
void *wxDynamicLibrary::DoGetSymbol(const wxString &name, bool *success) const void *wxDynamicLibrary::DoGetSymbol(const wxString &name, bool *success) const
{ {

View File

@@ -444,7 +444,7 @@ wxFontEncodingArray wxEncodingConverter::GetPlatformEquivalents(wxFontEncoding e
{ {
if (platform == wxPLATFORM_CURRENT) if (platform == wxPLATFORM_CURRENT)
{ {
#if defined(__WXMSW__) #if defined(__WINDOWS__)
platform = wxPLATFORM_WINDOWS; platform = wxPLATFORM_WINDOWS;
#elif defined(__WXGTK__) || defined(__WXMOTIF__) #elif defined(__WXGTK__) || defined(__WXMOTIF__)
platform = wxPLATFORM_UNIX; platform = wxPLATFORM_UNIX;

View File

@@ -82,7 +82,7 @@ bool wxEventLoopBase::Yield(bool onlyIfNeeded)
} }
// wxEventLoopManual is unused in the other ports // wxEventLoopManual is unused in the other ports
#if defined(__WXMSW__) || defined(__WXDFB__) || ( ( defined(__UNIX__) && !defined(__WXOSX__) ) && wxUSE_BASE) #if defined(__WINDOWS__) || defined(__WXDFB__) || ( ( defined(__UNIX__) && !defined(__WXOSX__) ) && wxUSE_BASE)
// ============================================================================ // ============================================================================
// wxEventLoopManual implementation // wxEventLoopManual implementation
@@ -213,5 +213,5 @@ void wxEventLoopManual::Exit(int rc)
WakeUp(); WakeUp();
} }
#endif // __WXMSW__ || __WXMAC__ || __WXDFB__ #endif // __WINDOWS__ || __WXMAC__ || __WXDFB__

View File

@@ -24,7 +24,7 @@
#if wxUSE_FILE #if wxUSE_FILE
// standard // standard
#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__) #if defined(__WINDOWS__) && !defined(__GNUWIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#define NOSERVICE #define NOSERVICE
@@ -47,7 +47,7 @@
#define NOCRYPT #define NOCRYPT
#define NOMCX #define NOMCX
#elif defined(__WXMSW__) && defined(__WXWINCE__) #elif defined(__WINDOWS__) && defined(__WXWINCE__)
#include "wx/msw/missing.h" #include "wx/msw/missing.h"
#elif (defined(__OS2__)) #elif (defined(__OS2__))
#include <io.h> #include <io.h>
@@ -119,7 +119,7 @@
#define O_BINARY (0) #define O_BINARY (0)
#endif //__UNIX__ #endif //__UNIX__
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/mslu.h" #include "wx/msw/mslu.h"
#endif #endif

View File

@@ -46,7 +46,7 @@
#include "wx/stdpaths.h" #include "wx/stdpaths.h"
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif //windows.h #endif //windows.h
#if defined(__WXPM__) #if defined(__WXPM__)

View File

@@ -367,7 +367,7 @@ template<typename CharType>
static CharType *wxDoRealPath (CharType *path) static CharType *wxDoRealPath (CharType *path)
{ {
static const CharType SEP = wxFILE_SEP_PATH; static const CharType SEP = wxFILE_SEP_PATH;
#ifdef __WXMSW__ #ifdef __WINDOWS__
wxUnix2DosFilename(path); wxUnix2DosFilename(path);
#endif #endif
if (path[0] && path[1]) { if (path[0] && path[1]) {
@@ -398,7 +398,7 @@ static CharType *wxDoRealPath (CharType *path)
path[0] = SEP; path[0] = SEP;
path[1] = wxT('\0'); path[1] = wxT('\0');
} }
#if defined(__WXMSW__) || defined(__OS2__) #if defined(__WINDOWS__) || defined(__OS2__)
/* Check that path[2] is NULL! */ /* Check that path[2] is NULL! */
else if (path[1] == wxT(':') && !path[2]) else if (path[1] == wxT(':') && !path[2])
{ {
@@ -447,7 +447,7 @@ wxChar *wxCopyAbsolutePath(const wxString& filename)
{ {
wxString buf = ::wxGetCwd(); wxString buf = ::wxGetCwd();
wxChar ch = buf.Last(); wxChar ch = buf.Last();
#ifdef __WXMSW__ #ifdef __WINDOWS__
if (ch != wxT('\\') && ch != wxT('/')) if (ch != wxT('\\') && ch != wxT('/'))
buf << wxT("\\"); buf << wxT("\\");
#else #else
@@ -501,7 +501,7 @@ static CharType *wxDoExpandPath(CharType *buf, const wxString& name)
trimchars[3] = 0; trimchars[3] = 0;
static const CharType SEP = wxFILE_SEP_PATH; static const CharType SEP = wxFILE_SEP_PATH;
#ifdef __WXMSW__ #ifdef __WINDOWS__
//wxUnix2DosFilename(path); //wxUnix2DosFilename(path);
#endif #endif
@@ -521,7 +521,7 @@ static CharType *wxDoExpandPath(CharType *buf, const wxString& name)
s = nm; s = nm;
d = lnm; d = lnm;
#ifdef __WXMSW__ #ifdef __WINDOWS__
q = FALSE; q = FALSE;
#else #else
q = nm[0] == wxT('\\') && nm[1] == wxT('~'); q = nm[0] == wxT('\\') && nm[1] == wxT('~');
@@ -546,7 +546,7 @@ static CharType *wxDoExpandPath(CharType *buf, const wxString& name)
else else
#else #else
while ((*d++ = *s) != 0) { while ((*d++ = *s) != 0) {
# ifndef __WXMSW__ # ifndef __WINDOWS__
if (*s == wxT('\\')) { if (*s == wxT('\\')) {
if ((*(d - 1) = *++s)!=0) { if ((*(d - 1) = *++s)!=0) {
s++; s++;
@@ -558,7 +558,7 @@ static CharType *wxDoExpandPath(CharType *buf, const wxString& name)
#endif #endif
// No env variables on WinCE // No env variables on WinCE
#ifndef __WXWINCE__ #ifndef __WXWINCE__
#ifdef __WXMSW__ #ifdef __WINDOWS__
if (*s++ == wxT('$') && (*s == wxT('{') || *s == wxT(')'))) if (*s++ == wxT('$') && (*s == wxT('{') || *s == wxT(')')))
#else #else
if (*s++ == wxT('$')) if (*s++ == wxT('$'))
@@ -677,7 +677,7 @@ wxContractPath (const wxString& filename,
return NULL; return NULL;
wxStrcpy (dest, filename); wxStrcpy (dest, filename);
#ifdef __WXMSW__ #ifdef __WINDOWS__
wxUnix2DosFilename(dest); wxUnix2DosFilename(dest);
#endif #endif
@@ -767,7 +767,7 @@ wxPathOnly (wxChar *path)
i --; i --;
} }
#if defined(__WXMSW__) || defined(__OS2__) #if defined(__WINDOWS__) || defined(__OS2__)
// Try Drive specifier // Try Drive specifier
if (wxIsalpha (buf[0]) && buf[1] == wxT(':')) if (wxIsalpha (buf[0]) && buf[1] == wxT(':'))
{ {
@@ -816,7 +816,7 @@ wxString wxPathOnly (const wxString& path)
i --; i --;
} }
#if defined(__WXMSW__) || defined(__OS2__) #if defined(__WINDOWS__) || defined(__OS2__)
// Try Drive specifier // Try Drive specifier
if (wxIsalpha (buf[0]) && buf[1] == wxT(':')) if (wxIsalpha (buf[0]) && buf[1] == wxT(':'))
{ {
@@ -923,7 +923,7 @@ static void wxDoDos2UnixFilename(T *s)
{ {
if (*s == wxT('\\')) if (*s == wxT('\\'))
*s = wxT('/'); *s = wxT('/');
#ifdef __WXMSW__ #ifdef __WINDOWS__
else else
*s = wxTolower(*s); // Case INDEPENDENT *s = wxTolower(*s); // Case INDEPENDENT
#endif #endif
@@ -936,14 +936,14 @@ void wxDos2UnixFilename(wchar_t *s) { wxDoDos2UnixFilename(s); }
template<typename T> template<typename T>
static void static void
#if defined(__WXMSW__) || defined(__OS2__) #if defined(__WINDOWS__) || defined(__OS2__)
wxDoUnix2DosFilename(T *s) wxDoUnix2DosFilename(T *s)
#else #else
wxDoUnix2DosFilename(T *WXUNUSED(s) ) wxDoUnix2DosFilename(T *WXUNUSED(s) )
#endif #endif
{ {
// Yes, I really mean this to happen under DOS only! JACS // Yes, I really mean this to happen under DOS only! JACS
#if defined(__WXMSW__) || defined(__OS2__) #if defined(__WINDOWS__) || defined(__OS2__)
if (s) if (s)
while (*s) while (*s)
{ {
@@ -1150,7 +1150,7 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
wxUnusedVar(overwrite); wxUnusedVar(overwrite);
return false; return false;
#endif // __WXMSW__ && __WIN32__ #endif // __WINDOWS__ && __WIN32__
return true; return true;
} }
@@ -1213,7 +1213,7 @@ bool wxMkdir(const wxString& dir, int perm)
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too // assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
// for the GNU compiler // for the GNU compiler
#elif (!(defined(__WXMSW__) || defined(__OS2__) || defined(__DOS__))) || \ #elif (!(defined(__WINDOWS__) || defined(__OS2__) || defined(__DOS__))) || \
(defined(__GNUWIN32__) && !defined(__MINGW32__)) || \ (defined(__GNUWIN32__) && !defined(__MINGW32__)) || \
defined(__WINE__) || defined(__WXMICROWIN__) defined(__WINE__) || defined(__WXMICROWIN__)
const wxChar *dirname = dir.c_str(); const wxChar *dirname = dir.c_str();
@@ -1863,7 +1863,7 @@ bool wxIsExecutable(const wxString &path)
// //
wxFileKind wxGetFileKind(int fd) wxFileKind wxGetFileKind(int fd)
{ {
#if defined __WXMSW__ && !defined __WXWINCE__ && defined wxGetOSFHandle #if defined __WINDOWS__ && !defined __WXWINCE__ && defined wxGetOSFHandle
switch (::GetFileType(wxGetOSFHandle(fd)) & ~FILE_TYPE_REMOTE) switch (::GetFileType(wxGetOSFHandle(fd)) & ~FILE_TYPE_REMOTE)
{ {
case FILE_TYPE_CHAR: case FILE_TYPE_CHAR:

View File

@@ -77,7 +77,7 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" // For GetShort/LongPathName #include "wx/msw/wrapwin.h" // For GetShort/LongPathName
#endif #endif
#include "wx/dynarray.h" #include "wx/dynarray.h"
@@ -98,7 +98,7 @@
#include "wx/msw/gccpriv.h" #include "wx/msw/gccpriv.h"
#endif #endif
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif #endif
@@ -1318,7 +1318,7 @@ bool wxFileName::Rmdir(int flags) const
bool wxFileName::Rmdir(const wxString& dir, int flags) bool wxFileName::Rmdir(const wxString& dir, int flags)
{ {
#ifdef __WXMSW__ #ifdef __WINDOWS__
if ( flags & wxPATH_RMDIR_RECURSIVE ) if ( flags & wxPATH_RMDIR_RECURSIVE )
{ {
// SHFileOperation needs double null termination string // SHFileOperation needs double null termination string
@@ -1354,9 +1354,9 @@ bool wxFileName::Rmdir(const wxString& dir, int flags)
return true; return true;
} }
else if ( flags & wxPATH_RMDIR_FULL ) else if ( flags & wxPATH_RMDIR_FULL )
#else // !__WXMSW__ #else // !__WINDOWS__
if ( flags != 0 ) // wxPATH_RMDIR_FULL or wxPATH_RMDIR_RECURSIVE if ( flags != 0 ) // wxPATH_RMDIR_FULL or wxPATH_RMDIR_RECURSIVE
#endif // !__WXMSW__ #endif // !__WINDOWS__
{ {
wxString path(dir); wxString path(dir);
if ( path.Last() != wxFILE_SEP_PATH ) if ( path.Last() != wxFILE_SEP_PATH )
@@ -1377,7 +1377,7 @@ bool wxFileName::Rmdir(const wxString& dir, int flags)
cont = d.GetNext(&filename); cont = d.GetNext(&filename);
} }
#ifndef __WXMSW__ #ifndef __WINDOWS__
if ( flags & wxPATH_RMDIR_RECURSIVE ) if ( flags & wxPATH_RMDIR_RECURSIVE )
{ {
// delete all files too // delete all files too
@@ -1388,7 +1388,7 @@ bool wxFileName::Rmdir(const wxString& dir, int flags)
cont = d.GetNext(&filename); cont = d.GetNext(&filename);
} }
} }
#endif // !__WXMSW__ #endif // !__WINDOWS__
} }
return ::wxRmdir(dir); return ::wxRmdir(dir);
@@ -2122,7 +2122,7 @@ wxString wxFileName::GetShortPath() const
{ {
wxString path(GetFullPath()); wxString path(GetFullPath());
#if defined(__WXMSW__) && defined(__WIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__) #if defined(__WINDOWS__) && defined(__WIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
DWORD sz = ::GetShortPathName(path.t_str(), NULL, 0); DWORD sz = ::GetShortPathName(path.t_str(), NULL, 0);
if ( sz != 0 ) if ( sz != 0 )
{ {
@@ -2272,7 +2272,7 @@ wxPathFormat wxFileName::GetFormat( wxPathFormat format )
{ {
if (format == wxPATH_NATIVE) if (format == wxPATH_NATIVE)
{ {
#if defined(__WXMSW__) || defined(__OS2__) || defined(__DOS__) #if defined(__WINDOWS__) || defined(__OS2__) || defined(__DOS__)
format = wxPATH_DOS; format = wxPATH_DOS;
#elif defined(__VMS) #elif defined(__VMS)
format = wxPATH_VMS; format = wxPATH_VMS;

View File

@@ -635,7 +635,7 @@ wxFileName wxFileSystem::URLToFileName(const wxString& url)
path = wxURI::Unescape(path); path = wxURI::Unescape(path);
#ifdef __WXMSW__ #ifdef __WINDOWS__
// file urls either start with a forward slash (local harddisk), // file urls either start with a forward slash (local harddisk),
// otherwise they have a servername/sharename notation, // otherwise they have a servername/sharename notation,
// which only exists on msw and corresponds to a unc // which only exists on msw and corresponds to a unc

View File

@@ -34,7 +34,7 @@
#include "wx/wxcrtvararg.h" #include "wx/wxcrtvararg.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/private.h" // includes windows.h for LOGFONT #include "wx/msw/private.h" // includes windows.h for LOGFONT
#include "wx/msw/winundef.h" #include "wx/msw/winundef.h"
#endif #endif

View File

@@ -37,7 +37,7 @@
#include "wx/scopedptr.h" #include "wx/scopedptr.h"
#include "wx/except.h" #include "wx/except.h"
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/msw/msvcrt.h" #include "wx/msw/msvcrt.h"
@@ -53,7 +53,7 @@
} }
} gs_enableLeakChecks; } gs_enableLeakChecks;
#endif // wxCrtSetDbgFlag #endif // wxCrtSetDbgFlag
#endif // __WXMSW__ #endif // __WINDOWS__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// private classes // private classes
@@ -238,7 +238,7 @@ static bool DoCommonPreInit()
wxLog::GetActiveTarget(); wxLog::GetActiveTarget();
#endif // wxUSE_LOG #endif // wxUSE_LOG
#ifdef __WXMSW__ #ifdef __WINDOWS__
// GUI applications obtain HINSTANCE in their WinMain() but we also need to // GUI applications obtain HINSTANCE in their WinMain() but we also need to
// initialize the global wxhInstance variable for the console programs as // initialize the global wxhInstance variable for the console programs as
// they may need it too, so set it here if it wasn't done yet // they may need it too, so set it here if it wasn't done yet
@@ -246,7 +246,7 @@ static bool DoCommonPreInit()
{ {
wxSetInstance(::GetModuleHandle(NULL)); wxSetInstance(::GetModuleHandle(NULL));
} }
#endif // __WXMSW__ #endif // __WINDOWS__
return true; return true;
} }
@@ -432,9 +432,9 @@ void wxEntryCleanup()
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// for MSW the real wxEntry is defined in msw/main.cpp // for MSW the real wxEntry is defined in msw/main.cpp
#ifndef __WXMSW__ #ifndef __WINDOWS__
#define wxEntryReal wxEntry #define wxEntryReal wxEntry
#endif // !__WXMSW__ #endif // !__WINDOWS__
int wxEntryReal(int& argc, wxChar **argv) int wxEntryReal(int& argc, wxChar **argv)
{ {

View File

@@ -121,7 +121,7 @@ inline wxString ExtractNotLang(const wxString& langFull)
// wxLanguageInfo // wxLanguageInfo
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __WXMSW__ #ifdef __WINDOWS__
// helper used by wxLanguageInfo::GetLocaleName() and elsewhere to determine // helper used by wxLanguageInfo::GetLocaleName() and elsewhere to determine
// whether the locale is Unicode-only (it is if this function returns empty // whether the locale is Unicode-only (it is if this function returns empty
@@ -177,7 +177,7 @@ wxString wxLanguageInfo::GetLocaleName() const
return locale; return locale;
} }
#endif // __WXMSW__ #endif // __WINDOWS__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxLocale // wxLocale
@@ -1126,7 +1126,7 @@ wxString wxLocale::GetHeaderValue(const wxString& header,
// accessors for locale-dependent data // accessors for locale-dependent data
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXMSW__) || defined(__WXOSX__) #if defined(__WINDOWS__) || defined(__WXOSX__)
namespace namespace
{ {
@@ -1148,7 +1148,7 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt)
const char* formatchars = const char* formatchars =
"dghHmMsSy" "dghHmMsSy"
#ifdef __WXMSW__ #ifdef __WINDOWS__
"t" "t"
#else #else
"EawD" "EawD"
@@ -1188,7 +1188,7 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt)
// between 1 and 2 digits for days // between 1 and 2 digits for days
fmtWX += "%d"; fmtWX += "%d";
break; break;
#ifdef __WXMSW__ #ifdef __WINDOWS__
case 3: // ddd case 3: // ddd
fmtWX += "%a"; fmtWX += "%a";
break; break;
@@ -1201,7 +1201,7 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt)
wxFAIL_MSG( "too many 'd's" ); wxFAIL_MSG( "too many 'd's" );
} }
break; break;
#ifndef __WXMSW__ #ifndef __WINDOWS__
case 'D': case 'D':
switch ( lastCount ) switch ( lastCount )
{ {
@@ -1344,12 +1344,12 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt)
wxASSERT_MSG( lastCount <= 2, "too many 'g's" ); wxASSERT_MSG( lastCount <= 2, "too many 'g's" );
break; break;
#ifndef __WXMSW__ #ifndef __WINDOWS__
case 'a': case 'a':
fmtWX += "%p"; fmtWX += "%p";
break; break;
#endif #endif
#ifdef __WXMSW__ #ifdef __WINDOWS__
case 't': case 't':
switch ( lastCount ) switch ( lastCount )
{ {
@@ -1389,9 +1389,9 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt)
} // anonymous namespace } // anonymous namespace
#endif // __WXMSW__ || __WXOSX__ #endif // __WINDOWS__ || __WXOSX__
#if defined(__WXMSW__) #if defined(__WINDOWS__)
namespace namespace
{ {
@@ -1582,7 +1582,7 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
return str.AsString(); return str.AsString();
} }
#else // !__WXMSW__ && !__WXOSX__, assume generic POSIX #else // !__WINDOWS__ && !__WXOSX__, assume generic POSIX
namespace namespace
{ {

View File

@@ -215,9 +215,9 @@ wxLogFormatter::Format(wxLogLevel level,
// don't time stamp debug messages under MSW as debug viewers usually // don't time stamp debug messages under MSW as debug viewers usually
// already have an option to do it // already have an option to do it
#ifdef __WXMSW__ #ifdef __WINDOWS__
if ( level != wxLOG_Debug && level != wxLOG_Trace ) if ( level != wxLOG_Debug && level != wxLOG_Trace )
#endif // __WXMSW__ #endif // __WINDOWS__
prefix = FormatTime(info.timestamp); prefix = FormatTime(info.timestamp);
switch ( level ) switch ( level )
@@ -232,7 +232,7 @@ wxLogFormatter::Format(wxLogLevel level,
// don't prepend "debug/trace" prefix under MSW as it goes to the debug // don't prepend "debug/trace" prefix under MSW as it goes to the debug
// window anyhow and so can't be confused with something else // window anyhow and so can't be confused with something else
#ifndef __WXMSW__ #ifndef __WINDOWS__
case wxLOG_Debug: case wxLOG_Debug:
// this prefix (as well as the one below) is intentionally not // this prefix (as well as the one below) is intentionally not
// translated as nobody translates debug messages anyhow // translated as nobody translates debug messages anyhow
@@ -242,7 +242,7 @@ wxLogFormatter::Format(wxLogLevel level,
case wxLOG_Trace: case wxLOG_Trace:
prefix += "Trace: "; prefix += "Trace: ";
break; break;
#endif // !__WXMSW__ #endif // !__WINDOWS__
} }
return prefix + msg; return prefix + msg;
@@ -1048,7 +1048,7 @@ static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz)
// get error code from syste // get error code from syste
unsigned long wxSysErrorCode() unsigned long wxSysErrorCode()
{ {
#if defined(__WXMSW__) && !defined(__WXMICROWIN__) #if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
return ::GetLastError(); return ::GetLastError();
#else //Unix #else //Unix
return errno; return errno;
@@ -1061,7 +1061,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
if ( nErrCode == 0 ) if ( nErrCode == 0 )
nErrCode = wxSysErrorCode(); nErrCode = wxSysErrorCode();
#if defined(__WXMSW__) && !defined(__WXMICROWIN__) #if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
static wxChar s_szBuf[1024]; static wxChar s_szBuf[1024];
// get error message from system // get error message from system
@@ -1109,7 +1109,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
} }
return s_szBuf; return s_szBuf;
#else // !__WXMSW__ #else // !__WINDOWS__
#if wxUSE_UNICODE #if wxUSE_UNICODE
static wchar_t s_wzBuf[1024]; static wchar_t s_wzBuf[1024];
wxConvCurrent->MB2WC(s_wzBuf, strerror((int)nErrCode), wxConvCurrent->MB2WC(s_wzBuf, strerror((int)nErrCode),
@@ -1118,7 +1118,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
#else #else
return strerror((int)nErrCode); return strerror((int)nErrCode);
#endif #endif
#endif // __WXMSW__/!__WXMSW__ #endif // __WINDOWS__/!__WINDOWS__
} }
#endif // wxUSE_LOG #endif // wxUSE_LOG

View File

@@ -21,7 +21,7 @@
#include "wx/memory.h" #include "wx/memory.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
#include "wx/utils.h" #include "wx/utils.h"
@@ -888,7 +888,7 @@ static MemoryCriticalSection memLocker;
#endif // USE_THREADSAFE_MEMORY_ALLOCATION #endif // USE_THREADSAFE_MEMORY_ALLOCATION
#if !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) #if !(defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
#if wxUSE_GLOBAL_MEMORY_OPERATORS #if wxUSE_GLOBAL_MEMORY_OPERATORS
void * operator new (size_t size, wxChar * fileName, int lineNum) void * operator new (size_t size, wxChar * fileName, int lineNum)
{ {
@@ -922,7 +922,7 @@ void operator delete[] (void * buf)
} }
#endif // wxUSE_ARRAY_MEMORY_OPERATORS #endif // wxUSE_ARRAY_MEMORY_OPERATORS
#endif // wxUSE_GLOBAL_MEMORY_OPERATORS #endif // wxUSE_GLOBAL_MEMORY_OPERATORS
#endif // !(defined(__WXMSW__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) #endif // !(defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)))
// TODO: store whether this is a vector or not. // TODO: store whether this is a vector or not.
void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) ) void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) )
@@ -1045,7 +1045,7 @@ void wxTrace(const wxChar * ...)
va_start(ap, fmt); va_start(ap, fmt);
#ifdef __WXMSW__ #ifdef __WINDOWS__
wvsprintf(buffer,fmt,ap) ; wvsprintf(buffer,fmt,ap) ;
#else #else
vsprintf(buffer,fmt,ap) ; vsprintf(buffer,fmt,ap) ;
@@ -1059,7 +1059,7 @@ void wxTrace(const wxChar * ...)
wxDebugContext::GetStream().flush(); wxDebugContext::GetStream().flush();
} }
else else
#ifdef __WXMSW__ #ifdef __WINDOWS__
#ifdef __WIN32__ #ifdef __WIN32__
OutputDebugString((LPCTSTR)buffer) ; OutputDebugString((LPCTSTR)buffer) ;
#else #else
@@ -1085,7 +1085,7 @@ void wxTraceLevel(int, const wxChar * ...)
va_start(ap, fmt); va_start(ap, fmt);
#ifdef __WXMSW__ #ifdef __WINDOWS__
wxWvsprintf(buffer,fmt,ap) ; wxWvsprintf(buffer,fmt,ap) ;
#else #else
vsprintf(buffer,fmt,ap) ; vsprintf(buffer,fmt,ap) ;
@@ -1099,7 +1099,7 @@ void wxTraceLevel(int, const wxChar * ...)
wxDebugContext::GetStream().flush(); wxDebugContext::GetStream().flush();
} }
else else
#ifdef __WXMSW__ #ifdef __WINDOWS__
#ifdef __WIN32__ #ifdef __WIN32__
OutputDebugString((LPCTSTR)buffer) ; OutputDebugString((LPCTSTR)buffer) ;
#else #else

View File

@@ -46,7 +46,7 @@
#include <ctype.h> #include <ctype.h>
// implementation classes: // implementation classes:
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/mimetype.h" #include "wx/msw/mimetype.h"
#elif ( defined(__WXMAC__) ) #elif ( defined(__WXMAC__) )
#include "wx/osx/mimetype.h" #include "wx/osx/mimetype.h"
@@ -346,9 +346,9 @@ bool wxFileType::GetIcon(wxIconLocation *iconLoc) const
if ( iconLoc ) if ( iconLoc )
{ {
iconLoc->SetFileName(m_info->GetIconFile()); iconLoc->SetFileName(m_info->GetIconFile());
#ifdef __WXMSW__ #ifdef __WINDOWS__
iconLoc->SetIndex(m_info->GetIconIndex()); iconLoc->SetIndex(m_info->GetIconIndex());
#endif // __WXMSW__ #endif // __WINDOWS__
} }
return true; return true;
@@ -444,9 +444,9 @@ size_t wxFileType::GetAllCommands(wxArrayString *verbs,
if ( commands ) if ( commands )
commands->Clear(); commands->Clear();
#if defined (__WXMSW__) || defined(__UNIX__) #if defined (__WINDOWS__) || defined(__UNIX__)
return m_impl->GetAllCommands(verbs, commands, params); return m_impl->GetAllCommands(verbs, commands, params);
#else // !__WXMSW__ || Unix #else // !__WINDOWS__ || __UNIX__
// we don't know how to retrieve all commands, so just try the 2 we know // we don't know how to retrieve all commands, so just try the 2 we know
// about // about
size_t count = 0; size_t count = 0;
@@ -471,12 +471,12 @@ size_t wxFileType::GetAllCommands(wxArrayString *verbs,
} }
return count; return count;
#endif // __WXMSW__/| __UNIX__ #endif // __WINDOWS__/| __UNIX__
} }
bool wxFileType::Unassociate() bool wxFileType::Unassociate()
{ {
#if defined(__WXMSW__) #if defined(__WINDOWS__)
return m_impl->Unassociate(); return m_impl->Unassociate();
#elif defined(__UNIX__) #elif defined(__UNIX__)
return m_impl->Unassociate(this); return m_impl->Unassociate(this);
@@ -490,7 +490,7 @@ bool wxFileType::SetCommand(const wxString& cmd,
const wxString& verb, const wxString& verb,
bool overwriteprompt) bool overwriteprompt)
{ {
#if defined (__WXMSW__) || defined(__UNIX__) #if defined (__WINDOWS__) || defined(__UNIX__)
return m_impl->SetCommand(cmd, verb, overwriteprompt); return m_impl->SetCommand(cmd, verb, overwriteprompt);
#else #else
wxUnusedVar(cmd); wxUnusedVar(cmd);
@@ -504,7 +504,7 @@ bool wxFileType::SetCommand(const wxString& cmd,
bool wxFileType::SetDefaultIcon(const wxString& cmd, int index) bool wxFileType::SetDefaultIcon(const wxString& cmd, int index)
{ {
wxString sTmp = cmd; wxString sTmp = cmd;
#ifdef __WXMSW__ #ifdef __WINDOWS__
// VZ: should we do this? // VZ: should we do this?
// chris elliott : only makes sense in MS windows // chris elliott : only makes sense in MS windows
if ( sTmp.empty() ) if ( sTmp.empty() )
@@ -512,7 +512,7 @@ bool wxFileType::SetDefaultIcon(const wxString& cmd, int index)
#endif #endif
wxCHECK_MSG( !sTmp.empty(), false, wxT("need the icon file") ); wxCHECK_MSG( !sTmp.empty(), false, wxT("need the icon file") );
#if defined (__WXMSW__) || defined(__UNIX__) #if defined (__WINDOWS__) || defined(__UNIX__)
return m_impl->SetDefaultIcon (cmd, index); return m_impl->SetDefaultIcon (cmd, index);
#else #else
wxUnusedVar(index); wxUnusedVar(index);
@@ -610,7 +610,7 @@ wxMimeTypesManager::Associate(const wxFileTypeInfo& ftInfo)
{ {
EnsureImpl(); EnsureImpl();
#if defined(__WXMSW__) || defined(__UNIX__) #if defined(__WINDOWS__) || defined(__UNIX__)
return m_impl->Associate(ftInfo); return m_impl->Associate(ftInfo);
#else // other platforms #else // other platforms
wxUnusedVar(ftInfo); wxUnusedVar(ftInfo);

View File

@@ -43,7 +43,7 @@
#endif #endif
// provide stubs for the systems not implementing these functions // provide stubs for the systems not implementing these functions
#if !defined(__WXMSW__) #if !defined(__WINDOWS__)
wxPowerType wxGetPowerType() wxPowerType wxGetPowerType()
{ {

View File

@@ -79,7 +79,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
// TODO: use POSIX getaddrinfo() (also available in Winsock 2) for simplicity // TODO: use POSIX getaddrinfo() (also available in Winsock 2) for simplicity
// and to use the same code for IPv4 and IPv6 support // and to use the same code for IPv4 and IPv6 support
#ifdef __WXMSW__ #ifdef __WINDOWS__
#define HAVE_INET_ADDR #define HAVE_INET_ADDR
#ifndef HAVE_GETHOSTBYNAME #ifndef HAVE_GETHOSTBYNAME
@@ -109,7 +109,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
#pragma warning(default:4706) #pragma warning(default:4706)
#endif #endif
#endif #endif
#endif // __WXMSW__ #endif // __WINDOWS__
// we assume that we have gethostbyaddr_r() if and only if we have // we assume that we have gethostbyaddr_r() if and only if we have
// gethostbyname_r() and that it uses the similar conventions to it (see // gethostbyname_r() and that it uses the similar conventions to it (see

View File

@@ -33,7 +33,7 @@
#if wxUSE_STOPWATCH #if wxUSE_STOPWATCH
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
#include "wx/log.h" #include "wx/log.h"
@@ -51,7 +51,7 @@
namespace namespace
{ {
#ifdef __WXMSW__ #ifdef __WINDOWS__
struct PerfCounter struct PerfCounter
{ {
@@ -70,7 +70,7 @@ struct PerfCounter
bool init; bool init;
} gs_perfCounter; } gs_perfCounter;
#endif // __WXMSW__ #endif // __WINDOWS__
const int MILLISECONDS_PER_SECOND = 1000; const int MILLISECONDS_PER_SECOND = 1000;
const int MICROSECONDS_PER_MILLISECOND = 1000; const int MICROSECONDS_PER_MILLISECOND = 1000;
@@ -80,7 +80,7 @@ const int MICROSECONDS_PER_SECOND = 1000*1000;
void wxStopWatch::DoStart() void wxStopWatch::DoStart()
{ {
#ifdef __WXMSW__ #ifdef __WINDOWS__
if ( !gs_perfCounter.init ) if ( !gs_perfCounter.init )
{ {
wxCRIT_SECT_LOCKER(lock, gs_perfCounter.cs); wxCRIT_SECT_LOCKER(lock, gs_perfCounter.cs);
@@ -99,19 +99,19 @@ void wxStopWatch::DoStart()
gs_perfCounter.init = true; gs_perfCounter.init = true;
} }
#endif // __WXMSW__ #endif // __WINDOWS__
m_t0 = GetCurrentClockValue(); m_t0 = GetCurrentClockValue();
} }
wxLongLong wxStopWatch::GetClockFreq() const wxLongLong wxStopWatch::GetClockFreq() const
{ {
#ifdef __WXMSW__ #ifdef __WINDOWS__
// Under MSW we use the high resolution performance counter timer which has // Under MSW we use the high resolution performance counter timer which has
// its own frequency (usually related to the CPU clock speed). // its own frequency (usually related to the CPU clock speed).
if ( gs_perfCounter.CanBeUsed() ) if ( gs_perfCounter.CanBeUsed() )
return gs_perfCounter.freq.QuadPart; return gs_perfCounter.freq.QuadPart;
#endif // __WXMSW__ #endif // __WINDOWS__
#ifdef HAVE_GETTIMEOFDAY #ifdef HAVE_GETTIMEOFDAY
// With gettimeofday() we can have nominally microsecond precision and // With gettimeofday() we can have nominally microsecond precision and
@@ -137,14 +137,14 @@ void wxStopWatch::Start(long t0)
wxLongLong wxStopWatch::GetCurrentClockValue() const wxLongLong wxStopWatch::GetCurrentClockValue() const
{ {
#ifdef __WXMSW__ #ifdef __WINDOWS__
if ( gs_perfCounter.CanBeUsed() ) if ( gs_perfCounter.CanBeUsed() )
{ {
LARGE_INTEGER counter; LARGE_INTEGER counter;
::QueryPerformanceCounter(&counter); ::QueryPerformanceCounter(&counter);
return counter.QuadPart; return counter.QuadPart;
} }
#endif // __WXMSW__ #endif // __WINDOWS__
#ifdef HAVE_GETTIMEOFDAY #ifdef HAVE_GETTIMEOFDAY
return wxGetUTCTimeUSec(); return wxGetUTCTimeUSec();

View File

@@ -41,9 +41,9 @@
#include "wx/vector.h" #include "wx/vector.h"
#include "wx/xlocale.h" #include "wx/xlocale.h"
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif // __WXMSW__ #endif // __WINDOWS__
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
#include <sstream> #include <sstream>

View File

@@ -26,7 +26,7 @@
#include "wx/time.h" #include "wx/time.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif
#include "wx/intl.h" #include "wx/intl.h"
@@ -48,7 +48,7 @@
# endif # endif
#endif #endif
#if defined(__MWERKS__) && defined(__WXMSW__) #if defined(__MWERKS__) && defined(__WINDOWS__)
# undef HAVE_FTIME # undef HAVE_FTIME
# undef HAVE_GETTIMEOFDAY # undef HAVE_GETTIMEOFDAY
#endif #endif
@@ -274,7 +274,7 @@ long wxGetUTCTime()
wxLongLong wxGetUTCTimeUSec() wxLongLong wxGetUTCTimeUSec()
{ {
#if defined(__WXMSW__) #if defined(__WINDOWS__)
FILETIME ft; FILETIME ft;
::GetSystemTimeAsFileTime(&ft); ::GetSystemTimeAsFileTime(&ft);
@@ -309,7 +309,7 @@ wxLongLong wxGetUTCTimeMillis()
// If possible, use a function which avoids conversions from // If possible, use a function which avoids conversions from
// broken-up time structures to milliseconds // broken-up time structures to milliseconds
#if defined(__WXMSW__) #if defined(__WINDOWS__)
FILETIME ft; FILETIME ft;
::GetSystemTimeAsFileTime(&ft); ::GetSystemTimeAsFileTime(&ft);

View File

@@ -50,7 +50,7 @@
#include "wx/stdpaths.h" #include "wx/stdpaths.h"
#include "wx/hashset.h" #include "wx/hashset.h"
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"
#endif #endif

View File

@@ -336,7 +336,7 @@ wxTextOutputStream::wxTextOutputStream(wxOutputStream& s, wxEOL mode)
m_mode = mode; m_mode = mode;
if (m_mode == wxEOL_NATIVE) if (m_mode == wxEOL_NATIVE)
{ {
#if defined(__WXMSW__) || defined(__WXPM__) #if defined(__WINDOWS__) || defined(__WXPM__)
m_mode = wxEOL_DOS; m_mode = wxEOL_DOS;
#else #else
m_mode = wxEOL_UNIX; m_mode = wxEOL_UNIX;
@@ -356,7 +356,7 @@ void wxTextOutputStream::SetMode(wxEOL mode)
m_mode = mode; m_mode = mode;
if (m_mode == wxEOL_NATIVE) if (m_mode == wxEOL_NATIVE)
{ {
#if defined(__WXMSW__) || defined(__WXPM__) #if defined(__WINDOWS__) || defined(__WXPM__)
m_mode = wxEOL_DOS; m_mode = wxEOL_DOS;
#else #else
m_mode = wxEOL_UNIX; m_mode = wxEOL_UNIX;

View File

@@ -91,7 +91,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/filesys.h" #include "wx/filesys.h"
#endif #endif
@@ -350,7 +350,7 @@ void wxPlatform::ClearPlatforms()
bool wxPlatform::Is(int platform) bool wxPlatform::Is(int platform)
{ {
#ifdef __WXMSW__ #ifdef __WINDOWS__
if (platform == wxOS_WINDOWS) if (platform == wxOS_WINDOWS)
return true; return true;
#endif #endif
@@ -583,9 +583,9 @@ bool wxGetEnvMap(wxEnvVariableHashMap *map)
// standard headers anyhow so we can just rely on already having the // standard headers anyhow so we can just rely on already having the
// correct declaration. And if this turns out to be wrong, we can always // correct declaration. And if this turns out to be wrong, we can always
// add a configure test checking whether it is declared later. // add a configure test checking whether it is declared later.
#ifndef __WXMSW__ #ifndef __WINDOWS__
extern char **environ; extern char **environ;
#endif // !__WXMSW__ #endif // !__WINDOWS__
char **env = environ; char **env = environ;
#endif #endif
@@ -998,7 +998,7 @@ bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
// Launch default browser // Launch default browser
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXMSW__) #if defined(__WINDOWS__)
// implemented in a port-specific utils source file: // implemented in a port-specific utils source file:
bool wxDoLaunchDefaultBrowser(const wxString& url, const wxString& scheme, int flags); bool wxDoLaunchDefaultBrowser(const wxString& url, const wxString& scheme, int flags);
@@ -1064,7 +1064,7 @@ static bool DoLaunchDefaultBrowserHelper(const wxString& urlOrig, int flags)
// (e.g. "C:\\test.txt" when parsed by wxURI reports a scheme == "C") // (e.g. "C:\\test.txt" when parsed by wxURI reports a scheme == "C")
bool hasValidScheme = uri.HasScheme() && uri.GetScheme().length() > 1; bool hasValidScheme = uri.HasScheme() && uri.GetScheme().length() > 1;
#if defined(__WXMSW__) #if defined(__WINDOWS__)
// NOTE: when testing wxMSW's wxLaunchDefaultBrowser all possible forms // NOTE: when testing wxMSW's wxLaunchDefaultBrowser all possible forms
// of the URL/flags should be tested; e.g.: // of the URL/flags should be tested; e.g.:

View File

@@ -32,7 +32,7 @@
// apparently not the case for all MSW makefiles and so, unless we use // apparently not the case for all MSW makefiles and so, unless we use
// configure (which defines __WX_SETUP_H__) or it is explicitly overridden by // configure (which defines __WX_SETUP_H__) or it is explicitly overridden by
// the user (who can define wxUSE_ZLIB_H_IN_PATH), we hardcode the path here // the user (who can define wxUSE_ZLIB_H_IN_PATH), we hardcode the path here
#if defined(__WXMSW__) && !defined(__WX_SETUP_H__) && !defined(wxUSE_ZLIB_H_IN_PATH) #if defined(__WINDOWS__) && !defined(__WX_SETUP_H__) && !defined(wxUSE_ZLIB_H_IN_PATH)
#include "../zlib/zlib.h" #include "../zlib/zlib.h"
#else #else
#include "zlib.h" #include "zlib.h"

View File

@@ -36,7 +36,7 @@
#include "wx/iconloc.h" #include "wx/iconloc.h"
#include "wx/confbase.h" #include "wx/confbase.h"
#ifdef __WXMSW__ #ifdef __WINDOWS__
#include "wx/msw/registry.h" #include "wx/msw/registry.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif // OS #endif // OS