}
-#elif defined(__WXMSW__)
+#elif defined(__WINDOWS__)
// include standard Windows headers
#include "wx/msw/wrapwin.h"
// under Windows we prefer to use the native implementation but can be forced
// to use the file-based one
-#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
+#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
#include "wx/msw/regconf.h"
#define wxConfig wxRegConfig
#elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE
WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE);
WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE);
-#if defined(__WXMSW__)
+#if defined(__WINDOWS__)
#include "wx/msw/dde.h"
#else
- #error DDE is only supported on MSW
+ #error DDE is only supported under Windows
#endif
#endif
wxString m_filename;
};
-// under MSW the same file may contain several icons so we also store the
+// under Windows the same file may contain several icons so we also store the
// index of the icon
-#if defined(__WXMSW__)
+#if defined(__WINDOWS__)
class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase
{
SetIndex(num);
}
-#else // !MSW
+#else // !__WINDOWS__
// must be a class because we forward declare it as class
class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase
#if wxUSE_JOYSTICK
-#if defined(__WXMSW__)
+#if defined(__WINDOWS__)
#include "wx/msw/joystick.h"
#elif defined(__WXMOTIF__)
#include "wx/unix/joystick.h"
// include the wxListCtrl class declaration
// ----------------------------------------------------------------------------
-#if defined(__WIN32__) && !defined(__WXUNIVERSAL__)
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/listctrl.h"
#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON
#include "wx/osx/listctrl.h"
#if defined(__WXUNIVERSAL__)
#define wxStatusBarUniv wxStatusBar
#include "wx/univ/statusbr.h"
-#elif defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR
+#elif defined(__WXMSW__) && wxUSE_NATIVE_STATUSBAR
#include "wx/msw/statusbar.h"
#elif defined(__WXMAC__)
#define wxStatusBarMac wxStatusBar
#pragma hdrstop
#endif
-#ifndef __WXMSW__
- #error "This sample is MSW-only"
+#ifndef __WINDOWS__
+ #error "This sample is Windows-only"
#endif
#include "wx/app.h"
#include "wx/stattext.h"
#include "wx/button.h"
-#ifndef __WXMSW__
- #error "This sample is MSW-only"
+#ifndef __WINDOWS__
+ #error "This sample is Windows-only"
#endif
#ifdef WXUSINGDLL
#include "wx/msw/ole/automtn.h"
-#ifndef __WXMSW__
+#ifndef __WINDOWS__
#error "Sorry, this sample works under Windows only."
#endif
#include "wx/imaglist.h"
#include "wx/tokenzr.h"
-#if wxUSE_CONFIG_NATIVE && defined( __WXMSW__ )
+#if wxUSE_CONFIG_NATIVE && defined( __WINDOWS__ )
# define DO_REGTEST 1
#else
# define DO_REGTEST 0
// define this to use XPMs everywhere (by default, BMPs are used under Win)
// BMPs use less space, but aren't compiled into the executable on other platforms
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#define USE_XPM_BITMAPS 0
#else
#define USE_XPM_BITMAPS 1
void wxMessageOutputDebug::Output(const wxString& str)
{
-#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
+#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
wxString out(AppendLineFeedIfNeeded(str));
out.Replace(wxT("\t"), wxT(" "));
out.Replace(wxT("\n"), wxT("\r\n"));
wxString out(str);
// the native MSW msg box understands the TABs, others don't
-#ifndef __WXMSW__
+#ifndef __WINDOWS__
out.Replace(wxT("\t"), wxT(" "));
#endif
#endif
// same for ManagerSetter in the MSW file
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
wxFORCE_LINK_MODULE( mswsocket )
#endif
#include "wx/platinfo.h"
#include "wx/private/window.h"
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include "wx/msw/wrapwin.h"
#endif
#include "wx/osx/private.h" // includes mac headers
#endif
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include <windows.h>
#include "wx/msw/winundef.h"
#include "wx/volume.h"
#include <ctype.h>
#endif
-#endif
+#endif // __WINDOWS__
#if defined(__OS2__) || defined(__DOS__)
#ifdef __OS2__
#else
newdrive[2] = wxT('\0');
#endif
-#if defined(__WXMSW__)
+#if defined(__WINDOWS__)
if (::SetCurrentDirectory(newdrive))
#else
// VA doesn't know what LPSTR is and has its own set
wxString dirName(data->m_path);
-#if defined(__WXMSW__) || defined(__OS2__)
+#if defined(__WINDOWS__) || defined(__OS2__)
if (dirName.Last() == ':')
dirName += wxString(wxFILE_SEP_PATH);
#endif
return m_smallImageList;
}
-#if wxUSE_MIMETYPE && wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
+#if wxUSE_MIMETYPE && wxUSE_IMAGE && (!defined(__WINDOWS__) || wxUSE_WXDIB)
// VS: we don't need this function w/o wxMimeTypesManager because we'll only have
// one icon and we won't resize it
{
m_smallImageList->Add(bmp);
}
-#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
+#if wxUSE_IMAGE && (!defined(__WINDOWS__) || wxUSE_WXDIB)
else
{
wxImage img = bmp.ConvertToImage();
#include "wx/tokenzr.h"
#include "wx/imaglist.h"
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include "wx/msw/wrapwin.h"
#endif
bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq)
{
+#ifdef __WXMSW__
BOOL changed = (pollingFreq == 0);
MMRESULT res = joySetCapture((HWND) win->GetHWND(), m_joystick, pollingFreq, changed);
return (res == JOYERR_NOERROR);
+#else
+ wxUnusedVar(win);
+ wxUnusedVar(pollingFreq);
+ return false;
+#endif
}
bool wxJoystick::ReleaseCapture()
# define WXARC_pclose(fp)
#endif
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
# define WXARC_b "b"
#else
# define WXARC_b
wxFileName fn(i->first, wxPATH_UNIX);
TestEntry& entry = *i->second;
wxDateTime dt = entry.GetDateTime();
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
if (fn.IsDir())
entry.SetDateTime(wxDateTime());
else
const TestEntry& testEntry = *it->second;
-#ifndef __WXMSW__
+#ifndef __WINDOWS__
// On Windows some archivers compensate for Windows DST handling, but
// other don't, so disable the test for now.
wxDateTime dt = testEntry.GetDateTime();
const TestEntry& testEntry = *it->second;
-#if 0 //ndef __WXMSW__
+#if 0 //ndef __WINDOWS__
CPPUNIT_ASSERT_MESSAGE("timestamp check" + error_context,
testEntry.GetDateTime() ==
wxFileName(path).GetModificationTime());
bool ArchiveTestSuite::IsInPath(const wxString& cmd)
{
wxString c = cmd.BeforeFirst(wxT(' '));
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
c += wxT(".exe");
#endif
return !m_path.FindValidPath(c).empty();
// Also benchmark various native functions under MSW. Surprisingly/annoyingly
// they sometimes have vastly better performance than alternatives, especially
// for case-sensitive comparison (see #10375).
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include "wx/msw/wrapwin.h"
) == CSTR_EQUAL;
}
-#endif // __WXMSW__
+#endif // __WINDOWS__
// ----------------------------------------------------------------------------
// string buffers: wx[W]CharBuffer
#define ASYNC_COMMAND "xclock"
#define SHELL_COMMAND "echo hi from shell>/dev/null"
#define COMMAND_NO_OUTPUT "echo -n"
-#elif defined(__WXMSW__)
+#elif defined(__WINDOWS__)
#define COMMAND "cmd.exe /c \"echo hi\""
#define ASYNC_COMMAND "notepad"
#define SHELL_COMMAND "echo hi > nul:"
{ ".", true },
{ "..", true },
{ "$USER_DOCS_DIR", true },
-#if defined(__WXMSW__)
+#if defined(__WINDOWS__)
{ "$USER_DOCS_DIR\\", true },
{ "$USER_DOCS_DIR\\\\", true },
{ "..\\..", true },
#endif
};
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
wxString homedrive = wxGetenv("HOMEDRIVE");
if ( homedrive.empty() )
homedrive = "c:";
-#endif // __WXMSW__
+#endif // __WINDOWS__
for ( size_t n = 0; n < WXSIZEOF(testData); n++ )
{
wxString dirname = testData[n].dirname;
dirname.Replace("$USER_DOCS_DIR", wxStandardPaths::Get().GetDocumentsDir());
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
dirname.Replace("$MSW_DRIVE", homedrive);
-#endif // __WXMSW__
+#endif // __WINDOWS__
std::string errDesc = wxString::Format("failed on directory '%s'", dirname).ToStdString();
CPPUNIT_ASSERT_EQUAL_MESSAGE(errDesc, testData[n].shouldExist, wxDir::Exists(dirname));
#include "wx/stdpaths.h"
#include "wx/scopeguard.h"
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include "wx/msw/registry.h"
-#endif // __WXMSW__
+#endif // __WINDOWS__
#ifdef __UNIX__
#include <unistd.h>
} tests[] =
{
// test wxPATH_NORM_ENV_VARS
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
{ "%ABCDEF%/g/h/i", wxPATH_NORM_ENV_VARS, "abcdef/g/h/i", wxPATH_UNIX },
#else
{ "$(ABCDEF)/g/h/i", wxPATH_NORM_ENV_VARS, "abcdef/g/h/i", wxPATH_UNIX },
// and also that the registry key was changed recently and didn't take
// effect yet but these are marginal cases which we consciously choose to
// ignore for now)
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
long shortNamesDisabled;
if ( wxRegKey
(
CPPUNIT_ASSERT_EQUAL( "..\\mkinstalldirs", fn.GetFullPath() );
}
//else: when in doubt, don't run the test
-#endif // __WXMSW__
+#endif // __WINDOWS__
}
void FileNameTestCase::TestReplace()
{ "foo", "$SYSTEM_TEMP", true },
{ "..", "$SYSTEM_TEMP", true },
{ "../bar", "..", true },
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
{ "$USER_DOCS_DIR\\", "$USER_DOCS_DIR", true },
{ "c:\\a\\directory\\which\\does\\not\\exist", "", false },
#elif defined( __UNIX__ )
CPPUNIT_TEST( TestEventModify );
// MSW implementation doesn't detect file access events currently
-#ifndef __WXMSW__
+#ifndef __WINDOWS__
CPPUNIT_TEST( TestEventAccess );
-#endif // __WXMSW__
+#endif // __WINDOWS__
#endif // !wxHAS_KQUEUE
CPPUNIT_TEST( TestNoEventsAfterRemove );
// wxDllLoader
// ----------------------------------------------------------------------------
-#if !defined(__WXMSW__) && !defined(__UNIX__)
+#if !defined(__WINDOWS__) && !defined(__UNIX__)
#undef TEST_DYNLIB
#endif
void DynamicLibraryTestCase::Load()
{
-#if defined(__WXMSW__)
+#if defined(__WINDOWS__)
static const wxChar *LIB_NAME = wxT("kernel32.dll");
static const wxChar *FUNC_NAME = wxT("lstrlenA");
#elif defined(__UNIX__)
// Call the function dynamically loaded
CPPUNIT_ASSERT( pfnStrlen("foo") == 3 );
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
static const wxChar *FUNC_NAME_AW = wxT("lstrlen");
typedef int (wxSTDCALL *wxStrlenTypeAorW)(const wxChar *);
CPPUNIT_ASSERT_MESSAGE( errMsg2.ToStdString(), pfnStrlenAorW );
CPPUNIT_ASSERT( pfnStrlenAorW(wxT("foobar")) == 6 );
-#endif // __WXMSW__
+#endif // __WINDOWS__
}
#endif // wxUSE_THREADS
-#endif // !__WXMSW__
+#endif // !__WINDOWS__
#include "wx/filename.h"
#include "wx/wfstream.h"
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include "wx/msw/wrapwin.h"
#ifdef __VISUALC__
// 'nonstandard extension used : nameless struct/union' occurs inside
// are picked up. However this is only possible when sparse files are
// supported otherwise the tests require too much disk space.
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#ifndef FILE_SUPPORTS_SPARSE_FILES
#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
return NULL;
}
-#else // __WXMSW__
+#else // __WINDOWS__
bool IsFAT(const wxString& WXUNUSED(path)) { return false; }
void MakeSparse(const wxString& WXUNUSED(path), int WXUNUSED(fd)) { }
return NULL;
}
-#endif // __WXMSW__
+#endif // __WINDOWS__
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(largeFile, "largeFile");
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(largeFile, "Streams.largeFile");
{
}
-#if defined(__WXMSW__) || defined(__WXPM__)
+#if defined(__WINDOWS__) || defined(__WXPM__)
# define NEWLINE "\r\n"
# define NEWLINELEN 2
#elif defined(__WXMAC__) && !defined(__DARWIN__)
// check size_t handling
size_t len = sizeof(*this);
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
wxString::Format("%Iu", len);
#else
wxString::Format("%zu", len);
CMP3("123456789", "%llu", (wxULongLong_t)123456789);
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
CMP3("123456789", "%I64d", (wxLongLong_t)123456789);
CMP3("123456789abcdef", "%I64x", wxLL(0x123456789abcdef));
#endif
#include <exception>
#include <iostream>
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
#include "wx/msw/msvcrt.h"
#endif
#ifdef wxHAS_XLOCALE_SUPPORT
CPPUNIT_ASSERT( wxXLocale(wxLANGUAGE_FRENCH).IsOk() );
-#ifdef __WXMSW__
+#ifdef __WINDOWS__
CPPUNIT_ASSERT( wxXLocale("french").IsOk() );
#else
CPPUNIT_ASSERT( wxXLocale("fr_FR").IsOk() );