check for wxUSE_TIMER in headers, not the files including them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-11 00:00:33 +00:00
parent 28fcfbfe09
commit 3c029873c6
7 changed files with 24 additions and 11 deletions

View File

@@ -7,10 +7,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GENERIC_PRIVATE_TIMER_H_ #ifndef _WX_GENERIC_PRIVATE_TIMER_H_
#define _WX_GENERIC_PRIVATE_TIMER_H_ #define _WX_GENERIC_PRIVATE_TIMER_H_
#if wxUSE_TIMER
#include "wx/private/timer.h" #include "wx/private/timer.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -40,4 +41,6 @@ private:
wxTimerDesc *m_desc; wxTimerDesc *m_desc;
}; };
#endif // wxUSE_TIMER
#endif // _WX_GENERIC_PRIVATE_TIMER_H_ #endif // _WX_GENERIC_PRIVATE_TIMER_H_

View File

@@ -10,6 +10,8 @@
#ifndef _WX_GTK_PRIVATE_TIMER_H_ #ifndef _WX_GTK_PRIVATE_TIMER_H_
#define _WX_GTK_PRIVATE_TIMER_H_ #define _WX_GTK_PRIVATE_TIMER_H_
#if wxUSE_TIMER
#include "wx/private/timer.h" #include "wx/private/timer.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -29,4 +31,6 @@ protected:
int m_sourceId; int m_sourceId;
}; };
#endif // wxUSE_TIMER
#endif // _WX_GTK_PRIVATE_TIMER_H_ #endif // _WX_GTK_PRIVATE_TIMER_H_

View File

@@ -11,6 +11,8 @@
#ifndef _WX_UNIX_PRIVATE_TIMER_H_ #ifndef _WX_UNIX_PRIVATE_TIMER_H_
#define _WX_UNIX_PRIVATE_TIMER_H_ #define _WX_UNIX_PRIVATE_TIMER_H_
#if wxUSE_TIMER
#include "wx/private/timer.h" #include "wx/private/timer.h"
// the type used for milliseconds is large enough for microseconds too but // the type used for milliseconds is large enough for microseconds too but
@@ -135,4 +137,6 @@ private:
// returns the number of microseconds since the Epoch // returns the number of microseconds since the Epoch
extern wxUsecClock_t wxGetLocalTimeUsec(); extern wxUsecClock_t wxGetLocalTimeUsec();
#endif // wxUSE_TIMER
#endif // _WX_UNIX_PRIVATE_TIMER_H_ #endif // _WX_UNIX_PRIVATE_TIMER_H_

View File

@@ -312,11 +312,15 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
return wxPORT_GTK; return wxPORT_GTK;
} }
#if wxUSE_TIMER
wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer)
{ {
return new wxGTKTimerImpl(timer); return new wxGTKTimerImpl(timer);
} }
#endif // wxUSE_TIMER
#if wxUSE_DETECT_SM #if wxUSE_DETECT_SM
static wxString GetSM() static wxString GetSM()
{ {
@@ -483,9 +487,9 @@ bool wxGUIAppTraits::ShowAssertDialog(const wxString& msg)
wxString wxGUIAppTraits::GetDesktopEnvironment() const wxString wxGUIAppTraits::GetDesktopEnvironment() const
{ {
wxString de = wxSystemOptions::GetOption(_T("gtk.desktop")); wxString de = wxSystemOptions::GetOption(_T("gtk.desktop"));
#if wxUSE_DETECT_SM
if ( de.empty() ) if ( de.empty() )
{ {
#if wxUSE_DETECT_SM
static const wxString s_SM = GetSM(); static const wxString s_SM = GetSM();
if (s_SM == wxT("GnomeSM")) if (s_SM == wxT("GnomeSM"))

View File

@@ -34,9 +34,7 @@
#include "wx/unix/execute.h" #include "wx/unix/execute.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
#if wxUSE_TIMER #include "wx/unix/private/timer.h"
#include "wx/unix/private/timer.h"
#endif // wxUSE_TIMER
// for waitpid() // for waitpid()
#include <sys/types.h> #include <sys/types.h>

View File

@@ -32,9 +32,7 @@
#include "wx/unix/private/epolldispatcher.h" #include "wx/unix/private/epolldispatcher.h"
#include "wx/private/selectdispatcher.h" #include "wx/private/selectdispatcher.h"
#if wxUSE_TIMER #include "wx/generic/private/timer.h"
#include "wx/generic/private/timer.h"
#endif
#define TRACE_EVENTS _T("events") #define TRACE_EVENTS _T("events")

View File

@@ -41,7 +41,6 @@
#endif #endif
// Various X11 Atoms used in this file: // Various X11 Atoms used in this file:
static Atom _NET_WM_ICON = 0;
static Atom _NET_WM_STATE = 0; static Atom _NET_WM_STATE = 0;
static Atom _NET_WM_STATE_FULLSCREEN = 0; static Atom _NET_WM_STATE_FULLSCREEN = 0;
static Atom _NET_WM_STATE_STAYS_ON_TOP = 0; static Atom _NET_WM_STATE_STAYS_ON_TOP = 0;
@@ -106,10 +105,13 @@ private:
// Setting icons for window manager: // Setting icons for window manager:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_IMAGE && !wxUSE_NANOX
static Atom _NET_WM_ICON = 0;
void void
wxSetIconsX11(WXDisplay* display, WXWindow window, const wxIconBundle& ib) wxSetIconsX11(WXDisplay* display, WXWindow window, const wxIconBundle& ib)
{ {
#if !wxUSE_NANOX
size_t size = 0; size_t size = 0;
const size_t numIcons = ib.GetIconCount(); const size_t numIcons = ib.GetIconCount();
@@ -184,9 +186,9 @@ wxSetIconsX11(WXDisplay* display, WXWindow window, const wxIconBundle& ib)
WindowCast(window), WindowCast(window),
_NET_WM_ICON ); _NET_WM_ICON );
} }
#endif // !wxUSE_NANOX
} }
#endif // wxUSE_IMAGE && !wxUSE_NANOX
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Fullscreen mode: // Fullscreen mode: