1
/* * This file is part of Maliit framework *
3
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6
* Contact: maliit-discuss@lists.maliit.org
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License version 2.1 as published by the Free Software Foundation
11
* and appearing in the file LICENSE.LGPL included in the packaging
14
#ifndef MPASSTHRUWINDOW_H
15
#define MPASSTHRUWINDOW_H
19
#include <QCloseEvent>
21
class MImRemoteWindow;
22
struct MImServerXOptions;
23
class MImXServerLogic;
26
* \brief MPassThruWindow uses XFixes to redirect mouse events to VKB
28
class MPassThruWindow: public QWidget
35
* \param p QWidget* parent widget
38
explicit MPassThruWindow(MImXServerLogic *serverLogic,
39
const MImServerXOptions &options);
44
virtual bool event(QEvent *e);
45
void closeEvent(QCloseEvent *ev);
47
//! Return region occupied by current plugin
48
const QRegion ®ion();
51
//! Set window ID for given region
52
void inputPassthrough(const QRegion ®ion = QRegion());
54
//! Set the new remote window (application window)
55
void setRemoteWindow(MImRemoteWindow *remoteWindow = 0);
57
//! Schedules repainting for widget's background from remote window
58
void updateFromRemoteWindow(const QRegion ®ion);
61
Q_DISABLE_COPY(MPassThruWindow)
63
void updateInputRegion();
64
void updateWindowType();
66
MImRemoteWindow *remoteWindow;
68
MImXServerLogic *mServerLogic;
69
const MImServerXOptions &xOptions;
71
friend class Ut_PassthroughServer;