source: trunk/src/gui/kernel/qwindowdefs_pm.h

Last change on this file was 1034, checked in by Dmitry A. Kuminov, 14 years ago

OS/2: Disable native window masking code as it is not complete.

This code is only necessary for child widgets that have native windows.
Applications using this approach are very rare (they include e.g. video
players that paint to Qt widgets on their own using native window IDs)
and they don't need masking in these widgets or their ancestors anyway.

The current implementation lacks some functionality -- in particular, it
cannot properly issue WM_VRNENABLED/WM_VRNDISABLED notifications
which breaks those video players, so that keeping it enabled makes little
to no sense.

The relevant code remains in place but guarded by the
QT_PM_NATIVEWIDGETMASK compiler macro so that it can be enabled
as needed for further experiments. See also #203 for more details.

File size: 4.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation (qt-info@nokia.com)
6**
7** Copyright (C) 2010 netlabs.org. OS/2 parts.
8**
9** This file is part of the QtGui module of the Qt Toolkit.
10**
11** $QT_BEGIN_LICENSE:LGPL$
12** Commercial Usage
13** Licensees holding valid Qt Commercial licenses may use this file in
14** accordance with the Qt Commercial License Agreement provided with the
15** Software or, alternatively, in accordance with the terms contained in
16** a written agreement between you and Nokia.
17**
18** GNU Lesser General Public License Usage
19** Alternatively, this file may be used under the terms of the GNU Lesser
20** General Public License version 2.1 as published by the Free Software
21** Foundation and appearing in the file LICENSE.LGPL included in the
22** packaging of this file. Please review the following information to
23** ensure the GNU Lesser General Public License version 2.1 requirements
24** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25**
26** In addition, as a special exception, Nokia gives you certain additional
27** rights. These rights are described in the Nokia Qt LGPL Exception
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29**
30** GNU General Public License Usage
31** Alternatively, this file may be used under the terms of the GNU
32** General Public License version 3.0 as published by the Free Software
33** Foundation and appearing in the file LICENSE.GPL included in the
34** packaging of this file. Please review the following information to
35** ensure the GNU General Public License version 3.0 requirements will be
36** met: http://www.gnu.org/copyleft/gpl.html.
37**
38** If you have questions regarding the use of this file, please contact
39** Nokia at qt-info@nokia.com.
40** $QT_END_LICENSE$
41**
42****************************************************************************/
43
44#ifndef QWINDOWDEFS_PM_H
45#define QWINDOWDEFS_PM_H
46
47#include <QtCore/qglobal.h>
48#include <QtCore/qstring.h>
49
50QT_BEGIN_HEADER
51
52QT_BEGIN_NAMESPACE
53
54QT_MODULE(Gui)
55
56QT_END_NAMESPACE
57
58// common typedefs from os2.h to avoid inclusion of qt_os2.h in public headers
59typedef long LONG;
60typedef unsigned long ULONG;
61typedef unsigned short USHORT;
62typedef unsigned long LHANDLE;
63typedef LHANDLE HWND;
64typedef LHANDLE HPS;
65typedef LHANDLE HBITMAP;
66typedef LHANDLE HPOINTER;
67typedef LHANDLE HRGN;
68typedef struct _QMSG QMSG;
69typedef void *MRESULT;
70
71typedef struct _RECTL RECTL;
72typedef RECTL *PRECTL;
73
74typedef HWND WId;
75
76#define NULLHANDLE ((LHANDLE)0)
77
78#define APIENTRY _System
79
80// constants to address extra window data (nothing so far)
81#define QT_EXTRAWINDATASIZE (sizeof(LONG) * 0)
82
83QT_BEGIN_NAMESPACE
84
85class QWidget;
86
87Q_GUI_EXPORT HPS qt_display_ps();
88
89Q_GUI_EXPORT int qt_display_width();
90Q_GUI_EXPORT int qt_display_height();
91
92Q_GUI_EXPORT QWidget *qt_widget_from_hwnd(HWND hwnd);
93
94#ifdef QT_PM_NATIVEWIDGETMASK
95
96enum PWOFlags {
97 PWO_Children = 0x01,
98 PWO_Siblings = 0x02,
99 PWO_Ancestors = 0x04,
100 PWO_Screen = 0x08,
101 PWO_TopLevel = 0x80000000,
102 PWO_Default = 0 /*PWO_Children | PWO_Siblings | PWO_Ancestors | PWO_Screen*/,
103};
104
105#ifdef Q_QDOC
106LONG qt_WinProcessWindowObstacles(HWND hwnd, RECTL *prcl, HRGN hrgn,
107 LONG op, LONG flags);
108#else
109Q_GUI_EXPORT LONG APIENTRY qt_WinProcessWindowObstacles(HWND hwnd, RECTL *prcl,
110 HRGN hrgn, LONG op,
111 LONG flags);
112#endif
113
114#endif // QT_PM_NATIVEWIDGETMASK
115
116// QDebug helpers for debugging various API types
117
118// don't drag qdebug.h but require it to be included first
119#if defined(QDEBUG_H) && !defined(QT_NO_DEBUG_STREAM)
120
121struct QDebugHWND { HWND hwnd; };
122inline QDebugHWND qDebugHWND(HWND hwnd) { QDebugHWND d = { hwnd }; return d; }
123Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QDebugHWND &d);
124
125struct QDebugHRGN { HRGN hrgn; };
126inline QDebugHRGN qDebugHRGN(HRGN hrgn) { QDebugHRGN d = { hrgn }; return d; }
127Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QDebugHRGN &d);
128
129// the following declarations require OS/2 types not defined here,
130// don't drag them in as well but require qt_os2.h to be included first
131#if defined(QT_OS2_H)
132
133Q_GUI_EXPORT QDebug operator<<(QDebug debug, const RECTL &rcl);
134Q_GUI_EXPORT QDebug operator<<(QDebug debug, const SWP &swp);
135Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QMSG &qmsg);
136
137#endif // defined(QT_OS2_H)
138
139#endif // defined(QDEBUG_H) && !defined(QT_NO_DEBUG_STREAM)
140
141QT_END_NAMESPACE
142
143QT_END_HEADER
144
145#endif // QWINDOWDEFS_PM_H
Note: See TracBrowser for help on using the repository browser.