KWin
Loading...
Searching...
No Matches
src
inputpanelv1window.h
Go to the documentation of this file.
1
/*
2
KWin - the KDE window manager
3
This file is part of the KDE project.
4
5
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
6
7
SPDX-License-Identifier: GPL-2.0-or-later
8
*/
9
10
#pragma once
11
12
#include "
wayland/inputmethod_v1.h
"
13
#include "
waylandwindow.h
"
14
#include <QPointer>
15
16
namespace
KWin
17
{
18
class
Output;
19
20
class
InputPanelV1Window
:
public
WaylandWindow
21
{
22
Q_OBJECT
23
public
:
24
InputPanelV1Window
(
InputPanelSurfaceV1Interface
*panelSurface);
25
26
enum class
Mode
{
27
None
,
28
VirtualKeyboard
,
29
Overlay
,
30
};
31
Q_ENUM(
Mode
)
32
33
void
destroyWindow
()
override
;
34
bool
isPlaceable
()
const override
35
{
36
return
false
;
37
}
38
bool
isCloseable
()
const override
39
{
40
return
false
;
41
}
42
bool
isResizable
()
const override
43
{
44
return
false
;
45
}
46
bool
isMovable
()
const override
47
{
48
return
false
;
49
}
50
bool
isMovableAcrossScreens
()
const override
51
{
52
return
false
;
53
}
54
bool
acceptsFocus
()
const override
55
{
56
return
false
;
57
}
58
void
closeWindow
()
override
59
{
60
}
61
bool
takeFocus
()
override
62
{
63
return
false
;
64
}
65
bool
wantsInput
()
const override
66
{
67
return
false
;
68
}
69
bool
isInputMethod
()
const override
70
{
71
return
true
;
72
}
73
NET::WindowType
windowType
()
const override
;
74
QRectF
frameRectToBufferRect
(
const
QRectF &
rect
)
const override
;
75
76
Mode
mode
()
const
77
{
78
return
m_mode;
79
}
80
void
allow
();
81
void
show
();
82
void
hide
();
83
84
protected
:
85
void
moveResizeInternal
(
const
QRectF &
rect
,
MoveResizeMode
mode
)
override
;
86
87
private
:
88
void
showTopLevel(
OutputInterface
*
output
,
InputPanelSurfaceV1Interface::Position
position);
89
void
showOverlayPanel();
90
void
reposition();
91
void
handleMapped();
92
void
maybeShow();
93
94
QRectF m_windowGeometry;
95
Mode
m_mode =
Mode::None
;
96
bool
m_allowed =
false
;
97
bool
m_virtualKeyboardShouldBeShown =
false
;
98
const
QPointer<InputPanelSurfaceV1Interface> m_panelSurface;
99
};
100
101
}
KWin::InputPanelSurfaceV1Interface
Definition
inputmethod_v1.h:128
KWin::InputPanelSurfaceV1Interface::Position
Position
Definition
inputmethod_v1.h:135
KWin::InputPanelV1Window
Definition
inputpanelv1window.h:21
KWin::InputPanelV1Window::acceptsFocus
bool acceptsFocus() const override
Definition
inputpanelv1window.h:54
KWin::InputPanelV1Window::windowType
NET::WindowType windowType() const override
Definition
inputpanelv1window.cpp:174
KWin::InputPanelV1Window::isCloseable
bool isCloseable() const override
Definition
inputpanelv1window.h:38
KWin::InputPanelV1Window::allow
void allow()
Definition
inputpanelv1window.cpp:59
KWin::InputPanelV1Window::isMovableAcrossScreens
bool isMovableAcrossScreens() const override
Definition
inputpanelv1window.h:50
KWin::InputPanelV1Window::wantsInput
bool wantsInput() const override
Definition
inputpanelv1window.h:65
KWin::InputPanelV1Window::isMovable
bool isMovable() const override
Definition
inputpanelv1window.h:46
KWin::InputPanelV1Window::takeFocus
bool takeFocus() override
Definition
inputpanelv1window.h:61
KWin::InputPanelV1Window::isInputMethod
bool isInputMethod() const override
Definition
inputpanelv1window.h:69
KWin::InputPanelV1Window::mode
Mode mode() const
Definition
inputpanelv1window.h:76
KWin::InputPanelV1Window::hide
void hide()
Definition
inputpanelv1window.cpp:71
KWin::InputPanelV1Window::InputPanelV1Window
InputPanelV1Window(InputPanelSurfaceV1Interface *panelSurface)
Definition
inputpanelv1window.cpp:25
KWin::InputPanelV1Window::Mode
Mode
Definition
inputpanelv1window.h:26
KWin::InputPanelV1Window::Mode::None
@ None
KWin::InputPanelV1Window::Mode::Overlay
@ Overlay
KWin::InputPanelV1Window::Mode::VirtualKeyboard
@ VirtualKeyboard
KWin::InputPanelV1Window::isResizable
bool isResizable() const override
Definition
inputpanelv1window.h:42
KWin::InputPanelV1Window::show
void show()
Definition
inputpanelv1window.cpp:65
KWin::InputPanelV1Window::moveResizeInternal
void moveResizeInternal(const QRectF &rect, MoveResizeMode mode) override
Definition
inputpanelv1window.cpp:184
KWin::InputPanelV1Window::destroyWindow
void destroyWindow() override
Definition
inputpanelv1window.cpp:160
KWin::InputPanelV1Window::frameRectToBufferRect
QRectF frameRectToBufferRect(const QRectF &rect) const override
Definition
inputpanelv1window.cpp:179
KWin::InputPanelV1Window::closeWindow
void closeWindow() override
Definition
inputpanelv1window.h:58
KWin::InputPanelV1Window::isPlaceable
bool isPlaceable() const override
Definition
inputpanelv1window.h:34
KWin::OutputInterface
Definition
output.h:35
KWin::WaylandWindow
Definition
waylandwindow.h:15
KWin::Window::MoveResizeMode
MoveResizeMode
Definition
window.h:1557
KWin::Window::rect
QRectF rect
Definition
window.h:113
KWin::Window::output
KWin::Output * output
Definition
window.h:111
inputmethod_v1.h
KWin
Definition
activation_test.cpp:20
waylandwindow.h
Generated on Sat Feb 17 2024 01:42:09 for KWin by
1.10.0