SCIMBridge 0.4.x

client-qt/scim-bridge-client-key-event-utility-qt.h

Go to the documentation of this file.
00001 /*
00002  * SCIM Bridge
00003  *
00004  * Copyright (c) 2006 Ryo Dairiki <ryo-dairiki@users.sourceforge.net>
00005  *
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation and 
00010  * appearing in the file LICENSE.LGPL included in the package of this file.
00011  * You can also redistribute it and/or modify it under the terms of 
00012  * the GNU General Public License as published by the Free Software Foundation and 
00013  * appearing in the file LICENSE.GPL included in the package of this file.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018  */
00019 
00026 #ifndef SCIMBRIDGECLIENTKEYEVENTUTILITYQT_H_
00027 #define SCIMBRIDGECLIENTKEYEVENTUTILITYQT_H_
00028 
00029 #include "scim-bridge.h"
00030 #include "scim-bridge-key-code.h"
00031 #include "scim-bridge-key-event.h"
00032 
00033 #include "scim-bridge-client-common-qt.h"
00034 
00035 #ifdef Q_WS_X11
00036 #include <X11/Xlib.h>
00037 #include <X11/keysym.h>
00038 #include <X11/Xutil.h>
00039 static const int XKeyPress = KeyPress;
00040 static const int XKeyRelease = KeyRelease;
00041 #undef KeyPress
00042 #undef KeyRelease
00043 #endif
00044 
00045 class QKeyEvent;
00046 
00053 QKeyEvent *scim_bridge_key_event_bridge_to_qt (const ScimBridgeKeyEvent *bridge_key_event);
00054 
00061 ScimBridgeKeyEvent *scim_bridge_key_event_qt_to_bridge (const QKeyEvent *qt_key_event);
00062 
00063 #ifdef Q_WS_X11
00064 
00072 XEvent *scim_bridge_key_event_bridge_to_x11 (const ScimBridgeKeyEvent *bridge_key_event, Display *display, WId window_id);
00073 
00074 
00081 ScimBridgeKeyEvent* scim_bridge_key_event_x11_to_bridge (const XEvent *x11_event);
00082 #endif
00083 
00084 #endif                                            /*SCIMBRIDGECLIENTKEYEVENTUTILITYQT_H_*/