summaryrefslogtreecommitdiff
path: root/qmake/include/private/qinputcontext_p.h
Unidiff
Diffstat (limited to 'qmake/include/private/qinputcontext_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/private/qinputcontext_p.h121
1 files changed, 121 insertions, 0 deletions
diff --git a/qmake/include/private/qinputcontext_p.h b/qmake/include/private/qinputcontext_p.h
new file mode 100644
index 0000000..9ac0d2b
--- a/dev/null
+++ b/qmake/include/private/qinputcontext_p.h
@@ -0,0 +1,121 @@
1/****************************************************************************
2** $Id$
3**
4** Definition of ???
5**
6** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
7**
8** This file is part of the kernel module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef QINPUTCONTEXT_P_H
37#define QINPUTCONTEXT_P_H
38
39
40//
41// W A R N I N G
42// -------------
43//
44// This file is not part of the Qt API. It exists for the convenience
45// of internal files. This header file may change from version to version
46// without notice, or even be removed.
47//
48// We mean it.
49//
50//
51
52#include <qglobal.h>
53
54class QKeyEvent;
55class QWidget;
56class QFont;
57class QString;
58
59
60#ifdef Q_WS_X11
61#include "qarray.h"
62#include "qwindowdefs.h"
63#include "qt_x11.h"
64#endif
65
66#ifdef Q_WS_WIN
67#include <qt_windows.h>
68#endif
69
70#ifdef Q_WS_QWS
71class QWSIMEvent;
72#endif
73
74class QInputContext
75{
76public:
77#ifdef Q_WS_X11
78 QInputContext(QWidget *); // should be a toplevel widget
79 ~QInputContext();
80
81 void setFocus();
82 void setComposePosition(int, int);
83 void setComposeArea(int, int, int, int);
84 void reset();
85
86 int lookupString(XKeyEvent *, QCString &, KeySym *, Status *) const;
87 void setXFontSet(const QFont &);
88
89 void *ic;
90 QString text, lastcompose;
91 QWidget *focusWidget;
92 bool composing;
93 QFont font;
94 XFontSet fontset;
95 QMemArray<bool> selectedChars;
96#endif // Q_WS_X11
97
98#ifdef Q_WS_QWS
99 static void translateIMEvent( QWSIMEvent *, QWidget * );
100 static void reset();
101private:
102 static QWidget* focusWidget;
103 static QString* composition;
104#endif //Q_WS_QWS
105
106#ifdef Q_WS_WIN
107 static void init();
108 static void shutdown();
109
110 static void TranslateMessage( const MSG *msg);
111 static LRESULT DefWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
112
113 static void setFont( const QWidget *w, const QFont & );
114 static void setFocusHint( int x, int y, int w, int h, const QWidget *widget );
115 static bool startComposition();
116 static bool endComposition( QWidget *fw = 0 );
117 static bool composition( LPARAM lparam );
118#endif
119};
120
121#endif // QINPUTCONTEXT_P_H