19 #ifndef MIR_SCENE_BASIC_SURFACE_H_ 20 #define MIR_SCENE_BASIC_SURFACE_H_ 31 #include <glm/glm.hpp> 42 struct BufferIPCPackage;
45 namespace frontend {
class EventSink; }
59 class CursorStreamImageAdapter;
68 std::shared_ptr<compositor::BufferStream>
const& buffer_stream,
69 std::shared_ptr<input::InputChannel>
const& input_channel,
70 std::shared_ptr<input::InputSender>
const& sender,
71 std::shared_ptr<graphics::CursorImage>
const& cursor_image,
72 std::shared_ptr<SceneReport>
const& report);
77 std::weak_ptr<Surface>
const& parent,
79 std::shared_ptr<compositor::BufferStream>
const& buffer_stream,
80 std::shared_ptr<input::InputChannel>
const& input_channel,
81 std::shared_ptr<input::InputSender>
const& sender,
82 std::shared_ptr<graphics::CursorImage>
const& cursor_image,
83 std::shared_ptr<SceneReport>
const& report);
89 float alpha()
const override;
90 void set_hidden(
bool is_hidden);
95 std::shared_ptr<frontend::BufferStream> primary_buffer_stream()
const override;
96 void set_streams(std::list<scene::StreamInfo>
const& streams)
override;
98 bool supports_input()
const override;
99 int client_input_fd()
const override;
100 std::shared_ptr<input::InputChannel> input_channel()
const override;
104 void set_input_region(std::vector<geometry::Rectangle>
const& input_rectangles)
override;
106 std::shared_ptr<compositor::BufferStream> buffer_stream()
const;
112 void consume(
MirEvent const* event)
override;
113 void set_alpha(
float alpha)
override;
115 void set_transformation(glm::mat4
const&)
override;
117 bool visible()
const override;
120 int buffers_ready_for_compositor(
void const* compositor_id)
const override;
126 void hide()
override;
127 void show()
override;
129 void set_cursor_image(std::shared_ptr<graphics::CursorImage>
const& image)
override;
130 std::shared_ptr<graphics::CursorImage> cursor_image()
const override;
132 void set_cursor_stream(std::shared_ptr<frontend::BufferStream>
const& stream,
137 void request_client_surface_close()
override;
139 std::shared_ptr<Surface> parent()
const override;
141 void add_observer(std::shared_ptr<SurfaceObserver>
const& observer)
override;
142 void remove_observer(std::weak_ptr<SurfaceObserver>
const& observer)
override;
152 bool visible(std::unique_lock<std::mutex>&)
const;
157 int set_swap_interval(
int);
162 std::mutex
mutable guard;
165 glm::mat4 transformation_matrix;
169 const bool nonrectangular;
170 std::vector<geometry::Rectangle> custom_input_rectangles;
171 std::shared_ptr<compositor::BufferStream>
const surface_buffer_stream;
172 std::shared_ptr<input::InputChannel>
const server_input_channel;
173 std::shared_ptr<input::InputSender>
const input_sender;
174 std::shared_ptr<graphics::CursorImage> cursor_image_;
175 std::shared_ptr<SceneReport>
const report;
176 std::weak_ptr<Surface>
const parent_;
178 std::list<StreamInfo> layers;
182 int swapinterval_ = 1;
188 std::unique_ptr<CursorStreamImageAdapter>
const cursor_stream_adapter;
196 #endif // MIR_SCENE_BASIC_SURFACE_H_
All things Mir.
Definition: atomic_callback.h:25
Definition: basic_surface.h:61
Definition: displacement.h:32
void const * CompositorID
Definition: compositor_id.h:27
std::vector< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:79
Definition: rectangle.h:33
Definition: surface_observers.h:30
Definition: event_private.h:181
int const size
Definition: make_socket_rpc_channel.cpp:51