⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qt_x11_p.h

📁 奇趣公司比较新的qt/emd版本
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.**** This file is part of the QtGui module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://trolltech.com/products/qt/licenses/licensing/opensource/**** If you are unsure which license is appropriate for your use, please** review the following information:** http://trolltech.com/products/qt/licenses/licensing/licensingoverview** or contact the sales department at sales@trolltech.com.**** In addition, as a special exception, Trolltech gives you certain** additional rights. These rights are described in the Trolltech GPL** Exception version 1.0, which can be found at** http://www.trolltech.com/products/qt/gplexception/ and in the file** GPL_EXCEPTION.txt in this package.**** In addition, as a special exception, Trolltech, as the sole copyright** holder for Qt Designer, grants users of the Qt/Eclipse Integration** plug-in the right for the Qt/Eclipse Integration to link to** functionality provided by Qt Designer and its related libraries.**** Trolltech reserves all rights not expressly granted herein.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#ifndef QT_X11_P_H#define QT_X11_P_H////  W A R N I N G//  -------------//// This file is not part of the Qt API.  It exists purely as an// implementation detail.  This header file may change from version to// version without notice, or even be removed.//// We mean it.//#include "QtGui/qwindowdefs.h"#include "QtCore/qlist.h"#include "QtCore/qvariant.h"// the following is necessary to work around breakage in many versions// of XFree86's Xlib.h still in use// ### which versions?#if defined(_XLIB_H_) // crude hack, but...#error "cannot include <X11/Xlib.h> before this file"#endif#define XRegisterIMInstantiateCallback qt_XRegisterIMInstantiateCallback#define XUnregisterIMInstantiateCallback qt_XUnregisterIMInstantiateCallback#define XSetIMValues qt_XSetIMValues#include <X11/Xlib.h>#undef XRegisterIMInstantiateCallback#undef XUnregisterIMInstantiateCallback#undef XSetIMValues#include <X11/Xutil.h>#include <X11/Xos.h>#ifdef index# undef index#endif#ifdef rindex# undef rindex#endif#include <X11/Xatom.h>//#define QT_NO_SHAPE#ifdef QT_NO_SHAPE#  define XShapeCombineRegion(a,b,c,d,e,f,g)#  define XShapeCombineMask(a,b,c,d,e,f,g)#else#  include <X11/extensions/shape.h>#endif // QT_NO_SHAPE#if !defined (QT_NO_TABLET)#  include <X11/extensions/XInput.h>#if defined (Q_OS_IRIX)#  include <X11/extensions/SGIMisc.h>#  include <wacom.h>#endif#endif // QT_NO_TABLET// #define QT_NO_XINERAMA#ifndef QT_NO_XINERAMA#  if 0 // ### Xsun, but how to detect it?// Xinerama is only supported in Solaris 7 with patches 107648/108376 and// Solaris 8 or above which introduce the X11R6.4 Xserver.// To switch the Xinerama functionality on, you need to add the "+xinerama"// argument to the Xsun start line.// At least Solaris 7 and 8 are missing Xinerama system headers and function// declarations (bug 4284701).// The Xinerama API is not documented. In theory it could change but it// probably won't because Sun are using it in at least dtlogin (bug 4221829).extern "C" Bool XPanoramiXQueryExtension(    Display*,    int*,    int*);extern "C" Status XPanoramiXQueryVersion(    Display*,    int*,    int*);extern "C" Status XPanoramiXGetState(    Display*,    Drawable,    XPanoramiXInfo*);extern "C" Status XPanoramiXGetScreenCount(    Display *,    Drawable,    XPanoramiXInfo*);extern "C" Status XPanoramiXGetScreenSize(    Display*,    Drawable,    int,    XPanoramiXInfo*);#  else // XFree86// XFree86 does not C++ify Xinerama (at least up to XFree86 4.0.3).extern "C" {#    include <X11/extensions/Xinerama.h>}#  endif#endif // QT_NO_XINERAMA// #define QT_NO_XRANDR#ifndef QT_NO_XRANDR#  include <X11/extensions/Xrandr.h>#endif // QT_NO_XRANDR// #define QT_NO_XRENDER#ifndef QT_NO_XRENDER#  include <X11/extensions/Xrender.h>#endif // QT_NO_XRENDER// #define QT_NO_XKB#ifndef QT_NO_XKB#  include <X11/XKBlib.h>#endif // QT_NO_XKB#if !defined(XlibSpecificationRelease)#  define X11R4typedef char *XPointer;#else#  undef X11R4#endif// #define QT_NO_XIM#if defined(X11R4)// X11R4 does not have XIM#define QT_NO_XIM#elif defined(Q_OS_OSF) && (XlibSpecificationRelease < 6)// broken in Xlib up to OSF/1 3.2#define QT_NO_XIM#elif defined(Q_OS_AIX)// broken in Xlib up to what version of AIX?#define QT_NO_XIM#elif defined(QT_NO_DEBUG) && defined(Q_OS_IRIX)// XmbLookupString broken on IRIX// XCreateIC broken when compiling -64 on IRIX 6.5.2#define QT_NO_XIM#elif defined(Q_OS_HPUX) && defined(__LP64__)// XCreateIC broken when compiling 64-bit ELF on HP-UX 11.0#define QT_NO_XIM#elif defined(Q_OS_SCO)// ### suggested by user...// ### #define QT_NO_XIM#endif // QT_NO_XIM/* * Solaris patch 108652-47 and higher fixes crases in * XRegisterIMInstantiateCallback, but the function doesn't seem to * work. * * Instead, we disabled R6 input, and open the input method * immediately at application start. */#if !defined(QT_NO_XIM) && (XlibSpecificationRelease >= 6) && \    !defined(Q_OS_SOLARIS)#define USE_X11R6_XIM//######### XFree86 has wrong declarations for XRegisterIMInstantiateCallback//######### and XUnregisterIMInstantiateCallback in at least version 3.3.2.//######### Many old X11R6 header files lack XSetIMValues.//######### Therefore, we have to declare these functions ourselves.extern "C" Bool XRegisterIMInstantiateCallback(    Display*,    struct _XrmHashBucketRec*,    char*,    char*,    XIMProc, //XFree86 has XIDProc, which has to be wrong    XPointer);extern "C" Bool XUnregisterIMInstantiateCallback(    Display*,    struct _XrmHashBucketRec*,    char*,    char*,    XIMProc, //XFree86 has XIDProc, which has to be wrong    XPointer);extern "C" char *XSetIMValues(XIM /* im */, ...);#endif#ifndef QT_NO_FONTCONFIG#include <fontconfig/fontconfig.h>#endif#ifndef QT_NO_XIM// some platforms (eg. Solaris 2.51) don't have these defines in Xlib.h#ifndef XNResetState#define XNResetState "resetState"#endif#ifndef XIMPreserveState#define XIMPreserveState (1L<<1)#endif#endif#ifndef X11R4#  include <X11/Xlocale.h>#endif // X11R4#ifdef QT_MITSHM#  include <X11/extensions/XShm.h>#endif // QT_MITSHMclass QWidget;struct QX11InfoData {    uint ref;    int screen;    int dpiX;    int dpiY;    int depth;    int cells;    Colormap colormap;    Visual *visual;    bool defaultColormap;    bool defaultVisual;    int subpixel;};class QDrag;struct QXdndDropTransaction{    Time timestamp;    Window target;    Window proxy_target;    QWidget *targetWidget;    QWidget *embedding_widget;    QDrag *object;};class QMimeData;struct QX11Data;extern QX11Data *qt_x11Data;enum DesktopEnvironment {    DE_UNKNOWN,    DE_KDE,    DE_GNOME,    DE_CDE,    DE_4DWM};struct QX11Data{    static Qt::KeyboardModifiers translateModifiers(int s);    Window findClientWindow(Window, Atom, bool);    // from qclipboard_x11.cpp    bool clipboardWaitForEvent(Window win, int type, XEvent *event, int timeout);    bool clipboardReadProperty(Window win, Atom property, bool deleteProperty,                            QByteArray *buffer, int *size, Atom *type, int *format, bool nullterm);    QByteArray clipboardReadIncrementalProperty(Window win, Atom property, int nbytes, bool nullterm);    // from qdnd_x11.cpp    bool dndEnable(QWidget* w, bool on);    static void xdndSetup();    void xdndHandleEnter(QWidget *, const XEvent *, bool);    void xdndHandlePosition(QWidget *, const XEvent *, bool);    void xdndHandleStatus(QWidget *, const XEvent *, bool);    void xdndHandleLeave(QWidget *, const XEvent *, bool);    void xdndHandleDrop(QWidget *, const XEvent *, bool);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -