1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
/* * This file is part of Maliit framework *
*
* Copyright (C) 2012 Canonical Ltd
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* and appearing in the file LICENSE.LGPL included in the packaging
* of this file.
*/
#ifndef WAYLANDINPUTMETHODCONNECTION_H
#define WAYLANDINPUTMETHODCONNECTION_H
#include <maliit/namespace.h>
#include "minputcontextconnection.h"
#include <QtCore>
Q_DECLARE_LOGGING_CATEGORY(lcWaylandConnection)
class WaylandInputMethodConnectionPrivate;
/*! \internal
* \ingroup maliitserver
* \brief Input method communication implementation between the Weston
* and the input method server.
*/
class WaylandInputMethodConnection : public MInputContextConnection
{
Q_OBJECT
Q_DISABLE_COPY(WaylandInputMethodConnection)
Q_DECLARE_PRIVATE(WaylandInputMethodConnection)
public:
explicit WaylandInputMethodConnection();
virtual ~WaylandInputMethodConnection();
virtual void sendPreeditString(const QString &string,
const QList<Maliit::PreeditTextFormat> &preedit_formats,
int replacement_start = 0,
int replacement_length = 0,
int cursor_pos = -1);
virtual void sendCommitString(const QString &string,
int replace_start = 0,
int replace_length = 0,
int cursor_pos = -1);
virtual void sendKeyEvent(const QKeyEvent &key_event,
Maliit::EventRequestType request_type);
virtual void setSelection(int start,
int length);
virtual QString selection(bool &valid);
virtual void setLanguage(const QString &language);
private:
const QScopedPointer<WaylandInputMethodConnectionPrivate> d_ptr;
};
//! \internal_end
#endif
|