19 #ifndef MIR_SCENE_APPLICATION_SESSION_H_
20 #define MIR_SCENE_APPLICATION_SESSION_H_
41 class SnapshotStrategy;
47 std::shared_ptr<shell::SurfaceFactory>
const& surface_factory,
49 std::string
const& session_name,
50 std::shared_ptr<SnapshotStrategy>
const& snapshot_strategy,
51 std::shared_ptr<shell::SessionListener>
const& session_listener,
52 std::shared_ptr<frontend::EventSink>
const& sink);
63 std::string
name()
const;
81 std::shared_ptr<shell::SurfaceFactory>
const surface_factory;
83 std::string
const session_name;
84 std::shared_ptr<SnapshotStrategy>
const snapshot_strategy;
85 std::shared_ptr<shell::SessionListener>
const session_listener;
86 std::shared_ptr<frontend::EventSink>
const event_sink;
90 std::atomic<int> next_surface_id;
92 typedef std::map<frontend::SurfaceId, std::shared_ptr<shell::Surface>> Surfaces;
94 std::mutex
mutable surfaces_mutex;
101 #endif // MIR_SCENE_APPLICATION_SESSION_H_
void destroy_surface(frontend::SurfaceId surface)
Definition: application_session.cpp:122
Definition: surface_creation_parameters.h:38
pid_t process_id() const override
Definition: application_session.cpp:141
Definition: application_session.h:43
void hide()
Definition: application_session.cpp:155
ApplicationSession & operator=(ApplicationSession const &)=delete
void send_display_config(graphics::DisplayConfiguration const &info)
Definition: application_session.cpp:183
ApplicationSession(std::shared_ptr< shell::SurfaceFactory > const &surface_factory, pid_t pid, std::string const &session_name, std::shared_ptr< SnapshotStrategy > const &snapshot_strategy, std::shared_ptr< shell::SessionListener > const &session_listener, std::shared_ptr< frontend::EventSink > const &sink)
std::function< void(Snapshot const &)> SnapshotCallback
Definition: snapshot.h:39
std::shared_ptr< shell::Surface > default_surface() const
Definition: application_session.cpp:112
Definition: int_wrapper.h:27
void take_snapshot(shell::SnapshotCallback const &snapshot_taken)
Definition: application_session.cpp:104
~ApplicationSession()
Definition: application_session.cpp:57
std::shared_ptr< frontend::Surface > get_surface(frontend::SurfaceId surface) const
Definition: application_session.cpp:97
void force_requests_to_complete()
Definition: application_session.cpp:146
int configure_surface(frontend::SurfaceId id, MirSurfaceAttrib attrib, int value)
Definition: application_session.cpp:173
Definition: session_listener.h:31
void set_lifecycle_state(MirLifecycleState state)
Definition: application_session.cpp:188
std::string name() const
Definition: application_session.cpp:136
void show()
Definition: application_session.cpp:164
frontend::SurfaceId create_surface(shell::SurfaceCreationParameters const ¶ms)
Definition: application_session.cpp:72
Definition: surface_factory.h:34
Interface to a configuration of display cards and outputs.
Definition: display_configuration.h:159