Remove libqxt from our svn. We don't depend on it anymore thanks to
[quassel.git] / src / contrib / libqxt-2007-10-24 / src / gui / qxtapplication_win.cpp
diff --git a/src/contrib/libqxt-2007-10-24/src/gui/qxtapplication_win.cpp b/src/contrib/libqxt-2007-10-24/src/gui/qxtapplication_win.cpp
deleted file mode 100644 (file)
index f525be2..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/****************************************************************************\r
-**\r
-** Copyright (C) Qxt Foundation. Some rights reserved.\r
-**\r
-** This file is part of the QxtGui module of the Qt eXTension library\r
-**\r
-** This library is free software; you can redistribute it and/or modify it\r
-** under the terms of th Common Public License, version 1.0, as published by\r
-** IBM.\r
-**\r
-** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY\r
-** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY\r
-** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR\r
-** FITNESS FOR A PARTICULAR PURPOSE.\r
-**\r
-** You should have received a copy of the CPL along with this file.\r
-** See the LICENSE file and the cpl1.0.txt file included with the source\r
-** distribution for more information. If you did not receive a copy of the\r
-** license, contact the Qxt Foundation.\r
-**\r
-** <http://libqxt.sourceforge.net>  <foundation@libqxt.org>\r
-**\r
-****************************************************************************/\r
-#include "qxtapplication.h"\r
-#include "qxtapplication_p.h"\r
-#include <qt_windows.h>\r
-#include <QWidget>\r
-\r
-bool QxtApplication::winEventFilter(MSG* msg, long* result)\r
-{\r
-       foreach (QxtNativeEventFilter* filter, qxt_d().nativeFilters)\r
-       {\r
-               if (filter && filter->winEventFilter(msg, result))\r
-                       return true;\r
-       }\r
-\r
-    if (msg->message == WM_HOTKEY)\r
-    {\r
-        uint modifiers = LOWORD(msg->lParam);\r
-        uint keycode = HIWORD(msg->lParam);\r
-        qxt_d().activateHotKey(modifiers, keycode);\r
-    }\r
-    return QApplication::winEventFilter(msg, result);\r
-}\r
-\r
-uint QxtApplicationPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers) const\r
-{\r
-    // MOD_ALT, MOD_CONTROL, (MOD_KEYUP), MOD_SHIFT, MOD_WIN\r
-    uint native = 0;\r
-    if (modifiers & Qt::ShiftModifier)\r
-        native |= MOD_SHIFT;\r
-    if (modifiers & Qt::ControlModifier)\r
-        native |= MOD_CONTROL;\r
-    if (modifiers & Qt::AltModifier)\r
-        native |= MOD_ALT;\r
-    if (modifiers & Qt::MetaModifier)\r
-        native |= MOD_WIN;\r
-    // TODO: resolve these?\r
-    //if (modifiers & Qt::KeypadModifier)\r
-    //if (modifiers & Qt::GroupSwitchModifier)\r
-    return native;\r
-}\r
-\r
-uint QxtApplicationPrivate::nativeKeycode(Qt::Key key) const\r
-{\r
-    switch (key)\r
-    {\r
-    case Qt::Key_Escape:\r
-        return VK_ESCAPE;\r
-    case Qt::Key_Tab:\r
-    case Qt::Key_Backtab:\r
-        return VK_TAB;\r
-    case Qt::Key_Backspace:\r
-        return VK_BACK;\r
-    case Qt::Key_Return:\r
-    case Qt::Key_Enter:\r
-        return VK_RETURN;\r
-    case Qt::Key_Insert:\r
-        return VK_INSERT;\r
-    case Qt::Key_Delete:\r
-        return VK_DELETE;\r
-    case Qt::Key_Pause:\r
-        return VK_PAUSE;\r
-    case Qt::Key_Print:\r
-        return VK_PRINT;\r
-    case Qt::Key_Clear:\r
-        return VK_CLEAR;\r
-    case Qt::Key_Home:\r
-        return VK_HOME;\r
-    case Qt::Key_End:\r
-        return VK_END;\r
-    case Qt::Key_Left:\r
-        return VK_LEFT;\r
-    case Qt::Key_Up:\r
-        return VK_UP;\r
-    case Qt::Key_Right:\r
-        return VK_RIGHT;\r
-    case Qt::Key_Down:\r
-        return VK_DOWN;\r
-    case Qt::Key_PageUp:\r
-        return VK_PRIOR;\r
-    case Qt::Key_PageDown:\r
-        return VK_NEXT;\r
-    case Qt::Key_F1:\r
-        return VK_F1;\r
-    case Qt::Key_F2:\r
-        return VK_F2;\r
-    case Qt::Key_F3:\r
-        return VK_F3;\r
-    case Qt::Key_F4:\r
-        return VK_F4;\r
-    case Qt::Key_F5:\r
-        return VK_F5;\r
-    case Qt::Key_F6:\r
-        return VK_F6;\r
-    case Qt::Key_F7:\r
-        return VK_F7;\r
-    case Qt::Key_F8:\r
-        return VK_F8;\r
-    case Qt::Key_F9:\r
-        return VK_F9;\r
-    case Qt::Key_F10:\r
-        return VK_F10;\r
-    case Qt::Key_F11:\r
-        return VK_F11;\r
-    case Qt::Key_F12:\r
-        return VK_F12;\r
-    case Qt::Key_F13:\r
-        return VK_F13;\r
-    case Qt::Key_F14:\r
-        return VK_F14;\r
-    case Qt::Key_F15:\r
-        return VK_F15;\r
-    case Qt::Key_F16:\r
-        return VK_F16;\r
-    case Qt::Key_F17:\r
-        return VK_F17;\r
-    case Qt::Key_F18:\r
-        return VK_F18;\r
-    case Qt::Key_F19:\r
-        return VK_F19;\r
-    case Qt::Key_F20:\r
-        return VK_F20;\r
-    case Qt::Key_F21:\r
-        return VK_F21;\r
-    case Qt::Key_F22:\r
-        return VK_F22;\r
-    case Qt::Key_F23:\r
-        return VK_F23;\r
-    case Qt::Key_F24:\r
-        return VK_F24;\r
-    case Qt::Key_Space:\r
-        return VK_SPACE;\r
-    case Qt::Key_Asterisk:\r
-        return VK_MULTIPLY;\r
-    case Qt::Key_Plus:\r
-        return VK_ADD;\r
-    case Qt::Key_Comma:\r
-        return VK_SEPARATOR;\r
-    case Qt::Key_Minus:\r
-        return VK_SUBTRACT;\r
-    case Qt::Key_Slash:\r
-        return VK_DIVIDE;\r
-\r
-        // numbers\r
-    case Qt::Key_0:\r
-    case Qt::Key_1:\r
-    case Qt::Key_2:\r
-    case Qt::Key_3:\r
-    case Qt::Key_4:\r
-    case Qt::Key_5:\r
-    case Qt::Key_6:\r
-    case Qt::Key_7:\r
-    case Qt::Key_8:\r
-    case Qt::Key_9:\r
-        return key;\r
-\r
-        // letters\r
-    case Qt::Key_A:\r
-    case Qt::Key_B:\r
-    case Qt::Key_C:\r
-    case Qt::Key_D:\r
-    case Qt::Key_E:\r
-    case Qt::Key_F:\r
-    case Qt::Key_G:\r
-    case Qt::Key_H:\r
-    case Qt::Key_I:\r
-    case Qt::Key_J:\r
-    case Qt::Key_K:\r
-    case Qt::Key_L:\r
-    case Qt::Key_M:\r
-    case Qt::Key_N:\r
-    case Qt::Key_O:\r
-    case Qt::Key_P:\r
-    case Qt::Key_Q:\r
-    case Qt::Key_R:\r
-    case Qt::Key_S:\r
-    case Qt::Key_T:\r
-    case Qt::Key_U:\r
-    case Qt::Key_V:\r
-    case Qt::Key_W:\r
-    case Qt::Key_X:\r
-    case Qt::Key_Y:\r
-    case Qt::Key_Z:\r
-        return key;\r
-\r
-    default:\r
-        return 0;\r
-    }\r
-}\r
-\r
-bool QxtApplicationPrivate::registerHotKey(uint modifiers, uint keycode, QWidget* receiver)\r
-{\r
-    Q_ASSERT(receiver);\r
-    return RegisterHotKey(receiver->winId(), modifiers ^ keycode, modifiers, keycode);\r
-}\r
-\r
-bool QxtApplicationPrivate::unregisterHotKey(uint modifiers, uint keycode, QWidget* receiver)\r
-{\r
-    Q_ASSERT(receiver);\r
-    return UnregisterHotKey(receiver->winId(), modifiers ^ keycode);\r
-}\r