~mir-team/mir/trunk

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2013-04-25 23:50:01 UTC
  • mfrom: (526.2.22 mir1)
  • Revision ID: tarmac-20130425235001-c3b3x2yyb3eldyx1
frontend, shell, tests: surface-states updated to avoid supplying dependencies through public member functions.

Approved by PS Jenkins bot, Chris Halse Rogers, Robert Ancell, Kevin DuBois.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
namespace mir
33
33
{
34
 
 
 
34
namespace events
 
35
{
35
36
class EventSink;
36
 
 
 
37
}
37
38
namespace frontend
38
39
{
39
40
struct SurfaceCreationParameters;
54
55
        std::shared_ptr<SurfaceBuilder> const& builder,
55
56
        frontend::SurfaceCreationParameters const& params,
56
57
        std::shared_ptr<input::InputChannel> const& input_channel);
 
58
 
 
59
    Surface(
 
60
        std::shared_ptr<SurfaceBuilder> const& builder,
 
61
        frontend::SurfaceCreationParameters const& params,
 
62
        std::shared_ptr<input::InputChannel> const& input_channel,
 
63
        frontend::SurfaceId id,
 
64
        std::shared_ptr<events::EventSink> const& sink);
 
65
 
57
66
    ~Surface();
58
67
 
59
68
    virtual void hide();
82
91
    virtual MirSurfaceType type() const;
83
92
    virtual MirSurfaceState state() const;
84
93
 
85
 
    void set_id(frontend::SurfaceId i);
86
 
    void set_event_target(std::shared_ptr<EventSink> const& sink);
87
 
 
88
94
private:
89
95
    bool set_type(MirSurfaceType t);  // Use configure() to make public changes
90
96
    bool set_state(MirSurfaceState s);
94
100
    std::shared_ptr<mir::input::InputChannel> const input_channel;
95
101
    std::weak_ptr<mir::surfaces::Surface> const surface;
96
102
 
97
 
    std::shared_ptr<EventSink> event_sink;
98
 
    frontend::SurfaceId id;
 
103
    frontend::SurfaceId const id;
 
104
    std::shared_ptr<events::EventSink> const event_sink;
99
105
 
100
106
    MirSurfaceType type_value;
101
107
    MirSurfaceState state_value;