1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/powercmn.cpp
3 // Purpose: power event types and stubs for power functions
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // for compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
31 // ============================================================================
33 // ============================================================================
35 #ifdef wxHAS_POWER_EVENTS
36 wxDEFINE_EVENT( wxEVT_POWER_SUSPENDING
, wxPowerEvent
);
37 wxDEFINE_EVENT( wxEVT_POWER_SUSPENDED
, wxPowerEvent
);
38 wxDEFINE_EVENT( wxEVT_POWER_SUSPEND_CANCEL
, wxPowerEvent
);
39 wxDEFINE_EVENT( wxEVT_POWER_RESUME
, wxPowerEvent
);
41 IMPLEMENT_DYNAMIC_CLASS(wxPowerEvent
, wxEvent
)
44 // provide stubs for the systems not implementing these functions
45 #if !defined(__WINDOWS__)
47 wxPowerType
wxGetPowerType()
49 return wxPOWER_UNKNOWN
;
52 wxBatteryState
wxGetBatteryState()
54 return wxBATTERY_UNKNOWN_STATE
;
57 #endif // systems without power management functions