From c0badb709a86b91a203416784b649e3d00c699c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Tue, 23 May 2006 11:04:37 +0000 Subject: [PATCH] Include wx/timer.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/mediactrl.mm | 12 +-- src/cocoa/timer.mm | 19 ++-- src/common/combocmn.cpp | 2 +- src/common/socket.cpp | 2 +- src/generic/datavgen.cpp | 2 +- src/generic/scrlwing.cpp | 7 +- src/generic/tipwin.cpp | 10 +- src/generic/treectlg.cpp | 2 +- src/gtk/toplevel.cpp | 2 +- src/gtk1/toplevel.cpp | 2 +- src/html/htmlwin.cpp | 2 +- src/mac/carbon/cfsocket.cpp | 2 +- src/mac/carbon/mediactrl.cpp | 2 +- src/mac/carbon/sound.cpp | 2 +- src/mac/carbon/tooltip.cpp | 4 +- src/mac/classic/timer.cpp | 4 +- src/mac/classic/tooltip.cpp | 2 +- src/mgl/evtloop.cpp | 2 +- src/motif/spinbutt.cpp | 6 +- src/motif/toolbar.cpp | 2 +- src/msw/dialup.cpp | 2 +- src/msw/mediactrl.cpp | 5 +- src/msw/mediactrl_am.cpp | 2 +- src/msw/timer.cpp | 4 +- src/msw/utils.cpp | 3 +- src/os2/timer.cpp | 4 +- src/os2/utilsgui.cpp | 174 +++++++++++++---------------------- src/palmos/timer.cpp | 4 +- src/palmos/utils.cpp | 3 +- src/unix/dialup.cpp | 2 +- src/unix/mediactrl.cpp | 2 +- src/unix/threadpsx.cpp | 2 +- src/x11/app.cpp | 2 +- src/x11/evtloop.cpp | 2 +- src/x11/reparent.cpp | 2 +- src/x11/window.cpp | 6 +- 36 files changed, 131 insertions(+), 176 deletions(-) diff --git a/src/cocoa/mediactrl.mm b/src/cocoa/mediactrl.mm index e6cc52cb9b..46f2ef177a 100644 --- a/src/cocoa/mediactrl.mm +++ b/src/cocoa/mediactrl.mm @@ -24,16 +24,17 @@ #pragma hdrstop #endif -//--------------------------------------------------------------------------- -// Includes -//--------------------------------------------------------------------------- -#include "wx/mediactrl.h" - //--------------------------------------------------------------------------- // Compilation guard //--------------------------------------------------------------------------- #if wxUSE_MEDIACTRL +#include "wx/mediactrl.h" + +#ifndef WX_PRECOMP + #include "wx/timer.h" +#endif + //=========================================================================== // BACKEND DECLARATIONS //=========================================================================== @@ -47,7 +48,6 @@ //--------------------------------------------------------------------------- // QT Includes //--------------------------------------------------------------------------- -#include "wx/timer.h" #include #include "wx/cocoa/autorelease.h" diff --git a/src/cocoa/timer.mm b/src/cocoa/timer.mm index 2dfe2cb30a..4815472d7b 100644 --- a/src/cocoa/timer.mm +++ b/src/cocoa/timer.mm @@ -22,8 +22,9 @@ #if wxUSE_TIMER +#include "wx/timer.h" + #ifndef WX_PRECOMP - #include "wx/timer.h" #endif #include "wx/cocoa/autorelease.h" @@ -76,7 +77,7 @@ IMPLEMENT_CLASS(wxTimer, wxTimerBase) { m_timer->Notify(); //wxTimerBase method } -@end +@end // ---------------------------------------------------------------------------- // wxTimer @@ -95,18 +96,18 @@ void wxTimer::Init() bool wxTimer::Start(int millisecs, bool oneShot) { Stop(); - + wxAutoNSAutoreleasePool thePool; wxNSTimerData *timerData = [[wxNSTimerData alloc] initWithWxTimer:this]; - m_cocoaNSTimer = [[NSTimer + m_cocoaNSTimer = [[NSTimer scheduledTimerWithTimeInterval: millisecs / 1000.0 //seconds - target: timerData - selector: @selector(onNotify:) - userInfo: nil - repeats: oneShot == false] retain]; + target: timerData + selector: @selector(onNotify:) + userInfo: nil + repeats: oneShot == false] retain]; [timerData release]; - + return IsRunning(); } diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index e2cb098146..44b92449d4 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -31,11 +31,11 @@ #include "wx/dcclient.h" #include "wx/settings.h" #include "wx/dialog.h" + #include "wx/timer.h" #endif #include "wx/dcbuffer.h" #include "wx/tooltip.h" -#include "wx/timer.h" #include "wx/combo.h" diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 080518cd0e..11d97cccc4 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -32,10 +32,10 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/timer.h" #endif #include "wx/apptrait.h" -#include "wx/timer.h" #include "wx/module.h" #include "wx/sckaddr.h" diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 662fcb16df..808f61b18e 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -24,13 +24,13 @@ #include "wx/sizer.h" #include "wx/log.h" #include "wx/dcclient.h" + #include "wx/timer.h" #endif #include "wx/stockitem.h" #include "wx/calctrl.h" #include "wx/popupwin.h" #include "wx/renderer.h" -#include "wx/timer.h" #include "wx/settings.h" #ifdef __WXMSW__ diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 53b6270584..e2aced4a81 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -35,10 +35,9 @@ #include "wx/utils.h" #include "wx/panel.h" #include "wx/dcclient.h" -#endif - -#if wxUSE_TIMER - #include "wx/timer.h" + #if wxUSE_TIMER + #include "wx/timer.h" + #endif #endif #include "wx/sizer.h" diff --git a/src/generic/tipwin.cpp b/src/generic/tipwin.cpp index 216f8e6828..1dd67eafb3 100644 --- a/src/generic/tipwin.cpp +++ b/src/generic/tipwin.cpp @@ -24,17 +24,19 @@ #pragma hdrstop #endif +#if wxUSE_TIPWINDOW + +#include "wx/tipwin.h" + #ifndef WX_PRECOMP #include "wx/dcclient.h" + #include "wx/timer.h" #endif // WX_PRECOMP + #ifdef __WXGTK__ #include #endif -#include "wx/tipwin.h" - -#if wxUSE_TIPWINDOW -#include "wx/timer.h" #include "wx/settings.h" // ---------------------------------------------------------------------------- diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 577ecbc4e1..3c7a235235 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -30,10 +30,10 @@ #ifndef WX_PRECOMP #include "wx/dcclient.h" + #include "wx/timer.h" #endif #include "wx/generic/treectlg.h" -#include "wx/timer.h" #include "wx/textctrl.h" #include "wx/imaglist.h" #include "wx/settings.h" diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 597c2a224a..862dbacbab 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -29,11 +29,11 @@ #include "wx/app.h" #include "wx/dcclient.h" #include "wx/dialog.h" + #include "wx/timer.h" #endif #include "wx/control.h" #include "wx/gtk/private.h" -#include "wx/timer.h" #include "wx/settings.h" #include "wx/evtloop.h" diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 2175518454..c2ee360fb7 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -29,11 +29,11 @@ #include "wx/app.h" #include "wx/dcclient.h" #include "wx/dialog.h" + #include "wx/timer.h" #endif #include "wx/control.h" #include "wx/gtk1/private.h" -#include "wx/timer.h" #include "wx/settings.h" #include "wx/evtloop.h" diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 9a081b30f7..360a1e646b 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -22,13 +22,13 @@ #include "wx/dcclient.h" #include "wx/frame.h" #include "wx/dcmemory.h" + #include "wx/timer.h" #endif #include "wx/html/htmlwin.h" #include "wx/html/htmlproc.h" #include "wx/clipbrd.h" #include "wx/dataobj.h" -#include "wx/timer.h" #include "wx/settings.h" #include "wx/arrimpl.cpp" diff --git a/src/mac/carbon/cfsocket.cpp b/src/mac/carbon/cfsocket.cpp index cfeb84963a..bc527d02c2 100644 --- a/src/mac/carbon/cfsocket.cpp +++ b/src/mac/carbon/cfsocket.cpp @@ -27,10 +27,10 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/timer.h" #endif #include "wx/apptrait.h" -#include "wx/timer.h" #include "wx/module.h" #include "wx/sckaddr.h" diff --git a/src/mac/carbon/mediactrl.cpp b/src/mac/carbon/mediactrl.cpp index 98d929e57f..e5cb61a1bc 100644 --- a/src/mac/carbon/mediactrl.cpp +++ b/src/mac/carbon/mediactrl.cpp @@ -42,11 +42,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/timer.h" #endif // uma is for wxMacFSSpec #include "wx/mac/uma.h" -#include "wx/timer.h" // standard QT stuff #ifndef __DARWIN__ diff --git a/src/mac/carbon/sound.cpp b/src/mac/carbon/sound.cpp index c04f765f72..f6ccb1557b 100644 --- a/src/mac/carbon/sound.cpp +++ b/src/mac/carbon/sound.cpp @@ -21,10 +21,10 @@ #include "wx/string.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/timer.h" #endif #include "wx/file.h" -#include "wx/timer.h" // Carbon QT Implementation Details - // diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index 1adb42296a..122c76b623 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -17,9 +17,9 @@ #include "wx/app.h" #include "wx/window.h" #include "wx/dc.h" + #include "wx/timer.h" #endif // WX_PRECOMP -#include "wx/timer.h" #include "wx/geometry.h" #include "wx/mac/uma.h" @@ -425,4 +425,4 @@ void wxMacToolTip::Clear() #endif } -#endif +#endif // wxUSE_TOOLTIPS diff --git a/src/mac/classic/timer.cpp b/src/mac/classic/timer.cpp index 34e288bcdb..0b6a4df374 100644 --- a/src/mac/classic/timer.cpp +++ b/src/mac/classic/timer.cpp @@ -12,12 +12,12 @@ // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/timer.h" + #ifndef WX_PRECOMP #include "wx/dynarray.h" #endif -#include "wx/timer.h" - IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxEvtHandler) #ifdef __WXMAC__ diff --git a/src/mac/classic/tooltip.cpp b/src/mac/classic/tooltip.cpp index 9e37daf461..4e66d906cb 100644 --- a/src/mac/classic/tooltip.cpp +++ b/src/mac/classic/tooltip.cpp @@ -21,9 +21,9 @@ #include "wx/app.h" #include "wx/window.h" #include "wx/dc.h" + #include "wx/timer.h" #endif -#include "wx/timer.h" #include "wx/geometry.h" #include "wx/mac/uma.h" diff --git a/src/mgl/evtloop.cpp b/src/mgl/evtloop.cpp index 58c868ada8..076009f6d4 100644 --- a/src/mgl/evtloop.cpp +++ b/src/mgl/evtloop.cpp @@ -22,10 +22,10 @@ #include "wx/window.h" #include "wx/app.h" #include "wx/thread.h" + #include "wx/timer.h" #endif //WX_PRECOMP #include "wx/evtloop.h" -#include "wx/timer.h" #include "wx/mgl/private.h" // ---------------------------------------------------------------------------- diff --git a/src/motif/spinbutt.cpp b/src/motif/spinbutt.cpp index fcdc7ec477..4f32323ea2 100644 --- a/src/motif/spinbutt.cpp +++ b/src/motif/spinbutt.cpp @@ -15,8 +15,12 @@ #if wxUSE_SPINBTN #include "wx/spinbutt.h" + +#ifndef WX_PRECOMP + #include "wx/timer.h" +#endif + #include "wx/spinctrl.h" -#include "wx/timer.h" #ifdef __VMS__ #pragma message disable nosimpint diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index dc724b395e..770e1bfcd0 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -29,10 +29,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/frame.h" + #include "wx/timer.h" #endif #include "wx/settings.h" -#include "wx/timer.h" #ifdef __VMS__ #pragma message disable nosimpint diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 75bd13098d..5e34902e0c 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -33,9 +33,9 @@ #include "wx/intl.h" #include "wx/event.h" #include "wx/app.h" + #include "wx/timer.h" #endif -#include "wx/timer.h" #include "wx/generic/choicdgg.h" #include "wx/dynlib.h" diff --git a/src/msw/mediactrl.cpp b/src/msw/mediactrl.cpp index 1c328f7c69..afa432cd22 100644 --- a/src/msw/mediactrl.cpp +++ b/src/msw/mediactrl.cpp @@ -37,11 +37,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/dcclient.h" + #include "wx/timer.h" #endif #include "wx/math.h" // log10 & pow #include "wx/msw/private.h" // user info and wndproc setting/getting -#include "wx/timer.h" #include "wx/dynlib.h" //--------------------------------------------------------------------------- @@ -3340,9 +3340,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend) // team I believe #define MOVIE_DELAY 20 -#include "wx/timer.h" - - //--------------------------------------------------------------------------- // wxQTLoadTimer // diff --git a/src/msw/mediactrl_am.cpp b/src/msw/mediactrl_am.cpp index 8f0855822f..de07e983b1 100644 --- a/src/msw/mediactrl_am.cpp +++ b/src/msw/mediactrl_am.cpp @@ -63,11 +63,11 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/dcclient.h" + #include "wx/timer.h" #endif #include "wx/math.h" // log10 & pow #include "wx/msw/private.h" // user info and wndproc setting/getting -#include "wx/timer.h" #include "wx/dynlib.h" #include "wx/stopwatch.h" diff --git a/src/msw/timer.cpp b/src/msw/timer.cpp index fef9ff0dfc..e9904ba27c 100644 --- a/src/msw/timer.cpp +++ b/src/msw/timer.cpp @@ -18,6 +18,8 @@ #if wxUSE_TIMER +#include "wx/timer.h" + #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/window.h" @@ -29,8 +31,6 @@ #include "wx/hashmap.h" -#include "wx/timer.h" - #include "wx/msw/private.h" // ---------------------------------------------------------------------------- diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 9e85f25180..80aa2bb025 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -29,6 +29,7 @@ #include "wx/app.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/timer.h" #endif //WX_PRECOMP #include "wx/msw/registry.h" @@ -55,8 +56,6 @@ #include #endif -#include "wx/timer.h" - #if !defined(__GNUWIN32__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__) #include diff --git a/src/os2/timer.cpp b/src/os2/timer.cpp index 9036f7d5aa..6d2a8c071d 100644 --- a/src/os2/timer.cpp +++ b/src/os2/timer.cpp @@ -12,6 +12,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/timer.h" + #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/window.h" @@ -23,8 +25,6 @@ #include "wx/os2/private.h" -#include "wx/timer.h" - #include #include diff --git a/src/os2/utilsgui.cpp b/src/os2/utilsgui.cpp index e64fc12f9b..9e3748e124 100644 --- a/src/os2/utilsgui.cpp +++ b/src/os2/utilsgui.cpp @@ -28,10 +28,10 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/cursor.h" + #include "wx/timer.h" #endif //WX_PRECOMP #include "wx/apptrait.h" -#include "wx/timer.h" #include "wx/os2/private.h" // includes @@ -44,29 +44,27 @@ // ---------------------------------------------------------------------------- // Sleep for nSecs seconds. Attempt a Windows implementation using timers. -static bool inTimer = FALSE; +static bool inTimer = false; class wxSleepTimer: public wxTimer { public: inline void Notify() { - inTimer = FALSE; + inTimer = false; Stop(); } }; // Reading and writing resources (eg WIN.INI, .Xdefaults) #if wxUSE_RESOURCES -bool wxWriteResource( - const wxString& rSection -, const wxString& rEntry -, const wxString& rValue -, const wxString& rFile -) +bool wxWriteResource( const wxString& rSection, + const wxString& rEntry, + const wxString& rValue, + const wxString& rFile ) { - HAB hab = 0; - HINI hIni = 0; + HAB hab = 0; + HINI hIni = 0; if (!rFile.empty()) { @@ -86,7 +84,7 @@ bool wxWriteResource( ,(PSZ)WXSTRINGCAST rEntry ,(PSZ)WXSTRINGCAST rValue )); - return FALSE; + return false; } bool wxWriteResource( @@ -123,34 +121,26 @@ bool wxWriteResource( ); } -bool wxWriteResource( - const wxString& rSection -, const wxString& rEntry -, int lValue -, const wxString& rFile -) +bool wxWriteResource( const wxString& rSection, + const wxString& rEntry, + int lValue, + const wxString& rFile ) { - wxChar zBuf[50]; + wxChar zBuf[50]; wxSprintf(zBuf, "%d", lValue); - return wxWriteResource( rSection - ,rEntry - ,zBuf - ,rFile - ); + return wxWriteResource( rSection, rEntry, zBuf, rFile ); } -bool wxGetResource( - const wxString& rSection -, const wxString& rEntry -, wxChar** ppValue -, const wxString& rFile -) +bool wxGetResource( const wxString& rSection, + const wxString& rEntry, + wxChar** ppValue, + const wxString& rFile ) { - HAB hab = 0; - HINI hIni = 0; - wxChar zDefunkt[] = _T("$$default"); - char zBuf[1000]; + HAB hab = 0; + HINI hIni = 0; + wxChar zDefunkt[] = _T("$$default"); + char zBuf[1000]; if (!rFile.empty()) { @@ -165,13 +155,13 @@ bool wxGetResource( ,1000 ); if (zBuf == NULL) - return FALSE; + return false; if (n == 0L || wxStrcmp(zBuf, zDefunkt) == 0) - return FALSE; + return false; zBuf[n-1] = '\0'; } else - return FALSE; + return false; } else { @@ -183,100 +173,70 @@ bool wxGetResource( ,1000 ); if (zBuf == NULL) - return FALSE; + return false; if (n == 0L || wxStrcmp(zBuf, zDefunkt) == 0) - return FALSE; + return false; zBuf[n-1] = '\0'; } strcpy((char*)*ppValue, zBuf); - return TRUE; + return true; } -bool wxGetResource( - const wxString& rSection -, const wxString& rEntry -, float* pValue -, const wxString& rFile -) +bool wxGetResource( const wxString& rSection, + const wxString& rEntry, + float* pValue, + const wxString& rFile ) { - wxChar* zStr = NULL; + wxChar* zStr = NULL; zStr = new wxChar[1000]; - bool bSucc = wxGetResource( rSection - ,rEntry - ,(wxChar **)&zStr - ,rFile - ); + bool bSucc = wxGetResource( rSection, rEntry, (wxChar **)&zStr, rFile ); if (bSucc) { *pValue = (float)wxStrtod(zStr, NULL); - delete[] zStr; - return TRUE; - } - else - { - delete[] zStr; - return FALSE; } + + delete[] zStr; + return bSucc; } -bool wxGetResource( - const wxString& rSection -, const wxString& rEntry -, long* pValue -, const wxString& rFile -) +bool wxGetResource( const wxString& rSection, + const wxString& rEntry, + long* pValue, + const wxString& rFile ) { - wxChar* zStr = NULL; + wxChar* zStr = NULL; zStr = new wxChar[1000]; - bool bSucc = wxGetResource( rSection - ,rEntry - ,(wxChar **)&zStr - ,rFile - ); + bool bSucc = wxGetResource( rSection, rEntry, (wxChar **)&zStr, rFile ); if (bSucc) { *pValue = wxStrtol(zStr, NULL, 10); - delete[] zStr; - return TRUE; - } - else - { - delete[] zStr; - return FALSE; } + + delete[] zStr; + return bSucc; } -bool wxGetResource( - const wxString& rSection -, const wxString& rEntry -, int* pValue -, const wxString& rFile -) +bool wxGetResource( const wxString& rSection, + const wxString& rEntry, + int* pValue, + const wxString& rFile ) { - wxChar* zStr = NULL; + wxChar* zStr = NULL; zStr = new wxChar[1000]; - bool bSucc = wxGetResource( rSection - ,rEntry - ,(wxChar **)&zStr - ,rFile - ); + bool bSucc = wxGetResource( rSection, rEntry, (wxChar **)&zStr, rFile ); if (bSucc) { *pValue = (int)wxStrtol(zStr, NULL, 10); - delete[] zStr; - return TRUE; - } - else - { - delete[] zStr; - return FALSE; } + + delete[] zStr; + return bSucc; } #endif // wxUSE_RESOURCES @@ -313,7 +273,7 @@ void wxEndBusyCursor() } } -// TRUE if we're between the above two calls +// true if we're between the above two calls bool wxIsBusy() { return (gs_wxBusyCursorCount > 0); @@ -321,26 +281,24 @@ bool wxIsBusy() // Check whether this window wants to process messages, e.g. Stop button // in long calculations. -bool wxCheckForInterrupt( - wxWindow* pWnd -) +bool wxCheckForInterrupt( wxWindow* pWnd ) { if(pWnd) { - QMSG vMsg; - HAB hab = 0; - HWND hwndFilter = NULLHANDLE; + QMSG vMsg; + HAB hab = 0; + HWND hwndFilter = NULLHANDLE; while(::WinPeekMsg(hab, &vMsg, hwndFilter, 0, 0, PM_REMOVE)) { ::WinDispatchMsg(hab, &vMsg); } - return TRUE;//*** temporary? + return true;//*** temporary? } else { wxFAIL_MSG(_T("pWnd==NULL !!!")); - return FALSE;//*** temporary? + return false;//*** temporary? } } @@ -362,7 +320,7 @@ void wxGetMousePosition( *pY = vPt.y; }; -// Return TRUE if we have a colour display +// Return true if we have a colour display bool wxColourDisplay() { #if 0 @@ -377,7 +335,7 @@ bool wxColourDisplay() #else // I don't see how the PM display could not be color. Besides, this // was leaking DCs and PSs!!! MN - return TRUE; + return true; #endif } diff --git a/src/palmos/timer.cpp b/src/palmos/timer.cpp index 426dc30367..74ae9f1965 100644 --- a/src/palmos/timer.cpp +++ b/src/palmos/timer.cpp @@ -18,6 +18,8 @@ #if wxUSE_TIMER +#include "wx/timer.h" + #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/window.h" @@ -29,8 +31,6 @@ #include "wx/hashmap.h" -#include "wx/timer.h" - #include "wx/palmos/private.h" // from utils.cpp diff --git a/src/palmos/utils.cpp b/src/palmos/utils.cpp index 3185ed3ea6..e35d21ae23 100644 --- a/src/palmos/utils.cpp +++ b/src/palmos/utils.cpp @@ -29,12 +29,12 @@ #include "wx/app.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/timer.h" #endif //WX_PRECOMP #include "wx/apptrait.h" #include "wx/dynload.h" #include "wx/confbase.h" -#include "wx/timer.h" #include #include @@ -270,4 +270,3 @@ extern long wxCharsetToCodepage(const wxChar *name) } #endif // wxUSE_FONTMAP/!wxUSE_FONTMAP - diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index b71a5cc8a4..3c173d516e 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -23,9 +23,9 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/timer.h" #endif // !PCH -#include "wx/timer.h" #include "wx/filefn.h" #include "wx/ffile.h" #include "wx/process.h" diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index 8d4cde3400..21c2defa40 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -31,10 +31,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" // wxLogDebug/wxLogSysError/wxLogTrace #include "wx/app.h" // wxTheApp->argc, wxTheApp->argv + #include "wx/timer.h" // wxTimer #endif #include "wx/thread.h" // wxMutex/wxMutexLocker -#include "wx/timer.h" // wxTimer #ifdef __WXGTK__ # include "wx/gtk/win_gtk.h" // for /GDK_WINDOW_XWINDOW diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index f6f055e6d6..1e538342f7 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -33,10 +33,10 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/timer.h" #endif #include "wx/module.h" -#include "wx/timer.h" #include "wx/stopwatch.h" #include diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 31af47478f..a63e55214f 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -22,13 +22,13 @@ #include "wx/frame.h" #include "wx/icon.h" #include "wx/dialog.h" + #include "wx/timer.h" #endif #include "wx/gdicmn.h" #include "wx/module.h" #include "wx/memory.h" #include "wx/evtloop.h" -#include "wx/timer.h" #include "wx/filename.h" #include "wx/univ/theme.h" diff --git a/src/x11/evtloop.cpp b/src/x11/evtloop.cpp index a0a848e097..8a703868de 100644 --- a/src/x11/evtloop.cpp +++ b/src/x11/evtloop.cpp @@ -26,10 +26,10 @@ #include "wx/hash.h" #include "wx/app.h" #include "wx/window.h" + #include "wx/timer.h" #endif #include "wx/tooltip.h" -#include "wx/timer.h" #include "wx/module.h" #include "wx/unix/private.h" #include "wx/x11/private.h" diff --git a/src/x11/reparent.cpp b/src/x11/reparent.cpp index d43de94906..eea2b4d6fe 100644 --- a/src/x11/reparent.cpp +++ b/src/x11/reparent.cpp @@ -31,10 +31,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" + #include "wx/timer.h" #endif #include "wx/evtloop.h" -#include "wx/timer.h" #include "wx/x11/private.h" #include "X11/Xatom.h" diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 8231d415ae..6113d64164 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -38,6 +38,7 @@ #include "wx/button.h" #include "wx/menu.h" #include "wx/dialog.h" + #include "wx/timer.h" #endif #include "wx/layout.h" @@ -58,11 +59,6 @@ #include "wx/x11/private.h" #include "X11/Xutil.h" -#if wxUSE_NANOX -// For wxGetLocalTime, used by XButtonEventGetTime -#include "wx/timer.h" -#endif - #include // ---------------------------------------------------------------------------- -- 2.45.2