added wxPowerEvent; moved power functions stubs to common/powercmn.cpp

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-05-27 14:09:40 +00:00
parent 9fa1b6aad4
commit 355debca06
37 changed files with 2660 additions and 277 deletions

57
src/common/powercmn.cpp Normal file
View File

@@ -0,0 +1,57 @@
///////////////////////////////////////////////////////////////////////////////
// Name: src/common/powercmn.cpp
// Purpose: power event types and stubs for power functions
// Author: Vadim Zeitlin
// Modified by:
// Created: 2006-05-27
// RCS-ID: $Id$
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#endif //WX_PRECOMP
#include "wx/power.h"
// ============================================================================
// implementation
// ============================================================================
#ifdef wxHAS_POWER_EVENTS
DEFINE_EVENT_TYPE(wxEVT_POWER_SUSPENDING)
DEFINE_EVENT_TYPE(wxEVT_POWER_SUSPENDED)
DEFINE_EVENT_TYPE(wxEVT_POWER_SUSPEND_CANCEL)
DEFINE_EVENT_TYPE(wxEVT_POWER_RESUME)
#endif
// provide stubs for the systems not implementing these functions
#if !defined(__WXPALMOS__) && !defined(__WXMSW__)
wxPowerType wxGetPowerType()
{
return wxPOWER_UNKNOWN;
}
wxBatteryState wxGetBatteryState()
{
return wxBATTERY_UNKNOWN_STATE;
}
#endif // systems without power management functions