From 02761f6cd478e3c2c97cf6f93442747f7b029833 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 31 Aug 2006 19:31:43 +0000 Subject: [PATCH] Include wx/module.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/module.h | 5 +- include/wx/wx.h | 1 + src/cocoa/app.mm | 3 +- src/cocoa/fontutil.cpp | 5 +- src/common/artprov.cpp | 6 +- src/common/bmpbase.cpp | 3 +- src/common/clipcmn.cpp | 9 +- src/common/cshelp.cpp | 2 +- src/common/datetime.cpp | 2 +- src/common/dpycmn.cpp | 2 +- src/common/dynload.cpp | 5 +- src/common/event.cpp | 3 +- src/common/filesys.cpp | 2 +- src/common/fmapbase.cpp | 15 ++- src/common/fs_inet.cpp | 7 +- src/common/imagbmp.cpp | 2 +- src/common/image.cpp | 2 +- src/common/imagjpeg.cpp | 2 +- src/common/imagpcx.cpp | 2 +- src/common/imagpng.cpp | 2 +- src/common/imagtiff.cpp | 2 +- src/common/init.cpp | 2 +- src/common/intl.cpp | 2 +- src/common/mimecmn.cpp | 2 +- src/common/paper.cpp | 2 +- src/common/prntbase.cpp | 2 +- src/common/protocol.cpp | 13 ++- src/common/sckipc.cpp | 2 +- src/common/socket.cpp | 2 +- src/common/url.cpp | 3 +- src/generic/dirctrlg.cpp | 2 +- src/generic/renderg.cpp | 2 +- src/generic/timer.cpp | 3 +- src/gtk/artgtk.cpp | 10 +- src/gtk/dcclient.cpp | 2 +- src/gtk/glcanvas.cpp | 3 +- src/gtk/gnome/gprint.cpp | 2 +- src/gtk/gnome/gvfs.cpp | 2 +- src/gtk/threadno.cpp | 14 +-- src/gtk/threadsgi.cpp | 2 +- src/gtk/window.cpp | 14 ++- src/gtk1/app.cpp | 2 +- src/gtk1/dcclient.cpp | 2 +- src/gtk1/glcanvas.cpp | 3 +- src/gtk1/threadno.cpp | 15 ++- src/gtk1/threadsgi.cpp | 2 +- src/gtk1/window.cpp | 3 +- src/html/chm.cpp | 14 +-- src/html/htmlcell.cpp | 2 +- src/html/htmprint.cpp | 2 +- src/mac/carbon/app.cpp | 8 +- src/mac/carbon/cfsocket.cpp | 2 +- src/mac/carbon/gdiobj.cpp | 2 +- src/mac/carbon/mpthread.cpp | 182 ++++++++++++++++---------------- src/mac/carbon/thread.cpp | 2 +- src/mac/classic/app.cpp | 8 +- src/mac/classic/thread.cpp | 34 +++--- src/mac/corefoundation/hid.cpp | 3 +- src/mgl/app.cpp | 2 +- src/mgl/cursor.cpp | 3 +- src/mgl/region.cpp | 2 +- src/mgl/settings.cpp | 3 +- src/motif/app.cpp | 6 +- src/motif/evtloop.cpp | 7 +- src/motif/window.cpp | 6 +- src/msw/app.cpp | 2 +- src/msw/cursor.cpp | 3 +- src/msw/dc.cpp | 2 +- src/msw/dde.cpp | 2 +- src/msw/dialup.cpp | 2 +- src/msw/glcanvas.cpp | 5 +- src/msw/ownerdrw.cpp | 2 +- src/msw/settings.cpp | 4 +- src/msw/textctrl.cpp | 2 +- src/msw/thread.cpp | 2 +- src/msw/toplevel.cpp | 20 ++-- src/msw/urlmsw.cpp | 2 +- src/msw/utilsexc.cpp | 2 +- src/msw/uxtheme.cpp | 4 +- src/msw/window.cpp | 2 +- src/os2/app.cpp | 3 +- src/os2/dc.cpp | 3 +- src/os2/settings.cpp | 2 +- src/os2/thread.cpp | 2 +- src/os2/toplevel.cpp | 2 +- src/palmos/app.cpp | 2 +- src/palmos/cursor.cpp | 3 +- src/palmos/dc.cpp | 2 +- src/palmos/ownerdrw.cpp | 2 +- src/palmos/settings.cpp | 2 +- src/palmos/textctrl.cpp | 3 +- src/palmos/thread.cpp | 11 +- src/palmos/toplevel.cpp | 2 +- src/palmos/utilsexc.cpp | 3 +- src/palmos/window.cpp | 5 +- src/richtext/richtextbuffer.cpp | 2 +- src/richtext/richtextstyles.cpp | 4 +- src/richtext/richtextxml.cpp | 2 +- src/unix/fontutil.cpp | 2 +- src/unix/sound.cpp | 6 +- src/unix/sound_sdl.cpp | 4 +- src/unix/threadpsx.cpp | 3 +- src/x11/app.cpp | 2 +- src/x11/dcclient.cpp | 2 +- src/x11/evtloop.cpp | 2 +- src/x11/window.cpp | 2 +- src/xrc/xmlres.cpp | 2 +- 107 files changed, 301 insertions(+), 318 deletions(-) diff --git a/include/wx/module.h b/include/wx/module.h index a35aab0e5e..1e39f0e003 100644 --- a/include/wx/module.h +++ b/include/wx/module.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: module.h +// Name: wx/module.h // Purpose: Modules handling // Author: Wolfram Gloger/adapted by Guilhem Lavaux // Modified by: @@ -85,7 +85,7 @@ private: static void DoCleanUpModules(const wxModuleList& modules); - // module dependencies: contains + // module dependencies: contains wxArrayClassInfo m_dependencies; // used internally while initiliazing/cleaning up modules @@ -101,4 +101,3 @@ private: }; #endif // _WX_MODULE_H_ - diff --git a/include/wx/wx.h b/include/wx/wx.h index 4ed8a6d417..1aa2bb695f 100644 --- a/include/wx/wx.h +++ b/include/wx/wx.h @@ -29,6 +29,7 @@ #include "wx/memory.h" #include "wx/math.h" #include "wx/stopwatch.h" +#include "wx/module.h" #if wxUSE_GUI diff --git a/src/cocoa/app.mm b/src/cocoa/app.mm index 565209e5b1..a246c4c211 100644 --- a/src/cocoa/app.mm +++ b/src/cocoa/app.mm @@ -17,10 +17,9 @@ #include "wx/dc.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include "wx/cocoa/ObjcPose.h" #include "wx/cocoa/autorelease.h" #include "wx/cocoa/mbarman.h" diff --git a/src/cocoa/fontutil.cpp b/src/cocoa/fontutil.cpp index c50c724772..1a59d7e8e2 100644 --- a/src/cocoa/fontutil.cpp +++ b/src/cocoa/fontutil.cpp @@ -24,15 +24,16 @@ #pragma hdrstop #endif +#include "wx/fontutil.h" + #ifndef WX_PRECOMP #include "wx/hash.h" #include "wx/utils.h" + #include "wx/module.h" #endif // PCH -#include "wx/fontutil.h" #include "wx/fontmap.h" #include "wx/tokenzr.h" -#include "wx/module.h" #include "wx/encinfo.h" #ifdef __WXGTK20__ diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index 918dc3307a..7661612429 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -20,16 +20,16 @@ #pragma hdrstop #endif +#include "wx/artprov.h" + #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/log.h" #include "wx/hashmap.h" #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/artprov.h" -#include "wx/module.h" - // =========================================================================== // implementation // =========================================================================== diff --git a/src/common/bmpbase.cpp b/src/common/bmpbase.cpp index 41a176ed3f..61a7762f7a 100644 --- a/src/common/bmpbase.cpp +++ b/src/common/bmpbase.cpp @@ -30,10 +30,9 @@ #include "wx/palette.h" #include "wx/icon.h" #include "wx/image.h" + #include "wx/module.h" #endif // WX_PRECOMP -#include "wx/module.h" - IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase, wxGDIObject) IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase,wxObject) diff --git a/src/common/clipcmn.cpp b/src/common/clipcmn.cpp index 6f380b5aae..4b9225b042 100644 --- a/src/common/clipcmn.cpp +++ b/src/common/clipcmn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: common/clipcmn.cpp +// Name: src/common/clipcmn.cpp // Purpose: common (to all ports) wxClipboard functions // Author: Robert Roebling // Modified by: @@ -24,10 +24,13 @@ #pragma hdrstop #endif +#if wxUSE_CLIPBOARD + #include "wx/clipbrd.h" -#include "wx/module.h" -#if wxUSE_CLIPBOARD +#ifndef WX_PRECOMP + #include "wx/module.h" +#endif static wxClipboard *gs_clipboard = NULL; diff --git a/src/common/cshelp.cpp b/src/common/cshelp.cpp index f94b9e67d7..57cea314d2 100644 --- a/src/common/cshelp.cpp +++ b/src/common/cshelp.cpp @@ -28,10 +28,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/module.h" #endif #include "wx/tipwin.h" -#include "wx/module.h" #include "wx/cshelp.h" // wxUSE_MS_HTML_HELP is not defined under platforms other than MSW diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 0832f5379f..069f1dbee3 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -70,11 +70,11 @@ #include "wx/log.h" #include "wx/intl.h" #include "wx/stopwatch.h" // for wxGetLocalTimeMillis() + #include "wx/module.h" #endif // WX_PRECOMP #include "wx/thread.h" #include "wx/tokenzr.h" -#include "wx/module.h" #include diff --git a/src/common/dpycmn.cpp b/src/common/dpycmn.cpp index ce5fc0ac22..13b4685281 100644 --- a/src/common/dpycmn.cpp +++ b/src/common/dpycmn.cpp @@ -27,11 +27,11 @@ #ifndef WX_PRECOMP #include "wx/gdicmn.h" #include "wx/window.h" + #include "wx/module.h" #endif //WX_PRECOMP #include "wx/display.h" #include "wx/display_impl.h" -#include "wx/module.h" #if wxUSE_DISPLAY diff --git a/src/common/dynload.cpp b/src/common/dynload.cpp index 5cb065859d..7759f6f8d1 100644 --- a/src/common/dynload.cpp +++ b/src/common/dynload.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dynload.cpp +// Name: src/common/dynload.cpp // Purpose: Dynamic loading framework // Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's // (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux) @@ -31,12 +31,12 @@ #include "wx/intl.h" #include "wx/hash.h" #include "wx/utils.h" + #include "wx/module.h" #endif #include "wx/strconv.h" #include "wx/dynload.h" -#include "wx/module.h" // --------------------------------------------------------------------------- @@ -360,4 +360,3 @@ void wxPluginManager::Unload() } #endif // wxUSE_DYNAMIC_LOADER - diff --git a/src/common/event.cpp b/src/common/event.cpp index 5e40721437..043eafa869 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -31,6 +31,7 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/stopwatch.h" + #include "wx/module.h" #if wxUSE_GUI #include "wx/control.h" @@ -40,8 +41,6 @@ #endif // wxUSE_GUI #endif -#include "wx/module.h" - // ---------------------------------------------------------------------------- // wxWin macros // ---------------------------------------------------------------------------- diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 405598e9c2..425be7057c 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -20,10 +20,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/wfstream.h" -#include "wx/module.h" #include "wx/mimetype.h" #include "wx/filename.h" #include "wx/tokenzr.h" diff --git a/src/common/fmapbase.cpp b/src/common/fmapbase.cpp index ccf7de0844..24ace1c214 100644 --- a/src/common/fmapbase.cpp +++ b/src/common/fmapbase.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: common/fmapbase.cpp +// Name: src/common/fmapbase.cpp // Purpose: wxFontMapperBase class implementation // Author: Vadim Zeitlin // Modified by: @@ -30,18 +30,18 @@ #include "wx/app.h" #include "wx/log.h" #include "wx/intl.h" + #include "wx/module.h" #endif //WX_PRECOMP #if defined(__WXMSW__) - #include "wx/msw/private.h" // includes windows.h for LOGFONT - #include "wx/msw/winundef.h" + #include "wx/msw/private.h" // includes windows.h for LOGFONT + #include "wx/msw/winundef.h" #endif #include "wx/fontmap.h" #include "wx/fmappriv.h" #include "wx/apptrait.h" -#include "wx/module.h" // wxMemoryConfig uses wxFileConfig #if wxUSE_CONFIG && wxUSE_FILECONFIG @@ -344,7 +344,7 @@ const wxChar *wxFontMapperBase::GetDefaultConfigPath() void wxFontMapperBase::SetConfigPath(const wxString& prefix) { - wxCHECK_RET( !prefix.IsEmpty() && prefix[0] == wxCONFIG_PATH_SEPARATOR, + wxCHECK_RET( !prefix.empty() && prefix[0] == wxCONFIG_PATH_SEPARATOR, wxT("an absolute path should be given to wxFontMapper::SetConfigPath()") ); m_configRootPath = prefix; @@ -399,7 +399,7 @@ bool wxFontMapperBase::ChangePath(const wxString& pathNew, wxString *pathOld) *pathOld = config->GetPath(); wxString path = GetConfigPath(); - if ( path.IsEmpty() || path.Last() != wxCONFIG_PATH_SEPARATOR ) + if ( path.empty() || path.Last() != wxCONFIG_PATH_SEPARATOR ) { path += wxCONFIG_PATH_SEPARATOR; } @@ -482,7 +482,7 @@ wxFontMapperBase::NonInteractiveCharsetToEncoding(const wxString& charset) config->SetPath(FONTMAPPER_CHARSET_ALIAS_PATH); wxString alias = config->Read(charset); - if ( !alias.IsEmpty() ) + if ( !alias.empty() ) { // yes, we do - use it instead cs = alias; @@ -731,4 +731,3 @@ wxFontEncoding wxFontMapperBase::GetEncodingFromName(const wxString& name) } #endif // wxUSE_FONTMAP - diff --git a/src/common/fs_inet.cpp b/src/common/fs_inet.cpp index f32d068f12..d927b9aa74 100644 --- a/src/common/fs_inet.cpp +++ b/src/common/fs_inet.cpp @@ -1,15 +1,16 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: fs_inet.cpp +// Name: src/common/fs_inet.cpp // Purpose: HTTP and FTP file system // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik +// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if !wxUSE_SOCKETS @@ -20,13 +21,13 @@ #if wxUSE_FILESYSTEM && wxUSE_FS_INET #ifndef WXPRECOMP + #include "wx/module.h" #endif #include "wx/wfstream.h" #include "wx/url.h" #include "wx/filesys.h" #include "wx/fs_inet.h" -#include "wx/module.h" // ---------------------------------------------------------------------------- // Helper classes diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 25b8f5e175..a500a84a97 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -20,13 +20,13 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/bitmap.h" + #include "wx/module.h" #endif #include "wx/imagbmp.h" #include "wx/filefn.h" #include "wx/wfstream.h" #include "wx/intl.h" -#include "wx/module.h" #include "wx/quantize.h" // For memcpy diff --git a/src/common/image.cpp b/src/common/image.cpp index 28aaf842e2..0f42524c20 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -25,12 +25,12 @@ #include "wx/utils.h" #include "wx/bitmap.h" #include "wx/math.h" + #include "wx/module.h" #endif #include "wx/filefn.h" #include "wx/wfstream.h" #include "wx/intl.h" -#include "wx/module.h" #if wxUSE_XPM #include "wx/xpmdecod.h" diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index 4db84ee61b..31e069e53a 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -23,6 +23,7 @@ #include "wx/app.h" #include "wx/intl.h" #include "wx/bitmap.h" + #include "wx/module.h" #endif // NB: Some compilers define boolean type in Windows headers @@ -45,7 +46,6 @@ extern "C" #include "wx/filefn.h" #include "wx/wfstream.h" -#include "wx/module.h" // For memcpy #include diff --git a/src/common/imagpcx.cpp b/src/common/imagpcx.cpp index 91167781f9..69b04d1ea7 100644 --- a/src/common/imagpcx.cpp +++ b/src/common/imagpcx.cpp @@ -24,11 +24,11 @@ #include "wx/intl.h" #include "wx/palette.h" #include "wx/hash.h" + #include "wx/module.h" #endif #include "wx/imagpcx.h" #include "wx/wfstream.h" -#include "wx/module.h" //----------------------------------------------------------------------------- // wxPCXHandler diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index 8261210c81..67c41464ca 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -30,13 +30,13 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/bitmap.h" + #include "wx/module.h" #endif #include "png.h" #include "wx/filefn.h" #include "wx/wfstream.h" #include "wx/intl.h" -#include "wx/module.h" // For memcpy #include diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index 4db167ecbb..00c11c56a8 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -23,6 +23,7 @@ #include "wx/app.h" #include "wx/intl.h" #include "wx/bitmap.h" + #include "wx/module.h" #endif extern "C" @@ -32,7 +33,6 @@ extern "C" } #include "wx/filefn.h" #include "wx/wfstream.h" -#include "wx/module.h" #ifndef TIFFLINKAGEMODE #if defined(__WATCOMC__) && defined(__WXMGL__) diff --git a/src/common/init.cpp b/src/common/init.cpp index b01d39cd9b..e699699702 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -29,12 +29,12 @@ #include "wx/log.h" #include "wx/thread.h" #include "wx/intl.h" + #include "wx/module.h" #endif #include "wx/init.h" #include "wx/ptr_scpd.h" -#include "wx/module.h" #include "wx/except.h" #if defined(__WXMSW__) && defined(__WXDEBUG__) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index ad84ce7ba4..903769fc59 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -47,6 +47,7 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/hashmap.h" + #include "wx/module.h" #endif // WX_PRECOMP #ifndef __WXWINCE__ @@ -69,7 +70,6 @@ #include "wx/file.h" #include "wx/filename.h" #include "wx/tokenzr.h" -#include "wx/module.h" #include "wx/fontmap.h" #include "wx/encconv.h" #include "wx/ptr_scpd.h" diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp index 43de8ee906..db1cf082f3 100644 --- a/src/common/mimecmn.cpp +++ b/src/common/mimecmn.cpp @@ -34,9 +34,9 @@ #include "wx/string.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/module.h" #endif //WX_PRECOMP -#include "wx/module.h" #include "wx/file.h" #include "wx/iconloc.h" #include "wx/confbase.h" diff --git a/src/common/paper.cpp b/src/common/paper.cpp index 7f1cbfa40b..fb2c1ca6d3 100644 --- a/src/common/paper.cpp +++ b/src/common/paper.cpp @@ -23,10 +23,10 @@ #include "wx/utils.h" #include "wx/settings.h" #include "wx/intl.h" + #include "wx/module.h" #endif #include "wx/paper.h" -#include "wx/module.h" #include #include diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 13ddf2a44f..eb1b109583 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -34,12 +34,12 @@ #include "wx/intl.h" #include "wx/textdlg.h" #include "wx/sizer.h" + #include "wx/module.h" #endif // !WX_PRECOMP #include "wx/prntbase.h" #include "wx/printdlg.h" #include "wx/print.h" -#include "wx/module.h" #include #include diff --git a/src/common/protocol.cpp b/src/common/protocol.cpp index e92f3a0899..7f1ba9d358 100644 --- a/src/common/protocol.cpp +++ b/src/common/protocol.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: protocol.cpp +// Name: src/common/protocol.cpp // Purpose: Implement protocol base class // Author: Guilhem Lavaux // Modified by: @@ -13,14 +13,18 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop + #pragma hdrstop #endif #if wxUSE_PROTOCOL #include "wx/protocol/protocol.h" + +#ifndef WX_PRECOMP + #include "wx/module.h" +#endif + #include "wx/url.h" -#include "wx/module.h" #include @@ -198,7 +202,7 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) *ret = 0; result = wxString::FromAscii( tmp_str ); - result = result.Left(result.Length()-1); + result = result.Left(result.length()-1); size = ret-tmp_str+1; sock->Unread(&tmp_buf[size], avail-size); @@ -209,4 +213,3 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) #endif // wxUSE_SOCKETS #endif // wxUSE_PROTOCOL - diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index 0ece73c6b0..f2b33bb2e2 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -36,6 +36,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/event.h" + #include "wx/module.h" #endif #include @@ -43,7 +44,6 @@ #include #include "wx/socket.h" -#include "wx/module.h" // -------------------------------------------------------------------------- // macros and constants diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 11d97cccc4..28a929198c 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -33,10 +33,10 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/timer.h" + #include "wx/module.h" #endif #include "wx/apptrait.h" -#include "wx/module.h" #include "wx/sckaddr.h" #include "wx/datetime.h" diff --git a/src/common/url.cpp b/src/common/url.cpp index 14ebd7b851..700cb18d7e 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -24,10 +24,9 @@ #include "wx/list.h" #include "wx/string.h" #include "wx/utils.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include #include diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 147b72074c..b9ba4dd4e5 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -37,9 +37,9 @@ #include "wx/textdlg.h" #include "wx/gdicmn.h" #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/filefn.h" #include "wx/imaglist.h" #include "wx/tokenzr.h" diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index 138321f6bf..11c05ae4b3 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -31,11 +31,11 @@ #include "wx/dc.h" #include "wx/settings.h" #include "wx/gdicmn.h" + #include "wx/module.h" #endif //WX_PRECOMP #include "wx/splitter.h" #include "wx/dcmirror.h" -#include "wx/module.h" // ---------------------------------------------------------------------------- // wxRendererGeneric: our wxRendererNative implementation diff --git a/src/generic/timer.cpp b/src/generic/timer.cpp index 92b513ef35..a2daf62003 100644 --- a/src/generic/timer.cpp +++ b/src/generic/timer.cpp @@ -26,10 +26,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/module.h" #endif -#include "wx/module.h" - // ---------------------------------------------------------------------------- // Time input function // ---------------------------------------------------------------------------- diff --git a/src/gtk/artgtk.cpp b/src/gtk/artgtk.cpp index f1de4e0951..9d4c51c768 100644 --- a/src/gtk/artgtk.cpp +++ b/src/gtk/artgtk.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: artstd.cpp +// Name: src/gtk/artstd.cpp // Purpose: stock wxArtProvider instance with native GTK+ stock icons // Author: Vaclav Slavik // Modified by: @@ -23,7 +23,11 @@ #if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #include "wx/artprov.h" -#include "wx/module.h" + +#ifndef WX_PRECOMP + #include "wx/module.h" +#endif + #include "wx/gtk/private.h" #include @@ -175,7 +179,7 @@ static GtkIconSize FindClosestIconSize(const wxSize& size) if (size.x > s_sizes[i].x || size.y > s_sizes[i].y) continue; - unsigned dist = (size.x - s_sizes[i].x) * (size.x - s_sizes[i].x) + + unsigned dist = (size.x - s_sizes[i].x) * (size.x - s_sizes[i].x) + (size.y - s_sizes[i].y) * (size.y - s_sizes[i].y); if (dist == 0) return s_sizes[i].icon; diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index c5ce2eea44..ff8c5aeb75 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -22,9 +22,9 @@ #include "wx/dcmemory.h" #include "wx/math.h" // for floating-point functions #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/fontutil.h" #include "wx/gtk/win_gtk.h" diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp index c0969bd6e0..85d0451334 100644 --- a/src/gtk/glcanvas.cpp +++ b/src/gtk/glcanvas.cpp @@ -20,10 +20,9 @@ #include "wx/app.h" #include "wx/frame.h" #include "wx/colour.h" + #include "wx/module.h" #endif // WX_PRECOMP -#include "wx/module.h" - extern "C" { #include "gtk/gtk.h" diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index aabe61aa63..5f3ab6ed25 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -25,11 +25,11 @@ #include "wx/icon.h" #include "wx/math.h" #include "wx/image.h" + #include "wx/module.h" #endif #include "wx/fontutil.h" #include "wx/gtk/private.h" -#include "wx/module.h" #include "wx/dynlib.h" #include diff --git a/src/gtk/gnome/gvfs.cpp b/src/gtk/gnome/gvfs.cpp index 84b3af17d2..d3f9fbb074 100644 --- a/src/gtk/gnome/gvfs.cpp +++ b/src/gtk/gnome/gvfs.cpp @@ -21,11 +21,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/mimetype.h" #include "wx/gtk/private.h" -#include "wx/module.h" #include "wx/dynlib.h" #include diff --git a/src/gtk/threadno.cpp b/src/gtk/threadno.cpp index 50e012ad3b..435f921394 100644 --- a/src/gtk/threadno.cpp +++ b/src/gtk/threadno.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/gtk/thread.cpp +// Name: src/gtk/threadno.cpp // Purpose: Solaris thread support // Author: Guilhem Lavaux // Modified by: @@ -16,10 +16,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/wx.h" -#include "wx/module.h" wxMutex::wxMutex() { @@ -69,7 +69,7 @@ void wxCondition::Wait(wxMutex& WXUNUSED(mutex)) bool wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), unsigned long WXUNUSED(nsec)) { - return FALSE; + return false; } void wxCondition::Signal() @@ -128,17 +128,17 @@ unsigned long wxThread::GetID() const bool wxThread::IsMain() { - return TRUE; + return true; } bool wxThread::IsRunning() const { - return FALSE; + return false; } bool wxThread::IsAlive() const { - return FALSE; + return false; } void wxThread::SetPriority(int WXUNUSED(prio)) { } @@ -170,7 +170,7 @@ bool wxThreadModule::OnInit() { wxMainMutex = new wxMutex(); wxMainMutex->Lock(); - return TRUE; + return true; } void wxThreadModule::OnExit() diff --git a/src/gtk/threadsgi.cpp b/src/gtk/threadsgi.cpp index fdf7740181..f8d7d177e0 100644 --- a/src/gtk/threadsgi.cpp +++ b/src/gtk/threadsgi.cpp @@ -17,6 +17,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/utils.h" + #include "wx/module.h" #endif #include @@ -25,7 +26,6 @@ #include #include #include -#include "wx/module.h" #include "gdk/gdk.h" #include "gtk/gtk.h" diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index a6544f8fe6..abae449a8a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -33,10 +33,9 @@ #include "wx/layout.h" #include "wx/statusbr.h" #include "wx/math.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" #endif @@ -2359,7 +2358,7 @@ void wxWindowGTK::Init() m_hasVMT = false; m_needParent = true; m_isBeingDeleted = false; - + m_showOnIdle= false; m_noExpose = false; @@ -2878,7 +2877,7 @@ bool wxWindowGTK::GtkShowFromOnIdle() m_showOnIdle = false; return true; } - + return false; } @@ -2900,7 +2899,7 @@ void wxWindowGTK::OnInternalIdle() SetBackgroundStyle(GetBackgroundStyle()); m_needsStyleChange = false; } - + wxCursor cursor = m_cursor; if (g_globalCursor.Ok()) cursor = g_globalCursor; @@ -3381,7 +3380,7 @@ bool wxWindowGTK::Reparent( wxWindowBase *newParentBase ) m_showOnIdle = true; gtk_widget_hide( m_widget ); } - + /* insert GTK representation */ (*(newParent->m_insertCallback))(newParent, this); } @@ -3643,7 +3642,7 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect ) if (m_wxwindow) { if (!GTK_PIZZA(m_wxwindow)->bin_window) return; - + GdkRectangle gdk_rect, *p; if (rect) @@ -4316,4 +4315,3 @@ void wxRemoveGrab(wxWindow* window) { gtk_grab_remove( (GtkWidget*) window->GetHandle() ); } - diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 24d091a897..748f9d57d4 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -29,11 +29,11 @@ #include "wx/font.h" #include "wx/gdicmn.h" #include "wx/image.h" + #include "wx/module.h" #endif #include "wx/file.h" #include "wx/filename.h" -#include "wx/module.h" #include "wx/thread.h" #ifdef __WXGPE__ diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 6dd1e9f48d..329d62d9eb 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -21,9 +21,9 @@ #include "wx/dcmemory.h" #include "wx/math.h" // for floating-point functions #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/fontutil.h" #include "wx/gtk1/win_gtk.h" diff --git a/src/gtk1/glcanvas.cpp b/src/gtk1/glcanvas.cpp index ec920d0800..235c0de0d7 100644 --- a/src/gtk1/glcanvas.cpp +++ b/src/gtk1/glcanvas.cpp @@ -20,10 +20,9 @@ #include "wx/app.h" #include "wx/frame.h" #include "wx/colour.h" + #include "wx/module.h" #endif // WX_PRECOMP -#include "wx/module.h" - extern "C" { #include "gtk/gtk.h" diff --git a/src/gtk1/threadno.cpp b/src/gtk1/threadno.cpp index 67d932e80a..a4bcf8a517 100644 --- a/src/gtk1/threadno.cpp +++ b/src/gtk1/threadno.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/gtk1/thread.cpp +// Name: src/gtk1/threadno.cpp // Purpose: Solaris thread support // Author: Guilhem Lavaux // Modified by: @@ -17,10 +17,9 @@ #ifndef WX_PRECOMP #include "wx/wx.h" #include "wx/log.h" + #include "wx/module.h" #endif -#include "wx/module.h" - wxMutex::wxMutex() { m_locked = 0; @@ -69,7 +68,7 @@ void wxCondition::Wait(wxMutex& WXUNUSED(mutex)) bool wxCondition::Wait(wxMutex& WXUNUSED(mutex), unsigned long WXUNUSED(sec), unsigned long WXUNUSED(nsec)) { - return FALSE; + return false; } void wxCondition::Signal() @@ -128,17 +127,17 @@ unsigned long wxThread::GetID() const bool wxThread::IsMain() { - return TRUE; + return true; } bool wxThread::IsRunning() const { - return FALSE; + return false; } bool wxThread::IsAlive() const { - return FALSE; + return false; } void wxThread::SetPriority(int WXUNUSED(prio)) { } @@ -170,7 +169,7 @@ bool wxThreadModule::OnInit() { wxMainMutex = new wxMutex(); wxMainMutex->Lock(); - return TRUE; + return true; } void wxThreadModule::OnExit() diff --git a/src/gtk1/threadsgi.cpp b/src/gtk1/threadsgi.cpp index b4e1b4ab82..8f49d94a32 100644 --- a/src/gtk1/threadsgi.cpp +++ b/src/gtk1/threadsgi.cpp @@ -17,6 +17,7 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/utils.h" + #include "wx/module.h" #endif #include @@ -25,7 +26,6 @@ #include #include #include -#include "wx/module.h" #include "gdk/gdk.h" #include "gtk/gtk.h" diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 98c21e02b3..cbb766c42b 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -32,10 +32,9 @@ #include "wx/layout.h" #include "wx/statusbr.h" #include "wx/math.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" #endif diff --git a/src/html/chm.cpp b/src/html/chm.cpp index 70c48e2694..4d8dba1662 100644 --- a/src/html/chm.cpp +++ b/src/html/chm.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: chm.cpp +// Name: src/html/chm.cpp // Purpose: CHM (Help) support for wxHTML // Author: Markus Sinner // Copyright: (c) 2003 Herd Software Development @@ -10,7 +10,7 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_LIBMSPACK @@ -18,11 +18,11 @@ #include #ifndef WXPRECOMP -#include "wx/intl.h" -#include "wx/log.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/filesys.h" #include "wx/mstream.h" #include "wx/wfstream.h" @@ -637,7 +637,7 @@ wxChmInputStream::CreateHHPStream() wxUint32 lcid = wxUINT32_SWAP_ON_BE( dummy ) ; wxString msg ; msg.Printf(_T("Language=0x%X\r\n"),lcid) ; - out->Write(msg.c_str() , msg.Length() ) ; + out->Write(msg.c_str() , msg.length() ) ; } break ; default: @@ -673,7 +673,7 @@ wxChmInputStream::CreateHHPStream() tmp = "Index File=*.hhk\r\n"; out->Write((const void *) tmp, strlen(tmp)); } - + // Now copy the Data from the memory out->SeekO(0, wxFromEnd); m_size = out->TellO(); diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 3a100af4d6..95d81d6abc 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -21,11 +21,11 @@ #include "wx/colour.h" #include "wx/dc.h" #include "wx/settings.h" + #include "wx/module.h" #endif #include "wx/html/htmlcell.h" #include "wx/html/htmlwin.h" -#include "wx/module.h" #include diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 0dd8817e52..80fa773564 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -23,6 +23,7 @@ #include "wx/dc.h" #include "wx/settings.h" #include "wx/msgdlg.h" + #include "wx/module.h" #endif #include "wx/print.h" @@ -30,7 +31,6 @@ #include "wx/html/htmprint.h" #include "wx/wxhtml.h" #include "wx/wfstream.h" -#include "wx/module.h" //-------------------------------------------------------------------------------- diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 973bb8065d..080f0dcb35 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -32,9 +32,9 @@ #include "wx/textctrl.h" #include "wx/memory.h" #include "wx/gdicmn.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/tooltip.h" #include "wx/docview.h" #include "wx/filename.h" @@ -45,9 +45,9 @@ // mac #ifndef __DARWIN__ - #if __option(profile) - #include - #endif + #if __option(profile) + #include + #endif #endif // #include "apprsrc.h" diff --git a/src/mac/carbon/cfsocket.cpp b/src/mac/carbon/cfsocket.cpp index bc527d02c2..a8a331f03d 100644 --- a/src/mac/carbon/cfsocket.cpp +++ b/src/mac/carbon/cfsocket.cpp @@ -28,10 +28,10 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/timer.h" + #include "wx/module.h" #endif #include "wx/apptrait.h" -#include "wx/module.h" #include "wx/sckaddr.h" #include "wx/mac/carbon/private.h" diff --git a/src/mac/carbon/gdiobj.cpp b/src/mac/carbon/gdiobj.cpp index 3e1b73d874..a4bbc91059 100644 --- a/src/mac/carbon/gdiobj.cpp +++ b/src/mac/carbon/gdiobj.cpp @@ -15,9 +15,9 @@ #ifndef WX_PRECOMP #include "wx/gdicmn.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/link.h" #include "wx/mac/private.h" diff --git a/src/mac/carbon/mpthread.cpp b/src/mac/carbon/mpthread.cpp index edf27aaf3c..30bb2a0087 100755 --- a/src/mac/carbon/mpthread.cpp +++ b/src/mac/carbon/mpthread.cpp @@ -25,9 +25,9 @@ #ifndef WX_PRECOMP #include "wx/wx.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/thread.h" #ifdef __WXMAC__ @@ -216,11 +216,11 @@ wxMutexError wxMutexInternal::TryLock() wxMutexError wxMutexInternal::Unlock() { wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ; - OSStatus err = MPSignalSemaphore( m_semaphore); - if ( err) + OSStatus err = MPSignalSemaphore( m_semaphore); + if ( err) { - wxLogSysError(_("Could not unlock mutex")); - return wxMUTEX_MISC_ERROR; + wxLogSysError(_("Could not unlock mutex")); + return wxMUTEX_MISC_ERROR; } return wxMUTEX_NO_ERROR; @@ -231,13 +231,13 @@ wxMutexError wxMutexInternal::Unlock() class wxMutexInternal { public: - wxMutexInternal(wxMutexType mutexType) ; - ~wxMutexInternal() ; - bool IsOk() const { return m_isOk; } + wxMutexInternal(wxMutexType mutexType) ; + ~wxMutexInternal() ; + bool IsOk() const { return m_isOk; } - wxMutexError Lock() ; - wxMutexError TryLock() ; - wxMutexError Unlock(); + wxMutexError Lock() ; + wxMutexError TryLock() ; + wxMutexError Unlock(); private: MPCriticalRegionID m_critRegion ; bool m_isOk ; @@ -259,17 +259,17 @@ wxMutexInternal::wxMutexInternal(wxMutexType mutexType ) wxMutexInternal::~wxMutexInternal() { if ( m_critRegion != kInvalidID ) - MPDeleteCriticalRegion( m_critRegion); + MPDeleteCriticalRegion( m_critRegion); } wxMutexError wxMutexInternal::Lock() { wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ; - OSStatus err = MPEnterCriticalRegion( m_critRegion, kDurationForever); - if ( err) + OSStatus err = MPEnterCriticalRegion( m_critRegion, kDurationForever); + if ( err) { - wxLogSysError(wxT("Could not lock mutex")); - return wxMUTEX_MISC_ERROR; + wxLogSysError(wxT("Could not lock mutex")); + return wxMUTEX_MISC_ERROR; } return wxMUTEX_NO_ERROR; @@ -278,15 +278,15 @@ wxMutexError wxMutexInternal::Lock() wxMutexError wxMutexInternal::TryLock() { wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ; - OSStatus err = MPEnterCriticalRegion( m_critRegion, kDurationImmediate); - if ( err) + OSStatus err = MPEnterCriticalRegion( m_critRegion, kDurationImmediate); + if ( err) { - if ( err == kMPTimeoutErr) - { - return wxMUTEX_BUSY; - } - wxLogSysError(wxT("Could not try lock mutex")); - return wxMUTEX_MISC_ERROR; + if ( err == kMPTimeoutErr) + { + return wxMUTEX_BUSY; + } + wxLogSysError(wxT("Could not try lock mutex")); + return wxMUTEX_MISC_ERROR; } return wxMUTEX_NO_ERROR; @@ -295,11 +295,11 @@ wxMutexError wxMutexInternal::TryLock() wxMutexError wxMutexInternal::Unlock() { wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ; - OSStatus err = MPExitCriticalRegion( m_critRegion); - if ( err) + OSStatus err = MPExitCriticalRegion( m_critRegion); + if ( err) { - wxLogSysError(_("Could not unlock mutex")); - return wxMUTEX_MISC_ERROR; + wxLogSysError(_("Could not unlock mutex")); + return wxMUTEX_MISC_ERROR; } return wxMUTEX_NO_ERROR; @@ -314,23 +314,23 @@ wxMutexError wxMutexInternal::Unlock() class wxSemaphoreInternal { public: - wxSemaphoreInternal(int initialcount, int maxcount); - ~wxSemaphoreInternal(); + wxSemaphoreInternal(int initialcount, int maxcount); + ~wxSemaphoreInternal(); - bool IsOk() const { return m_isOk; } + bool IsOk() const { return m_isOk; } - wxSemaError WaitTimeout(unsigned long milliseconds); + wxSemaError WaitTimeout(unsigned long milliseconds); - wxSemaError Wait() { return WaitTimeout( kDurationForever); } + wxSemaError Wait() { return WaitTimeout( kDurationForever); } - wxSemaError TryWait() - { - wxSemaError err = WaitTimeout(kDurationImmediate); - if ( err == wxSEMA_TIMEOUT ) - err = wxSEMA_BUSY ; - return err ; - } - wxSemaError Post(); + wxSemaError TryWait() + { + wxSemaError err = WaitTimeout(kDurationImmediate); + if ( err == wxSEMA_TIMEOUT ) + err = wxSEMA_BUSY ; + return err ; + } + wxSemaError Post(); private: MPSemaphoreID m_semaphore; @@ -342,12 +342,12 @@ wxSemaphoreInternal::wxSemaphoreInternal(int initialcount, int maxcount) wxMacMPThreadsInitVerify() ; m_isOk = false ; m_semaphore = kInvalidID ; - if ( maxcount == 0 ) + if ( maxcount == 0 ) { - // make it practically infinite - maxcount = INT_MAX; + // make it practically infinite + maxcount = INT_MAX; } - verify_noerr( MPCreateSemaphore( maxcount, initialcount, & m_semaphore) ); + verify_noerr( MPCreateSemaphore( maxcount, initialcount, & m_semaphore) ); m_isOk = ( m_semaphore != kInvalidID ) ; if ( !IsOk() ) @@ -357,31 +357,31 @@ wxSemaphoreInternal::wxSemaphoreInternal(int initialcount, int maxcount) wxSemaphoreInternal::~wxSemaphoreInternal() { if( m_semaphore != kInvalidID ) - MPDeleteSemaphore( m_semaphore); + MPDeleteSemaphore( m_semaphore); } wxSemaError wxSemaphoreInternal::WaitTimeout(unsigned long milliseconds) { - OSStatus err = MPWaitOnSemaphore( m_semaphore, milliseconds); - if ( err) + OSStatus err = MPWaitOnSemaphore( m_semaphore, milliseconds); + if ( err) { - if ( err == kMPTimeoutErr) - { - return wxSEMA_TIMEOUT; - } - return wxSEMA_MISC_ERROR; + if ( err == kMPTimeoutErr) + { + return wxSEMA_TIMEOUT; + } + return wxSEMA_MISC_ERROR; } - return wxSEMA_NO_ERROR; + return wxSEMA_NO_ERROR; } wxSemaError wxSemaphoreInternal::Post() { - OSStatus err = MPSignalSemaphore( m_semaphore); - if ( err) + OSStatus err = MPSignalSemaphore( m_semaphore); + if ( err) { - return wxSEMA_MISC_ERROR; + return wxSEMA_MISC_ERROR; } - return wxSEMA_NO_ERROR; + return wxSEMA_NO_ERROR; } // ---------------------------------------------------------------------------- @@ -394,50 +394,50 @@ class wxConditionInternal { public: - wxConditionInternal(wxMutex& mutex) + wxConditionInternal(wxMutex& mutex) : m_mutex( mutex), - m_semaphore( 0, 1), - m_gate( 1, 1) - { - m_waiters = 0; - m_signals = 0; - m_canceled = 0; - } + m_semaphore( 0, 1), + m_gate( 1, 1) + { + m_waiters = 0; + m_signals = 0; + m_canceled = 0; + } - ~wxConditionInternal() - { - } + ~wxConditionInternal() + { + } - bool IsOk() const { return m_mutex.IsOk() ; } + bool IsOk() const { return m_mutex.IsOk() ; } - wxCondError Wait() - { - return WaitTimeout( kDurationForever); - } + wxCondError Wait() + { + return WaitTimeout( kDurationForever); + } - wxCondError WaitTimeout(unsigned long msectimeout); + wxCondError WaitTimeout(unsigned long msectimeout); - wxCondError Signal() - { - return DoSignal( false); - } + wxCondError Signal() + { + return DoSignal( false); + } - wxCondError Broadcast() - { - return DoSignal( true); - } + wxCondError Broadcast() + { + return DoSignal( true); + } private: - wxCondError DoSignal( bool signalAll); + wxCondError DoSignal( bool signalAll); - wxMutex& m_mutex; - wxSemaphoreInternal m_semaphore; // Signals the waiting threads. - wxSemaphoreInternal m_gate; - wxCriticalSection m_varSection; - size_t m_waiters; // Number of threads waiting for a signal. - size_t m_signals; // Number of signals to send. - size_t m_canceled; // Number of canceled waiters in m_waiters. + wxMutex& m_mutex; + wxSemaphoreInternal m_semaphore; // Signals the waiting threads. + wxSemaphoreInternal m_gate; + wxCriticalSection m_varSection; + size_t m_waiters; // Number of threads waiting for a signal. + size_t m_signals; // Number of signals to send. + size_t m_canceled; // Number of canceled waiters in m_waiters. }; diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp index 7a981d6206..b8302e571f 100644 --- a/src/mac/carbon/thread.cpp +++ b/src/mac/carbon/thread.cpp @@ -18,11 +18,11 @@ #ifndef WX_PRECOMP #include "wx/wx.h" + #include "wx/module.h" #endif #if wxUSE_THREADS -#include "wx/module.h" #include "wx/thread.h" #ifdef __WXMAC__ diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index 16f2be2066..80a5cd86da 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -36,9 +36,9 @@ #include "wx/textctrl.h" #include "wx/memory.h" #include "wx/gdicmn.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/tooltip.h" #include "wx/docview.h" #include "wx/filename.h" @@ -48,9 +48,9 @@ // mac #ifndef __DARWIN__ - #if __option(profile) - #include - #endif + #if __option(profile) + #include + #endif #endif #include "apprsrc.h" diff --git a/src/mac/classic/thread.cpp b/src/mac/classic/thread.cpp index ee31c8e7df..52f7603ee3 100644 --- a/src/mac/classic/thread.cpp +++ b/src/mac/classic/thread.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: thread.cpp +// Name: src/mac/classic/thread.cpp // Purpose: wxThread Implementation // Author: Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin // Modified by: Stefan Csomor @@ -23,11 +23,11 @@ #ifndef WX_PRECOMP #include "wx/wx.h" + #include "wx/module.h" #endif #if wxUSE_THREADS -#include "wx/module.h" #include "wx/thread.h" #ifdef __WXMAC__ @@ -60,7 +60,7 @@ enum wxThreadState // ---------------------------------------------------------------------------- static ThreadID gs_idMainThread = kNoThreadID ; -static bool gs_waitingForThread = FALSE ; +static bool gs_waitingForThread = false ; size_t g_numberOfThreads = 0; // ============================================================================ @@ -433,7 +433,7 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize) if ( err != noErr ) { wxLogSysError(_("Can't create thread")); - return FALSE; + return false; } if ( m_priority != WXTHREAD_DEFAULT_PRIORITY ) @@ -443,7 +443,7 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize) m_state = STATE_NEW; - return TRUE; + return true; } bool wxThreadInternal::Suspend() @@ -458,14 +458,14 @@ bool wxThreadInternal::Suspend() err = ::ThreadEndCritical() ; wxASSERT( err == noErr ) ; wxLogSysError(_("Can not suspend thread %x"), m_tid); - return FALSE; + return false; } m_state = STATE_PAUSED; err = ::SetThreadStateEndCritical(m_tid, kStoppedThreadState, kNoThreadID); - return TRUE; + return true; } bool wxThreadInternal::Resume() @@ -485,7 +485,7 @@ bool wxThreadInternal::Resume() err = ::ThreadEndCritical() ; wxASSERT( err == noErr ) ; wxLogSysError(_("Can not resume thread %x"), m_tid); - return FALSE; + return false; } err = ::SetThreadStateEndCritical(m_tid, kReadyThreadState, kNoThreadID); @@ -494,7 +494,7 @@ bool wxThreadInternal::Resume() err = ::ThreadEndCritical() ; wxASSERT( err == noErr ) ; ::YieldToAnyThread() ; - return TRUE; + return true; } // static functions @@ -545,7 +545,7 @@ void wxThread::Sleep(unsigned long milliseconds) double mssleep = milliseconds * 1000 ; double msstart, msnow ; msstart = (start.hi * 4294967296.0 + start.lo) ; - + do { YieldToAnyThread(); @@ -583,7 +583,7 @@ bool wxThread::SetConcurrency(size_t level) return level == 1; } - return TRUE ; + return true ; } // ctor and dtor @@ -688,7 +688,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc) // Delete() is always safe to call, so consider all possible states // has the thread started to run? - bool shouldResume = FALSE; + bool shouldResume = false; { wxCriticalSectionLocker lock(m_critsect); @@ -698,7 +698,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc) // WinThreadStart() will see it and terminate immediately m_internal->SetState(STATE_EXITED); - shouldResume = TRUE; + shouldResume = true; } } @@ -712,7 +712,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc) if ( IsMain() ) { // set flag for wxIsWaitingForThread() - gs_waitingForThread = TRUE; + gs_waitingForThread = true; #if wxUSE_GUI wxBeginBusyCursor(); @@ -742,7 +742,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc) if ( IsMain() ) { - gs_waitingForThread = FALSE; + gs_waitingForThread = false; #if wxUSE_GUI wxEndBusyCursor(); @@ -879,13 +879,13 @@ bool wxThreadModule::OnInit() if ( !hasThreadManager ) { wxLogSysError( wxT("Thread Support is not available on this System") ); - return FALSE ; + return false ; } // no error return for GetCurrentThreadId() MacGetCurrentThread( &gs_idMainThread ) ; - return TRUE; + return true; } void wxThreadModule::OnExit() diff --git a/src/mac/corefoundation/hid.cpp b/src/mac/corefoundation/hid.cpp index f072b71b46..c820d8d941 100644 --- a/src/mac/corefoundation/hid.cpp +++ b/src/mac/corefoundation/hid.cpp @@ -34,12 +34,11 @@ #include "wx/string.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/module.h" #endif #include "wx/mac/corefoundation/cfstring.h" -#include "wx/module.h" - // ============================================================================ // implementation // ============================================================================ diff --git a/src/mgl/app.cpp b/src/mgl/app.cpp index bc64f28457..247d9558de 100644 --- a/src/mgl/app.cpp +++ b/src/mgl/app.cpp @@ -22,10 +22,10 @@ #include "wx/dialog.h" #include "wx/log.h" #include "wx/intl.h" + #include "wx/module.h" #endif #include "wx/evtloop.h" -#include "wx/module.h" #include "wx/fontutil.h" #include "wx/univ/theme.h" #include "wx/univ/renderer.h" diff --git a/src/mgl/cursor.cpp b/src/mgl/cursor.cpp index 48e37f2b59..c60a9eaf11 100644 --- a/src/mgl/cursor.cpp +++ b/src/mgl/cursor.cpp @@ -21,10 +21,9 @@ #include "wx/log.h" #include "wx/utils.h" #include "wx/hashmap.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include "wx/mgl/private.h" diff --git a/src/mgl/region.cpp b/src/mgl/region.cpp index 36d60598d7..6819daf689 100644 --- a/src/mgl/region.cpp +++ b/src/mgl/region.cpp @@ -18,10 +18,10 @@ #ifndef WX_PRECOMP #include "wx/gdicmn.h" + #include "wx/module.h" #endif #include "wx/thread.h" -#include "wx/module.h" #include diff --git a/src/mgl/settings.cpp b/src/mgl/settings.cpp index 01ca9d65b9..63fc4576ca 100644 --- a/src/mgl/settings.cpp +++ b/src/mgl/settings.cpp @@ -19,10 +19,9 @@ #include "wx/colour.h" #include "wx/font.h" #include "wx/gdicmn.h" + #include "wx/module.h" #endif -#include "wx/module.h" - // ---------------------------------------------------------------------------- // global data // ---------------------------------------------------------------------------- diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 8e4db93daa..6358c0387b 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -25,9 +25,9 @@ #include "wx/log.h" #include "wx/utils.h" #include "wx/memory.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/evtloop.h" #if wxUSE_THREADS @@ -35,7 +35,7 @@ #endif #ifdef __VMS__ -#pragma message disable nosimpint + #pragma message disable nosimpint #endif #include #include @@ -43,7 +43,7 @@ #include #include #ifdef __VMS__ -#pragma message enable nosimpint + #pragma message enable nosimpint #endif #include "wx/motif/private.h" diff --git a/src/motif/evtloop.cpp b/src/motif/evtloop.cpp index 03049f43da..79a49240f1 100644 --- a/src/motif/evtloop.cpp +++ b/src/motif/evtloop.cpp @@ -29,17 +29,18 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/window.h" + #include "wx/module.h" #endif //WX_PRECOMP #include "wx/evtloop.h" #ifdef __VMS__ -#pragma message disable nosimpint + #pragma message disable nosimpint #endif #include #include #ifdef __VMS__ -#pragma message enable nosimpint + #pragma message enable nosimpint #endif #include "wx/unix/private.h" @@ -377,8 +378,6 @@ bool wxDoEventLoopIteration( wxEventLoop& evtLoop ) // also wxEventLoop::Exit is implemented that way, so that exiting an // event loop won't require an event being in the queue -#include "wx/module.h" - #include #include #include diff --git a/src/motif/window.cpp b/src/motif/window.cpp index d5b4b71854..720aff4a40 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -40,9 +40,9 @@ #include "wx/scrolwin.h" #include "wx/layout.h" #include "wx/menuitem.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/evtloop.h" #if wxUSE_DRAG_AND_DROP @@ -65,7 +65,7 @@ // 2) call DoMoveWindow from DoSetSize, allowing controls to override it #ifdef __VMS__ -#pragma message disable nosimpint + #pragma message disable nosimpint #endif #include @@ -76,7 +76,7 @@ #include #include // for XmMenuPosition #ifdef __VMS__ -#pragma message enable nosimpint + #pragma message enable nosimpint #endif #include "wx/motif/private.h" diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 23307d06b1..133b9f70b1 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -41,11 +41,11 @@ #include "wx/intl.h" #include "wx/wxchar.h" #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/apptrait.h" #include "wx/filename.h" -#include "wx/module.h" #include "wx/dynlib.h" #include "wx/evtloop.h" diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 47a2aca746..9619122ec0 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -34,10 +34,9 @@ #include "wx/settings.h" #include "wx/intl.h" #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include "wx/msw/private.h" #include "wx/msw/missing.h" // IDC_HAND diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 613cd0205b..50e86d027c 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -36,10 +36,10 @@ #include "wx/log.h" #include "wx/icon.h" #include "wx/dcprint.h" + #include "wx/module.h" #endif #include "wx/sysopt.h" -#include "wx/module.h" #include "wx/dynlib.h" #ifdef wxHAVE_RAW_BITMAP diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp index 547f67b767..a7465a0dcc 100644 --- a/src/msw/dde.cpp +++ b/src/msw/dde.cpp @@ -30,9 +30,9 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/hashmap.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/dde.h" #include "wx/intl.h" diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 5e34902e0c..76ad747b72 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -34,12 +34,12 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/timer.h" + #include "wx/module.h" #endif #include "wx/generic/choicdgg.h" #include "wx/dynlib.h" -#include "wx/module.h" DEFINE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED) DEFINE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED) diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index a463d64c6d..0f4ee4b78b 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -12,7 +12,7 @@ #include "wx/wxprec.h" #if defined(__BORLANDC__) -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_GLCANVAS @@ -23,10 +23,9 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/app.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include "wx/msw/private.h" // DLL options compatibility check: diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index e30c64687e..e7fd6460cc 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -26,11 +26,11 @@ #include "wx/utils.h" #include "wx/settings.h" #include "wx/menuitem.h" + #include "wx/module.h" #endif #include "wx/ownerdrw.h" #include "wx/fontutil.h" -#include "wx/module.h" #if wxUSE_OWNER_DRAWN diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index c15da355e7..9817d4d7c1 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/settings.cpp +// Name: src/msw/settings.cpp // Purpose: wxSystemSettingsNative implementation for MSW // Author: Julian Smart // Modified by: @@ -29,6 +29,7 @@ #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/gdicmn.h" + #include "wx/module.h" #endif #include "wx/msw/private.h" @@ -37,7 +38,6 @@ #define SPI_GETFLATMENU 0x1022 #endif -#include "wx/module.h" #include "wx/fontutil.h" // for SM_CXCURSOR, SM_CYCURSOR, SM_TABLETPC diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 5c1fcdeacc..c331c3c95f 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -36,9 +36,9 @@ #include "wx/app.h" #include "wx/menu.h" #include "wx/math.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/sysopt.h" #if wxUSE_CLIPBOARD diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 9377f181ab..462c74137b 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -28,6 +28,7 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/app.h" + #include "wx/module.h" #endif #include "wx/apptrait.h" @@ -38,7 +39,6 @@ #include "wx/msw/seh.h" #include "wx/except.h" -#include "wx/module.h" // must have this symbol defined to get _beginthread/_endthread declarations #ifndef _MT diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index a4dd694672..4b1301b55f 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -34,20 +34,20 @@ #include "wx/intl.h" #include "wx/frame.h" #include "wx/containr.h" // wxSetFocusToChild() + #include "wx/module.h" #endif //WX_PRECOMP -#include "wx/module.h" #include "wx/dynlib.h" #include "wx/msw/private.h" #if defined(__WXWINCE__) && !defined(__HANDHELDPC__) - #include - #include - // Standard SDK doesn't have aygshell.dll: see include/wx/msw/wince/libraries.h - #if _WIN32_WCE < 400 || !defined(__WINCE_STANDARDSDK__) - #include - #endif -#include "wx/msw/wince/missing.h" + #include + #include + // Standard SDK doesn't have aygshell.dll: see include/wx/msw/wince/libraries.h + #if _WIN32_WCE < 400 || !defined(__WINCE_STANDARDSDK__) + #include + #endif + #include "wx/msw/wince/missing.h" #endif #include "wx/msw/missing.h" @@ -1073,13 +1073,13 @@ bool wxTopLevelWindowMSW::SetTransparent(wxByte alpha) if ((exstyle & WS_EX_LAYERED) == 0 ) SetWindowLong(GetHwnd(), GWL_EXSTYLE, exstyle | WS_EX_LAYERED); - return pSetLayeredWindowAttributes(GetHwnd(), 0, (BYTE)alpha, LWA_ALPHA) != 0; + return pSetLayeredWindowAttributes(GetHwnd(), 0, (BYTE)alpha, LWA_ALPHA) != 0; } bool wxTopLevelWindowMSW::CanSetTransparent() { // The API is available on win2k and above - + static int os_type = -1; static int ver_major = -1; diff --git a/src/msw/urlmsw.cpp b/src/msw/urlmsw.cpp index 951244b6e4..70eb9dfdde 100644 --- a/src/msw/urlmsw.cpp +++ b/src/msw/urlmsw.cpp @@ -22,6 +22,7 @@ #include "wx/list.h" #include "wx/string.h" #include "wx/utils.h" + #include "wx/module.h" #endif #if !wxUSE_PROTOCOL_HTTP @@ -65,7 +66,6 @@ USE_PROTOCOL(wxHTTPDummyProto) #pragma comment(lib, "wininet.lib") #endif -#include "wx/module.h" #include "wx/url.h" #include diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 8df728921e..1e7e5d3d0a 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -32,13 +32,13 @@ #if wxUSE_STREAMS #include "wx/stream.h" #endif + #include "wx/module.h" #endif #include "wx/process.h" #include "wx/apptrait.h" -#include "wx/module.h" #include "wx/msw/private.h" diff --git a/src/msw/uxtheme.cpp b/src/msw/uxtheme.cpp index 4376d2549d..f850095db2 100644 --- a/src/msw/uxtheme.cpp +++ b/src/msw/uxtheme.cpp @@ -31,10 +31,9 @@ #include "wx/toplevel.h" #include "wx/string.h" #include "wx/log.h" + #include "wx/module.h" #endif //WX_PRECOMP -#include "wx/module.h" - #include "wx/msw/uxtheme.h" // ============================================================================ @@ -176,4 +175,3 @@ bool wxUxThemeEngine::Initialize() } #endif // wxUSE_UXTHEME - diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 4522e1bfc2..eea6424f01 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -48,6 +48,7 @@ #include "wx/log.h" #include "wx/textctrl.h" #include "wx/menuitem.h" + #include "wx/module.h" #endif #if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) @@ -55,7 +56,6 @@ #endif #include "wx/evtloop.h" -#include "wx/module.h" #include "wx/power.h" #include "wx/sysopt.h" diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 3453d44396..65b080d5e9 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -30,13 +30,12 @@ #include "wx/intl.h" #include "wx/wxchar.h" #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/stdpaths.h" #include "wx/filename.h" -#include "wx/module.h" - #include "wx/os2/private.h" #ifdef __EMX__ diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index 09fe982e45..2347161e0e 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -25,10 +25,9 @@ #include "wx/msgdlg.h" #include "wx/dcprint.h" #include "wx/statusbr.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include #include "wx/os2/private.h" diff --git a/src/os2/settings.cpp b/src/os2/settings.cpp index b07f9e15da..26b80d7459 100644 --- a/src/os2/settings.cpp +++ b/src/os2/settings.cpp @@ -20,9 +20,9 @@ #include "wx/gdicmn.h" #include "wx/window.h" #include "wx/settings.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/os2/private.h" // the module which is used to clean up wxSystemSettings data (this is a diff --git a/src/os2/thread.cpp b/src/os2/thread.cpp index 3274b8ef57..bcdd9e1934 100644 --- a/src/os2/thread.cpp +++ b/src/os2/thread.cpp @@ -24,10 +24,10 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/app.h" + #include "wx/module.h" #endif //WX_PRECOMP #include "wx/apptrait.h" -#include "wx/module.h" #include "wx/utils.h" #include diff --git a/src/os2/toplevel.cpp b/src/os2/toplevel.cpp index 2da126aed0..94819c9f83 100644 --- a/src/os2/toplevel.cpp +++ b/src/os2/toplevel.cpp @@ -36,9 +36,9 @@ #include "wx/control.h" #include "wx/containr.h" // wxSetFocusToChild() #include "wx/settings.h" + #include "wx/module.h" // wxSetFocusToChild() #endif //WX_PRECOMP -#include "wx/module.h" // wxSetFocusToChild() #include "wx/os2/private.h" // ---------------------------------------------------------------------------- diff --git a/src/palmos/app.cpp b/src/palmos/app.cpp index cc947d8823..82c5cef7c1 100644 --- a/src/palmos/app.cpp +++ b/src/palmos/app.cpp @@ -41,11 +41,11 @@ #include "wx/intl.h" #include "wx/wxchar.h" #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/apptrait.h" #include "wx/filename.h" -#include "wx/module.h" #include "wx/dynlib.h" #if wxUSE_TOOLTIPS diff --git a/src/palmos/cursor.cpp b/src/palmos/cursor.cpp index ddec4ac7c6..a51fcc0d0f 100644 --- a/src/palmos/cursor.cpp +++ b/src/palmos/cursor.cpp @@ -34,10 +34,9 @@ #include "wx/settings.h" #include "wx/intl.h" #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" - // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- diff --git a/src/palmos/dc.cpp b/src/palmos/dc.cpp index fc359b5568..eddc16efc4 100644 --- a/src/palmos/dc.cpp +++ b/src/palmos/dc.cpp @@ -35,10 +35,10 @@ #include "wx/log.h" #include "wx/icon.h" #include "wx/dcprint.h" + #include "wx/module.h" #endif #include "wx/sysopt.h" -#include "wx/module.h" #include "wx/dynload.h" #ifdef wxHAVE_RAW_BITMAP diff --git a/src/palmos/ownerdrw.cpp b/src/palmos/ownerdrw.cpp index 939e416970..261649727f 100644 --- a/src/palmos/ownerdrw.cpp +++ b/src/palmos/ownerdrw.cpp @@ -25,11 +25,11 @@ #include "wx/utils.h" #include "wx/settings.h" #include "wx/menuitem.h" + #include "wx/module.h" #endif #include "wx/ownerdrw.h" #include "wx/fontutil.h" -#include "wx/module.h" #if wxUSE_OWNER_DRAWN diff --git a/src/palmos/settings.cpp b/src/palmos/settings.cpp index a93fcf006e..e9d5be3f19 100644 --- a/src/palmos/settings.cpp +++ b/src/palmos/settings.cpp @@ -29,9 +29,9 @@ #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/gdicmn.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/fontutil.h" #include diff --git a/src/palmos/textctrl.cpp b/src/palmos/textctrl.cpp index 2710ee6fb4..13887eb9f4 100644 --- a/src/palmos/textctrl.cpp +++ b/src/palmos/textctrl.cpp @@ -36,10 +36,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/menu.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #if wxUSE_CLIPBOARD #include "wx/clipbrd.h" #endif diff --git a/src/palmos/thread.cpp b/src/palmos/thread.cpp index 625fb082a3..5dbbbdcea1 100644 --- a/src/palmos/thread.cpp +++ b/src/palmos/thread.cpp @@ -20,21 +20,21 @@ #pragma hdrstop #endif +#if wxUSE_THREADS + +#include "wx/thread.h" + #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/app.h" + #include "wx/module.h" #endif -#if wxUSE_THREADS - #include "wx/apptrait.h" #include "wx/palmos/private.h" #include "wx/palmos/missing.h" -#include "wx/module.h" -#include "wx/thread.h" - // must have this symbol defined to get _beginthread/_endthread declarations #ifndef _MT #define _MT @@ -591,4 +591,3 @@ bool WXDLLIMPEXP_BASE wxIsWaitingForThread() #include "wx/thrimpl.cpp" #endif // wxUSE_THREADS - diff --git a/src/palmos/toplevel.cpp b/src/palmos/toplevel.cpp index da36ee828f..0b1105aafc 100644 --- a/src/palmos/toplevel.cpp +++ b/src/palmos/toplevel.cpp @@ -38,9 +38,9 @@ #include "wx/checkbox.h" #include "wx/radiobut.h" #include "wx/slider.h" + #include "wx/module.h" #endif //WX_PRECOMP -#include "wx/module.h" #include "wx/display.h" // controls for sending select event diff --git a/src/palmos/utilsexc.cpp b/src/palmos/utilsexc.cpp index 35be0f4752..eaa04a4e6b 100644 --- a/src/palmos/utilsexc.cpp +++ b/src/palmos/utilsexc.cpp @@ -32,14 +32,13 @@ #if wxUSE_STREAMS #include "wx/stream.h" #endif + #include "wx/module.h" #endif #include "wx/process.h" #include "wx/apptrait.h" -#include "wx/module.h" - #include #include diff --git a/src/palmos/window.cpp b/src/palmos/window.cpp index 2839a44221..f2f25a0109 100644 --- a/src/palmos/window.cpp +++ b/src/palmos/window.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/palmos/windows.cpp +// Name: src/palmos/window.cpp // Purpose: wxWindow // Author: William Osborne - minimal working wxPalmOS port // Modified by: Wlodzimierz ABX Skiba - more than minimal functionality @@ -46,14 +46,13 @@ #include "wx/log.h" #include "wx/textctrl.h" #include "wx/menuitem.h" + #include "wx/module.h" #endif #if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) #include "wx/ownerdrw.h" #endif -#include "wx/module.h" - #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" #endif diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index ee680385d7..e350f524cb 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -25,12 +25,12 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/dataobj.h" + #include "wx/module.h" #endif #include "wx/filename.h" #include "wx/clipbrd.h" #include "wx/wfstream.h" -#include "wx/module.h" #include "wx/mstream.h" #include "wx/sstream.h" diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index 6ecda90988..309a110176 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -13,7 +13,7 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop + #pragma hdrstop #endif #if wxUSE_RICHTEXT @@ -22,12 +22,12 @@ #ifndef WX_PRECOMP #include "wx/dcclient.h" + #include "wx/module.h" #endif #include "wx/filename.h" #include "wx/clipbrd.h" #include "wx/wfstream.h" -#include "wx/module.h" #include "wx/richtext/richtextctrl.h" diff --git a/src/richtext/richtextxml.cpp b/src/richtext/richtextxml.cpp index 869560414f..b2205170ed 100644 --- a/src/richtext/richtextxml.cpp +++ b/src/richtext/richtextxml.cpp @@ -22,13 +22,13 @@ #ifndef WX_PRECOMP #include "wx/intl.h" + #include "wx/module.h" #endif #include "wx/filename.h" #include "wx/clipbrd.h" #include "wx/wfstream.h" #include "wx/sstream.h" -#include "wx/module.h" #include "wx/txtstrm.h" #include "wx/xml/xml.h" diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 93df3b0ced..c3cc7702e5 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -32,11 +32,11 @@ #include "wx/encinfo.h" #include "wx/hash.h" #include "wx/utils.h" // for wxGetDisplay() + #include "wx/module.h" #endif // PCH #include "wx/fontmap.h" #include "wx/tokenzr.h" -#include "wx/module.h" #include "wx/fontenum.h" #if wxUSE_PANGO diff --git a/src/unix/sound.cpp b/src/unix/sound.cpp index 997873bf90..66db273514 100644 --- a/src/unix/sound.cpp +++ b/src/unix/sound.cpp @@ -13,7 +13,7 @@ #include "wx/wxprec.h" #if defined(__BORLANDC__) -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_SOUND @@ -31,11 +31,11 @@ #include "wx/event.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/thread.h" #include "wx/file.h" -#include "wx/module.h" #include "wx/sound.h" #include "wx/dynlib.h" @@ -640,7 +640,7 @@ bool wxSound::LoadWAV(const wxUint8 *data, size_t length, bool copyData) // 28 average bytes per second | // 32 bytes per frame | // 34 bits per sample | - // + // // 36 "data" // 40 number of data bytes // 44 (wave signal) data diff --git a/src/unix/sound_sdl.cpp b/src/unix/sound_sdl.cpp index 4858a0f282..972ebd11e4 100644 --- a/src/unix/sound_sdl.cpp +++ b/src/unix/sound_sdl.cpp @@ -13,7 +13,7 @@ #include "wx/wxprec.h" #if defined(__BORLANDC__) -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_SOUND && wxUSE_LIBSDL @@ -25,10 +25,10 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/module.h" #endif #include "wx/thread.h" -#include "wx/module.h" #include "wx/sound.h" // ---------------------------------------------------------------------------- diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 1104048d4e..60172047a5 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -35,10 +35,9 @@ #include "wx/utils.h" #include "wx/timer.h" #include "wx/stopwatch.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include #include #include diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 6afd9e2006..e5dc6785da 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -25,9 +25,9 @@ #include "wx/timer.h" #include "wx/memory.h" #include "wx/gdicmn.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/evtloop.h" #include "wx/filename.h" diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index c7dc8b9276..849911fa69 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -20,9 +20,9 @@ #include "wx/dcmemory.h" #include "wx/math.h" #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/fontutil.h" #include "wx/x11/private.h" diff --git a/src/x11/evtloop.cpp b/src/x11/evtloop.cpp index 0295cd1559..2fbbbb421c 100644 --- a/src/x11/evtloop.cpp +++ b/src/x11/evtloop.cpp @@ -27,10 +27,10 @@ #include "wx/app.h" #include "wx/window.h" #include "wx/timer.h" + #include "wx/module.h" #endif #include "wx/tooltip.h" -#include "wx/module.h" #include "wx/unix/private.h" #include "wx/x11/private.h" #include "X11/Xlib.h" diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 7c5cc615f2..d51631aace 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -46,9 +46,9 @@ #include "wx/scrolwin.h" #include "wx/layout.h" #include "wx/menuitem.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/fontutil.h" #include "wx/univ/renderer.h" diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 9a55df5861..17ee409812 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -28,6 +28,7 @@ #include "wx/settings.h" #include "wx/bitmap.h" #include "wx/image.h" + #include "wx/module.h" #endif #ifndef __WXWINCE__ @@ -39,7 +40,6 @@ #include "wx/filename.h" #include "wx/tokenzr.h" #include "wx/fontenum.h" -#include "wx/module.h" #include "wx/fontmap.h" #include "wx/artprov.h" -- 2.45.2