SCIMBridge  0.4.x
scim-bridge-client-imcontext-qt.h
Go to the documentation of this file.
1 /*
2  * SCIM Bridge
3  *
4  * Copyright (c) 2006 Ryo Dairiki <ryo-dairiki@users.sourceforge.net>
5  *
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation and
10  * appearing in the file LICENSE.LGPL included in the package of this file.
11  * You can also redistribute it and/or modify it under the terms of
12  * the GNU General Public License as published by the Free Software Foundation and
13  * appearing in the file LICENSE.GPL included in the package of this file.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18  */
19 
26 #ifndef SCIMBRIDGECLIENTIMCONTEXTQT_H_
27 #define SCIMBRIDGECLIENTIMCONTEXTQT_H_
28 
29 #ifdef QT4
30 #include <QApplication>
31 #include <QEvent>
32 #include <QFont>
33 #include <QInputContext>
34 #include <QInputMethodEvent>
35 #include <QObject>
36 #include <QPoint>
37 #include <QWidget>
38 #else
39 #include <qapplication.h>
40 #include <qevent.h>
41 #include <qfont.h>
42 #include <qinputcontext.h>
43 #include <qobject.h>
44 #include <qptrlist.h>
45 #include <qpoint.h>
46 #include <qwidget.h>
47 #endif
48 
49 #include "scim-bridge.h"
50 #include "scim-bridge-attribute.h"
51 
53 
55 
59 struct _ScimBridgeClientIMContext: public QInputContext
60 {
61 
62  public:
63 
67  static void static_initialize ();
68 
72  static void static_finalize ();
73 
77  static void connection_opened ();
78 
82  static void connection_closed ();
83 
90 
95 
103  virtual bool x11FilterEvent (QWidget *widget, XEvent *event) = 0;
104 
111  virtual bool filterEvent (const QEvent *event) = 0;
112 
113 #ifdef QT4
114 
117  virtual void update () = 0;
118 
124  virtual QString identifierName () = 0;
125 
131  virtual QString language () = 0;
132 
139  virtual void mouseHandler (int offset, QMouseEvent *event) = 0;
140 
146  virtual void widgetDestroyed (QWidget *widget) = 0;
147 
148 #else
149 
153  virtual void setFocus () = 0;
154 
158  virtual void unsetFocus () = 0;
159 
169  virtual void setMicroFocus (int x, int y, int w, int h, QFont *font = 0) = 0;
170 
179  virtual void mouseHandler (int offset, QEvent::Type type, ButtonState button, ButtonState state) = 0;
180 
181 #endif
182 
186  virtual void reset () = 0;
187 
188  protected:
189 
194 
195 };
196 
197 #endif /*SCIMBRIDGECLIENTIMCONTEXTQT_H_*/
This is the common header for qt client of scim-bridge.
static void connection_opened()
Definition: scim-bridge-client-imcontext-qt.cpp:148
static _ScimBridgeClientIMContext * alloc()
Definition: scim-bridge-client-imcontext-qt.cpp:158
This header describes about fundamental definitions of scim-bridge.
virtual void mouseHandler(int offset, QEvent::Type type, ButtonState button, ButtonState state)=0
virtual void unsetFocus()=0
virtual ~_ScimBridgeClientIMContext()
Definition: scim-bridge-client-imcontext-qt.h:94
This is the common header of IMContext over the all clients.
static void static_finalize()
Definition: scim-bridge-client-imcontext-qt.cpp:143
Definition: scim-bridge-client-imcontext-gtk.c:39
static void connection_closed()
Definition: scim-bridge-client-imcontext-qt.cpp:153
This header describes about attributes.
virtual void setFocus()=0
virtual void setMicroFocus(int x, int y, int w, int h, QFont *font=0)=0
_ScimBridgeClientIMContext()
Definition: scim-bridge-client-imcontext-qt.h:193
virtual bool x11FilterEvent(QWidget *widget, XEvent *event)=0
static void static_initialize()
Definition: scim-bridge-client-imcontext-qt.cpp:138
virtual bool filterEvent(const QEvent *event)=0
virtual void reset()=0