Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
include
server
mir
input
input_send_observer.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
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 General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Authored by: Andreas Pokorny <andreas.pokorny@canonical.com>
17
*/
18
19
#ifndef MIR_INPUT_INPUT_SEND_OBSERVER_H_
20
#define MIR_INPUT_INPUT_SEND_OBSERVER_H_
21
22
#include <
mir_toolkit/event.h
>
23
24
#include <memory>
25
26
namespace
mir
27
{
28
namespace
input
29
{
30
class
Surface;
31
32
class
InputSendObserver
33
{
34
public
:
35
InputSendObserver
() =
default
;
36
virtual
~InputSendObserver
() =
default
;
37
38
enum
FailureReason
39
{
40
surface_disappeared
,
41
no_response_received
,
42
socket_error
43
};
50
virtual
void
send_failed
(
MirEvent
const
& event,
input::Surface
* surface,
FailureReason
reason) = 0;
51
52
enum
InputResponse
53
{
54
consumed
,
55
not_consumed
56
};
60
virtual
void
send_suceeded
(
MirEvent
const
& event,
input::Surface
* surface,
InputResponse
response) = 0;
61
66
virtual
void
client_blocked
(
MirEvent
const
& event,
input::Surface
* client) = 0;
67
68
protected
:
69
InputSendObserver
&
operator=
(
InputSendObserver
const
&) =
delete
;
70
InputSendObserver
(
InputSendObserver
const
&) =
delete
;
71
};
72
73
}
74
}
75
76
#endif
mir
All things Mir.
Definition:
atomic_callback.h:25
mir::input::InputSendObserver::InputResponse
InputResponse
Definition:
input_send_observer.h:52
mir::input::InputSendObserver::~InputSendObserver
virtual ~InputSendObserver()=default
mir::input::Surface
Definition:
surface.h:47
mir::input::InputSendObserver::no_response_received
Definition:
input_send_observer.h:41
mir::input::InputSendObserver::surface_disappeared
Definition:
input_send_observer.h:40
mir::input::InputSendObserver::consumed
Definition:
input_send_observer.h:54
mir::input::InputSendObserver
Definition:
input_send_observer.h:32
mir::input::InputSendObserver::InputSendObserver
InputSendObserver()=default
mir::input::InputSendObserver::send_failed
virtual void send_failed(MirEvent const &event, input::Surface *surface, FailureReason reason)=0
An attempt to send an input event to a destination failed.
mir::input::InputSendObserver::FailureReason
FailureReason
Definition:
input_send_observer.h:38
event.h
mir::input::InputSendObserver::operator=
InputSendObserver & operator=(InputSendObserver const &)=delete
mir::socket_error
Definition:
fd_socket_transmission.h:28
MirEvent
Definition:
event_private.h:178
mir::input::InputSendObserver::client_blocked
virtual void client_blocked(MirEvent const &event, input::Surface *client)=0
Called when client is temporary blocked because input events are still in the queue.
mir::input::InputSendObserver::send_suceeded
virtual void send_suceeded(MirEvent const &event, input::Surface *surface, InputResponse response)=0
Client responded to an input event.
mir::input::InputSendObserver::not_consumed
Definition:
input_send_observer.h:55
Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015