/*
* Copyright (C) 2005-2013 Team XBMC
-* http://www.xbmc.org
-*
-* This Program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2, or (at your option)
-* any later version.
-*
-* This Program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with XBMC; see the file COPYING. If not, see
-* <http://www.gnu.org/licenses/>.
-*
-*/
+ * http://xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#include "utils/log.h"
#include "Windowsx.h"
-#include "windowing/WinEvents.h"
+#include "WinEventsWin32.h"
#include "WIN32Util.h"
#include "storage/windows/Win32StorageProvider.h"
#include "Application.h"
#include "network/ZeroconfBrowser.h"
#include "GUIUserMessages.h"
#include "utils/CharsetConverter.h"
+#include "utils/StringUtils.h"
#ifdef TARGET_WINDOWS
return true;
}
+size_t CWinEventsWin32::GetQueueSize()
+{
+ MSG msg;
+ return PeekMessage( &msg, NULL, 0U, 0U, PM_NOREMOVE );
+}
+
LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
XBMC_Event newEvent;
switch( wParam&0xFFF0 )
{
case SC_MONITORPOWER:
- if (g_application.IsPlaying() || g_application.IsPaused())
+ if (g_application.m_pPlayer->IsPlaying() || g_application.m_pPlayer->IsPausedPlayback())
return 0;
else if(CSettings::Get().GetInt("powermanagement.displaysoff") == 0)
return 0;
{
switch (wParam)
{
- case VK_V:
- if(GetKeyState(VK_CONTROL) & 0x8000)
- {
- // CTRL+V
- if(OpenClipboard(NULL))
- {
- CStdString strtext;
- HANDLE htext = GetClipboardData(CF_UNICODETEXT);
- CStdStringW strwtext = (WCHAR*)htext;
- g_charsetConverter.wToUTF8(strwtext, strtext);
- if(!strtext.empty())
- {
- CGUIMessage msg(GUI_MSG_INPUT_TEXT, 0, 0);
- msg.SetLabel(strtext);
- g_windowManager.SendMessage(msg, g_windowManager.GetFocusedWindow());
- }
- CloseClipboard();
- return(0);
- }
- }
- break;
case VK_CONTROL:
if ( lParam & EXTENDED_KEYMASK )
wParam = VK_RCONTROL;
// optical medium
if (lpdbv -> dbcv_flags & DBTF_MEDIA)
{
- CStdString strdrive;
- strdrive.Format("%c:\\", CWIN32Util::FirstDriveFromMask(lpdbv ->dbcv_unitmask));
+ CStdString strdrive = StringUtils::Format("%c:\\", CWIN32Util::FirstDriveFromMask(lpdbv ->dbcv_unitmask));
if(wParam == DBT_DEVICEARRIVAL)
{
CLog::Log(LOGDEBUG, __FUNCTION__": Drive %s Media has arrived.", strdrive.c_str());