~alan-griffiths/junk/composition-bypass

« back to all changes in this revision

Viewing changes to include/server/mir/shell/input_target_listener.h

  • Committer: Alan Griffiths
  • Date: 2013-05-31 11:14:55 UTC
  • mfrom: (693.3.19 trunk)
  • Revision ID: alan@octopull.co.uk-20130531111455-5ka3q9h9hhnffx70
merge lp:mir

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright © 2013 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: Robert Carr <robert.carr@canonical.com>
17
 
 */
18
 
 
19
 
#ifndef MIR_SHELL_INPUT_TARGET_LISTENER_H_
20
 
#define MIR_SHELL_INPUT_TARGET_LISTENER_H_
21
 
 
22
 
#include <memory>
23
 
 
24
 
namespace mir
25
 
{
26
 
namespace input
27
 
{
28
 
class SessionTarget;
29
 
class SurfaceTarget;
30
 
}
31
 
 
32
 
namespace shell
33
 
{
34
 
 
35
 
class InputTargetListener
36
 
{
37
 
public:
38
 
    virtual ~InputTargetListener() = default;
39
 
    
40
 
    virtual void input_application_opened(std::shared_ptr<input::SessionTarget> const& application) = 0;
41
 
    virtual void input_application_closed(std::shared_ptr<input::SessionTarget> const& application) = 0;
42
 
 
43
 
    virtual void input_surface_opened(std::shared_ptr<input::SessionTarget> const& application,
44
 
                                      std::shared_ptr<input::SurfaceTarget> const& opened_surface) = 0;
45
 
    virtual void input_surface_closed(std::shared_ptr<input::SurfaceTarget> const& closed_surface) = 0;
46
 
 
47
 
    virtual void focus_changed(std::shared_ptr<input::SurfaceTarget> const& focus_surface) = 0;
48
 
    virtual void focus_cleared() = 0;
49
 
 
50
 
protected:
51
 
    InputTargetListener() = default;
52
 
    InputTargetListener(InputTargetListener const&) = delete;
53
 
    InputTargetListener& operator=(InputTargetListener const&) = delete;
54
 
};
55
 
 
56
 
}
57
 
} // namespace mir
58
 
 
59
 
#endif // MIR_SHELL_INPUT_TARGET_LISTENER_H_