1
/* * This file is part of Maliit framework *
3
* Copyright (C) 2012 Canonical Ltd
5
* Contact: maliit-discuss@lists.maliit.org
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 version 2.1 as published by the Free Software Foundation
10
* and appearing in the file LICENSE.LGPL included in the packaging
14
#ifndef WAYLANDINPUTMETHODCONNECTION_H
15
#define WAYLANDINPUTMETHODCONNECTION_H
17
#include <maliit/namespace.h>
18
#include "minputcontextconnection.h"
19
#include <qwayland-input-method.h>
23
class WaylandInputMethodConnectionPrivate;
26
* \ingroup maliitserver
27
* \brief Input method communication implementation between the Weston
28
* and the input method server.
30
class WaylandInputMethodConnection : public MInputContextConnection
33
Q_DISABLE_COPY(WaylandInputMethodConnection)
34
Q_DECLARE_PRIVATE(WaylandInputMethodConnection)
37
explicit WaylandInputMethodConnection();
38
virtual ~WaylandInputMethodConnection();
40
virtual void sendPreeditString(const QString &string,
41
const QList<Maliit::PreeditTextFormat> &preedit_formats,
42
int replacement_start = 0,
43
int replacement_length = 0,
45
virtual void sendCommitString(const QString &string,
46
int replace_start = 0,
47
int replace_length = 0,
49
virtual void sendKeyEvent(const QKeyEvent &key_event,
50
Maliit::EventRequestType request_type);
51
virtual void setSelection(int start,
53
virtual QString selection(bool &valid);
54
virtual void setLanguage(const QString &language);
57
const QScopedPointer<WaylandInputMethodConnectionPrivate> d_ptr;