From dbc74bccc9d020281f2e1fcceb35323d45c91566 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 29 May 2006 23:24:02 +0000 Subject: [PATCH] wxWinCE power build fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/power.cpp | 10 ++++++++-- src/msw/window.cpp | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/msw/power.cpp b/src/msw/power.cpp index cf96885bbb..83819c38fb 100644 --- a/src/msw/power.cpp +++ b/src/msw/power.cpp @@ -30,6 +30,14 @@ #include "wx/power.h" #include "wx/msw/private.h" +#ifdef __WXWINCE__ + typedef SYSTEM_POWER_STATUS_EX SYSTEM_POWER_STATUS; + BOOL GetSystemPowerStatus(SYSTEM_POWER_STATUS *status) + { + return GetSystemPowerStatusEx(status, TRUE); + } +#endif + // ---------------------------------------------------------------------------- // helper functions // ---------------------------------------------------------------------------- @@ -94,5 +102,3 @@ wxBatteryState wxGetBatteryState() return wxBATTERY_UNKNOWN_STATE; } - - diff --git a/src/msw/window.cpp b/src/msw/window.cpp index a28f4c0901..7691c62d9a 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -105,7 +105,10 @@ #endif #include -#include + +#ifndef __WXWINCE__ + #include +#endif #include "wx/msw/missing.h" @@ -3081,6 +3084,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l } break; +#ifndef __WXWINCE__ case WM_POWERBROADCAST: { bool vetoed; @@ -3088,6 +3092,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l rc.result = processed && vetoed ? BROADCAST_QUERY_DENY : TRUE; } break; +#endif // __WXWINCE__ } if ( !processed ) @@ -3795,10 +3800,14 @@ bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd), return false; } -bool wxWindowMSW::HandlePower(WXWPARAM wParam, +bool wxWindowMSW::HandlePower(WXWPARAM WXUNUSED_IN_WINCE(wParam), WXLPARAM WXUNUSED(lParam), - bool *vetoed) + bool *WXUNUSED_IN_WINCE(vetoed)) { +#ifdef __WXWINCE__ + // FIXME + return false; +#else wxEventType evtType; switch ( wParam ) { @@ -3851,6 +3860,7 @@ bool wxWindowMSW::HandlePower(WXWPARAM wParam, *vetoed = event.IsVetoed(); return true; +#endif } // --------------------------------------------------------------------------- -- 2.45.2