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;
69 std::list<scene::StreamInfo>
const& streams,
70 std::shared_ptr<input::InputChannel>
const& input_channel,
71 std::shared_ptr<input::InputSender>
const& sender,
72 std::shared_ptr<graphics::CursorImage>
const& cursor_image,
73 std::shared_ptr<SceneReport>
const& report);
78 std::weak_ptr<Surface>
const& parent,
81 std::list<scene::StreamInfo>
const& streams,
82 std::shared_ptr<input::InputChannel>
const& input_channel,
83 std::shared_ptr<input::InputSender>
const& sender,
84 std::shared_ptr<graphics::CursorImage>
const& cursor_image,
85 std::shared_ptr<SceneReport>
const& report);
91 float alpha()
const override;
92 void set_hidden(
bool is_hidden);
97 std::shared_ptr<frontend::BufferStream> primary_buffer_stream()
const override;
98 void set_streams(std::list<scene::StreamInfo>
const& streams)
override;
100 bool supports_input()
const override;
101 int client_input_fd()
const override;
102 std::shared_ptr<input::InputChannel> input_channel()
const override;
106 void set_input_region(std::vector<geometry::Rectangle>
const& input_rectangles)
override;
108 std::shared_ptr<compositor::BufferStream> buffer_stream()
const;
115 void set_alpha(
float alpha)
override;
117 void set_transformation(glm::mat4
const&)
override;
119 bool visible()
const override;
122 int buffers_ready_for_compositor(
void const* compositor_id)
const override;
128 void hide()
override;
129 void show()
override;
131 void set_cursor_image(std::shared_ptr<graphics::CursorImage>
const& image)
override;
132 std::shared_ptr<graphics::CursorImage> cursor_image()
const override;
134 void set_cursor_stream(std::shared_ptr<frontend::BufferStream>
const& stream,
139 void request_client_surface_close()
override;
141 std::shared_ptr<Surface> parent()
const override;
143 void add_observer(std::shared_ptr<SurfaceObserver>
const& observer)
override;
144 void remove_observer(std::weak_ptr<SurfaceObserver>
const& observer)
override;
157 bool visible(std::unique_lock<std::mutex>&)
const;
162 int set_swap_interval(
int);
167 std::mutex
mutable guard;
170 glm::mat4 transformation_matrix;
174 const bool nonrectangular;
175 std::vector<geometry::Rectangle> custom_input_rectangles;
176 std::shared_ptr<compositor::BufferStream>
const surface_buffer_stream;
177 std::shared_ptr<input::InputChannel>
const server_input_channel;
178 std::shared_ptr<input::InputSender>
const input_sender;
179 std::shared_ptr<graphics::CursorImage> cursor_image_;
180 std::shared_ptr<SceneReport>
const report;
181 std::weak_ptr<Surface>
const parent_;
183 std::list<StreamInfo> layers;
187 int swapinterval_ = 1;
194 std::unique_ptr<CursorStreamImageAdapter>
const cursor_stream_adapter;
202 #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
int const size
Definition: make_socket_rpc_channel.cpp:51
char const * consume(char const *pos, Data &data)
Definition: event.h:83