19 #ifndef MIR_SCENE_APPLICATION_SESSION_H_ 20 #define MIR_SCENE_APPLICATION_SESSION_H_ 36 namespace compositor {
class BufferStream; }
39 class DisplayConfiguration;
41 namespace shell {
class SurfaceStack; }
44 class SessionListener;
46 class SnapshotStrategy;
47 class BufferStreamFactory;
54 std::shared_ptr<shell::SurfaceStack>
const& surface_stack,
55 std::shared_ptr<SurfaceFactory>
const& surface_factory,
56 std::shared_ptr<BufferStreamFactory>
const& buffer_stream_factory,
59 std::shared_ptr<SnapshotStrategy>
const& snapshot_strategy,
60 std::shared_ptr<SessionListener>
const& session_listener,
62 std::shared_ptr<frontend::EventSink>
const& sink);
68 std::shared_ptr<frontend::EventSink>
const& surface_sink)
override;
72 std::shared_ptr<Surface> surface_after(std::shared_ptr<Surface>
const&)
const override;
75 std::shared_ptr<Surface> default_surface()
const override;
78 pid_t process_id()
const override;
80 void force_requests_to_complete()
override;
86 void send_input_device_change(std::vector<std::shared_ptr<input::Device>>
const& devices)
override;
90 void start_prompt_session()
override;
91 void stop_prompt_session()
override;
92 void suspend_prompt_session()
override;
93 void resume_prompt_session()
override;
98 void configure_streams(
Surface& surface, std::vector<shell::StreamSpecification>
const& config)
override;
99 void destroy_surface(std::weak_ptr<Surface>
const& surface)
override;
106 std::shared_ptr<shell::SurfaceStack>
const surface_stack;
107 std::shared_ptr<SurfaceFactory>
const surface_factory;
108 std::shared_ptr<BufferStreamFactory>
const buffer_stream_factory;
111 std::shared_ptr<SnapshotStrategy>
const snapshot_strategy;
112 std::shared_ptr<SessionListener>
const session_listener;
113 std::shared_ptr<frontend::EventSink>
const event_sink;
117 std::atomic<int> next_surface_id;
121 typedef std::map<frontend::SurfaceId, std::shared_ptr<Surface>> Surfaces;
122 typedef std::map<frontend::BufferStreamId, std::shared_ptr<compositor::BufferStream>> Streams;
125 std::mutex
mutable surfaces_and_streams_mutex;
129 void destroy_surface(std::unique_lock<std::mutex>& lock, Surfaces::const_iterator in_surfaces);
135 #endif // MIR_SCENE_APPLICATION_SESSION_H_ All things Mir.
Definition: atomic_callback.h:25
std::function< void(Snapshot const &)> SnapshotCallback
Definition: snapshot.h:39
Definition: application_session.h:50
Definition: int_wrapper.h:27
Definition: surface_creation_parameters.h:41
Buffer creation properties.
Definition: buffer_properties.h:48
Definition: output_properties_cache.h:44
Interface to a configuration of display cards and outputs.
Definition: display_configuration.h:167