on bdbbb20 help sign in
unity8/plugins/WindowManager/InputMethodManager.h
55 lines 1.6 kB history raw
1/*
2 * Copyright (C) 2019 UBports Foundation.
3 * Author(s) Marius Gripsgard <marius@ubports.com>
4 *
5 * This program is free software: you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License version 3, as published by
7 * the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
11 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
18#pragma once
20#include <QLoggingCategory>
21#include <QObject>
23#include "WindowManagerGlobal.h"
25Q_DECLARE_LOGGING_CATEGORY(INPUTMETHODMANAGER)
27class Window;
29namespace unity {
30 namespace shell {
31 namespace application {
32 class MirSurfaceInterface;
33 }
34 }
37class WINDOWMANAGERQML_EXPORT InputMethodManager : public QObject
39 Q_OBJECT
40 Q_PROPERTY(unity::shell::application::MirSurfaceInterface* surface READ surface NOTIFY surfaceChanged)
42public:
43 InputMethodManager();
44 static InputMethodManager* instance();
46 void setWindow(Window* window);
48Q_SIGNALS:
49 void surfaceChanged(unity::shell::application::MirSurfaceInterface* inputMethodSurface);
51private:
52 unity::shell::application::MirSurfaceInterface* surface() const;
54 Window* m_inputMethodWindow{nullptr};
55};