Mir
set_compositor.h
Go to the documentation of this file.
1/*
2 * Copyright © Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef MIROIL_SET_COMPOSITOR_H
18#define MIROIL_SET_COMPOSITOR_H
19#include <memory>
20#include <functional>
21
22namespace mir { class Server; }
23namespace mir { namespace graphics { class Display; } }
24namespace mir { namespace compositor { class DisplayListener; } }
25
26namespace miroil
27{
28 class Compositor;
29
30// Configure the server for using the Qt compositor
32{
33 using InitFunction = std::function<void(const std::shared_ptr<mir::graphics::Display>& display,
34 const std::shared_ptr<Compositor> & compositor,
35 const std::shared_ptr<mir::compositor::DisplayListener>& displayListener)>;
36
37 using ConstructorFunction = std::function<std::shared_ptr<Compositor>()>;
38
39public:
40 SetCompositor(ConstructorFunction constructor, InitFunction init);
41
42 void operator()(mir::Server& server);
43
44private:
45 struct CompositorImpl;
46
47 std::weak_ptr<CompositorImpl> compositor_impl;
48 ConstructorFunction constructor_function;
49 InitFunction init_function;
50};
51
52}
53
54#endif //MIROIL_SET_COMPOSITOR_H
Definition: compositor.h:24
Definition: set_compositor.h:32
SetCompositor(ConstructorFunction constructor, InitFunction init)
void operator()(mir::Server &server)
Definition: display_listener_wrapper.h:25
Definition: output.h:28
Definition: runner.h:27
Definition: compositor.h:21

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.