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
|
/*
* Copyright (c) 2017 Jan Arne Petersen
*
* 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 MALIIT_STANDALONEINPUTMETHOD_H
#define MALIIT_STANDALONEINPUTMETHOD_H
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#include <memory>
class MAbstractInputMethod;
class MInputContextConnection;
namespace Maliit
{
class AbstractPlatform;
class StandaloneInputMethodHost;
class WindowGroup;
namespace Plugins
{
class InputMethodPlugin;
}
class StandaloneInputMethod: public QObject
{
Q_OBJECT
public:
StandaloneInputMethod(Maliit::Plugins::InputMethodPlugin *plugin);
~StandaloneInputMethod();
private:
void handleWidgetStateChanged(unsigned int clientId,
const QMap<QString, QVariant> &newState,
const QMap<QString, QVariant> &oldState,
bool focusChanged);
std::unique_ptr<MInputContextConnection> mConnection;
QSharedPointer<AbstractPlatform> mPlatform; // TODO use std::unique_ptr instead
std::unique_ptr<WindowGroup> mWindowGroup;
std::unique_ptr<StandaloneInputMethodHost> mInputMethodHost;
std::unique_ptr<MAbstractInputMethod> mInputMethod;
};
std::unique_ptr<MInputContextConnection> createConnection();
}
#endif //MALIIT_STANDALONEINPUTMETHOD_H
|