2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#include "ubuntuapplicationapiwrapper.h"
20
#include <ubuntu/ui/ubuntu_ui_session_service.h>
21
#include <ubuntu/application/ui/window_properties.h>
22
#define HAVE_UBUNTU_PLATFORM_API
28
UbuntuApplicationApiWrapper::UbuntuApplicationApiWrapper()
29
: m_runningOnMir(false)
31
if (qgetenv("QT_QPA_PLATFORM") == "ubuntumirclient") {
32
m_runningOnMir = false;
36
void UbuntuApplicationApiWrapper::reportOSKVisible(const int x, const int y, const int width, const int height)
38
#ifdef HAVE_UBUNTU_PLATFORM_API
39
if (!m_runningOnMir) { // following method not implemented on Mir
40
ubuntu_ui_report_osk_visible(x, y, width, height);
50
void UbuntuApplicationApiWrapper::reportOSKInvisible()
52
#ifdef HAVE_UBUNTU_PLATFORM_API
53
if (!m_runningOnMir) { // following method not implemented on Mir
54
ubuntu_ui_report_osk_invisible();
59
int UbuntuApplicationApiWrapper::oskWindowRole() const
61
#ifdef HAVE_UBUNTU_PLATFORM_API
62
return static_cast<int>(U_ON_SCREEN_KEYBOARD_ROLE);