1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/powercmn.cpp
3 // Purpose: power event types and stubs for power functions
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // for compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
32 // ============================================================================
34 // ============================================================================
36 #ifdef wxHAS_POWER_EVENTS
37 wxDEFINE_EVENT( wxEVT_POWER_SUSPENDING
, wxPowerEvent
);
38 wxDEFINE_EVENT( wxEVT_POWER_SUSPENDED
, wxPowerEvent
);
39 wxDEFINE_EVENT( wxEVT_POWER_SUSPEND_CANCEL
, wxPowerEvent
);
40 wxDEFINE_EVENT( wxEVT_POWER_RESUME
, wxPowerEvent
);
42 IMPLEMENT_DYNAMIC_CLASS(wxPowerEvent
, wxEvent
)
45 // provide stubs for the systems not implementing these functions
46 #if !defined(__WXMSW__)
48 wxPowerType
wxGetPowerType()
50 return wxPOWER_UNKNOWN
;
53 wxBatteryState
wxGetBatteryState()
55 return wxBATTERY_UNKNOWN_STATE
;
58 #endif // systems without power management functions