2
* This file is part of Maliit framework *
4
* Copyright (C) 2012 Intel Corporation and/or its subsidiary(-ies).
7
* Contact: maliit-discuss@lists.maliit.org
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License version 2.1 as published by the Free Software Foundation
12
* and appearing in the file LICENSE.LGPL included in the packaging
16
#ifndef MALIIT_SERVER_WINDOWED_SURFACE_P_H
17
#define MALIIT_SERVER_WINDOWED_SURFACE_P_H
21
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
24
#include <QWidget> // For WId
30
#include <wayland-client.h>
31
#include "wayland-desktop-shell-client-protocol.h"
34
#include "maliit/plugins/abstractsurface.h"
39
class WindowedSurfaceFactory;
41
class WindowedSurface : public QObject,
42
public virtual Maliit::Plugins::AbstractSurface
47
WindowedSurface(WindowedSurfaceFactory *factory,
48
AbstractSurface::Options options,
49
const QSharedPointer<WindowedSurface> &parent,
57
void setSize(const QSize &size);
58
QPoint relativePosition() const;
59
void setRelativePosition(const QPoint &position);
60
QSharedPointer<AbstractSurface> parent() const;
61
QPoint translateEventPosition(const QPoint &eventPosition,
62
const QSharedPointer<AbstractSurface> &eventSurface = QSharedPointer<AbstractSurface>()) const;
63
void setActive(bool active);
64
void applicationFocusChanged(WId winId);
65
QRegion inputMethodArea();
66
virtual QWidget *widget() const = 0;
69
void updateVisibility();
72
bool isWindow() const;
73
QPoint mapToGlobal(const QPoint &pos) const;
75
bool eventFilter(QObject *object, QEvent *event);
77
WindowedSurfaceFactory *mFactory;
79
QSharedPointer<WindowedSurface> mParent;
80
QScopedPointer<QWidget> mToplevel;
83
QPoint mRelativePosition;
86
struct input_panel_surface *mSurface;
93
#endif // MALIIT_SERVER_WINDOWED_SURFACE_P_H