/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qguiapplication.h"
#include "private/qguiapplication_p.h"
#include <qpa/qplatformintegrationfactory_p.h>
#include "private/qevent_p.h"
#include "qfont.h"
#include <qpa/qplatformfontdatabase.h>
#include <qpa/qplatformwindow.h>
#include <qpa/qplatformnativeinterface.h>
#include <qpa/qplatformtheme.h>
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformdrag.h>
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/QVariant>
#include <QtCore/private/qcoreapplication_p.h>
#include <QtCore/private/qabstracteventdispatcher_p.h>
#include <QtCore/qmutex.h>
#include <QtCore/private/qthread_p.h>
#include <QtCore/qdir.h>
#include <QtCore/qlibraryinfo.h>
#include <QtCore/qnumeric.h>
#include <QtDebug>
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
#endif
#include <qpalette.h>
#include <qscreen.h>
#include "qsessionmanager.h"
#include <private/qscreen_p.h>
#include <private/qdrawhelper_p.h>
#include <QtGui/qgenericpluginfactory.h>
#include <QtGui/qstylehints.h>
#include <QtGui/qinputmethod.h>
#include <QtGui/qpixmapcache.h>
#include <qpa/qplatforminputcontext.h>
#include <qpa/qplatforminputcontext_p.h>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qwindowsysteminterface_p.h>
#include "private/qwindow_p.h"
#include "private/qcursor_p.h"
#include "private/qopenglcontext_p.h"
#include "private/qdnd_p.h"
#include <qpa/qplatformthemefactory_p.h>
#ifndef QT_NO_CURSOR
#include <qpa/qplatformcursor.h>
#endif
#include <QtGui/QPixmap>
#ifndef QT_NO_CLIPBOARD
#include <QtGui/QClipboard>
#endif
#ifndef QT_NO_LIBRARY
#include <QtCore/QLibrary>
#endif
#if defined(Q_OS_MAC)
# include "private/qcore_mac_p.h"
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
# include <QtCore/qt_windows.h>
# include <QtCore/QLibraryInfo>
#endif // Q_OS_WIN && !Q_OS_WINCE
#include <ctype.h>
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT bool qt_is_gui_used = true;
Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
Qt::MouseButtons QGuiApplicationPrivate::tabletState = Qt::NoButton;
QWindow *QGuiApplicationPrivate::tabletPressTarget = 0;
QWindow *QGuiApplicationPrivate::currentMouseWindow = 0;
Qt::ApplicationState QGuiApplicationPrivate::applicationState = Qt::ApplicationInactive;
QPlatformIntegration *QGuiApplicationPrivate::platform_integration = 0;
QPlatformTheme *QGuiApplicationPrivate::platform_theme = 0;
QList<QObject *> QGuiApplicationPrivate::generic_plugin_list;
enum ApplicationResourceFlags
{
ApplicationPaletteExplicitlySet = 0x1,
ApplicationFontExplicitlySet = 0x2
};
static unsigned applicationResourceFlags = 0;
QIcon *QGuiApplicationPrivate::app_icon = 0;
QString *QGuiApplicationPrivate::platform_name = 0;
QString *QGuiApplicationPrivate::displayName = 0;
QPalette *QGuiApplicationPrivate::app_pal = 0; // default application palette
Qt::MouseButtons QGuiApplicationPrivate::buttons = Qt::NoButton;
ulong QGuiApplicationPrivate::mousePressTime = 0;
Qt::MouseButton QGuiApplicationPrivate::mousePressButton = Qt::NoButton;
int QGuiApplicationPrivate::mousePressX = 0;
int QGuiApplicationPrivate::mousePressY = 0;
int QGuiApplicationPrivate::mouse_double_click_distance = -1;
static Qt::LayoutDirection layout_direction = Qt::LeftToRight;
static bool force_reverse = false;
QGuiApplicationPrivate *QGuiApplicationPrivate::self = 0;
QTouchDevice *QGuiApplicationPrivate::m_fakeTouchDevice = 0;
int QGuiApplicationPrivate::m_fakeMouseSourcePointId = 0;
#ifndef QT_NO_CLIPBOARD
QClipboard *QGuiApplicationPrivate::qt_clipboard = 0;
#endif
QList<QScreen *> QGuiApplicationPrivate::screen_list;
QWindowList QGuiApplicationPrivate::window_list;
QWindow *QGuiApplicationPrivate::focus_window = 0;
static QBasicMutex applicationFontMutex;
QFont *QGuiApplicationPrivate::app_font = 0;
bool QGuiApplicationPrivate::obey_desktop_settings = true;
static qreal fontSmoothingGamma = 1.7;
extern void qRegisterGuiVariant();
#ifndef QT_NO_ANIMATION
extern void qRegisterGuiGetInterpolator();
#endif
extern void qInitDrawhelperAsm();
extern void qInitImageConversions();
static bool qt_detectRTLLanguage()
{
return force_reverse ^
(QCoreApplication::tr("QT_LAYOUT_DIRECTION",
"Translate this string to the string 'LTR' in left-to-right"
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
}
static void initPalette()
{
if (!QGuiApplicationPrivate::app_pal)
if (const QPalette *themePalette = QGuiApplicationPrivate::platformTheme()->palette())
QGuiApplicationPrivate::app_pal = new QPalette(*themePalette);
if (!QGuiApplicationPrivate::app_pal)
QGuiApplicationPrivate::app_pal = new QPalette(Qt::gray);
}
static inline void clearPalette()
{
delete QGuiApplicationPrivate::app_pal;
QGuiApplicationPrivate::app_pal = 0;
}
static void initFontUnlocked()
{
if (!QGuiApplicationPrivate::app_font) {
if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme())
if (const QFont *font = theme->font(QPlatformTheme::SystemFont))
QGuiApplicationPrivate::app_font = new QFont(*font);
}
if (!QGuiApplicationPrivate::app_font)
QGuiApplicationPrivate::app_font =
new QFont(QGuiApplicationPrivate::platformIntegration()->fontDatabase()->defaultFont());
}
static inline void clearFontUnlocked()
{
delete QGuiApplicationPrivate::app_font;
QGuiApplicationPrivate::app_font = 0;
}
static inline bool isPopupWindow(const QWindow *w)
{
return (w->flags() & Qt::WindowType_Mask) == Qt::Popup;
}
// Geometry specification for top level windows following the convention of the
// -geometry command line arguments in X11 (see XParseGeometry).
struct QWindowGeometrySpecification
{
QWindowGeometrySpecification() : corner(Qt::TopLeftCorner), xOffset(-1), yOffset(-1), width(-1), height(-1) {}
static QWindowGeometrySpecification fromArgument(cons
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
在Qt 5.4.2官方原版源代码基础上针对MSYS2环境的MinGW编译器修改: 1.动态链接版本Qt可编译源码自带的ANGLE、webkit; 2.静态链接版本Qt可编译源码自带的ANGLE,不保证完全编译webkit; 3.修正自主编译的Qt链接的程序在QtCreator中执行时无法找到window插件的问题 4.可选择使用MinGW编译的fontconfig、freetype2、zlib、harfbuzz、icu、openssl、glib-2.0、sqlite3等(由于MSYS2中MinGW带的harfbuzz没有静态编译库,编译静态链接Qt时需要自己编译harfbuzz,可参考我的博文:http://blog.csdn.net/JohnYork/article/details/46434075)
资源推荐
资源详情
资源评论
收起资源包目录
QtPatch.5.4.2.rar (39个子文件)
Src
qtbase
config.tests
qpa
egl
egl.pro 359B
unix
fontconfig
fontconfig.cpp 2KB
fontconfig.pro 204B
harfbuzz
harfbuzz.pro 289B
freetype
freetype.pri 961B
libpng
libpng.pro 234B
icu
icu.pro 780B
dbus
dbus.pro 449B
pcre
pcre.pro 271B
glib
glib.pro 301B
src
angle
src
config.pri 4KB
libGLESv2
libGLESv2.pro 18KB
corelib
global
qsystemdetection.h 9KB
qlibraryinfo.cpp 22KB
tools
tools.pri 7KB
3rdparty
angle
src
common
platform.h 6KB
plugins
platforms
platforms.pro 741B
gui
kernel
qguiapplication.cpp 124KB
text
qzip.cpp 42KB
platformsupport
fontdatabases
fontconfig
fontconfig.pri 299B
basic
basic.pri 4KB
fontdatabases.pri 376B
configure 237KB
mkspecs
features
qt_functions.prf 15KB
configure.prf 4KB
qtwebkit
Tools
qmake
config.tests
fontconfig
fontconfig.pro 126B
mkspecs
features
functions.prf 12KB
Source
ThirdParty
ANGLE
DerivedSources.pri 2KB
WebCore
DerivedSources.pri 45KB
WebCore.pri 10KB
make-hash-tools.pl 2KB
css
CSSGrammar.y.in 53KB
makevalues.pl 5KB
makegrammar.pl 3KB
makeprop.pl 8KB
JavaScriptCore
offlineasm
parser.rb 25KB
qtdeclarative
tools
tools.pro 997B
makeinstall 11KB
qmake.conf 4KB
共 39 条
- 1
资源评论
JohnYork
- 粉丝: 17
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功