From 472b1776d764c8fc6929880da81d5c11bd1ae404 Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Mon, 15 Apr 2024 15:50:24 +1000 Subject: [PATCH 01/29] common/Signal: New worker-thread synchronisaton primitive. This is *very* much like `std::binary_semaphore`, but doesn't have the preconditon that the signal must not be raised before attempting to raise it. Use it to fix the UB (on shutdown) in `mir::ThreadPoolExecutor` --- include/common/mir/signal.h | 75 +++++++++++++++++++++++++++++ src/common/CMakeLists.txt | 2 + src/common/signal.cpp | 34 +++++++++++++ src/common/thread_pool_executor.cpp | 19 +++----- 4 files changed, 117 insertions(+), 13 deletions(-) create mode 100644 include/common/mir/signal.h create mode 100644 src/common/signal.cpp diff --git a/include/common/mir/signal.h b/include/common/mir/signal.h new file mode 100644 index 00000000000..e01ede716a5 --- /dev/null +++ b/include/common/mir/signal.h @@ -0,0 +1,75 @@ +/* + * Copyright © Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 or 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef MIR_SIGNAL_H_ +#define MIR_SIGNAL_H_ + +#include + +namespace mir +{ +/** + * A thread-synchronisation barrier. + * + * The expected usage is that one thread sits in `wait()` until + * signalled from another thread with `raise()`. + * + * This mechanism does not attempt to ensure that only one thread + * is released per `raise()` or that each `raise()` unblocks only + * one `wait()`. The only guarantees are that: + * 1) At least one call to `raise()` strongly-happens-before + * a call to `wait()` returns, and + * 2) `wait()` will block until a call to `raise()` that + * happens-after the most recent return from `wait()`. + * + * The primary use-case for such a barrier is to signal a + * worker thread to run the next iteration of work. + * + * This is very similar to a `std::binary_semaphore` but + * without the precondition that `raise()` is not called + * if the Signal is already raised. + */ +class Signal +{ +public: + Signal(); + + /** + * Raise the signal, releasing any thread in `wait()` + * + * This does not synchronise with any other call to `raise()` + * This synchronises-with a subsequent call to `wait()`, but does + * not guarantee that each call to `raise()` releases at least one + * `wait()`. + * + * Two unsynchronised calls to `raise()` may result in either one + * or two calls to `wait()` being unblocked, depending on timing. + */ + void raise(); + + /** + * Wait for the signal to be raised + * + * This synchronises-wtih a previous call to `raise()`, and + * then resets the signal. + */ + void wait(); +private: + std::atomic flag; +}; +} + +#endif // MIR_SIGNAL_H_ diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 8e16039b1a1..8a4b5275968 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -34,6 +34,8 @@ list(APPEND MIR_COMMON_SOURCES thread_pool_executor.cpp linearising_executor.cpp immediate_executor.cpp + ${PROJECT_SOURCE_DIR}/include/common/mir/signal.h + signal.cpp ) set( diff --git a/src/common/signal.cpp b/src/common/signal.cpp new file mode 100644 index 00000000000..9a7914ea74d --- /dev/null +++ b/src/common/signal.cpp @@ -0,0 +1,34 @@ +/* + * Copyright © Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 or 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "mir/signal.h" + +mir::Signal::Signal() + : flag{false} +{ +} + +void mir::Signal::raise() +{ + flag = true; + flag.notify_all(); +} + +void mir::Signal::wait() +{ + flag.wait(false); + flag = false; +} diff --git a/src/common/thread_pool_executor.cpp b/src/common/thread_pool_executor.cpp index ed41274da90..d97f220bca1 100644 --- a/src/common/thread_pool_executor.cpp +++ b/src/common/thread_pool_executor.cpp @@ -15,6 +15,7 @@ */ #include "mir/executor.h" +#include "mir/signal.h" #include "mir/thread_name.h" @@ -23,7 +24,6 @@ #include #include #include -#include namespace { @@ -38,8 +38,7 @@ class Worker { public: Worker() - : work{[](){}}, - work_available{0} + : work{[](){}} { std::promise*> shutdown_channel; auto resolved_shutdown_location = shutdown_channel.get_future(); @@ -82,7 +81,7 @@ class Worker { // Precondition: this Worker is idle (work_available is unraised, work = [](){}) work = std::move(to_do); - work_available.release(); + work_available.raise(); } /** @@ -104,14 +103,8 @@ class Worker */ *shutdown = true; /* We need to release the workloop thread by raising the signal. - * However, it's UB to raise the semaphore if it's already raised. - * So, first, consume any pending signal… */ - work_available.try_acquire(); - /* work_available is now guaranteed not-signalled, so it's OK to - * unconditionally raise the signal and so release the workloop thread. - */ - work_available.release(); + work_available.raise(); } static void work_loop(Worker* me, std::promise*>&& shutdown_channel) @@ -123,7 +116,7 @@ class Worker while (!shutdown) { - me->work_available.acquire(); + me->work_available.wait(); auto work = std::move(me->work); me->work = [](){}; work(); @@ -139,7 +132,7 @@ class Worker * after setting *shutdown to true it is no longer safe to access. */ std::atomic* shutdown; - std::binary_semaphore work_available; + mir::Signal work_available; std::thread thread; }; From c4402a2b60d0e4ec01b45fe0154eb7e2ae433ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Wed, 17 Apr 2024 20:36:16 +0200 Subject: [PATCH 02/29] doc: pin sphinx https://github.com/breathe-doc/breathe/issues/981 --- doc/sphinx/.sphinx/build_requirements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx/.sphinx/build_requirements.py b/doc/sphinx/.sphinx/build_requirements.py index 084d6ea99e6..0e610e8be79 100644 --- a/doc/sphinx/.sphinx/build_requirements.py +++ b/doc/sphinx/.sphinx/build_requirements.py @@ -78,7 +78,7 @@ def DeduplicateExtensions(extensionNames: [str]): requirements = [ "furo", "pyspelling", - "sphinx", + "sphinx==7.2.6", "sphinx-autobuild", "sphinx-copybutton", "sphinx-design", From cccffa3a04f3216c1d4351f179c2772a4aff6d91 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 18 Apr 2024 09:51:28 -0400 Subject: [PATCH 03/29] WIP --- src/include/server/mir/server.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/include/server/mir/server.h b/src/include/server/mir/server.h index 280f8320a00..aefd7a83800 100644 --- a/src/include/server/mir/server.h +++ b/src/include/server/mir/server.h @@ -67,6 +67,10 @@ namespace input { class SeatObserver; } +namespace renderer +{ +class RendererFactory; +} class Fd; class MainLoop; @@ -294,6 +298,9 @@ class Server /// Sets an override functor for creating the persistent_surface_store void override_the_persistent_surface_store(Builder const& persistent_surface_store); + /// Sets an override functor for the renderer_factory + void override_the_renderer_factory(Builder const& r); + /// Each of the wrap functions takes a wrapper functor of the same form template using Wrapper = std::function(std::shared_ptr const&)>; @@ -421,6 +428,9 @@ class Server auto the_session_lock() const -> std::shared_ptr; + auto the_renderer_factory() const -> + std::shared_ptr; + /** @} */ /** @name Client side support From 448db7e8cc2179647f8d7de8c4b11ccf9ec9ba34 Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Fri, 19 Apr 2024 16:34:41 +1000 Subject: [PATCH 04/29] Typo fix Co-authored-by: Matthew Kosarek --- include/common/mir/signal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/mir/signal.h b/include/common/mir/signal.h index e01ede716a5..bf5c2503ed7 100644 --- a/include/common/mir/signal.h +++ b/include/common/mir/signal.h @@ -63,7 +63,7 @@ class Signal /** * Wait for the signal to be raised * - * This synchronises-wtih a previous call to `raise()`, and + * This synchronises-with a previous call to `raise()`, and * then resets the signal. */ void wait(); From 1404488f9e7737350fbd67e2a4dfbb3333f4a948 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Fri, 19 Apr 2024 16:40:41 -0400 Subject: [PATCH 05/29] A basic, working renderer is exposed --- include/miral/miral/custom_renderer.h | 61 +++++++++++++++++++++++++++ src/include/server/mir/server.h | 2 +- src/miral/CMakeLists.txt | 2 + src/miral/custom_renderer.cpp | 55 ++++++++++++++++++++++++ src/miral/symbols.map | 5 +++ src/server/server.cpp | 6 ++- src/server/symbols.map | 2 + 7 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 include/miral/miral/custom_renderer.h create mode 100644 src/miral/custom_renderer.cpp diff --git a/include/miral/miral/custom_renderer.h b/include/miral/miral/custom_renderer.h new file mode 100644 index 00000000000..1d8e2c4859f --- /dev/null +++ b/include/miral/miral/custom_renderer.h @@ -0,0 +1,61 @@ +/* + * Copyright © Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 or 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef MIRAL_CUSTOM_RENDERER_H +#define MIRAL_CUSTOM_RENDERER_H + +#include +#include + +namespace mir +{ +class Server; +namespace graphics +{ +class GLRenderingProvider; +namespace gl +{ +class OutputSurface; +} +} +namespace renderer +{ +class Renderer; +class RendererFactory; +namespace gl +{ +class RenderTarget; +} +} +} + +namespace miral +{ +typedef std::function + (std::unique_ptr, + std::shared_ptr)> CreateRenderer; + +class CustomRenderer +{ +public: + explicit CustomRenderer(CreateRenderer const& renderer); + void operator()(mir::Server& server) const; +private: + std::shared_ptr factory; +}; +} + +#endif //MIRAL_CUSTOM_RENDERER_H diff --git a/src/include/server/mir/server.h b/src/include/server/mir/server.h index aefd7a83800..2e3ef4c9044 100644 --- a/src/include/server/mir/server.h +++ b/src/include/server/mir/server.h @@ -299,7 +299,7 @@ class Server void override_the_persistent_surface_store(Builder const& persistent_surface_store); /// Sets an override functor for the renderer_factory - void override_the_renderer_factory(Builder const& r); + void override_the_renderer_factory(Builder const& renderer_factory_builder); /// Each of the wrap functions takes a wrapper functor of the same form template using Wrapper = std::function(std::shared_ptr const&)>; diff --git a/src/miral/CMakeLists.txt b/src/miral/CMakeLists.txt index 80fa50b4721..30758697f6d 100644 --- a/src/miral/CMakeLists.txt +++ b/src/miral/CMakeLists.txt @@ -1,5 +1,6 @@ include_directories( ${PROJECT_SOURCE_DIR}/src/include/server + ${PROJECT_SOURCE_DIR}/include/renderer ) set(MIRAL_ABI 7) @@ -54,6 +55,7 @@ add_library(miral SHARED configuration_option.cpp ${miral_include}/miral/configuration_option.h ${miral_include}/miral/command_line_option.h cursor_theme.cpp ${miral_include}/miral/cursor_theme.h + custom_renderer.cpp ${miral_include}/miral/custom_renderer.h display_configuration.cpp ${miral_include}/miral/display_configuration.h external_client.cpp ${miral_include}/miral/external_client.h keymap.cpp ${miral_include}/miral/keymap.h diff --git a/src/miral/custom_renderer.cpp b/src/miral/custom_renderer.cpp new file mode 100644 index 00000000000..71a25c5f0af --- /dev/null +++ b/src/miral/custom_renderer.cpp @@ -0,0 +1,55 @@ +/* + * Copyright © Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 or 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "miral/custom_renderer.h" +#include +#include +#include +#include + +namespace +{ +class RendererFactory : public mir::renderer::RendererFactory +{ +public: + explicit RendererFactory(miral::CreateRenderer const& renderer) + : renderer{renderer} + { + } + + [[nodiscard]] auto create_renderer_for( + std::unique_ptr output_surface, + std::shared_ptr gl_provider) const + -> std::unique_ptr override + { + return renderer(std::move(output_surface), std::move(gl_provider)); + } + +private: + miral::CreateRenderer const& renderer; +}; +} + +miral::CustomRenderer::CustomRenderer(CreateRenderer const& renderer) + : factory(std::make_shared(renderer)) +{ +} + +void miral::CustomRenderer::operator()(mir::Server &server) const +{ + std::function()> builder = [&]() { return factory; }; + server.override_the_renderer_factory(builder); +} \ No newline at end of file diff --git a/src/miral/symbols.map b/src/miral/symbols.map index f588c74cb24..e0b6abb8bbb 100644 --- a/src/miral/symbols.map +++ b/src/miral/symbols.map @@ -38,6 +38,9 @@ global: miral::CursorTheme::?CursorTheme*; miral::CursorTheme::CursorTheme*; miral::CursorTheme::operator*; + miral::CustomRenderer::?CustomRenderer*; + miral::CustomRenderer::CustomRenderer*; + miral::CustomRenderer::operator*; miral::DisplayConfiguration::?DisplayConfiguration*; miral::DisplayConfiguration::DisplayConfiguration*; miral::DisplayConfiguration::add_output_attribute*; @@ -412,6 +415,7 @@ global: typeinfo?for?miral::CanonicalWindowManagerPolicy; typeinfo?for?miral::ConfigurationOption; typeinfo?for?miral::CursorTheme; + typeinfo?for?miral::CustomRenderer; typeinfo?for?miral::DisplayConfiguration; typeinfo?for?miral::ExternalClientLauncher; typeinfo?for?miral::FdHandle; @@ -450,6 +454,7 @@ global: vtable?for?miral::CanonicalWindowManagerPolicy; vtable?for?miral::ConfigurationOption; vtable?for?miral::CursorTheme; + vtable?for?miral::CustomRenderer; vtable?for?miral::DisplayConfiguration; vtable?for?miral::ExternalClientLauncher; vtable?for?miral::FdHandle; diff --git a/src/server/server.cpp b/src/server/server.cpp index 665c9ea2db5..1b45c0d9304 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -99,7 +99,8 @@ struct TemporaryCompositeEventFilter : public mi::CompositeEventFilter MACRO(session_listener)\ MACRO(shell)\ MACRO(application_not_responding_detector)\ - MACRO(persistent_surface_store) + MACRO(persistent_surface_store)\ + MACRO(renderer_factory) #define FOREACH_ACCESSOR(MACRO)\ MACRO(the_buffer_stream_factory)\ @@ -131,7 +132,8 @@ struct TemporaryCompositeEventFilter : public mi::CompositeEventFilter MACRO(the_persistent_surface_store)\ MACRO(the_display_configuration_observer_registrar)\ MACRO(the_seat_observer_registrar)\ - MACRO(the_session_lock) + MACRO(the_session_lock)\ + MACRO(the_renderer_factory) #define MIR_SERVER_BUILDER(name)\ std::function()> name##_builder; diff --git a/src/server/symbols.map b/src/server/symbols.map index b01b6abec4a..2c7a47b635e 100644 --- a/src/server/symbols.map +++ b/src/server/symbols.map @@ -143,6 +143,8 @@ MIR_SERVER_2.17 { mir::Server::override_the_session_listener*; mir::Server::override_the_shell*; mir::Server::override_the_window_manager_builder*; + mir::Server::the_renderer_factory*; + mir::Server::override_the_renderer_factory*; mir::Server::run*; mir::Server::set_command_line*; mir::Server::set_command_line_handler*; From 7d9c759068286e42296abb4fd0dfa29a57e121ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Sun, 21 Apr 2024 19:23:21 +0200 Subject: [PATCH 06/29] Revert "doc: pin sphinx (#3335)" This reverts commit f6296889ba81e8067d2f7b6d057f362daea36b73, reversing changes made to 8407da28ddb9a535df2775f224bf5143e8770d52. --- doc/sphinx/.sphinx/build_requirements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx/.sphinx/build_requirements.py b/doc/sphinx/.sphinx/build_requirements.py index 0e610e8be79..084d6ea99e6 100644 --- a/doc/sphinx/.sphinx/build_requirements.py +++ b/doc/sphinx/.sphinx/build_requirements.py @@ -78,7 +78,7 @@ def DeduplicateExtensions(extensionNames: [str]): requirements = [ "furo", "pyspelling", - "sphinx==7.2.6", + "sphinx", "sphinx-autobuild", "sphinx-copybutton", "sphinx-design", From 5ccffefaaa712962158c45285b0fac0bb9567e61 Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Mon, 22 Apr 2024 16:53:14 +1000 Subject: [PATCH 07/29] tests: Add some tests for mir::Signal --- src/common/symbols.map | 4 ++ tests/unit-tests/CMakeLists.txt | 1 + tests/unit-tests/test_signal.cpp | 104 +++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 tests/unit-tests/test_signal.cpp diff --git a/src/common/symbols.map b/src/common/symbols.map index 1294d90cd1c..d674a6fcacd 100644 --- a/src/common/symbols.map +++ b/src/common/symbols.map @@ -336,6 +336,10 @@ MIR_COMMON_2.17 { mir::SharedLibraryProberReport::?SharedLibraryProberReport*; mir::SharedLibraryProberReport::SharedLibraryProberReport*; mir::SharedLibraryProberReport::operator*; + mir::Signal::Signal*; + mir::Signal::?Signal*; + mir::Signal::raise*; + mir::Signal::wait*; mir::SignalBlocker::?SignalBlocker*; mir::SignalBlocker::SignalBlocker*; mir::detail::RefCountedLibrary::?RefCountedLibrary*; diff --git a/tests/unit-tests/CMakeLists.txt b/tests/unit-tests/CMakeLists.txt index d62046b0501..4897d9f8d74 100644 --- a/tests/unit-tests/CMakeLists.txt +++ b/tests/unit-tests/CMakeLists.txt @@ -67,6 +67,7 @@ set( test_thread_pool_executor.cpp test_linearising_executor.cpp test_shm_backing.cpp + test_signal.cpp ) if (HAVE_PTHREAD_GETNAME_NP) diff --git a/tests/unit-tests/test_signal.cpp b/tests/unit-tests/test_signal.cpp new file mode 100644 index 00000000000..f6382b3ae7a --- /dev/null +++ b/tests/unit-tests/test_signal.cpp @@ -0,0 +1,104 @@ +/* + * Copyright © Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 or 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "mir/signal.h" +#include +#include +#include +#include + +#include "mir/test/auto_unblock_thread.h" + +namespace mt = mir::test; + +TEST(Signal, waits_until_raised) +{ + mir::Signal signal; + + std::atomic event_hit{false}; + std::latch thread_spawned{2}; + + std::thread waiter_thread{ + [&]() + { + thread_spawned.arrive_and_wait(); + EXPECT_FALSE(event_hit); + signal.wait(); + EXPECT_TRUE(event_hit); + } + }; + + thread_spawned.arrive_and_wait(); + std::this_thread::sleep_for(std::chrono::milliseconds{100}); + + event_hit = true; + signal.raise(); + + waiter_thread.join(); +} + +TEST(Signal, racing_raises_release_at_least_one_waiter) +{ + mir::Signal signal; + + int const thread_count{10}; + std::latch threads_spawned{thread_count + 1}; + std::vector racing_releasers; + + for(auto i = 0; i < thread_count; ++i) + { + racing_releasers.emplace_back( + mt::AutoJoinThread{ + [&]() + { + threads_spawned.arrive_and_wait(); + signal.raise(); + } + }); + } + + threads_spawned.arrive_and_wait(); + signal.wait(); +} + +TEST(Signal, pre_raised_signal_releases_immediately) +{ + mir::Signal signal; + + signal.raise(); + signal.wait(); +} + +TEST(Signal, release_from_wait_resets_signal) +{ + mir::Signal signal; + + std::chrono::milliseconds const delay{500}; + + mt::AutoJoinThread releaser{ + [&]() + { + signal.raise(); + std::this_thread::sleep_for(delay * 2); + signal.raise(); + } + }; + + signal.wait(); + auto now = std::chrono::steady_clock::now(); + signal.wait(); + EXPECT_THAT(std::chrono::steady_clock::now(), testing::Gt(now + delay)); +} From 559a00324e8996ec8d31676644db4b27cac0d18b Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Mon, 22 Apr 2024 16:58:40 +1000 Subject: [PATCH 08/29] mc::MultiThreadedCompositor: Switch to mir::Signal --- .../compositor/multi_threaded_compositor.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/server/compositor/multi_threaded_compositor.cpp b/src/server/compositor/multi_threaded_compositor.cpp index 75657e9bf8c..7c7d5960c19 100644 --- a/src/server/compositor/multi_threaded_compositor.cpp +++ b/src/server/compositor/multi_threaded_compositor.cpp @@ -28,6 +28,7 @@ #include "mir/unwind_helpers.h" #include "mir/thread_name.h" #include "mir/executor.h" +#include "mir/signal.h" #include #include @@ -59,7 +60,6 @@ class CompositingFunctor compositor_factory{db_compositor_factory}, group(group), scene(scene), - needs_wakeup{false}, running{true}, force_sleep{fixed_composite_delay}, display_listener{display_listener}, @@ -120,9 +120,7 @@ class CompositingFunctor while (running) { /* Wait until compositing has been scheduled or we are stopped */ - needs_wakeup.wait(false); - // We've been awoken; reset the trigger - needs_wakeup = false; + wakeup.wait(); /* * Check if we are running before compositing, since we may have @@ -167,8 +165,7 @@ class CompositingFunctor void schedule_compositing() { - needs_wakeup = true; - needs_wakeup.notify_one(); + wakeup.raise(); } void schedule_compositing(geometry::Rectangle const& damage) @@ -179,16 +176,14 @@ class CompositingFunctor if (took_damage) { - needs_wakeup = true; - needs_wakeup.notify_one(); + wakeup.raise(); } } void stop() { running = false; - needs_wakeup = true; - needs_wakeup.notify_one(); + wakeup.raise(); } void wait_until_started() @@ -212,7 +207,7 @@ class CompositingFunctor std::shared_ptr const compositor_factory; mg::DisplaySyncGroup& group; std::shared_ptr const scene; - std::atomic needs_wakeup; + mir::Signal wakeup; std::atomic running; std::chrono::milliseconds force_sleep{-1}; std::shared_ptr const display_listener; From 2191081d4b23437e244d100c2c5b4fb8a4f5bb1f Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Mon, 22 Apr 2024 09:07:16 -0400 Subject: [PATCH 09/29] Custom Renderer can also include a GL config --- include/miral/miral/custom_renderer.h | 19 +++++++++---------- src/miral/custom_renderer.cpp | 26 +++++++++++++++++++++----- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/include/miral/miral/custom_renderer.h b/include/miral/miral/custom_renderer.h index 1d8e2c4859f..f9e22172c1a 100644 --- a/include/miral/miral/custom_renderer.h +++ b/include/miral/miral/custom_renderer.h @@ -26,6 +26,7 @@ class Server; namespace graphics { class GLRenderingProvider; +class GLConfig; namespace gl { class OutputSurface; @@ -34,27 +35,25 @@ class OutputSurface; namespace renderer { class Renderer; -class RendererFactory; -namespace gl -{ -class RenderTarget; -} } } namespace miral { -typedef std::function - (std::unique_ptr, - std::shared_ptr)> CreateRenderer; class CustomRenderer { public: - explicit CustomRenderer(CreateRenderer const& renderer); + using Builder = std::function< + std::unique_ptr( + std::unique_ptr, std::shared_ptr) + >; + + CustomRenderer(Builder&& renderer, std::shared_ptr const&); void operator()(mir::Server& server) const; private: - std::shared_ptr factory; + struct Self; + std::shared_ptr self; }; } diff --git a/src/miral/custom_renderer.cpp b/src/miral/custom_renderer.cpp index 71a25c5f0af..610c3cdd332 100644 --- a/src/miral/custom_renderer.cpp +++ b/src/miral/custom_renderer.cpp @@ -25,7 +25,7 @@ namespace class RendererFactory : public mir::renderer::RendererFactory { public: - explicit RendererFactory(miral::CreateRenderer const& renderer) + explicit RendererFactory(miral::CustomRenderer::Builder const& renderer) : renderer{renderer} { } @@ -39,17 +39,33 @@ class RendererFactory : public mir::renderer::RendererFactory } private: - miral::CreateRenderer const& renderer; + miral::CustomRenderer::Builder const& renderer; }; } -miral::CustomRenderer::CustomRenderer(CreateRenderer const& renderer) - : factory(std::make_shared(renderer)) +struct miral::CustomRenderer::Self +{ + Self(Builder const& renderer, std::shared_ptr const& config) + : factory(std::make_shared(renderer)), + config{config} + { + } + + std::shared_ptr factory; + std::shared_ptr config; +}; + +miral::CustomRenderer::CustomRenderer( + Builder&& renderer, std::shared_ptr const& config) + : self{std::make_shared(renderer, config)} { } void miral::CustomRenderer::operator()(mir::Server &server) const { - std::function()> builder = [&]() { return factory; }; + std::function()> builder = [&]() { return self->factory; }; server.override_the_renderer_factory(builder); + + if (self->config) + server.override_the_gl_config([&]() { return self->config; }); } \ No newline at end of file From 459f8bb9e4febbc6a4873fded3bef744267e9ec9 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Tue, 23 Apr 2024 09:14:02 -0400 Subject: [PATCH 10/29] feature: generating miral and miroil symbols using a new script --- .github/workflows/symbols-check.yml | 42 ++ .gitignore | 2 +- doc/sphinx/.sphinx/build_requirements.py | 2 +- src/miral/CMakeLists.txt | 27 +- src/miral/regenerate-miral-symbols-map.py | 235 --------- src/miral/symbols.map | 57 +-- src/miroil/CMakeLists.txt | 21 + src/miroil/regenerate-miroil-symbols-map.py | 236 --------- src/miroil/symbols.map | 26 +- tools/symbols_map_generator/README.md | 26 + tools/symbols_map_generator/main.py | 516 ++++++++++++++++++++ 11 files changed, 646 insertions(+), 544 deletions(-) create mode 100644 .github/workflows/symbols-check.yml delete mode 100755 src/miral/regenerate-miral-symbols-map.py delete mode 100755 src/miroil/regenerate-miroil-symbols-map.py create mode 100644 tools/symbols_map_generator/README.md create mode 100755 tools/symbols_map_generator/main.py diff --git a/.github/workflows/symbols-check.yml b/.github/workflows/symbols-check.yml new file mode 100644 index 00000000000..2a760e604d9 --- /dev/null +++ b/.github/workflows/symbols-check.yml @@ -0,0 +1,42 @@ +name: Symbols Check + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number && format('pr{0}', github.event.number) || github.ref_name }} + cancel-in-progress: true + +jobs: + Run: + runs-on: ubuntu-latest + + timeout-minutes: 10 + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - + sudo add-apt-repository --update "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main" + sudo apt install libclang1-19 + sudo apt install python3-clang-19 + echo "MIR_SYMBOLS_MAP_GENERATOR_CLANG_SO_PATH=/usr/lib/llvm-19/lib/libclang-19.so.1" >> $GITHUB_ENV + echo "MIR_SYMBOLS_MAP_GENERATOR_CLANG_LIBRARY_PATH=/usr/lib/llvm-19/lib" >> $GITHUB_ENV + sudo apt-get build-dep ./ + + - name: Configure + run: > + cmake -B build ${{ github.workspace }} + + - name: Check symbols + run: | + RET=0 + cmake --build build --target check-miral-symbols-map || RET=$? + cmake --build build --target check-miroil-symbols-map || RET=$? + exit $RET \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7e13d92ef42..7d9cc0491ff 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ cmake-* build benchmarks/build -tools/bot-data.tar.xz +tools/bot-data.tar.xz \ No newline at end of file diff --git a/doc/sphinx/.sphinx/build_requirements.py b/doc/sphinx/.sphinx/build_requirements.py index 0e610e8be79..084d6ea99e6 100644 --- a/doc/sphinx/.sphinx/build_requirements.py +++ b/doc/sphinx/.sphinx/build_requirements.py @@ -78,7 +78,7 @@ def DeduplicateExtensions(extensionNames: [str]): requirements = [ "furo", "pyspelling", - "sphinx==7.2.6", + "sphinx", "sphinx-autobuild", "sphinx-copybutton", "sphinx-design", diff --git a/src/miral/CMakeLists.txt b/src/miral/CMakeLists.txt index 80fa50b4721..ba2ca388952 100644 --- a/src/miral/CMakeLists.txt +++ b/src/miral/CMakeLists.txt @@ -142,6 +142,27 @@ add_custom_target(regenerate-miral-debian-symbols ${MIR_CHECK_MIRAL_SYMBOLS_DEFA WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" VERBATIM) +add_custom_target( + generate-miral-symbols-map + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py + --library-name miral + --version ${MIRAL_VERSION} + --symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" + --external-headers-directory="${PROJECT_SOURCE_DIR}/include/miral" + --include-dirs "$,:>" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + +add_custom_target( + check-miral-symbols-map + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py + --library-name miral + --version ${MIRAL_VERSION} + --symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" + --external-headers-directory="${PROJECT_SOURCE_DIR}/include/miral" + --include-dirs "$,:>" + --diff + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/miral.pc.in ${CMAKE_CURRENT_BINARY_DIR}/miral.pc @@ -153,12 +174,6 @@ configure_file( ${miral_include}/miral/version.h ) -if(TARGET doc) - add_custom_target(regenerate-miral-symbols-map - ${CMAKE_CURRENT_SOURCE_DIR}/regenerate-miral-symbols-map.py ${CMAKE_BINARY_DIR}/doc/sphinx/xml/*.xml > ${symbol_map} - DEPENDS doc) -endif() - install(TARGETS miral LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/miral DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/miral.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") diff --git a/src/miral/regenerate-miral-symbols-map.py b/src/miral/regenerate-miral-symbols-map.py deleted file mode 100755 index 3d2ecd9de17..00000000000 --- a/src/miral/regenerate-miral-symbols-map.py +++ /dev/null @@ -1,235 +0,0 @@ -#! /usr/bin/python3 -"""This script processes the XML generated by "make doc" and produces summary information -on symbols that libmiral intends to make public. - -To use: Go to your build folder and run "make regenerate-miral-symbols-map" """ - -from xml.dom import minidom -from sys import argv - -HELPTEXT = __doc__ -DEBUG = False - -def _get_text(node): - substrings = [] - for node in node.childNodes: - if node.nodeType == node.TEXT_NODE: - substrings.append(node.data) - elif node.nodeType == node.ELEMENT_NODE: - substrings.append(_get_text(node)) - return ''.join(substrings) - -def _get_text_for_element(parent, tagname): - substrings = [] - - for node in parent.getElementsByTagName(tagname): - substrings.append(_get_text(node)) - - return ''.join(substrings) - -def _get_file_location(node): - for node in node.childNodes: - if node.nodeType == node.ELEMENT_NODE and node.tagName == 'location': - return node.attributes['file'].value - if DEBUG: - print('no location in:', node) - return None - -def _has_element(node, tagname): - for node in node.childNodes: - if node.nodeType == node.ELEMENT_NODE and node.tagName in tagname: - return True - return False - -def _print_attribs(node, attribs): - for attrib in attribs: - print(' ', attrib, '=', node.attributes[attrib].value) - -def _concat_text_from_tags(parent, tagnames): - substrings = [] - - for tag in tagnames: - substrings.append(_get_text_for_element(parent, tag)) - - return ''.join(substrings) - -def _print_location(node): - print(' ', 'location', '=', _get_file_location(node)) - -def _get_attribs(node): - kind = node.attributes['kind'].value - static = node.attributes['static'].value - prot = node.attributes['prot'].value - return kind, static, prot - -COMPONENT_MAP = {} -SYMBOLS = {'public' : set(), 'private' : set()} - -def _report(publish, symbol): - symbol = symbol.replace('~', '?') - - if publish: - SYMBOLS['public'].add(symbol) - else: - SYMBOLS['private'].add(symbol) - - if not DEBUG: - return - - if publish: - print(' PUBLISH: {}'.format(symbol)) - else: - print('NOPUBLISH: {}'.format(symbol)) - -OLD_STANZAS = '''MIRAL_5.0 { -global:''' - -END_NEW_STANZA = '''local: *; -};''' - -def _print_report(): - print(OLD_STANZAS) - new_symbols = False; - for symbol in sorted(SYMBOLS['public']): - formatted_symbol = ' {};'.format(symbol) - if formatted_symbol not in OLD_STANZAS and 'miral::' in formatted_symbol: - if not new_symbols: - new_symbols = True; - print(' extern "C++" {') - print(formatted_symbol) - - if new_symbols: print(" };") - print(END_NEW_STANZA) - -def _print_debug_info(node, attributes): - if not DEBUG: - return - print() - _print_attribs(node, attributes) - _print_location(node) - -def _parse_member_def(context_name, node, is_class): - kind = node.attributes['kind'].value - - if (kind in ['enum', 'typedef'] - or _has_element(node, ['templateparamlist']) - or kind in ['function'] and node.attributes['inline'].value == 'yes'): - return - - name = _concat_text_from_tags(node, ['name']) - - if name in ['__attribute__']: - if DEBUG: - print(' ignoring doxygen mis-parsing:', _concat_text_from_tags(node, ['argsstring'])) - return - - if name.startswith('operator'): - name = 'operator' - - if not context_name is None: - symbol = context_name + '::' + name - else: - symbol = name - - is_function = kind == 'function' - - if is_function: - _print_debug_info(node, ['kind', 'prot', 'static', 'virt']) - else: - _print_debug_info(node, ['kind', 'prot', 'static']) - - if DEBUG: - print(' is_class:', is_class) - - publish = _should_publish(is_class, is_function, node) - - _report(publish, symbol + '*') - - if is_function and node.attributes['virt'].value == 'virtual': - _report(publish, 'non-virtual?thunk?to?' + symbol + '*') - - -def _should_publish(is_class, is_function, node): - (kind, static, prot) = _get_attribs(node) - - publish = True - - if publish: - publish = kind != 'define' - - if publish and is_class: - publish = is_function or static == 'yes' - - if publish and prot == 'private': - if is_function: - publish = node.attributes['virt'].value == 'virtual' - else: - publish = False - - if publish and _has_element(node, ['argsstring']): - publish = not _get_text_for_element(node, 'argsstring').endswith('=0') - - return publish - - -def _parse_compound_defs(xmldoc): - compounddefs = xmldoc.getElementsByTagName('compounddef') - for node in compounddefs: - kind = node.attributes['kind'].value - - if kind in ['page', 'file', 'example', 'union']: - continue - - if kind in ['group']: - for member in node.getElementsByTagName('memberdef'): - _parse_member_def(None, member, False) - continue - - if kind in ['namespace']: - symbol = _concat_text_from_tags(node, ['compoundname']) - for member in node.getElementsByTagName('memberdef'): - _parse_member_def(symbol, member, False) - continue - - filename = _get_file_location(node) - - if DEBUG: - print(' from file:', filename) - - if ('/examples/' in filename or '/test/' in filename or '[generated]' in filename - or '[STL]' in filename or _has_element(node, ['templateparamlist'])): - continue - - symbol = _concat_text_from_tags(node, ['compoundname']) - - publish = True - - if publish: - if kind in ['class', 'struct']: - prot = node.attributes['prot'].value - publish = prot != 'private' - _print_debug_info(node, ['kind', 'prot']) - _report(publish, 'vtable?for?' + symbol) - _report(publish, 'typeinfo?for?' + symbol) - - if publish: - for member in node.getElementsByTagName('memberdef'): - _parse_member_def(symbol, member, kind in ['class', 'struct']) - -if __name__ == "__main__": - if len(argv) == 1 or '-h' in argv or '--help' in argv: - print(HELPTEXT) - exit() - - for arg in argv[1:]: - try: - if DEBUG: - print('Processing:', arg) - _parse_compound_defs(minidom.parse(arg)) - except Exception as error: - print('Error:', arg, error) - - if DEBUG: - print('Processing complete') - - _print_report() diff --git a/src/miral/symbols.map b/src/miral/symbols.map index f588c74cb24..360b36cbdc0 100644 --- a/src/miral/symbols.map +++ b/src/miral/symbols.map @@ -64,9 +64,11 @@ global: miral::MinimalWindowManager::?MinimalWindowManager*; miral::MinimalWindowManager::MinimalWindowManager*; miral::MinimalWindowManager::advise_delete_app*; + miral::MinimalWindowManager::advise_delete_window*; miral::MinimalWindowManager::advise_focus_gained*; miral::MinimalWindowManager::advise_focus_lost*; miral::MinimalWindowManager::advise_new_app*; + miral::MinimalWindowManager::advise_new_window*; miral::MinimalWindowManager::begin_pointer_move*; miral::MinimalWindowManager::begin_pointer_resize*; miral::MinimalWindowManager::begin_touch_move*; @@ -82,8 +84,6 @@ global: miral::MinimalWindowManager::handle_touch_event*; miral::MinimalWindowManager::handle_window_ready*; miral::MinimalWindowManager::place_new_window*; - miral::MinimalWindowManager::advise_new_window*; - miral::MinimalWindowManager::advise_delete_window*; miral::MirRunner::?MirRunner*; miral::MirRunner::MirRunner*; miral::MirRunner::add_start_callback*; @@ -183,10 +183,10 @@ global: miral::WindowInfo::constrain_resize*; miral::WindowInfo::depth_layer*; miral::WindowInfo::exclusive_rect*; - miral::WindowInfo::ignore_exclusion_zones*; miral::WindowInfo::focus_mode*; miral::WindowInfo::has_output_id*; miral::WindowInfo::height_inc*; + miral::WindowInfo::ignore_exclusion_zones*; miral::WindowInfo::is_visible*; miral::WindowInfo::max_aspect*; miral::WindowInfo::max_height*; @@ -205,6 +205,7 @@ global: miral::WindowInfo::restore_rect*; miral::WindowInfo::shell_chrome*; miral::WindowInfo::state*; + miral::WindowInfo::swap*; miral::WindowInfo::type*; miral::WindowInfo::userdata*; miral::WindowInfo::visible_on_lock_screen*; @@ -242,6 +243,7 @@ global: miral::WindowManagerTools::active_window*; miral::WindowManagerTools::add_tree_to_workspace*; miral::WindowManagerTools::ask_client_to_close*; + miral::WindowManagerTools::can_select_window*; miral::WindowManagerTools::count_applications*; miral::WindowManagerTools::create_workspace*; miral::WindowManagerTools::drag_active_window*; @@ -269,7 +271,6 @@ global: miral::WindowManagerTools::swap_tree_order*; miral::WindowManagerTools::window_at*; miral::WindowManagerTools::window_to_select_application*; - miral::WindowManagerTools::can_select_window*; miral::WindowSpecification::?WindowSpecification*; miral::WindowSpecification::WindowSpecification*; miral::WindowSpecification::application_id*; @@ -280,9 +281,9 @@ global: miral::WindowSpecification::confine_pointer*; miral::WindowSpecification::depth_layer*; miral::WindowSpecification::exclusive_rect*; - miral::WindowSpecification::ignore_exclusion_zones*; miral::WindowSpecification::focus_mode*; miral::WindowSpecification::height_inc*; + miral::WindowSpecification::ignore_exclusion_zones*; miral::WindowSpecification::input_mode*; miral::WindowSpecification::input_shape*; miral::WindowSpecification::max_aspect*; @@ -364,10 +365,13 @@ global: non-virtual?thunk?to?miral::CanonicalWindowManagerPolicy::handle_window_ready*; non-virtual?thunk?to?miral::CanonicalWindowManagerPolicy::place_new_window*; non-virtual?thunk?to?miral::FdHandle::?FdHandle*; + non-virtual?thunk?to?miral::MinimalWindowManager::?MinimalWindowManager*; non-virtual?thunk?to?miral::MinimalWindowManager::advise_delete_app*; + non-virtual?thunk?to?miral::MinimalWindowManager::advise_delete_window*; non-virtual?thunk?to?miral::MinimalWindowManager::advise_focus_gained*; non-virtual?thunk?to?miral::MinimalWindowManager::advise_focus_lost*; non-virtual?thunk?to?miral::MinimalWindowManager::advise_new_app*; + non-virtual?thunk?to?miral::MinimalWindowManager::advise_new_window*; non-virtual?thunk?to?miral::MinimalWindowManager::confirm_inherited_move*; non-virtual?thunk?to?miral::MinimalWindowManager::confirm_placement_on_display*; non-virtual?thunk?to?miral::MinimalWindowManager::handle_keyboard_event*; @@ -379,8 +383,6 @@ global: non-virtual?thunk?to?miral::MinimalWindowManager::handle_touch_event*; non-virtual?thunk?to?miral::MinimalWindowManager::handle_window_ready*; non-virtual?thunk?to?miral::MinimalWindowManager::place_new_window*; - non-virtual?thunk?to?miral::MinimalWindowManager::advise_new_window*; - non-virtual?thunk?to?miral::MinimalWindowManager::advise_delete_window*; non-virtual?thunk?to?miral::WaylandExtensions::Context::?Context*; non-virtual?thunk?to?miral::WindowManagementPolicy::?WindowManagementPolicy*; non-virtual?thunk?to?miral::WindowManagementPolicy::advise_adding_to_workspace*; @@ -419,66 +421,35 @@ global: typeinfo?for?miral::Keymap; typeinfo?for?miral::MinimalWindowManager; typeinfo?for?miral::MirRunner; - typeinfo?for?miral::Output; typeinfo?for?miral::Output::PhysicalSizeMM; + typeinfo?for?miral::Output; typeinfo?for?miral::PrependEventFilter; typeinfo?for?miral::SessionLockListener; typeinfo?for?miral::SetCommandLineHandler; typeinfo?for?miral::SetTerminator; typeinfo?for?miral::SetWindowManagementPolicy; typeinfo?for?miral::StartupInternalClient; - typeinfo?for?miral::WaylandExtensions; typeinfo?for?miral::WaylandExtensions::Builder; typeinfo?for?miral::WaylandExtensions::Context; typeinfo?for?miral::WaylandExtensions::EnableInfo; + typeinfo?for?miral::WaylandExtensions; typeinfo?for?miral::Window; typeinfo?for?miral::WindowInfo; typeinfo?for?miral::WindowManagementPolicy; typeinfo?for?miral::WindowManagerOption; typeinfo?for?miral::WindowManagerOptions; typeinfo?for?miral::WindowManagerTools; - typeinfo?for?miral::WindowSpecification; typeinfo?for?miral::WindowSpecification::AspectRatio; + typeinfo?for?miral::WindowSpecification; typeinfo?for?miral::X11Support; typeinfo?for?miral::Zone; - vtable?for?miral::AddInitCallback; - vtable?for?miral::AppendEventFilter; vtable?for?miral::ApplicationAuthorizer; - vtable?for?miral::ApplicationCredentials; - vtable?for?miral::ApplicationInfo; - vtable?for?miral::BasicSetApplicationAuthorizer; vtable?for?miral::CanonicalWindowManagerPolicy; - vtable?for?miral::ConfigurationOption; - vtable?for?miral::CursorTheme; - vtable?for?miral::DisplayConfiguration; - vtable?for?miral::ExternalClientLauncher; vtable?for?miral::FdHandle; - vtable?for?miral::InternalClientLauncher; - vtable?for?miral::Keymap; vtable?for?miral::MinimalWindowManager; - vtable?for?miral::MirRunner; - vtable?for?miral::Output; - vtable?for?miral::Output::PhysicalSizeMM; - vtable?for?miral::PrependEventFilter; - vtable?for?miral::SessionLockListener; - vtable?for?miral::SetCommandLineHandler; - vtable?for?miral::SetTerminator; - vtable?for?miral::SetWindowManagementPolicy; - vtable?for?miral::StartupInternalClient; - vtable?for?miral::WaylandExtensions; - vtable?for?miral::WaylandExtensions::Builder; vtable?for?miral::WaylandExtensions::Context; - vtable?for?miral::WaylandExtensions::EnableInfo; - vtable?for?miral::Window; - vtable?for?miral::WindowInfo; vtable?for?miral::WindowManagementPolicy; - vtable?for?miral::WindowManagerOption; - vtable?for?miral::WindowManagerOptions; - vtable?for?miral::WindowManagerTools; - vtable?for?miral::WindowSpecification; - vtable?for?miral::WindowSpecification::AspectRatio; - vtable?for?miral::X11Support; - vtable?for?miral::Zone; }; local: *; -}; \ No newline at end of file +}; + diff --git a/src/miroil/CMakeLists.txt b/src/miroil/CMakeLists.txt index de73650218b..0eddd20d42a 100644 --- a/src/miroil/CMakeLists.txt +++ b/src/miroil/CMakeLists.txt @@ -89,6 +89,27 @@ if(TARGET doc) DEPENDS doc) endif() +add_custom_target( + generate-miroil-symbols-map + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py + --library-name miroil + --version ${MIROIL_VERSION} + --symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" + --external-headers-directory="${PROJECT_SOURCE_DIR}/include/miroil" + --include-dirs "$,:>" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + +add_custom_target( + check-miroil-symbols-map + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py + --library-name miroil + --version ${MIROIL_VERSION} + --symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" + --external-headers-directory="${PROJECT_SOURCE_DIR}/include/miroil" + --include-dirs "$,:>" + --diff + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + install(TARGETS miroil LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/miroil DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/miroil.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") diff --git a/src/miroil/regenerate-miroil-symbols-map.py b/src/miroil/regenerate-miroil-symbols-map.py deleted file mode 100755 index 340b6012a08..00000000000 --- a/src/miroil/regenerate-miroil-symbols-map.py +++ /dev/null @@ -1,236 +0,0 @@ -#! /usr/bin/python3 -"""This script processes the XML generated by "make doc" and produces summary information -on symbols that libmiroil intends to make public. - -To use: Go to your build folder and run "make regenerate-miroil-symbols-map" """ - -from xml.dom import minidom -from sys import argv - -HELPTEXT = __doc__ -DEBUG = False - -def _get_text(node): - substrings = [] - for node in node.childNodes: - if node.nodeType == node.TEXT_NODE: - substrings.append(node.data) - elif node.nodeType == node.ELEMENT_NODE: - substrings.append(_get_text(node)) - return ''.join(substrings) - -def _get_text_for_element(parent, tagname): - substrings = [] - - for node in parent.getElementsByTagName(tagname): - substrings.append(_get_text(node)) - - return ''.join(substrings) - -def _get_file_location(node): - for node in node.childNodes: - if node.nodeType == node.ELEMENT_NODE and node.tagName == 'location': - return node.attributes['file'].value - if DEBUG: - print('no location in:', node) - return None - -def _has_element(node, tagname): - for node in node.childNodes: - if node.nodeType == node.ELEMENT_NODE and node.tagName in tagname: - return True - return False - -def _print_attribs(node, attribs): - for attrib in attribs: - print(' ', attrib, '=', node.attributes[attrib].value) - -def _concat_text_from_tags(parent, tagnames): - substrings = [] - - for tag in tagnames: - substrings.append(_get_text_for_element(parent, tag)) - - return ''.join(substrings) - -def _print_location(node): - print(' ', 'location', '=', _get_file_location(node)) - -def _get_attribs(node): - kind = node.attributes['kind'].value - static = node.attributes['static'].value - prot = node.attributes['prot'].value - return kind, static, prot - -COMPONENT_MAP = {} -SYMBOLS = {'public' : set(), 'private' : set()} - -def _report(publish, symbol): - symbol = symbol.replace('~', '?') - - if publish: - SYMBOLS['public'].add(symbol) - else: - SYMBOLS['private'].add(symbol) - - if not DEBUG: - return - - if publish: - print(' PUBLISH: {}'.format(symbol)) - else: - print('NOPUBLISH: {}'.format(symbol)) - -OLD_STANZAS = '''MIROIL_5.0 { -global:''' - -END_NEW_STANZA = ''' -local: *; -};''' - -def _print_report(): - print(OLD_STANZAS) - new_symbols = False; - for symbol in sorted(SYMBOLS['public']): - formatted_symbol = ' {};'.format(symbol) - if formatted_symbol not in OLD_STANZAS and 'miroil::' in formatted_symbol: - if not new_symbols: - new_symbols = True; - print(' extern "C++" {') - print(formatted_symbol) - - if new_symbols: print(" };") - print(END_NEW_STANZA) - -def _print_debug_info(node, attributes): - if not DEBUG: - return - print() - _print_attribs(node, attributes) - _print_location(node) - -def _parse_member_def(context_name, node, is_class): - kind = node.attributes['kind'].value - - if (kind in ['enum', 'typedef'] - or _has_element(node, ['templateparamlist']) - or kind in ['function'] and node.attributes['inline'].value == 'yes'): - return - - name = _concat_text_from_tags(node, ['name']) - - if name in ['__attribute__']: - if DEBUG: - print(' ignoring doxygen mis-parsing:', _concat_text_from_tags(node, ['argsstring'])) - return - - if name.startswith('operator'): - name = 'operator' - - if not context_name is None: - symbol = context_name + '::' + name - else: - symbol = name - - is_function = kind == 'function' - - if is_function: - _print_debug_info(node, ['kind', 'prot', 'static', 'virt']) - else: - _print_debug_info(node, ['kind', 'prot', 'static']) - - if DEBUG: - print(' is_class:', is_class) - - publish = _should_publish(is_class, is_function, node) - - _report(publish, symbol + '*') - - if is_function and node.attributes['virt'].value == 'virtual': - _report(publish, 'non-virtual?thunk?to?' + symbol + '*') - - -def _should_publish(is_class, is_function, node): - (kind, static, prot) = _get_attribs(node) - - publish = True - - if publish: - publish = kind != 'define' - - if publish and is_class: - publish = is_function or static == 'yes' - - if publish and prot == 'private': - if is_function: - publish = node.attributes['virt'].value == 'virtual' - else: - publish = False - - if publish and _has_element(node, ['argsstring']): - publish = not _get_text_for_element(node, 'argsstring').endswith('=0') - - return publish - - -def _parse_compound_defs(xmldoc): - compounddefs = xmldoc.getElementsByTagName('compounddef') - for node in compounddefs: - kind = node.attributes['kind'].value - - if kind in ['page', 'file', 'example', 'union']: - continue - - if kind in ['group']: - for member in node.getElementsByTagName('memberdef'): - _parse_member_def(None, member, False) - continue - - if kind in ['namespace']: - symbol = _concat_text_from_tags(node, ['compoundname']) - for member in node.getElementsByTagName('memberdef'): - _parse_member_def(symbol, member, False) - continue - - filename = _get_file_location(node) - - if DEBUG: - print(' from file:', filename) - - if ('/examples/' in filename or '/test/' in filename or '[generated]' in filename - or '[STL]' in filename or _has_element(node, ['templateparamlist'])): - continue - - symbol = _concat_text_from_tags(node, ['compoundname']) - - publish = True - - if publish: - if kind in ['class', 'struct']: - prot = node.attributes['prot'].value - publish = prot != 'private' - _print_debug_info(node, ['kind', 'prot']) - _report(publish, 'vtable?for?' + symbol) - _report(publish, 'typeinfo?for?' + symbol) - - if publish: - for member in node.getElementsByTagName('memberdef'): - _parse_member_def(symbol, member, kind in ['class', 'struct']) - -if __name__ == "__main__": - if len(argv) == 1 or '-h' in argv or '--help' in argv: - print(HELPTEXT) - exit() - - for arg in argv[1:]: - try: - if DEBUG: - print('Processing:', arg) - _parse_compound_defs(minidom.parse(arg)) - except Exception as error: - print('Error:', arg, error) - - if DEBUG: - print('Processing complete') - - _print_report() diff --git a/src/miroil/symbols.map b/src/miroil/symbols.map index 72234b38ad2..d1098dd8372 100644 --- a/src/miroil/symbols.map +++ b/src/miroil/symbols.map @@ -104,17 +104,17 @@ global: non-virtual?thunk?to?miroil::SurfaceObserver::?SurfaceObserver*; typeinfo?for?miroil::Compositor; typeinfo?for?miroil::DisplayConfigurationControllerWrapper; - typeinfo?for?miroil::DisplayConfigurationOptions; typeinfo?for?miroil::DisplayConfigurationOptions::DisplayMode; + typeinfo?for?miroil::DisplayConfigurationOptions; typeinfo?for?miroil::DisplayConfigurationPolicy; typeinfo?for?miroil::DisplayConfigurationStorage; typeinfo?for?miroil::DisplayId; typeinfo?for?miroil::DisplayListenerWrapper; - typeinfo?for?miroil::Edid; typeinfo?for?miroil::Edid::Descriptor; typeinfo?for?miroil::Edid::PhysicalSizeMM; - typeinfo?for?miroil::EventBuilder; + typeinfo?for?miroil::Edid; typeinfo?for?miroil::EventBuilder::EventInfo; + typeinfo?for?miroil::EventBuilder; typeinfo?for?miroil::GLBuffer; typeinfo?for?miroil::InputDevice; typeinfo?for?miroil::InputDeviceObserver; @@ -128,31 +128,13 @@ global: typeinfo?for?miroil::Surface; typeinfo?for?miroil::SurfaceObserver; vtable?for?miroil::Compositor; - vtable?for?miroil::DisplayConfigurationControllerWrapper; - vtable?for?miroil::DisplayConfigurationOptions; - vtable?for?miroil::DisplayConfigurationOptions::DisplayMode; vtable?for?miroil::DisplayConfigurationPolicy; vtable?for?miroil::DisplayConfigurationStorage; - vtable?for?miroil::DisplayId; - vtable?for?miroil::DisplayListenerWrapper; - vtable?for?miroil::Edid; - vtable?for?miroil::Edid::Descriptor; - vtable?for?miroil::Edid::PhysicalSizeMM; vtable?for?miroil::EventBuilder; - vtable?for?miroil::EventBuilder::EventInfo; - vtable?for?miroil::GLBuffer; - vtable?for?miroil::InputDevice; vtable?for?miroil::InputDeviceObserver; - vtable?for?miroil::MirPromptSession; - vtable?for?miroil::MirServerHooks; - vtable?for?miroil::OpenGLContext; - vtable?for?miroil::PersistDisplayConfig; vtable?for?miroil::PromptSessionListener; - vtable?for?miroil::PromptSessionManager; - vtable?for?miroil::SetCompositor; - vtable?for?miroil::Surface; vtable?for?miroil::SurfaceObserver; }; - local: *; }; + diff --git a/tools/symbols_map_generator/README.md b/tools/symbols_map_generator/README.md new file mode 100644 index 00000000000..9947b978c6f --- /dev/null +++ b/tools/symbols_map_generator/README.md @@ -0,0 +1,26 @@ +# Symbols Map Generator +This tool parses the header files of a library in the Mir project to extract symbols. +These symbols are outputted to a corresponding `symbols.map` file by default. If the `--diff` +option is provided, then the added and removed symbols will be printed to `stdout`. + +## Usage +It is recommended that the script be run from a python venv: +```sh +python -m venv venv +source venv/bin/activate +pip install -r requirements.txt +``` + +The following will output the introduced symbols to `stdout` for version 5.0 of the `miral` library: +```sh +./main.py --library miral --version 5.0 --diff +``` + +The following will write the introduced symbols to `src/miral/symbols.map` for version 5.0 of the `miral` library: +```sh +./main.py --library miral --version 5.0 --output_symbols +``` + +## Requirements +- `libclang-dev` +- `pip install libclang` diff --git a/tools/symbols_map_generator/main.py b/tools/symbols_map_generator/main.py new file mode 100755 index 00000000000..f48ad6fadff --- /dev/null +++ b/tools/symbols_map_generator/main.py @@ -0,0 +1,516 @@ +#!/usr/bin/env python3 + +# Copyright © Canonical Ltd. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 or 3 +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import logging +import argparse +from pathlib import Path +from typing import TypedDict, Optional +from collections import OrderedDict +import bisect +import clang.cindex +import os + +_logger = logging.getLogger(__name__) + + +class HeaderDirectory(TypedDict): + path: str + is_internal: bool + + +class LibraryInfo(TypedDict): + header_directories: list[HeaderDirectory] + map_file: str + + +class Symbol: + name: str + version: str + is_c_symbol: bool + + def __init__(self, name: str, version: str, is_c_symbol: bool): + self.name = name + self.version = version + self.is_c_symbol = is_c_symbol + + def is_internal(self) -> bool: + return self.version.startswith("INTERNAL_") + + + +def should_generate_as_class_or_struct(node: clang.cindex.Cursor): + return ((node.kind == clang.cindex.CursorKind.CLASS_DECL + or node.kind == clang.cindex.CursorKind.STRUCT_DECL) + and node.is_definition()) + + +def is_operator(node: clang.cindex.Cursor) -> bool: + if node.spelling.startswith("operator"): + remainder = node.spelling[len("operator"):] + if any(not c.isalnum() for c in remainder): + return True + + return False + + +def create_node_symbol_name(node: clang.cindex.Cursor) -> str: + if is_operator(node): + return "operator" + elif node.kind == clang.cindex.CursorKind.DESTRUCTOR: + return f"?{node.spelling[1:]}" + else: + return node.spelling + + +def has_vtable(node: clang.cindex.Cursor): + # This method assumes that the node is a class/struct + for child in node.get_children(): + if ((child.kind == clang.cindex.CursorKind.CXX_METHOD + or child.kind == clang.cindex.CursorKind.DESTRUCTOR + or child.kind == clang.cindex.CursorKind.CONSTRUCTOR + or child.kind == clang.cindex.CursorKind.CONVERSION_FUNCTION) + and child.is_virtual_method()): + return True + + # Otherwise, look up the tree + base_classes: list[clang.cindex.Cursor] = [] + for child in node.semantic_parent.get_children(): + if child.kind != clang.cindex.CursorKind.CXX_BASE_SPECIFIER: + continue + + class_or_struct_node = clang.cindex.conf.lib.clang_getCursorDefinition(child) + if class_or_struct_node is None: + continue + + base_classes.append(class_or_struct_node) + + for base in base_classes: + if has_vtable(base): + return True + + return False + + +def is_function_inline(node: clang.cindex.CursorKind): + # This method assumes that the node is a FUNCTION_DECL. + # There is no explicit way to check if a function is inlined + # but seeing that if it is a FUNCTION_DECL and it has + # a definition is good enough. + return node.is_definition() + + +def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str], current_namespace: str = "") -> set[str]: + # Ignore private and protected variables + if (node.access_specifier == clang.cindex.AccessSpecifier.PRIVATE): + return result + + # Check if we need to output a symbol + if ((node.location.file is not None and node.location.file.name == filename) + and ((node.kind == clang.cindex.CursorKind.FUNCTION_DECL and not is_function_inline(node)) + or node.kind == clang.cindex.CursorKind.CXX_METHOD + or node.kind == clang.cindex.CursorKind.VAR_DECL + or node.kind == clang.cindex.CursorKind.CONSTRUCTOR + or node.kind == clang.cindex.CursorKind.DESTRUCTOR + or node.kind == clang.cindex.CursorKind.CONVERSION_FUNCTION + or should_generate_as_class_or_struct(node)) + and not node.is_pure_virtual_method() + and not node.is_anonymous()): + + if current_namespace: + namespace_str = f"{current_namespace}::{create_node_symbol_name(node)}" + else: + namespace_str = create_node_symbol_name(node) + + _logger.debug(f"Emitting node {namespace_str} in file {node.location.file.name}") + + # Classes and structs have a specific output + if (node.kind == clang.cindex.CursorKind.CLASS_DECL + or node.kind == clang.cindex.CursorKind.STRUCT_DECL): + if has_vtable(node): + result.add(f"vtable?for?{namespace_str};") + result.add(f"typeinfo?for?{namespace_str};") + else: + def add_internal(s: str): + result.add(f"{s}*;") + add_internal(namespace_str) + + # Check if we're marked virtual + is_virtual = False + if ((node.kind == clang.cindex.CursorKind.CXX_METHOD + or node.kind == clang.cindex.CursorKind.DESTRUCTOR + or node.kind == clang.cindex.CursorKind.CONSTRUCTOR + or node.kind == clang.cindex.CursorKind.CONVERSION_FUNCTION) + and node.is_virtual_method()): + add_internal(f"non-virtual?thunk?to?{namespace_str}") + is_virtual = True + else: + # Check if we're marked override + for child in node.get_children(): + if child.kind == clang.cindex.CursorKind.CXX_OVERRIDE_ATTR: + add_internal(f"non-virtual?thunk?to?{namespace_str}") + is_virtual = True + break + + # If this is a virtual/override, then we iterate the virtual base + # classes.. If we find find the provided method in those classes + # we need to generate a a virtual?thunk?to? for the method/constructor/deconstructor. + if is_virtual: + def search_class_hierarchy_for_virtual_thunk(derived: clang.cindex.Cursor): + assert (derived.kind == clang.cindex.CursorKind.CLASS_DECL + or derived.kind == clang.cindex.CursorKind.STRUCT_DECL + or derived.kind == clang.cindex.CursorKind.CLASS_TEMPLATE) + + # Find the base classes for the derived class + base_classes: list[clang.cindex.Cursor] = [] + for child in derived.get_children(): + if child.kind != clang.cindex.CursorKind.CXX_BASE_SPECIFIER: + continue + + class_or_struct_node = clang.cindex.conf.lib.clang_getCursorDefinition(child) + if class_or_struct_node is None: + continue + + base_classes.append(class_or_struct_node) + if not clang.cindex.conf.lib.clang_isVirtualBase(child): + continue + + # Search the immediate base classes for the function name + for other_child in class_or_struct_node.get_children(): + if (other_child.displayname == node.displayname): + add_internal(f"virtual?thunk?to?{namespace_str}") + return True + + # Looks like it wasn't in any of our direct ancestors, so let's + # try their ancestors too + for base in base_classes: + if search_class_hierarchy_for_virtual_thunk(base): + return True + + return False + + search_class_hierarchy_for_virtual_thunk(node.semantic_parent) + elif node.location.file is not None: + _logger.debug(f"NOT emitting node {node.spelling} in file {node.location.file.name}") + + + # Traverse down the tree if we can + is_file = node.kind == clang.cindex.CursorKind.TRANSLATION_UNIT + is_containing_node = (node.kind == clang.cindex.CursorKind.CLASS_DECL + or node.kind == clang.cindex.CursorKind.STRUCT_DECL + or node.kind == clang.cindex.CursorKind.NAMESPACE) + if is_file or is_containing_node: + if clang.cindex.conf.lib.clang_Location_isInSystemHeader(node.location): + _logger.debug(f"Node is in a system header={node.location.file.name}") + return result + + if node.kind != clang.cindex.CursorKind.TRANSLATION_UNIT: + if not current_namespace: + current_namespace = node.spelling + else: + current_namespace = f"{current_namespace}::{node.spelling}" + + for child in node.get_children(): + traverse_ast(child, filename, result, current_namespace) + else: + _logger.debug(f"Nothing to process for node={node.spelling} in file={node.location.file.name}") + + return result + + +def process_directory(directory: Path, search_dirs: Optional[list[str]]) -> set[str]: + result = set() + + files = directory.rglob('*.h') + + args = ['-std=c++23', '-x', 'c++-header'] + for dir in search_dirs: + args.append(f"-I{dir}") + + for file in files: + _logger.debug(f"Processing header file: {file.as_posix()}") + file_args = args.copy() + idx = clang.cindex.Index.create() + tu = idx.parse( + file.as_posix(), + args=file_args, + options=0) + root = tu.cursor + list(traverse_ast(root, file.as_posix(), result)) + + return result + + +def read_symbols_from_file(f: argparse.FileType, library_name: str) -> list[Symbol]: + """ + Returns a list of symbols for each stanza in the symbols.map file. + The returned list is ordered by version. + """ + # WARNING: This is a very naive way to parse these files + library_name = library_name.upper() + "_" + retval: list[Symbol] = [] + version_str = None + + for line in f.readlines(): + if line.startswith(library_name): + # This denotes that a new version + version_str = line[len(library_name):].split()[0] + elif line.startswith(" "): + line = line.strip() + assert line.endswith(';') + retval.append(Symbol(line, version_str, False)) + elif line.startswith(" "): + line = line.strip() + if line.startswith("global:") or line.startswith("local:") or line == 'extern "C++" {' or line.startswith("}"): + continue + + # This is a c-symbol + assert line.endswith(';') + retval.append(Symbol(line, version_str, True)) + return retval + + +def get_added_symbols(previous_symbols: list[Symbol], new_symbols: set[str], is_internal: bool) -> list[str]: + added_symbols: set[str] = new_symbols.copy() + for symbol in previous_symbols: + if (symbol.name in added_symbols) or (is_internal != symbol.is_internal and symbol.name in added_symbols): + added_symbols.remove(symbol.name) + added_symbols = list(added_symbols) + added_symbols.sort() + return added_symbols + + +def report_symbols_diff(previous_symbols: list[Symbol], new_symbols: set[str], is_internal: bool): + """ + Prints the diff between the previous symbols and the new symbols. + """ + added_symbols = get_added_symbols(previous_symbols, new_symbols, is_internal) + + print("") + print(" \033[1mNew Symbols 🟢🟢🟢\033[0m") + for s in added_symbols: + print(f"\033[92m {s}\033[0m") + + # Deleted symbols + deleted_symbols = set() + for symbol in previous_symbols: + if is_internal == symbol.is_internal and not symbol.name in new_symbols: + deleted_symbols.add(symbol.name) + deleted_symbols = deleted_symbols - new_symbols + deleted_symbols = list(deleted_symbols) + deleted_symbols.sort() + + print("") + print(" \033[1mDeleted Symbols 🔻🔻🔻\033[0m") + for s in deleted_symbols: + print(f"\033[91m {s}\033[0m") + + return len(deleted_symbols) > 0 or len(added_symbols) > 0 + + +def main(): + parser = argparse.ArgumentParser(description="This tool parses the header files of a provided in the Mir project " + "and process a list of new internal and external symbols. " + "By default, the script updates the corresponding symbols.map file automatically. " + "To view this diff only, the user may provide the --diff option. " + "The tool uses https://pypi.org/project/libclang/ to process " + "the AST of the project's header files.\n\nIf the content of the outputted map " + "file appears incorrect, trying using a later version of clang (e.g. clang 19). You can do this " + "by specifying 'MIR_SYMBOLS_MAP_GENERATOR_CLANG_SO_PATH' along with 'MIR_SYMBOLS_MAP_GENERATOR_CLANG_LIBRARY_PATH'. " + "Note that you most likely must set both of these values so that libLLVM-XY.so can be resolved alongside clang. " + "As an example, I used this script (https://github.com/opencollab/llvm-jenkins.debian.net/blob/master/llvm.sh) " + "to install clang 19 (sudo ./llvm.sh 19), and I set the following:" + "\n\n export MIR_SYMBOLS_MAP_GENERATOR_CLANG_SO_PATH=/usr/lib/llvm-19/lib/libclang.so.1" + "\n export MIR_SYMBOLS_MAP_GENERATOR_CLANG_LIBRARY_PATH=/usr/lib/llvm-19/lib" + , formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument('--library-name', type=str, + help='name of library', + dest="library_name", + required=True) + parser.add_argument('--symbols-map-path', type=argparse.FileType('r+', encoding='latin-1'), + help='absolute path to a symbols map', + dest="symbols_map_path", + required=True) + parser.add_argument('--external-headers-directory', type=Path, + help=f'absolute path to the directory containing the public-facing headers of this library', + dest="external_headers") + parser.add_argument('--internal-headers-directory', type=Path, + help=f'absolute path to the directory containing private headers of this library', + dest="internal_headers") + parser.add_argument('--version', type=str, + help='current version of the library', + required=True) + parser.add_argument('--diff', action='store_true', + help='if true a diff should be output to the console') + parser.add_argument('--include-dirs', type=str, help="colon separated list of directories to search for symbols", + required=True, dest='include_dirs') + + args = parser.parse_args() + logging.basicConfig(level=logging.INFO) + + if args.diff: + _logger.info("symbols_map_generator is running in 'diff' mode") + else: + _logger.info("symbols_map_generator is running in 'output symbols' mode") + + # Point libclang to a file on the system + if 'MIR_SYMBOLS_MAP_GENERATOR_CLANG_SO_PATH' in os.environ: + file_path = os.environ['MIR_SYMBOLS_MAP_GENERATOR_CLANG_SO_PATH'] + _logger.info(f"MIR_SYMBOLS_MAP_GENERATOR_CLANG_SO_PATH is {file_path}") + clang.cindex.Config.set_library_file(file_path) + else: + _logger.error("Expected MIR_SYMBOLS_MAP_GENERATOR_CLANG_SO_PATH to be defined in the environment") + exit(1) + + if 'MIR_SYMBOLS_MAP_GENERATOR_CLANG_LIBRARY_PATH' in os.environ: + library_path = os.environ['MIR_SYMBOLS_MAP_GENERATOR_CLANG_LIBRARY_PATH'] + _logger.info(f"MIR_SYMBOLS_MAP_GENERATOR_CLANG_LIBRARY_PATH is {library_path}") + clang.cindex.Config.set_library_path(library_path) + else: + _logger.error("Expected MIR_SYMBOLS_MAP_GENERATOR_CLANG_LIBRARY_PATH to be defined in the environment") + exit(1) + + include_dirs = args.include_dirs.split(":") + _logger.debug(f"Parsing with include directories: {include_dirs}") + + library = args.library_name + version = args.version + + # Remove the patch version since we're not interested in it + split_version = version.split('.') + if len(split_version) == 3: + version = f"{split_version[0]}.{split_version[1]}" + + _logger.info(f"Symbols map generation is beginning for library={library} with version={version}") + + # Create a set that includes all of the available symbols + external_symbols: set[str] = set() + if args.external_headers: + _logger.info(f"Processing external headers directory: {args.external_headers}") + external_symbols: set[str] = process_directory( + args.external_headers, + include_dirs + ) + + internal_symbols: set[str] = set() + if args.internal_headers: + _logger.info(f"Processing internal headers directory: {args.internal_headers}") + internal_symbols: set[str] = process_directory( + args.internal_headers, + include_dirs + ) + + previous_symbols = read_symbols_from_file(args.symbols_map_path, library) + + has_changed_symbols = False + if args.diff: + print("External Symbols Diff:") + has_changed_symbols = report_symbols_diff(previous_symbols, external_symbols, False) + + print("") + print("Internal Symbols Diff:") + has_changed_symbols = has_changed_symbols or report_symbols_diff(previous_symbols, internal_symbols, True) + print("") + if has_changed_symbols: + exit(1) + else: + _logger.info(f"Outputting the symbols file to: {args.symbols_map_path.name}") + + # We now have a list of new external and internal symbols. Our goal now is to add them to the correct stanzas + new_external_symbols = get_added_symbols(previous_symbols, external_symbols, False) + new_internal_symbols = get_added_symbols(previous_symbols, internal_symbols, True) + + next_version = f"{library.upper()}_{version}" + next_internal_version = f"{library.upper()}_INTERNAL_{version}" + data_to_output: OrderedDict[str, dict[str, list[str]]] = OrderedDict() + + # Remake the stanzas for the previous symbols + for symbol in previous_symbols: + version = f"{library.upper()}_{symbol.version}" + if not version in data_to_output: + data_to_output[version] = { + "c": [], + "c++": [] + } + if symbol.is_c_symbol: + bisect.insort(data_to_output[version]["c"], symbol.name) + else: + bisect.insort(data_to_output[version]["c++"], symbol.name) + + # Add the external symbols + for symbol in new_external_symbols: + if not next_version in data_to_output: + data_to_output[next_version] = { + "c": [], + "c++": [] + } + bisect.insort(data_to_output[next_version]["c++"], symbol) + + # Add the internal symbols + for symbol in new_internal_symbols: + if not next_internal_version in data_to_output: + data_to_output[next_internal_version] = { + "c": [], + "c++": [] + } + bisect.insort(data_to_output[next_internal_version]["c++"], symbol) + + # Finally, output them to the file + f = args.symbols_map_path + f.seek(0) + prev_internal_version_str = None + prev_external_version_str = None + for i, (version, symbols_dict) in enumerate(data_to_output.items()): + # Only the first stanza should contain the local symbols + if i == 0: + closing_line = "local: *;\n" + else: + closing_line = "" + + # Add the correct previous version. This will depend on + is_internal = "_INTERNAL_" in version + if is_internal: + if prev_internal_version_str is not None: + closing_line += "} " + prev_internal_version_str + ";" + else: + closing_line += "};" + prev_internal_version_str = version + else: + if prev_external_version_str is not None: + closing_line += "} " + prev_external_version_str + ";" + else: + closing_line += "};" + prev_external_version_str = version + + if not symbols_dict["c"]: + c_symbols_str = "" + else: + c_symbols_str = "\n " + "\n ".join(symbols_dict["c"]) + "\n" + cpp_symbols_str = "\n ".join(symbols_dict["c++"]) + output_str = f'''{version} {"{"} +global:{c_symbols_str} + extern "C++" {"{"} + {cpp_symbols_str} + {'};'} +{closing_line} + +''' + + f.write(output_str) + + f.truncate() + +if __name__ == "__main__": + main() From 359aef26aed1322530284992367da9117f061fde Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Tue, 23 Apr 2024 09:18:05 -0400 Subject: [PATCH 11/29] feature: generating miral and miroil symbols using a new scriptg --- CMakeLists.txt | 4 +- debian/control | 20 + debian/libmirserver-internal-dev.install | 2 + .../mir/input/legacy_input_dispatchable.h | 36 - .../server/mir/shell/surface_ready_observer.h | 0 src/server/CMakeLists.txt | 29 + src/server/mirserver-internal.pc.in | 8 + src/server/symbols.map | 683 +++++++++++++++++- 8 files changed, 728 insertions(+), 54 deletions(-) create mode 100644 debian/libmirserver-internal-dev.install delete mode 100644 src/include/server/mir/input/legacy_input_dispatchable.h delete mode 100644 src/include/server/mir/shell/surface_ready_observer.h create mode 100644 src/server/mirserver-internal.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index dbb579c6071..bf431169c6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(MIR_VERSION_MAJOR 2) -set(MIR_VERSION_MINOR 16) -set(MIR_VERSION_PATCH 4) +set(MIR_VERSION_MINOR 17) +set(MIR_VERSION_PATCH 0) add_compile_definitions(MIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) add_compile_definitions(MIR_VERSION_MINOR=${MIR_VERSION_MINOR}) diff --git a/debian/control b/debian/control index 1f68270160a..f8105459b47 100644 --- a/debian/control +++ b/debian/control @@ -154,6 +154,26 @@ Description: Display server for Ubuntu - development headers . Contains header files required to build Mir servers. +Package: libmirserver-internal-dev +Section: libdevel +Architecture: linux-any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: libmirserver60 (= ${binary:Version}), + libmirplatform-dev (= ${binary:Version}), + libmircommon-dev (= ${binary:Version}), + libmircore-dev (= ${binary:Version}), + libmirserver-dev (= ${binary:Version}), + libglm-dev, + uuid-dev, + ${misc:Depends}, +Description: Display server for Ubuntu - internal development headers + Mir is a display server running on linux systems, with a focus on efficiency, + robust operation and a well-defined driver model. + . + This package contains internal headers with no stability guarantee, for servers + that wish to use functionality for which no public API exists yet. + Package: mirtest-dev Section: libdevel Architecture: linux-any diff --git a/debian/libmirserver-internal-dev.install b/debian/libmirserver-internal-dev.install new file mode 100644 index 00000000000..9562ee20be4 --- /dev/null +++ b/debian/libmirserver-internal-dev.install @@ -0,0 +1,2 @@ +usr/include/mirserver-internal +usr/lib/*/pkgconfig/mirserver-internal.pc \ No newline at end of file diff --git a/src/include/server/mir/input/legacy_input_dispatchable.h b/src/include/server/mir/input/legacy_input_dispatchable.h deleted file mode 100644 index 589920a3fe8..00000000000 --- a/src/include/server/mir/input/legacy_input_dispatchable.h +++ /dev/null @@ -1,36 +0,0 @@ - /* - * Copyright © Canonical Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 or 3 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef MIR_INPUT_LEGACY_INPUT_DISPATCHABLE_H_ -#define MIR_INPUT_LEGACY_INPUT_DISPATCHABLE_H_ - -#include "mir/dispatch/dispatchable.h" - -namespace mir -{ -namespace input -{ - -struct LegacyInputDispatchable : mir::dispatch::Dispatchable -{ - virtual void start() = 0; -}; - -} -} - -#endif - diff --git a/src/include/server/mir/shell/surface_ready_observer.h b/src/include/server/mir/shell/surface_ready_observer.h deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index a3b10a80b26..1d3f4a4f7c6 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -36,6 +36,12 @@ configure_file( @ONLY ) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/mirserver-internal.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/mirserver-internal.pc + @ONLY +) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${PROJECT_SOURCE_DIR}/include/server/mir/version.h @@ -154,6 +160,9 @@ install(DIRECTORY install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/server/mir DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/mirserver" ) +install(DIRECTORY + ${CMAKE_SOURCE_DIR}/src/include/server/mir DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/mirserver-internal" +) set(MIRSERVER_ABI 60) # Be sure to increment MIR_VERSION_MINOR at the same time set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) @@ -170,3 +179,23 @@ set_target_properties( install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mirserver.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mirserver-internal.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) + +add_custom_target( + generate-mirserver-symbols-map + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/run.sh + --library-name mir_server + --version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR} + --symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" + --internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/server" + --include_dirs "$,:>" + --output_symbols + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + +add_custom_target(regenerate-mirserver-internal-debian-symbols + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/run.sh --library mir_server_internal --version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR} --output_symbols + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" + VERBATIM) diff --git a/src/server/mirserver-internal.pc.in b/src/server/mirserver-internal.pc.in new file mode 100644 index 00000000000..03c1247756f --- /dev/null +++ b/src/server/mirserver-internal.pc.in @@ -0,0 +1,8 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@PKGCONFIG_INCLUDEDIR@/mirserver-internal + +Name: mirserver-internal +Description: Mir server internal headers +Version: @MIR_VERSION@ +Requires: mirserver mircommon mirplatform mircore +Cflags: -I${includedir} diff --git a/src/server/symbols.map b/src/server/symbols.map index b01b6abec4a..cfa97e20595 100644 --- a/src/server/symbols.map +++ b/src/server/symbols.map @@ -1,10 +1,16 @@ -MIR_SERVER_2.17 { - global: +MIR_SERVER_INTERNAL_2.17 { +global: extern "C++" { + "mir::DefaultServerConfiguration::the_drag_icon_controller()"; + "mir::DefaultServerConfiguration::the_pointer_input_dispatcher()"; VTT?for?mir::DefaultServerConfiguration; VTT?for?mir::scene::ApplicationNotRespondingDetectorWrapper; VTT?for?mir::shell::ShellWrapper; VTT?for?mir::shell::SystemCompositorWindowManager; + mir::BasicCallback::BasicCallback*; + mir::BasicCallback::lock*; + mir::BasicCallback::operator*; + mir::BasicCallback::unlock*; mir::DefaultServerConfiguration::DefaultServerConfiguration*; mir::DefaultServerConfiguration::add_wayland_extension*; mir::DefaultServerConfiguration::default_reports*; @@ -29,23 +35,27 @@ MIR_SERVER_2.17 { mir::DefaultServerConfiguration::the_cursor_listener*; mir::DefaultServerConfiguration::the_decoration_manager*; mir::DefaultServerConfiguration::the_default_cursor_image*; + mir::DefaultServerConfiguration::the_default_input_device_hub*; mir::DefaultServerConfiguration::the_display*; mir::DefaultServerConfiguration::the_display_buffer_compositor_factory*; mir::DefaultServerConfiguration::the_display_changer*; mir::DefaultServerConfiguration::the_display_configuration_controller*; + mir::DefaultServerConfiguration::the_display_configuration_observer*; + mir::DefaultServerConfiguration::the_display_configuration_observer_registrar*; mir::DefaultServerConfiguration::the_display_configuration_policy*; mir::DefaultServerConfiguration::the_display_platforms*; mir::DefaultServerConfiguration::the_display_report*; + mir::DefaultServerConfiguration::the_drag_icon_controller*; mir::DefaultServerConfiguration::the_emergency_cleanup*; mir::DefaultServerConfiguration::the_event_filter_chain_dispatcher*; mir::DefaultServerConfiguration::the_fatal_error_strategy*; + mir::DefaultServerConfiguration::the_focus_controller*; mir::DefaultServerConfiguration::the_frontend_display_changer*; mir::DefaultServerConfiguration::the_frontend_surface_stack*; mir::DefaultServerConfiguration::the_gl_config*; mir::DefaultServerConfiguration::the_host_connection*; mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*; mir::DefaultServerConfiguration::the_idle_handler*; - mir::DefaultServerConfiguration::the_session_lock*; mir::DefaultServerConfiguration::the_idle_hub*; mir::DefaultServerConfiguration::the_input_device_hub*; mir::DefaultServerConfiguration::the_input_device_registry*; @@ -58,12 +68,15 @@ MIR_SERVER_2.17 { mir::DefaultServerConfiguration::the_key_mapper*; mir::DefaultServerConfiguration::the_keyboard_observer_registrar*; mir::DefaultServerConfiguration::the_logger*; + mir::DefaultServerConfiguration::the_main_clipboard*; mir::DefaultServerConfiguration::the_main_loop*; mir::DefaultServerConfiguration::the_mediating_display_changer*; mir::DefaultServerConfiguration::the_message_processor_report*; mir::DefaultServerConfiguration::the_options*; mir::DefaultServerConfiguration::the_persistent_surface_store*; mir::DefaultServerConfiguration::the_pixel_buffer*; + mir::DefaultServerConfiguration::the_pointer_input_dispatcher*; + mir::DefaultServerConfiguration::the_primary_selection_clipboard*; mir::DefaultServerConfiguration::the_prompt_connection_creator*; mir::DefaultServerConfiguration::the_prompt_connector*; mir::DefaultServerConfiguration::the_prompt_session_listener*; @@ -75,6 +88,7 @@ MIR_SERVER_2.17 { mir::DefaultServerConfiguration::the_screen_shooter*; mir::DefaultServerConfiguration::the_screencast*; mir::DefaultServerConfiguration::the_seat*; + mir::DefaultServerConfiguration::the_seat_observer*; mir::DefaultServerConfiguration::the_seat_observer_registrar*; mir::DefaultServerConfiguration::the_server_action_queue*; mir::DefaultServerConfiguration::the_server_status_listener*; @@ -84,6 +98,7 @@ MIR_SERVER_2.17 { mir::DefaultServerConfiguration::the_session_event_handler_register*; mir::DefaultServerConfiguration::the_session_event_sink*; mir::DefaultServerConfiguration::the_session_listener*; + mir::DefaultServerConfiguration::the_session_lock*; mir::DefaultServerConfiguration::the_session_mediator_observer_registrar*; mir::DefaultServerConfiguration::the_shared_library_prober_report*; mir::DefaultServerConfiguration::the_shell*; @@ -106,10 +121,41 @@ MIR_SERVER_2.17 { mir::DefaultServerConfiguration::wrap_display_configuration_policy*; mir::DefaultServerConfiguration::wrap_shell*; mir::DefaultServerConfiguration::wrap_surface_stack*; + mir::DefaultServerStatusListener::paused*; + mir::DefaultServerStatusListener::ready_for_user_input*; + mir::DefaultServerStatusListener::resumed*; + mir::DefaultServerStatusListener::started*; + mir::DefaultServerStatusListener::stop_receiving_input*; + mir::DisplayChanger::?DisplayChanger*; + mir::DisplayChanger::DisplayChanger*; + mir::DisplayChanger::operator*; + mir::DisplayServer::?DisplayServer*; + mir::DisplayServer::DisplayServer*; + mir::DisplayServer::run*; + mir::DisplayServer::stop*; mir::Executor::?Executor*; + mir::GLibMainLoop::GLibMainLoop*; + mir::GLibMainLoop::create_alarm*; + mir::GLibMainLoop::enqueue*; + mir::GLibMainLoop::enqueue_with_guaranteed_execution*; + mir::GLibMainLoop::pause_processing_for*; + mir::GLibMainLoop::register_fd_handler*; + mir::GLibMainLoop::register_signal_handler*; + mir::GLibMainLoop::reprocess_all_sources*; + mir::GLibMainLoop::resume_processing_for*; + mir::GLibMainLoop::run*; + mir::GLibMainLoop::running*; + mir::GLibMainLoop::spawn*; + mir::GLibMainLoop::stop*; + mir::GLibMainLoop::unregister_fd_handler*; mir::LockableCallback::?LockableCallback*; mir::LockableCallback::LockableCallback*; mir::LockableCallback::operator*; + mir::LockableCallbackWrapper::LockableCallbackWrapper*; + mir::LockableCallbackWrapper::lock*; + mir::LockableCallbackWrapper::operator*; + mir::LockableCallbackWrapper::unlock*; + mir::OptionType*; mir::Server::Server*; mir::Server::add_configuration_option*; mir::Server::add_emergency_cleanup*; @@ -144,6 +190,7 @@ MIR_SERVER_2.17 { mir::Server::override_the_shell*; mir::Server::override_the_window_manager_builder*; mir::Server::run*; + mir::Server::run_on_wayland_display*; mir::Server::set_command_line*; mir::Server::set_command_line_handler*; mir::Server::set_config_filename*; @@ -172,7 +219,6 @@ MIR_SERVER_2.17 { mir::Server::the_logger*; mir::Server::the_main_loop*; mir::Server::the_persistent_surface_store*; - mir::Server::the_session_lock*; mir::Server::the_prompt_session_listener*; mir::Server::the_prompt_session_manager*; mir::Server::the_rendering_platforms*; @@ -180,6 +226,7 @@ MIR_SERVER_2.17 { mir::Server::the_session_authorizer*; mir::Server::the_session_coordinator*; mir::Server::the_session_listener*; + mir::Server::the_session_lock*; mir::Server::the_session_mediator_observer_registrar*; mir::Server::the_shell*; mir::Server::the_shell_display_layout*; @@ -198,11 +245,16 @@ MIR_SERVER_2.17 { mir::ServerActionQueue::?ServerActionQueue*; mir::ServerActionQueue::ServerActionQueue*; mir::ServerActionQueue::operator*; + mir::ServerConfiguration::?ServerConfiguration*; + mir::ServerConfiguration::ServerConfiguration*; + mir::ServerConfiguration::operator*; mir::ServerStatusListener::?ServerStatusListener*; mir::ServerStatusListener::ServerStatusListener*; mir::ServerStatusListener::operator*; mir::check_for_termination_exception*; mir::clear_termination_exception*; + mir::compositor::BufferStream::?BufferStream*; + mir::compositor::Compositor::?Compositor*; mir::compositor::Compositor::Compositor*; mir::compositor::Compositor::operator*; mir::compositor::CompositorReport::?CompositorReport*; @@ -217,16 +269,55 @@ MIR_SERVER_2.17 { mir::compositor::DisplayListener::?DisplayListener*; mir::compositor::DisplayListener::DisplayListener*; mir::compositor::DisplayListener::operator*; + mir::compositor::Scene::?Scene*; mir::compositor::Scene::Scene*; mir::compositor::SceneElement::?SceneElement*; mir::compositor::SceneElement::SceneElement*; mir::compositor::SceneElement::operator*; + mir::compositor::ScreenShooter::?ScreenShooter*; + mir::compositor::ScreenShooter::ScreenShooter*; + mir::detail::FdSources::?FdSources*; + mir::detail::FdSources::FdSources*; + mir::detail::FdSources::add*; + mir::detail::FdSources::remove_all_owned_by*; + mir::detail::GMainContextHandle::?GMainContextHandle*; + mir::detail::GMainContextHandle::GMainContextHandle*; + mir::detail::GMainContextHandle::operator*; + mir::detail::GSourceHandle::?GSourceHandle*; + mir::detail::GSourceHandle::GSourceHandle*; + mir::detail::GSourceHandle::ensure_no_further_dispatch*; + mir::detail::GSourceHandle::operator*; + mir::detail::SignalSources::?SignalSources*; + mir::detail::SignalSources::SignalSources*; + mir::detail::SignalSources::add*; + mir::detail::add_idle_gsource*; + mir::detail::add_server_action_gsource*; + mir::detail::add_timer_gsource*; + mir::empty*; mir::frontend::BufferSink::?BufferSink*; mir::frontend::BufferSink::BufferSink*; mir::frontend::BufferSink::operator*; mir::frontend::BufferStream::?BufferStream*; mir::frontend::BufferStream::BufferStream*; mir::frontend::BufferStream::operator*; + mir::frontend::Connector::?Connector*; + mir::frontend::Connector::Connector*; + mir::frontend::Connector::operator*; + mir::frontend::DisplayChanger::?DisplayChanger*; + mir::frontend::DisplayChanger::DisplayChanger*; + mir::frontend::DisplayChanger::operator*; + mir::frontend::DragIconController::?DragIconController*; + mir::frontend::DragIconController::DragIconController*; + mir::frontend::DragIconController::operator*; + mir::frontend::EventSink::?EventSink*; + mir::frontend::EventSink::EventSink*; + mir::frontend::EventSink::operator*; + mir::frontend::InputConfigurationChanger::?InputConfigurationChanger*; + mir::frontend::InputConfigurationChanger::InputConfigurationChanger*; + mir::frontend::InputConfigurationChanger::operator*; + mir::frontend::PointerInputDispatcher::?PointerInputDispatcher*; + mir::frontend::PointerInputDispatcher::PointerInputDispatcher*; + mir::frontend::PointerInputDispatcher::operator*; mir::frontend::PromptSession::?PromptSession*; mir::frontend::PromptSession::PromptSession*; mir::frontend::PromptSession::operator*; @@ -243,16 +334,29 @@ MIR_SERVER_2.17 { mir::frontend::Surface::?Surface*; mir::frontend::Surface::Surface*; mir::frontend::Surface::operator*; + mir::frontend::SurfaceStack::?SurfaceStack*; + mir::frontend::SurfaceStack::SurfaceStack*; mir::frontend::get_session*; mir::frontend::get_standard_extensions*; mir::frontend::get_supported_extensions*; mir::frontend::get_window*; mir::graphics::CloneDisplayConfigurationPolicy::apply_to*; + mir::graphics::CloneDisplayConfigurationPolicy::confirm*; mir::graphics::DisplayConfigurationObserver::?DisplayConfigurationObserver*; mir::graphics::DisplayConfigurationObserver::DisplayConfigurationObserver*; mir::graphics::DisplayConfigurationObserver::operator*; + mir::graphics::NullDisplayConfigurationObserver::base_configuration_updated*; + mir::graphics::NullDisplayConfigurationObserver::catastrophic_configuration_error*; + mir::graphics::NullDisplayConfigurationObserver::configuration_applied*; + mir::graphics::NullDisplayConfigurationObserver::configuration_failed*; + mir::graphics::NullDisplayConfigurationObserver::configuration_updated_for_session*; + mir::graphics::NullDisplayConfigurationObserver::initial_configuration*; + mir::graphics::NullDisplayConfigurationObserver::session_configuration_applied*; + mir::graphics::NullDisplayConfigurationObserver::session_configuration_removed*; mir::graphics::SideBySideDisplayConfigurationPolicy::apply_to*; + mir::graphics::SideBySideDisplayConfigurationPolicy::confirm*; mir::graphics::SingleDisplayConfigurationPolicy::apply_to*; + mir::graphics::SingleDisplayConfigurationPolicy::confirm*; mir::input::CursorImages::?CursorImages*; mir::input::CursorImages::CursorImages*; mir::input::CursorImages::operator*; @@ -271,9 +375,19 @@ MIR_SERVER_2.17 { mir::input::InputDeviceObserver::InputDeviceObserver*; mir::input::InputDeviceObserver::operator*; mir::input::InputDispatcher::?InputDispatcher*; + mir::input::InputManager::?InputManager*; mir::input::InputManager::InputManager*; mir::input::InputManager::operator*; + mir::input::InputReceptionMode*; + mir::input::KeyboardObserver::?KeyboardObserver*; + mir::input::KeyboardObserver::KeyboardObserver*; + mir::input::KeyboardObserver::operator*; mir::input::ResyncKeyboardDispatcher*; + mir::input::Scene::?Scene*; + mir::input::Scene::Scene*; + mir::input::Scene::operator*; + mir::input::Seat::?Seat*; + mir::input::Seat::Seat*; mir::input::SeatObserver::?SeatObserver*; mir::input::Surface::?Surface*; mir::input::Surface::Surface*; @@ -281,7 +395,19 @@ MIR_SERVER_2.17 { mir::input::TouchVisualizer::?TouchVisualizer*; mir::input::TouchVisualizer::TouchVisualizer*; mir::input::TouchVisualizer::operator*; + mir::input::VTFilter::?VTFilter*; + mir::input::VTFilter::VTFilter*; + mir::input::VTFilter::handle*; + mir::input::Validator::Validator*; + mir::input::Validator::validate_and_dispatch*; + mir::input::VirtualInputDevice::VirtualInputDevice*; + mir::input::VirtualInputDevice::if_started_then*; mir::input::default_cursor_size*; + mir::input::input_platform_from_graphics_module*; + mir::input::operator*; + mir::input::probe_input_platforms*; + mir::register_early_observer*; + mir::register_interest*; mir::report_exception*; mir::run_mir*; mir::scene::ApplicationNotRespondingDetector::?ApplicationNotRespondingDetector*; @@ -298,10 +424,41 @@ MIR_SERVER_2.17 { mir::scene::BufferStreamFactory::?BufferStreamFactory*; mir::scene::BufferStreamFactory::BufferStreamFactory*; mir::scene::BufferStreamFactory::operator*; + mir::scene::ClipboardObserver::?ClipboardObserver*; + mir::scene::ClipboardObserver::ClipboardObserver*; mir::scene::CoordinateTranslator::?CoordinateTranslator*; + mir::scene::DataExchangeSource::?DataExchangeSource*; + mir::scene::DataExchangeSource::DataExchangeSource*; + mir::scene::IdleHub::?IdleHub*; + mir::scene::IdleHub::IdleHub*; + mir::scene::IdleStateObserver::?IdleStateObserver*; + mir::scene::IdleStateObserver::IdleStateObserver*; + mir::scene::NullObserver::?NullObserver*; + mir::scene::NullObserver::NullObserver*; + mir::scene::NullObserver::end_observation*; + mir::scene::NullObserver::operator*; + mir::scene::NullObserver::scene_changed*; + mir::scene::NullObserver::surface_added*; + mir::scene::NullObserver::surface_exists*; + mir::scene::NullObserver::surface_removed*; + mir::scene::NullObserver::surfaces_reordered*; + mir::scene::NullPromptSessionListener::prompt_provider_added*; + mir::scene::NullPromptSessionListener::prompt_provider_removed*; + mir::scene::NullPromptSessionListener::resuming*; + mir::scene::NullPromptSessionListener::starting*; + mir::scene::NullPromptSessionListener::stopping*; + mir::scene::NullPromptSessionListener::suspending*; mir::scene::NullSessionListener::?NullSessionListener*; mir::scene::NullSessionListener::NullSessionListener*; + mir::scene::NullSessionListener::buffer_stream_created*; + mir::scene::NullSessionListener::buffer_stream_destroyed*; + mir::scene::NullSessionListener::destroying_surface*; + mir::scene::NullSessionListener::focused*; mir::scene::NullSessionListener::operator*; + mir::scene::NullSessionListener::starting*; + mir::scene::NullSessionListener::stopping*; + mir::scene::NullSessionListener::surface_created*; + mir::scene::NullSessionListener::unfocused*; mir::scene::NullSurfaceObserver::?NullSurfaceObserver*; mir::scene::NullSurfaceObserver::NullSurfaceObserver*; mir::scene::NullSurfaceObserver::alpha_set_to*; @@ -312,10 +469,12 @@ MIR_SERVER_2.17 { mir::scene::NullSurfaceObserver::cursor_image_removed*; mir::scene::NullSurfaceObserver::cursor_image_set_to*; mir::scene::NullSurfaceObserver::depth_layer_set_to*; + mir::scene::NullSurfaceObserver::entered_output*; mir::scene::NullSurfaceObserver::frame_posted*; mir::scene::NullSurfaceObserver::hidden_set_to*; mir::scene::NullSurfaceObserver::input_consumed*; mir::scene::NullSurfaceObserver::keymap_changed*; + mir::scene::NullSurfaceObserver::left_output*; mir::scene::NullSurfaceObserver::moved_to*; mir::scene::NullSurfaceObserver::operator*; mir::scene::NullSurfaceObserver::orientation_set_to*; @@ -328,30 +487,103 @@ MIR_SERVER_2.17 { mir::scene::Observer::?Observer*; mir::scene::Observer::Observer*; mir::scene::Observer::operator*; + mir::scene::OutputPropertiesCache::properties_for*; + mir::scene::OutputPropertiesCache::update_from*; mir::scene::PromptSessionListener::?PromptSessionListener*; mir::scene::PromptSessionListener::PromptSessionListener*; mir::scene::PromptSessionListener::operator*; mir::scene::PromptSessionManager::?PromptSessionManager*; mir::scene::PromptSessionManager::PromptSessionManager*; mir::scene::PromptSessionManager::operator*; + mir::scene::SceneChangeNotification::?SceneChangeNotification*; + mir::scene::SceneChangeNotification::SceneChangeNotification*; + mir::scene::SceneChangeNotification::end_observation*; + mir::scene::SceneChangeNotification::scene_changed*; + mir::scene::SceneChangeNotification::surface_added*; + mir::scene::SceneChangeNotification::surface_exists*; + mir::scene::SceneChangeNotification::surface_removed*; + mir::scene::SceneChangeNotification::surfaces_reordered*; + mir::scene::SceneReport::?SceneReport*; + mir::scene::SceneReport::SceneReport*; + mir::scene::SceneReport::operator*; + mir::scene::Session::?Session*; + mir::scene::Session::Session*; + mir::scene::Session::operator*; + mir::scene::SessionContainer::?SessionContainer*; + mir::scene::SessionContainer::SessionContainer*; + mir::scene::SessionContainer::for_each*; + mir::scene::SessionContainer::insert_session*; + mir::scene::SessionContainer::operator*; + mir::scene::SessionContainer::predecessor_of*; + mir::scene::SessionContainer::remove_session*; + mir::scene::SessionContainer::successor_of*; mir::scene::SessionCoordinator::?SessionCoordinator*; mir::scene::SessionCoordinator::SessionCoordinator*; mir::scene::SessionCoordinator::operator*; + mir::scene::SessionEventHandlerRegister::?SessionEventHandlerRegister*; + mir::scene::SessionEventHandlerRegister::SessionEventHandlerRegister*; + mir::scene::SessionEventHandlerRegister::operator*; + mir::scene::SessionEventSink::?SessionEventSink*; + mir::scene::SessionEventSink::SessionEventSink*; + mir::scene::SessionEventSink::operator*; mir::scene::SessionListener::?SessionListener*; mir::scene::SessionListener::SessionListener*; mir::scene::SessionListener::operator*; + mir::scene::SessionLock::?SessionLock*; + mir::scene::SessionLock::SessionLock*; + mir::scene::SessionLock::operator*; + mir::scene::SessionLockObserver::?SessionLockObserver*; + mir::scene::SessionLockObserver::SessionLockObserver*; + mir::scene::SessionLockObserver::operator*; + mir::scene::SurfaceEventSource::SurfaceEventSource*; + mir::scene::SurfaceEventSource::attrib_changed*; + mir::scene::SurfaceEventSource::client_surface_close_requested*; + mir::scene::SurfaceEventSource::content_resized_to*; + mir::scene::SurfaceEventSource::input_consumed*; + mir::scene::SurfaceEventSource::moved_to*; + mir::scene::SurfaceEventSource::orientation_set_to*; + mir::scene::SurfaceEventSource::placed_relative*; mir::scene::SurfaceFactory::?SurfaceFactory*; mir::scene::SurfaceFactory::SurfaceFactory*; mir::scene::SurfaceObserver::?SurfaceObserver*; mir::scene::SurfaceObserver::SurfaceObserver*; mir::scene::SurfaceObserver::operator*; + mir::scene::SurfaceObservers::SurfaceObservers*; + mir::scene::SurfaceObservers::alpha_set_to*; + mir::scene::SurfaceObservers::application_id_set_to*; + mir::scene::SurfaceObservers::attrib_changed*; + mir::scene::SurfaceObservers::client_surface_close_requested*; + mir::scene::SurfaceObservers::content_resized_to*; + mir::scene::SurfaceObservers::cursor_image_removed*; + mir::scene::SurfaceObservers::cursor_image_set_to*; + mir::scene::SurfaceObservers::depth_layer_set_to*; + mir::scene::SurfaceObservers::frame_posted*; + mir::scene::SurfaceObservers::hidden_set_to*; + mir::scene::SurfaceObservers::input_consumed*; + mir::scene::SurfaceObservers::moved_to*; + mir::scene::SurfaceObservers::orientation_set_to*; + mir::scene::SurfaceObservers::placed_relative*; + mir::scene::SurfaceObservers::reception_mode_set_to*; + mir::scene::SurfaceObservers::renamed*; + mir::scene::SurfaceObservers::transformation_set_to*; + mir::scene::SurfaceObservers::window_resized_to*; mir::scene::SurfaceStateTracker::SurfaceStateTracker*; mir::scene::SurfaceStateTracker::active_state*; mir::scene::SurfaceStateTracker::has*; mir::scene::SurfaceStateTracker::has_any*; + mir::scene::SurfaceStateTracker::operator*; mir::scene::SurfaceStateTracker::with*; mir::scene::SurfaceStateTracker::with_active_state*; mir::scene::SurfaceStateTracker::without*; + mir::scene::TextInputChange::TextInputChange*; + mir::scene::TextInputChangeCause*; + mir::scene::TextInputChangeHandler::?TextInputChangeHandler*; + mir::scene::TextInputChangeHandler::TextInputChangeHandler*; + mir::scene::TextInputContentHint*; + mir::scene::TextInputContentPurpose*; + mir::scene::TextInputHub::?TextInputHub*; + mir::scene::TextInputStateObserver::?TextInputStateObserver*; + mir::scene::TextInputStateObserver::TextInputStateObserver*; mir::scene::a_surface*; mir::scene::operator*; mir::shell::AbstractShell::?AbstractShell*; @@ -363,6 +595,7 @@ MIR_SERVER_2.17 { mir::shell::AbstractShell::create_surface*; mir::shell::AbstractShell::destroy_surface*; mir::shell::AbstractShell::focus_next_session*; + mir::shell::AbstractShell::focus_prev_session*; mir::shell::AbstractShell::focused_session*; mir::shell::AbstractShell::focused_surface*; mir::shell::AbstractShell::get_surface_attribute*; @@ -374,12 +607,17 @@ MIR_SERVER_2.17 { mir::shell::AbstractShell::remove_display*; mir::shell::AbstractShell::request_drag_and_drop*; mir::shell::AbstractShell::request_move*; + mir::shell::AbstractShell::request_resize*; + mir::shell::AbstractShell::send_to_back*; mir::shell::AbstractShell::set_drag_and_drop_handle*; mir::shell::AbstractShell::set_focus_to*; + mir::shell::AbstractShell::set_popup_grab_tree*; mir::shell::AbstractShell::set_surface_attribute*; mir::shell::AbstractShell::start_prompt_session_for*; mir::shell::AbstractShell::stop_prompt_session*; mir::shell::AbstractShell::surface_at*; + mir::shell::AbstractShell::surface_ready*; + mir::shell::AbstractShell::swap_z_order*; mir::shell::AbstractShell::update_focused_surface_confined_region*; mir::shell::BasicWindowManager::?BasicWindowManager*; mir::shell::BasicWindowManager::BasicWindowManager*; @@ -420,6 +658,7 @@ MIR_SERVER_2.17 { mir::shell::CanonicalWindowManagerPolicy::handle_session_info_updated*; mir::shell::CanonicalWindowManagerPolicy::handle_set_state*; mir::shell::CanonicalWindowManagerPolicy::handle_touch_event*; + mir::shell::DefaultWindowManager::handle_keyboard_event*; mir::shell::DisplayConfigurationController::?DisplayConfigurationController*; mir::shell::DisplayConfigurationController::DisplayConfigurationController*; mir::shell::DisplayConfigurationController::operator*; @@ -429,6 +668,11 @@ MIR_SERVER_2.17 { mir::shell::FocusController::?FocusController*; mir::shell::FocusController::FocusController*; mir::shell::FocusController::operator*; + mir::shell::Id::Id*; + mir::shell::Id::operator*; + mir::shell::Id::serialize_to_string*; + mir::shell::IdleHandler::?IdleHandler*; + mir::shell::IdleHandler::IdleHandler*; mir::shell::InputTargeter::?InputTargeter*; mir::shell::InputTargeter::InputTargeter*; mir::shell::InputTargeter::operator*; @@ -460,12 +704,16 @@ MIR_SERVER_2.17 { mir::shell::ShellWrapper::request_drag_and_drop*; mir::shell::ShellWrapper::request_move*; mir::shell::ShellWrapper::request_resize*; + mir::shell::ShellWrapper::send_to_back*; mir::shell::ShellWrapper::set_drag_and_drop_handle*; mir::shell::ShellWrapper::set_focus_to*; + mir::shell::ShellWrapper::set_popup_grab_tree*; mir::shell::ShellWrapper::set_surface_attribute*; mir::shell::ShellWrapper::start_prompt_session_for*; mir::shell::ShellWrapper::stop_prompt_session*; mir::shell::ShellWrapper::surface_at*; + mir::shell::ShellWrapper::surface_ready*; + mir::shell::ShellWrapper::swap_z_order*; mir::shell::SurfaceInfo::SurfaceInfo*; mir::shell::SurfaceInfo::can_be_active*; mir::shell::SurfaceInfo::can_morph_to*; @@ -475,6 +723,8 @@ MIR_SERVER_2.17 { mir::shell::SurfaceInfo::must_not_have_parent*; mir::shell::SurfaceInfo::needs_titlebar*; mir::shell::SurfaceSpecification::is_empty*; + mir::shell::SurfaceSpecification::set_size*; + mir::shell::SurfaceSpecification::update_from*; mir::shell::SurfaceStack::?SurfaceStack*; mir::shell::SurfaceStack::SurfaceStack*; mir::shell::SurfaceStack::operator*; @@ -482,7 +732,9 @@ MIR_SERVER_2.17 { mir::shell::SurfaceStackWrapper::add_surface*; mir::shell::SurfaceStackWrapper::raise*; mir::shell::SurfaceStackWrapper::remove_surface*; + mir::shell::SurfaceStackWrapper::send_to_back*; mir::shell::SurfaceStackWrapper::surface_at*; + mir::shell::SurfaceStackWrapper::swap_z_order*; mir::shell::SystemCompositorWindowManager::SystemCompositorWindowManager*; mir::shell::SystemCompositorWindowManager::add_display*; mir::shell::SystemCompositorWindowManager::add_session*; @@ -510,32 +762,169 @@ MIR_SERVER_2.17 { mir::shell::WindowManagerTools::?WindowManagerTools*; mir::shell::WindowManagerTools::WindowManagerTools*; mir::shell::WindowManagerTools::operator*; + mir::shell::operator*; mir::terminate_with_current_exception*; mir::time::Alarm::?Alarm*; mir::time::Alarm::Alarm*; + mir::time::Alarm::State*; mir::time::Alarm::operator*; mir::time::AlarmFactory::?AlarmFactory*; mir::time::AlarmFactory::AlarmFactory*; mir::time::AlarmFactory::operator*; + mir::unregister_interest*; + non-virtual?thunk?to?mir::BasicCallback::lock*; + non-virtual?thunk?to?mir::BasicCallback::operator*; + non-virtual?thunk?to?mir::BasicCallback::unlock*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::add_wayland_extension*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::set_enabled_wayland_extensions*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::set_wayland_extension_filter*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_application_not_responding_detector*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_buffer_allocator*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_buffer_stream_factory*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_clock*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_composite_event_filter*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_compositor*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_compositor_report*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_console_services*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_cursor*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_cursor_images*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_cursor_listener*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_decoration_manager*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_default_cursor_image*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_buffer_compositor_factory*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_changer*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_configuration_controller*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_configuration_policy*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_platforms*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_display_report*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_drag_icon_controller*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_emergency_cleanup*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_event_filter_chain_dispatcher*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_fatal_error_strategy*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_frontend_display_changer*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_frontend_surface_stack*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_gl_config*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_idle_handler*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_idle_hub*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_device_hub*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_device_registry*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_dispatcher*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_manager*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_reading_multiplexer*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_report*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_scene*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_input_targeter*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_key_mapper*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_keyboard_observer_registrar*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_logger*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_main_clipboard*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_main_loop*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_mediating_display_changer*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_persistent_surface_store*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_pointer_input_dispatcher*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_primary_selection_clipboard*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_prompt_session_listener*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_prompt_session_manager*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_renderer_factory*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_rendering_platforms*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_scene*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_scene_report*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_screen_shooter*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_seat*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_seat_observer_registrar*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_server_action_queue*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_server_status_listener*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_authorizer*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_container*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_coordinator*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_event_handler_register*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_event_sink*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_listener*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_session_lock*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shared_library_prober_report*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell_display_layout*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_shell_report*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_stop_callback*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_surface_factory*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_surface_input_dispatcher*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_surface_stack*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_text_input_hub*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_touch_visualizer*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_wayland_connector*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_window_manager_builder*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::the_xwayland_connector*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_application_not_responding_detector*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_cursor*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_cursor_listener*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_display_buffer_compositor_factory*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_display_configuration_policy*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_shell*; + non-virtual?thunk?to?mir::DefaultServerConfiguration::wrap_surface_stack*; + non-virtual?thunk?to?mir::DefaultServerStatusListener::paused*; + non-virtual?thunk?to?mir::DefaultServerStatusListener::ready_for_user_input*; + non-virtual?thunk?to?mir::DefaultServerStatusListener::resumed*; + non-virtual?thunk?to?mir::DefaultServerStatusListener::started*; + non-virtual?thunk?to?mir::DefaultServerStatusListener::stop_receiving_input*; + non-virtual?thunk?to?mir::DisplayChanger::?DisplayChanger*; non-virtual?thunk?to?mir::Executor::?Executor*; + non-virtual?thunk?to?mir::GLibMainLoop::create_alarm*; + non-virtual?thunk?to?mir::GLibMainLoop::enqueue*; + non-virtual?thunk?to?mir::GLibMainLoop::enqueue_with_guaranteed_execution*; + non-virtual?thunk?to?mir::GLibMainLoop::pause_processing_for*; + non-virtual?thunk?to?mir::GLibMainLoop::register_fd_handler*; + non-virtual?thunk?to?mir::GLibMainLoop::register_signal_handler*; + non-virtual?thunk?to?mir::GLibMainLoop::resume_processing_for*; + non-virtual?thunk?to?mir::GLibMainLoop::run*; + non-virtual?thunk?to?mir::GLibMainLoop::running*; + non-virtual?thunk?to?mir::GLibMainLoop::spawn*; + non-virtual?thunk?to?mir::GLibMainLoop::stop*; + non-virtual?thunk?to?mir::GLibMainLoop::unregister_fd_handler*; non-virtual?thunk?to?mir::LockableCallback::?LockableCallback*; + non-virtual?thunk?to?mir::LockableCallbackWrapper::lock*; + non-virtual?thunk?to?mir::LockableCallbackWrapper::operator*; + non-virtual?thunk?to?mir::LockableCallbackWrapper::unlock*; non-virtual?thunk?to?mir::ServerActionQueue::?ServerActionQueue*; + non-virtual?thunk?to?mir::ServerConfiguration::?ServerConfiguration*; non-virtual?thunk?to?mir::ServerStatusListener::?ServerStatusListener*; + non-virtual?thunk?to?mir::compositor::BufferStream::?BufferStream*; + non-virtual?thunk?to?mir::compositor::Compositor::?Compositor*; non-virtual?thunk?to?mir::compositor::CompositorReport::?CompositorReport*; non-virtual?thunk?to?mir::compositor::DisplayBufferCompositor::?DisplayBufferCompositor*; non-virtual?thunk?to?mir::compositor::DisplayBufferCompositorFactory::?DisplayBufferCompositorFactory*; non-virtual?thunk?to?mir::compositor::DisplayListener::?DisplayListener*; + non-virtual?thunk?to?mir::compositor::Scene::?Scene*; non-virtual?thunk?to?mir::compositor::SceneElement::?SceneElement*; + non-virtual?thunk?to?mir::compositor::ScreenShooter::?ScreenShooter*; non-virtual?thunk?to?mir::frontend::BufferSink::?BufferSink*; non-virtual?thunk?to?mir::frontend::BufferStream::?BufferStream*; + non-virtual?thunk?to?mir::frontend::Connector::?Connector*; + non-virtual?thunk?to?mir::frontend::DisplayChanger::?DisplayChanger*; + non-virtual?thunk?to?mir::frontend::DragIconController::?DragIconController*; + non-virtual?thunk?to?mir::frontend::EventSink::?EventSink*; + non-virtual?thunk?to?mir::frontend::InputConfigurationChanger::?InputConfigurationChanger*; + non-virtual?thunk?to?mir::frontend::PointerInputDispatcher::?PointerInputDispatcher*; non-virtual?thunk?to?mir::frontend::PromptSession::?PromptSession*; non-virtual?thunk?to?mir::frontend::Session::?Session*; non-virtual?thunk?to?mir::frontend::SessionAuthorizer::?SessionAuthorizer*; non-virtual?thunk?to?mir::frontend::Surface::?Surface*; + non-virtual?thunk?to?mir::frontend::SurfaceStack::?SurfaceStack*; non-virtual?thunk?to?mir::graphics::CloneDisplayConfigurationPolicy::apply_to*; + non-virtual?thunk?to?mir::graphics::CloneDisplayConfigurationPolicy::confirm*; non-virtual?thunk?to?mir::graphics::DisplayConfigurationObserver::?DisplayConfigurationObserver*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::base_configuration_updated*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::catastrophic_configuration_error*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::configuration_applied*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::configuration_failed*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::configuration_updated_for_session*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::initial_configuration*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::session_configuration_applied*; + non-virtual?thunk?to?mir::graphics::NullDisplayConfigurationObserver::session_configuration_removed*; non-virtual?thunk?to?mir::graphics::SideBySideDisplayConfigurationPolicy::apply_to*; + non-virtual?thunk?to?mir::graphics::SideBySideDisplayConfigurationPolicy::confirm*; non-virtual?thunk?to?mir::graphics::SingleDisplayConfigurationPolicy::apply_to*; + non-virtual?thunk?to?mir::graphics::SingleDisplayConfigurationPolicy::confirm*; non-virtual?thunk?to?mir::input::CursorImages::?CursorImages*; non-virtual?thunk?to?mir::input::CursorListener::?CursorListener*; non-virtual?thunk?to?mir::input::Device::?Device*; @@ -543,30 +932,68 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::input::InputDeviceHub::?InputDeviceHub*; non-virtual?thunk?to?mir::input::InputDeviceObserver::?InputDeviceObserver*; non-virtual?thunk?to?mir::input::InputDispatcher::?InputDispatcher*; + non-virtual?thunk?to?mir::input::InputManager::?InputManager*; + non-virtual?thunk?to?mir::input::KeyboardObserver::?KeyboardObserver*; + non-virtual?thunk?to?mir::input::Scene::?Scene*; + non-virtual?thunk?to?mir::input::Seat::?Seat*; non-virtual?thunk?to?mir::input::SeatObserver::?SeatObserver*; non-virtual?thunk?to?mir::input::Surface::?Surface*; non-virtual?thunk?to?mir::input::TouchVisualizer::?TouchVisualizer*; + non-virtual?thunk?to?mir::input::VTFilter::?VTFilter*; + non-virtual?thunk?to?mir::input::VTFilter::handle*; + non-virtual?thunk?to?mir::register_early_observer*; + non-virtual?thunk?to?mir::register_interest*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetector::?ApplicationNotRespondingDetector*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetector::Observer::?Observer*; + non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::?ApplicationNotRespondingDetectorWrapper*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::pong_received*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::register_observer*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::register_session*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::unregister_observer*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::unregister_session*; non-virtual?thunk?to?mir::scene::BufferStreamFactory::?BufferStreamFactory*; + non-virtual?thunk?to?mir::scene::ClipboardObserver::?ClipboardObserver*; non-virtual?thunk?to?mir::scene::CoordinateTranslator::?CoordinateTranslator*; + non-virtual?thunk?to?mir::scene::DataExchangeSource::?DataExchangeSource*; + non-virtual?thunk?to?mir::scene::IdleHub::?IdleHub*; + non-virtual?thunk?to?mir::scene::IdleStateObserver::?IdleStateObserver*; + non-virtual?thunk?to?mir::scene::NullObserver::?NullObserver*; + non-virtual?thunk?to?mir::scene::NullObserver::end_observation*; + non-virtual?thunk?to?mir::scene::NullObserver::scene_changed*; + non-virtual?thunk?to?mir::scene::NullObserver::surface_added*; + non-virtual?thunk?to?mir::scene::NullObserver::surface_exists*; + non-virtual?thunk?to?mir::scene::NullObserver::surface_removed*; + non-virtual?thunk?to?mir::scene::NullObserver::surfaces_reordered*; + non-virtual?thunk?to?mir::scene::NullPromptSessionListener::prompt_provider_added*; + non-virtual?thunk?to?mir::scene::NullPromptSessionListener::prompt_provider_removed*; + non-virtual?thunk?to?mir::scene::NullPromptSessionListener::resuming*; + non-virtual?thunk?to?mir::scene::NullPromptSessionListener::starting*; + non-virtual?thunk?to?mir::scene::NullPromptSessionListener::stopping*; + non-virtual?thunk?to?mir::scene::NullPromptSessionListener::suspending*; non-virtual?thunk?to?mir::scene::NullSessionListener::?NullSessionListener*; + non-virtual?thunk?to?mir::scene::NullSessionListener::buffer_stream_created*; + non-virtual?thunk?to?mir::scene::NullSessionListener::buffer_stream_destroyed*; + non-virtual?thunk?to?mir::scene::NullSessionListener::destroying_surface*; + non-virtual?thunk?to?mir::scene::NullSessionListener::focused*; + non-virtual?thunk?to?mir::scene::NullSessionListener::starting*; + non-virtual?thunk?to?mir::scene::NullSessionListener::stopping*; + non-virtual?thunk?to?mir::scene::NullSessionListener::surface_created*; + non-virtual?thunk?to?mir::scene::NullSessionListener::unfocused*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::?NullSurfaceObserver*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::alpha_set_to*; + non-virtual?thunk?to?mir::scene::NullSurfaceObserver::application_id_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::attrib_changed*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::client_surface_close_requested*; + non-virtual?thunk?to?mir::scene::NullSurfaceObserver::content_resized_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::cursor_image_removed*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::cursor_image_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::depth_layer_set_to*; + non-virtual?thunk?to?mir::scene::NullSurfaceObserver::entered_output*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::frame_posted*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::hidden_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::input_consumed*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::keymap_changed*; + non-virtual?thunk?to?mir::scene::NullSurfaceObserver::left_output*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::moved_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::orientation_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::placed_relative*; @@ -575,13 +1002,56 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::scene::NullSurfaceObserver::resized_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::start_drag_and_drop*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::transformation_set_to*; + non-virtual?thunk?to?mir::scene::NullSurfaceObserver::window_resized_to*; non-virtual?thunk?to?mir::scene::Observer::?Observer*; non-virtual?thunk?to?mir::scene::PromptSessionListener::?PromptSessionListener*; non-virtual?thunk?to?mir::scene::PromptSessionManager::?PromptSessionManager*; + non-virtual?thunk?to?mir::scene::SceneChangeNotification::?SceneChangeNotification*; + non-virtual?thunk?to?mir::scene::SceneChangeNotification::end_observation*; + non-virtual?thunk?to?mir::scene::SceneChangeNotification::scene_changed*; + non-virtual?thunk?to?mir::scene::SceneChangeNotification::surface_added*; + non-virtual?thunk?to?mir::scene::SceneChangeNotification::surface_exists*; + non-virtual?thunk?to?mir::scene::SceneChangeNotification::surface_removed*; + non-virtual?thunk?to?mir::scene::SceneChangeNotification::surfaces_reordered*; + non-virtual?thunk?to?mir::scene::SceneReport::?SceneReport*; + non-virtual?thunk?to?mir::scene::Session::?Session*; non-virtual?thunk?to?mir::scene::SessionCoordinator::?SessionCoordinator*; + non-virtual?thunk?to?mir::scene::SessionEventHandlerRegister::?SessionEventHandlerRegister*; + non-virtual?thunk?to?mir::scene::SessionEventSink::?SessionEventSink*; non-virtual?thunk?to?mir::scene::SessionListener::?SessionListener*; + non-virtual?thunk?to?mir::scene::SessionLock::?SessionLock*; + non-virtual?thunk?to?mir::scene::SessionLockObserver::?SessionLockObserver*; + non-virtual?thunk?to?mir::scene::SurfaceEventSource::attrib_changed*; + non-virtual?thunk?to?mir::scene::SurfaceEventSource::client_surface_close_requested*; + non-virtual?thunk?to?mir::scene::SurfaceEventSource::content_resized_to*; + non-virtual?thunk?to?mir::scene::SurfaceEventSource::input_consumed*; + non-virtual?thunk?to?mir::scene::SurfaceEventSource::moved_to*; + non-virtual?thunk?to?mir::scene::SurfaceEventSource::orientation_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceEventSource::placed_relative*; non-virtual?thunk?to?mir::scene::SurfaceFactory::?SurfaceFactory*; non-virtual?thunk?to?mir::scene::SurfaceObserver::?SurfaceObserver*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::alpha_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::application_id_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::attrib_changed*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::client_surface_close_requested*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::content_resized_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::cursor_image_removed*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::cursor_image_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::depth_layer_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::frame_posted*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::hidden_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::input_consumed*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::moved_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::orientation_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::placed_relative*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::reception_mode_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::renamed*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::transformation_set_to*; + non-virtual?thunk?to?mir::scene::SurfaceObservers::window_resized_to*; + non-virtual?thunk?to?mir::scene::TextInputChangeHandler::?TextInputChangeHandler*; + non-virtual?thunk?to?mir::scene::TextInputHub::?TextInputHub*; + non-virtual?thunk?to?mir::scene::TextInputStateObserver::?TextInputStateObserver*; + non-virtual?thunk?to?mir::shell::AbstractShell::?AbstractShell*; non-virtual?thunk?to?mir::shell::AbstractShell::add_display*; non-virtual?thunk?to?mir::shell::AbstractShell::add_prompt_provider_for*; non-virtual?thunk?to?mir::shell::AbstractShell::clear_drag_and_drop_handle*; @@ -589,6 +1059,7 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::shell::AbstractShell::create_surface*; non-virtual?thunk?to?mir::shell::AbstractShell::destroy_surface*; non-virtual?thunk?to?mir::shell::AbstractShell::focus_next_session*; + non-virtual?thunk?to?mir::shell::AbstractShell::focus_prev_session*; non-virtual?thunk?to?mir::shell::AbstractShell::focused_session*; non-virtual?thunk?to?mir::shell::AbstractShell::focused_surface*; non-virtual?thunk?to?mir::shell::AbstractShell::get_surface_attribute*; @@ -600,12 +1071,17 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::shell::AbstractShell::remove_display*; non-virtual?thunk?to?mir::shell::AbstractShell::request_drag_and_drop*; non-virtual?thunk?to?mir::shell::AbstractShell::request_move*; + non-virtual?thunk?to?mir::shell::AbstractShell::request_resize*; + non-virtual?thunk?to?mir::shell::AbstractShell::send_to_back*; non-virtual?thunk?to?mir::shell::AbstractShell::set_drag_and_drop_handle*; non-virtual?thunk?to?mir::shell::AbstractShell::set_focus_to*; + non-virtual?thunk?to?mir::shell::AbstractShell::set_popup_grab_tree*; non-virtual?thunk?to?mir::shell::AbstractShell::set_surface_attribute*; non-virtual?thunk?to?mir::shell::AbstractShell::start_prompt_session_for*; non-virtual?thunk?to?mir::shell::AbstractShell::stop_prompt_session*; non-virtual?thunk?to?mir::shell::AbstractShell::surface_at*; + non-virtual?thunk?to?mir::shell::AbstractShell::surface_ready*; + non-virtual?thunk?to?mir::shell::AbstractShell::swap_z_order*; non-virtual?thunk?to?mir::shell::BasicWindowManager::active_display*; non-virtual?thunk?to?mir::shell::BasicWindowManager::add_display*; non-virtual?thunk?to?mir::shell::BasicWindowManager::add_session*; @@ -642,9 +1118,11 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_session_info_updated*; non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_set_state*; non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_touch_event*; + non-virtual?thunk?to?mir::shell::DefaultWindowManager::handle_keyboard_event*; non-virtual?thunk?to?mir::shell::DisplayConfigurationController::?DisplayConfigurationController*; non-virtual?thunk?to?mir::shell::DisplayLayout::?DisplayLayout*; non-virtual?thunk?to?mir::shell::FocusController::?FocusController*; + non-virtual?thunk?to?mir::shell::IdleHandler::?IdleHandler*; non-virtual?thunk?to?mir::shell::InputTargeter::?InputTargeter*; non-virtual?thunk?to?mir::shell::PersistentSurfaceStore::?PersistentSurfaceStore*; non-virtual?thunk?to?mir::shell::ShellReport::?ShellReport*; @@ -655,6 +1133,7 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::shell::ShellWrapper::create_surface*; non-virtual?thunk?to?mir::shell::ShellWrapper::destroy_surface*; non-virtual?thunk?to?mir::shell::ShellWrapper::focus_next_session*; + non-virtual?thunk?to?mir::shell::ShellWrapper::focus_prev_session*; non-virtual?thunk?to?mir::shell::ShellWrapper::focused_session*; non-virtual?thunk?to?mir::shell::ShellWrapper::focused_surface*; non-virtual?thunk?to?mir::shell::ShellWrapper::get_surface_attribute*; @@ -667,17 +1146,23 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::shell::ShellWrapper::request_drag_and_drop*; non-virtual?thunk?to?mir::shell::ShellWrapper::request_move*; non-virtual?thunk?to?mir::shell::ShellWrapper::request_resize*; + non-virtual?thunk?to?mir::shell::ShellWrapper::send_to_back*; non-virtual?thunk?to?mir::shell::ShellWrapper::set_drag_and_drop_handle*; non-virtual?thunk?to?mir::shell::ShellWrapper::set_focus_to*; + non-virtual?thunk?to?mir::shell::ShellWrapper::set_popup_grab_tree*; non-virtual?thunk?to?mir::shell::ShellWrapper::set_surface_attribute*; non-virtual?thunk?to?mir::shell::ShellWrapper::start_prompt_session_for*; non-virtual?thunk?to?mir::shell::ShellWrapper::stop_prompt_session*; non-virtual?thunk?to?mir::shell::ShellWrapper::surface_at*; + non-virtual?thunk?to?mir::shell::ShellWrapper::surface_ready*; + non-virtual?thunk?to?mir::shell::ShellWrapper::swap_z_order*; non-virtual?thunk?to?mir::shell::SurfaceStack::?SurfaceStack*; non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::add_surface*; non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::raise*; non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::remove_surface*; + non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::send_to_back*; non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::surface_at*; + non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::swap_z_order*; non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::add_display*; non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::add_session*; non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::add_surface*; @@ -700,13 +1185,25 @@ MIR_SERVER_2.17 { non-virtual?thunk?to?mir::shell::WindowManagerTools::?WindowManagerTools*; non-virtual?thunk?to?mir::time::Alarm::?Alarm*; non-virtual?thunk?to?mir::time::AlarmFactory::?AlarmFactory*; + non-virtual?thunk?to?mir::unregister_interest*; + std::hash::operator*; + typeinfo?for?mir::BasicCallback; typeinfo?for?mir::DefaultServerConfiguration; + typeinfo?for?mir::DefaultServerStatusListener; + typeinfo?for?mir::DisplayChanger; + typeinfo?for?mir::DisplayServer; + typeinfo?for?mir::EmergencyCleanup; typeinfo?for?mir::Executor; + typeinfo?for?mir::GLibMainLoop; typeinfo?for?mir::LockableCallback; + typeinfo?for?mir::LockableCallbackWrapper; typeinfo?for?mir::MainLoop; typeinfo?for?mir::Server; typeinfo?for?mir::ServerActionQueue; + typeinfo?for?mir::ServerConfiguration; typeinfo?for?mir::ServerStatusListener; + typeinfo?for?mir::WaylandExtensionHook; + typeinfo?for?mir::compositor::BufferStream; typeinfo?for?mir::compositor::Compositor; typeinfo?for?mir::compositor::CompositorReport; typeinfo?for?mir::compositor::DisplayBufferCompositor; @@ -714,15 +1211,28 @@ MIR_SERVER_2.17 { typeinfo?for?mir::compositor::DisplayListener; typeinfo?for?mir::compositor::Scene; typeinfo?for?mir::compositor::SceneElement; + typeinfo?for?mir::compositor::ScreenShooter; + typeinfo?for?mir::detail::FdSources; + typeinfo?for?mir::detail::GMainContextHandle; + typeinfo?for?mir::detail::GSourceHandle; + typeinfo?for?mir::detail::SignalSources; typeinfo?for?mir::frontend::BufferSink; typeinfo?for?mir::frontend::BufferStream; + typeinfo?for?mir::frontend::Connector; + typeinfo?for?mir::frontend::DisplayChanger; + typeinfo?for?mir::frontend::DragIconController; + typeinfo?for?mir::frontend::EventSink; + typeinfo?for?mir::frontend::InputConfigurationChanger; + typeinfo?for?mir::frontend::PointerInputDispatcher; typeinfo?for?mir::frontend::PromptSession; typeinfo?for?mir::frontend::Session; typeinfo?for?mir::frontend::SessionAuthorizer; typeinfo?for?mir::frontend::SessionCredentials; typeinfo?for?mir::frontend::Surface; + typeinfo?for?mir::frontend::SurfaceStack; typeinfo?for?mir::graphics::CloneDisplayConfigurationPolicy; typeinfo?for?mir::graphics::DisplayConfigurationObserver; + typeinfo?for?mir::graphics::NullDisplayConfigurationObserver; typeinfo?for?mir::graphics::SideBySideDisplayConfigurationPolicy; typeinfo?for?mir::graphics::SingleDisplayConfigurationPolicy; typeinfo?for?mir::input::CompositeEventFilter; @@ -734,36 +1244,72 @@ MIR_SERVER_2.17 { typeinfo?for?mir::input::InputDeviceObserver; typeinfo?for?mir::input::InputDispatcher; typeinfo?for?mir::input::InputManager; + typeinfo?for?mir::input::KeyboardObserver; + typeinfo?for?mir::input::Scene; + typeinfo?for?mir::input::Seat; typeinfo?for?mir::input::SeatObserver; typeinfo?for?mir::input::Surface; typeinfo?for?mir::input::TouchVisualizer::Spot; typeinfo?for?mir::input::TouchVisualizer; + typeinfo?for?mir::input::VTFilter; + typeinfo?for?mir::input::Validator; + typeinfo?for?mir::input::VirtualInputDevice; typeinfo?for?mir::scene::ApplicationNotRespondingDetector::Observer; typeinfo?for?mir::scene::ApplicationNotRespondingDetector; typeinfo?for?mir::scene::ApplicationNotRespondingDetectorWrapper; typeinfo?for?mir::scene::BufferStreamFactory; + typeinfo?for?mir::scene::Clipboard; + typeinfo?for?mir::scene::ClipboardObserver; typeinfo?for?mir::scene::CoordinateTranslator; + typeinfo?for?mir::scene::DataExchangeSource; + typeinfo?for?mir::scene::IdleHub; + typeinfo?for?mir::scene::IdleStateObserver; + typeinfo?for?mir::scene::NullObserver; + typeinfo?for?mir::scene::NullPromptSessionListener; typeinfo?for?mir::scene::NullSessionListener; typeinfo?for?mir::scene::NullSurfaceObserver; typeinfo?for?mir::scene::Observer; + typeinfo?for?mir::scene::OutputProperties; + typeinfo?for?mir::scene::OutputPropertiesCache; typeinfo?for?mir::scene::PromptSession; typeinfo?for?mir::scene::PromptSessionCreationParameters; typeinfo?for?mir::scene::PromptSessionListener; typeinfo?for?mir::scene::PromptSessionManager; + typeinfo?for?mir::scene::SceneChangeNotification; + typeinfo?for?mir::scene::SceneReport; typeinfo?for?mir::scene::Session; + typeinfo?for?mir::scene::SessionContainer; typeinfo?for?mir::scene::SessionCoordinator; + typeinfo?for?mir::scene::SessionEventHandlerRegister; + typeinfo?for?mir::scene::SessionEventSink; typeinfo?for?mir::scene::SessionListener; + typeinfo?for?mir::scene::SessionLock; + typeinfo?for?mir::scene::SessionLockObserver; typeinfo?for?mir::scene::Snapshot; typeinfo?for?mir::scene::StreamInfo; typeinfo?for?mir::scene::Surface; + typeinfo?for?mir::scene::SurfaceEventSource; typeinfo?for?mir::scene::SurfaceFactory; typeinfo?for?mir::scene::SurfaceObserver; + typeinfo?for?mir::scene::SurfaceObservers; + typeinfo?for?mir::scene::SurfaceStateTracker; + typeinfo?for?mir::scene::TextInputChange::CursorPosition; + typeinfo?for?mir::scene::TextInputChange::TextInputKeySym; + typeinfo?for?mir::scene::TextInputChange::TextInputPreeditStyle; + typeinfo?for?mir::scene::TextInputChange; + typeinfo?for?mir::scene::TextInputChangeHandler; + typeinfo?for?mir::scene::TextInputHub; + typeinfo?for?mir::scene::TextInputState; + typeinfo?for?mir::scene::TextInputStateObserver; typeinfo?for?mir::shell::AbstractShell; typeinfo?for?mir::shell::BasicWindowManager; typeinfo?for?mir::shell::CanonicalWindowManagerPolicy; + typeinfo?for?mir::shell::DefaultWindowManager; typeinfo?for?mir::shell::DisplayConfigurationController; typeinfo?for?mir::shell::DisplayLayout; typeinfo?for?mir::shell::FocusController; + typeinfo?for?mir::shell::Id; + typeinfo?for?mir::shell::IdleHandler; typeinfo?for?mir::shell::InputTargeter; typeinfo?for?mir::shell::PersistentSurfaceStore::Id; typeinfo?for?mir::shell::PersistentSurfaceStore; @@ -783,6 +1329,38 @@ MIR_SERVER_2.17 { typeinfo?for?mir::shell::WindowManagerTools; typeinfo?for?mir::time::Alarm; typeinfo?for?mir::time::AlarmFactory; + typeinfo?for?std::hash; + virtual?thunk?to?mir::DefaultServerConfiguration::add_wayland_extension*; + virtual?thunk?to?mir::DefaultServerConfiguration::set_enabled_wayland_extensions*; + virtual?thunk?to?mir::DefaultServerConfiguration::set_wayland_extension_filter*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_application_not_responding_detector*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_compositor*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_console_services*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_display*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_display_changer*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_display_platforms*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_emergency_cleanup*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_fatal_error_strategy*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_idle_handler*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_idle_hub*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_input_dispatcher*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_input_manager*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_main_clipboard*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_main_loop*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_primary_selection_clipboard*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_rendering_platforms*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_screen_shooter*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_server_status_listener*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_session_lock*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_stop_callback*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_text_input_hub*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_wayland_connector*; + virtual?thunk?to?mir::DefaultServerConfiguration::the_xwayland_connector*; + virtual?thunk?to?mir::DefaultServerStatusListener::paused*; + virtual?thunk?to?mir::DefaultServerStatusListener::ready_for_user_input*; + virtual?thunk?to?mir::DefaultServerStatusListener::resumed*; + virtual?thunk?to?mir::DefaultServerStatusListener::started*; + virtual?thunk?to?mir::DefaultServerStatusListener::stop_receiving_input*; virtual?thunk?to?mir::shell::AbstractShell::?AbstractShell*; virtual?thunk?to?mir::shell::AbstractShell::add_display*; virtual?thunk?to?mir::shell::AbstractShell::add_prompt_provider_for*; @@ -790,17 +1368,28 @@ MIR_SERVER_2.17 { virtual?thunk?to?mir::shell::AbstractShell::create_surface*; virtual?thunk?to?mir::shell::AbstractShell::destroy_surface*; virtual?thunk?to?mir::shell::AbstractShell::focus_next_session*; + virtual?thunk?to?mir::shell::AbstractShell::focus_prev_session*; virtual?thunk?to?mir::shell::AbstractShell::focused_session*; + virtual?thunk?to?mir::shell::AbstractShell::focused_surface*; virtual?thunk?to?mir::shell::AbstractShell::get_surface_attribute*; virtual?thunk?to?mir::shell::AbstractShell::handle*; virtual?thunk?to?mir::shell::AbstractShell::handle_surface_created*; virtual?thunk?to?mir::shell::AbstractShell::open_session*; + virtual?thunk?to?mir::shell::AbstractShell::raise*; + virtual?thunk?to?mir::shell::AbstractShell::raise_surface*; virtual?thunk?to?mir::shell::AbstractShell::remove_display*; + virtual?thunk?to?mir::shell::AbstractShell::request_move*; + virtual?thunk?to?mir::shell::AbstractShell::request_resize*; + virtual?thunk?to?mir::shell::AbstractShell::send_to_back*; virtual?thunk?to?mir::shell::AbstractShell::set_focus_to*; + virtual?thunk?to?mir::shell::AbstractShell::set_popup_grab_tree*; virtual?thunk?to?mir::shell::AbstractShell::set_surface_attribute*; virtual?thunk?to?mir::shell::AbstractShell::setting_focus_to*; virtual?thunk?to?mir::shell::AbstractShell::start_prompt_session_for*; virtual?thunk?to?mir::shell::AbstractShell::stop_prompt_session*; + virtual?thunk?to?mir::shell::AbstractShell::surface_at*; + virtual?thunk?to?mir::shell::AbstractShell::surface_ready*; + virtual?thunk?to?mir::shell::AbstractShell::swap_z_order*; virtual?thunk?to?mir::shell::BasicWindowManager::?BasicWindowManager*; virtual?thunk?to?mir::shell::BasicWindowManager::add_display*; virtual?thunk?to?mir::shell::BasicWindowManager::add_session*; @@ -816,15 +1405,35 @@ MIR_SERVER_2.17 { virtual?thunk?to?mir::shell::BasicWindowManager::remove_surface*; virtual?thunk?to?mir::shell::BasicWindowManager::set_surface_attribute*; virtual?thunk?to?mir::shell::ShellWrapper::add_display*; + virtual?thunk?to?mir::shell::ShellWrapper::focus_next_session*; + virtual?thunk?to?mir::shell::ShellWrapper::focus_prev_session*; + virtual?thunk?to?mir::shell::ShellWrapper::focused_session*; + virtual?thunk?to?mir::shell::ShellWrapper::focused_surface*; virtual?thunk?to?mir::shell::ShellWrapper::handle*; + virtual?thunk?to?mir::shell::ShellWrapper::raise*; virtual?thunk?to?mir::shell::ShellWrapper::remove_display*; + virtual?thunk?to?mir::shell::ShellWrapper::send_to_back*; + virtual?thunk?to?mir::shell::ShellWrapper::set_focus_to*; + virtual?thunk?to?mir::shell::ShellWrapper::set_popup_grab_tree*; + virtual?thunk?to?mir::shell::ShellWrapper::surface_at*; + virtual?thunk?to?mir::shell::ShellWrapper::swap_z_order*; + vtable?for?mir::BasicCallback; vtable?for?mir::DefaultServerConfiguration; + vtable?for?mir::DefaultServerStatusListener; + vtable?for?mir::DisplayChanger; + vtable?for?mir::DisplayServer; + vtable?for?mir::EmergencyCleanup; vtable?for?mir::Executor; + vtable?for?mir::GLibMainLoop; vtable?for?mir::LockableCallback; + vtable?for?mir::LockableCallbackWrapper; vtable?for?mir::MainLoop; vtable?for?mir::Server; vtable?for?mir::ServerActionQueue; + vtable?for?mir::ServerConfiguration; vtable?for?mir::ServerStatusListener; + vtable?for?mir::WaylandExtensionHook; + vtable?for?mir::compositor::BufferStream; vtable?for?mir::compositor::Compositor; vtable?for?mir::compositor::CompositorReport; vtable?for?mir::compositor::DisplayBufferCompositor; @@ -832,14 +1441,28 @@ MIR_SERVER_2.17 { vtable?for?mir::compositor::DisplayListener; vtable?for?mir::compositor::Scene; vtable?for?mir::compositor::SceneElement; + vtable?for?mir::compositor::ScreenShooter; + vtable?for?mir::detail::FdSources; + vtable?for?mir::detail::GMainContextHandle; + vtable?for?mir::detail::GSourceHandle; + vtable?for?mir::detail::SignalSources; vtable?for?mir::frontend::BufferSink; + vtable?for?mir::frontend::BufferStream; + vtable?for?mir::frontend::Connector; + vtable?for?mir::frontend::DisplayChanger; + vtable?for?mir::frontend::DragIconController; + vtable?for?mir::frontend::EventSink; + vtable?for?mir::frontend::InputConfigurationChanger; + vtable?for?mir::frontend::PointerInputDispatcher; vtable?for?mir::frontend::PromptSession; vtable?for?mir::frontend::Session; vtable?for?mir::frontend::SessionAuthorizer; vtable?for?mir::frontend::SessionCredentials; vtable?for?mir::frontend::Surface; + vtable?for?mir::frontend::SurfaceStack; vtable?for?mir::graphics::CloneDisplayConfigurationPolicy; vtable?for?mir::graphics::DisplayConfigurationObserver; + vtable?for?mir::graphics::NullDisplayConfigurationObserver; vtable?for?mir::graphics::SideBySideDisplayConfigurationPolicy; vtable?for?mir::graphics::SingleDisplayConfigurationPolicy; vtable?for?mir::input::CompositeEventFilter; @@ -851,36 +1474,72 @@ MIR_SERVER_2.17 { vtable?for?mir::input::InputDeviceObserver; vtable?for?mir::input::InputDispatcher; vtable?for?mir::input::InputManager; + vtable?for?mir::input::KeyboardObserver; + vtable?for?mir::input::Scene; + vtable?for?mir::input::Seat; vtable?for?mir::input::SeatObserver; vtable?for?mir::input::Surface; vtable?for?mir::input::TouchVisualizer::Spot; vtable?for?mir::input::TouchVisualizer; + vtable?for?mir::input::VTFilter; + vtable?for?mir::input::Validator; + vtable?for?mir::input::VirtualInputDevice; vtable?for?mir::scene::ApplicationNotRespondingDetector::Observer; vtable?for?mir::scene::ApplicationNotRespondingDetector; vtable?for?mir::scene::ApplicationNotRespondingDetectorWrapper; vtable?for?mir::scene::BufferStreamFactory; + vtable?for?mir::scene::Clipboard; + vtable?for?mir::scene::ClipboardObserver; vtable?for?mir::scene::CoordinateTranslator; + vtable?for?mir::scene::DataExchangeSource; + vtable?for?mir::scene::IdleHub; + vtable?for?mir::scene::IdleStateObserver; + vtable?for?mir::scene::NullObserver; + vtable?for?mir::scene::NullPromptSessionListener; vtable?for?mir::scene::NullSessionListener; vtable?for?mir::scene::NullSurfaceObserver; vtable?for?mir::scene::Observer; + vtable?for?mir::scene::OutputProperties; + vtable?for?mir::scene::OutputPropertiesCache; vtable?for?mir::scene::PromptSession; vtable?for?mir::scene::PromptSessionCreationParameters; vtable?for?mir::scene::PromptSessionListener; vtable?for?mir::scene::PromptSessionManager; + vtable?for?mir::scene::SceneChangeNotification; + vtable?for?mir::scene::SceneReport; vtable?for?mir::scene::Session; + vtable?for?mir::scene::SessionContainer; vtable?for?mir::scene::SessionCoordinator; + vtable?for?mir::scene::SessionEventHandlerRegister; + vtable?for?mir::scene::SessionEventSink; vtable?for?mir::scene::SessionListener; + vtable?for?mir::scene::SessionLock; + vtable?for?mir::scene::SessionLockObserver; vtable?for?mir::scene::Snapshot; vtable?for?mir::scene::StreamInfo; vtable?for?mir::scene::Surface; + vtable?for?mir::scene::SurfaceEventSource; vtable?for?mir::scene::SurfaceFactory; vtable?for?mir::scene::SurfaceObserver; + vtable?for?mir::scene::SurfaceObservers; + vtable?for?mir::scene::SurfaceStateTracker; + vtable?for?mir::scene::TextInputChange::CursorPosition; + vtable?for?mir::scene::TextInputChange::TextInputKeySym; + vtable?for?mir::scene::TextInputChange::TextInputPreeditStyle; + vtable?for?mir::scene::TextInputChange; + vtable?for?mir::scene::TextInputChangeHandler; + vtable?for?mir::scene::TextInputHub; + vtable?for?mir::scene::TextInputState; + vtable?for?mir::scene::TextInputStateObserver; vtable?for?mir::shell::AbstractShell; vtable?for?mir::shell::BasicWindowManager; vtable?for?mir::shell::CanonicalWindowManagerPolicy; + vtable?for?mir::shell::DefaultWindowManager; vtable?for?mir::shell::DisplayConfigurationController; vtable?for?mir::shell::DisplayLayout; vtable?for?mir::shell::FocusController; + vtable?for?mir::shell::Id; + vtable?for?mir::shell::IdleHandler; vtable?for?mir::shell::InputTargeter; vtable?for?mir::shell::PersistentSurfaceStore::Id; vtable?for?mir::shell::PersistentSurfaceStore; @@ -900,16 +1559,8 @@ MIR_SERVER_2.17 { vtable?for?mir::shell::WindowManagerTools; vtable?for?mir::time::Alarm; vtable?for?mir::time::AlarmFactory; - mir::shell::ShellWrapper::surface_ready*; - mir::shell::ShellWrapper::set_popup_grab_tree*; - mir::DefaultServerConfiguration::the_main_clipboard*; - mir::DefaultServerConfiguration::the_primary_selection_clipboard*; - "mir::DefaultServerConfiguration::the_drag_icon_controller()"; - "mir::DefaultServerConfiguration::the_pointer_input_dispatcher()"; - mir::shell::SurfaceStackWrapper::swap_z_order*; - mir::shell::SurfaceStackWrapper::send_to_back*; - mir::shell::ShellWrapper::swap_z_order*; - mir::shell::ShellWrapper::send_to_back*; - }; - local: *; + vtable?for?std::hash; + }; +local: *; }; + From e2a8769c3e09dcf6a1fe7b6844b257785c18be93 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Tue, 23 Apr 2024 10:09:56 -0400 Subject: [PATCH 12/29] bugfix: generator was missing namespaces for structs within classes --- .github/workflows/symbols-check.yml | 1 + src/server/CMakeLists.txt | 16 +- src/server/symbols.map | 263 +--------------------------- tools/symbols_map_generator/main.py | 31 ++-- 4 files changed, 38 insertions(+), 273 deletions(-) diff --git a/.github/workflows/symbols-check.yml b/.github/workflows/symbols-check.yml index 2a760e604d9..05cdfdd8b9e 100644 --- a/.github/workflows/symbols-check.yml +++ b/.github/workflows/symbols-check.yml @@ -39,4 +39,5 @@ jobs: RET=0 cmake --build build --target check-miral-symbols-map || RET=$? cmake --build build --target check-miroil-symbols-map || RET=$? + cmake --build build --target check-mirserver-symbols-map || RET=$? exit $RET \ No newline at end of file diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 1d3f4a4f7c6..84d1efcbcbe 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -186,15 +186,25 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mirserver-internal.pc add_custom_target( generate-mirserver-symbols-map - COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/run.sh + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py --library-name mir_server --version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR} --symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" --internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/server" - --include_dirs "$,:>" - --output_symbols + --include-dirs="$,:>" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") +add_custom_target( + check-mirserver-symbols-map + COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py + --library-name mir_server + --version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR} + --symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" + --internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/server" + --include-dirs "$,:>" + --diff + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + add_custom_target(regenerate-mirserver-internal-debian-symbols COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/run.sh --library mir_server_internal --version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR} --output_symbols WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" diff --git a/src/server/symbols.map b/src/server/symbols.map index cfa97e20595..e8e1d1ef015 100644 --- a/src/server/symbols.map +++ b/src/server/symbols.map @@ -1,12 +1,6 @@ MIR_SERVER_INTERNAL_2.17 { global: extern "C++" { - "mir::DefaultServerConfiguration::the_drag_icon_controller()"; - "mir::DefaultServerConfiguration::the_pointer_input_dispatcher()"; - VTT?for?mir::DefaultServerConfiguration; - VTT?for?mir::scene::ApplicationNotRespondingDetectorWrapper; - VTT?for?mir::shell::ShellWrapper; - VTT?for?mir::shell::SystemCompositorWindowManager; mir::BasicCallback::BasicCallback*; mir::BasicCallback::lock*; mir::BasicCallback::operator*; @@ -14,22 +8,16 @@ global: mir::DefaultServerConfiguration::DefaultServerConfiguration*; mir::DefaultServerConfiguration::add_wayland_extension*; mir::DefaultServerConfiguration::default_reports*; - mir::DefaultServerConfiguration::new_ipc_factory*; mir::DefaultServerConfiguration::set_enabled_wayland_extensions*; mir::DefaultServerConfiguration::set_wayland_extension_filter*; mir::DefaultServerConfiguration::the_application_not_responding_detector*; mir::DefaultServerConfiguration::the_buffer_allocator*; mir::DefaultServerConfiguration::the_buffer_stream_factory*; - mir::DefaultServerConfiguration::the_clipboard*; mir::DefaultServerConfiguration::the_clock*; mir::DefaultServerConfiguration::the_composite_event_filter*; mir::DefaultServerConfiguration::the_compositor*; mir::DefaultServerConfiguration::the_compositor_report*; - mir::DefaultServerConfiguration::the_connection_creator*; - mir::DefaultServerConfiguration::the_connector*; - mir::DefaultServerConfiguration::the_connector_report*; mir::DefaultServerConfiguration::the_console_services*; - mir::DefaultServerConfiguration::the_coordinate_translator*; mir::DefaultServerConfiguration::the_cursor*; mir::DefaultServerConfiguration::the_cursor_images*; mir::DefaultServerConfiguration::the_cursor_listener*; @@ -53,8 +41,6 @@ global: mir::DefaultServerConfiguration::the_frontend_display_changer*; mir::DefaultServerConfiguration::the_frontend_surface_stack*; mir::DefaultServerConfiguration::the_gl_config*; - mir::DefaultServerConfiguration::the_host_connection*; - mir::DefaultServerConfiguration::the_host_lifecycle_event_listener*; mir::DefaultServerConfiguration::the_idle_handler*; mir::DefaultServerConfiguration::the_idle_hub*; mir::DefaultServerConfiguration::the_input_device_hub*; @@ -71,14 +57,10 @@ global: mir::DefaultServerConfiguration::the_main_clipboard*; mir::DefaultServerConfiguration::the_main_loop*; mir::DefaultServerConfiguration::the_mediating_display_changer*; - mir::DefaultServerConfiguration::the_message_processor_report*; mir::DefaultServerConfiguration::the_options*; mir::DefaultServerConfiguration::the_persistent_surface_store*; - mir::DefaultServerConfiguration::the_pixel_buffer*; mir::DefaultServerConfiguration::the_pointer_input_dispatcher*; mir::DefaultServerConfiguration::the_primary_selection_clipboard*; - mir::DefaultServerConfiguration::the_prompt_connection_creator*; - mir::DefaultServerConfiguration::the_prompt_connector*; mir::DefaultServerConfiguration::the_prompt_session_listener*; mir::DefaultServerConfiguration::the_prompt_session_manager*; mir::DefaultServerConfiguration::the_renderer_factory*; @@ -86,7 +68,6 @@ global: mir::DefaultServerConfiguration::the_scene*; mir::DefaultServerConfiguration::the_scene_report*; mir::DefaultServerConfiguration::the_screen_shooter*; - mir::DefaultServerConfiguration::the_screencast*; mir::DefaultServerConfiguration::the_seat*; mir::DefaultServerConfiguration::the_seat_observer*; mir::DefaultServerConfiguration::the_seat_observer_registrar*; @@ -99,12 +80,10 @@ global: mir::DefaultServerConfiguration::the_session_event_sink*; mir::DefaultServerConfiguration::the_session_listener*; mir::DefaultServerConfiguration::the_session_lock*; - mir::DefaultServerConfiguration::the_session_mediator_observer_registrar*; mir::DefaultServerConfiguration::the_shared_library_prober_report*; mir::DefaultServerConfiguration::the_shell*; mir::DefaultServerConfiguration::the_shell_display_layout*; mir::DefaultServerConfiguration::the_shell_report*; - mir::DefaultServerConfiguration::the_snapshot_strategy*; mir::DefaultServerConfiguration::the_stop_callback*; mir::DefaultServerConfiguration::the_surface_factory*; mir::DefaultServerConfiguration::the_surface_input_dispatcher*; @@ -133,7 +112,6 @@ global: mir::DisplayServer::DisplayServer*; mir::DisplayServer::run*; mir::DisplayServer::stop*; - mir::Executor::?Executor*; mir::GLibMainLoop::GLibMainLoop*; mir::GLibMainLoop::create_alarm*; mir::GLibMainLoop::enqueue*; @@ -155,7 +133,10 @@ global: mir::LockableCallbackWrapper::lock*; mir::LockableCallbackWrapper::operator*; mir::LockableCallbackWrapper::unlock*; - mir::OptionType*; + mir::ObserverMultiplexer::empty*; + mir::ObserverMultiplexer::register_early_observer*; + mir::ObserverMultiplexer::register_interest*; + mir::ObserverMultiplexer::unregister_interest*; mir::Server::Server*; mir::Server::add_configuration_option*; mir::Server::add_emergency_cleanup*; @@ -166,18 +147,14 @@ global: mir::Server::apply_settings*; mir::Server::exited_normally*; mir::Server::get_options*; - mir::Server::mir_socket_name*; - mir::Server::open_client_socket*; mir::Server::open_client_wayland*; mir::Server::open_prompt_socket*; mir::Server::open_wayland_client_socket*; mir::Server::override_the_application_not_responding_detector*; mir::Server::override_the_compositor*; - mir::Server::override_the_coordinate_translator*; mir::Server::override_the_cursor_images*; mir::Server::override_the_display_buffer_compositor_factory*; mir::Server::override_the_gl_config*; - mir::Server::override_the_host_lifecycle_event_listener*; mir::Server::override_the_input_dispatcher*; mir::Server::override_the_input_targeter*; mir::Server::override_the_logger*; @@ -213,7 +190,6 @@ global: mir::Server::the_display_platforms*; mir::Server::the_focus_controller*; mir::Server::the_gl_config*; - mir::Server::the_graphics_platform*; mir::Server::the_input_device_hub*; mir::Server::the_input_targeter*; mir::Server::the_logger*; @@ -227,7 +203,6 @@ global: mir::Server::the_session_coordinator*; mir::Server::the_session_listener*; mir::Server::the_session_lock*; - mir::Server::the_session_mediator_observer_registrar*; mir::Server::the_shell*; mir::Server::the_shell_display_layout*; mir::Server::the_surface_factory*; @@ -293,7 +268,6 @@ global: mir::detail::add_idle_gsource*; mir::detail::add_server_action_gsource*; mir::detail::add_timer_gsource*; - mir::empty*; mir::frontend::BufferSink::?BufferSink*; mir::frontend::BufferSink::BufferSink*; mir::frontend::BufferSink::operator*; @@ -321,9 +295,6 @@ global: mir::frontend::PromptSession::?PromptSession*; mir::frontend::PromptSession::PromptSession*; mir::frontend::PromptSession::operator*; - mir::frontend::Session::?Session*; - mir::frontend::Session::Session*; - mir::frontend::Session::operator*; mir::frontend::SessionAuthorizer::?SessionAuthorizer*; mir::frontend::SessionAuthorizer::SessionAuthorizer*; mir::frontend::SessionAuthorizer::operator*; @@ -378,11 +349,9 @@ global: mir::input::InputManager::?InputManager*; mir::input::InputManager::InputManager*; mir::input::InputManager::operator*; - mir::input::InputReceptionMode*; mir::input::KeyboardObserver::?KeyboardObserver*; mir::input::KeyboardObserver::KeyboardObserver*; mir::input::KeyboardObserver::operator*; - mir::input::ResyncKeyboardDispatcher*; mir::input::Scene::?Scene*; mir::input::Scene::Scene*; mir::input::Scene::operator*; @@ -404,10 +373,7 @@ global: mir::input::VirtualInputDevice::if_started_then*; mir::input::default_cursor_size*; mir::input::input_platform_from_graphics_module*; - mir::input::operator*; mir::input::probe_input_platforms*; - mir::register_early_observer*; - mir::register_interest*; mir::report_exception*; mir::run_mir*; mir::scene::ApplicationNotRespondingDetector::?ApplicationNotRespondingDetector*; @@ -426,7 +392,6 @@ global: mir::scene::BufferStreamFactory::operator*; mir::scene::ClipboardObserver::?ClipboardObserver*; mir::scene::ClipboardObserver::ClipboardObserver*; - mir::scene::CoordinateTranslator::?CoordinateTranslator*; mir::scene::DataExchangeSource::?DataExchangeSource*; mir::scene::DataExchangeSource::DataExchangeSource*; mir::scene::IdleHub::?IdleHub*; @@ -473,7 +438,6 @@ global: mir::scene::NullSurfaceObserver::frame_posted*; mir::scene::NullSurfaceObserver::hidden_set_to*; mir::scene::NullSurfaceObserver::input_consumed*; - mir::scene::NullSurfaceObserver::keymap_changed*; mir::scene::NullSurfaceObserver::left_output*; mir::scene::NullSurfaceObserver::moved_to*; mir::scene::NullSurfaceObserver::operator*; @@ -481,7 +445,6 @@ global: mir::scene::NullSurfaceObserver::placed_relative*; mir::scene::NullSurfaceObserver::reception_mode_set_to*; mir::scene::NullSurfaceObserver::renamed*; - mir::scene::NullSurfaceObserver::start_drag_and_drop*; mir::scene::NullSurfaceObserver::transformation_set_to*; mir::scene::NullSurfaceObserver::window_resized_to*; mir::scene::Observer::?Observer*; @@ -576,21 +539,16 @@ global: mir::scene::SurfaceStateTracker::with_active_state*; mir::scene::SurfaceStateTracker::without*; mir::scene::TextInputChange::TextInputChange*; - mir::scene::TextInputChangeCause*; mir::scene::TextInputChangeHandler::?TextInputChangeHandler*; mir::scene::TextInputChangeHandler::TextInputChangeHandler*; - mir::scene::TextInputContentHint*; - mir::scene::TextInputContentPurpose*; mir::scene::TextInputHub::?TextInputHub*; mir::scene::TextInputStateObserver::?TextInputStateObserver*; mir::scene::TextInputStateObserver::TextInputStateObserver*; - mir::scene::a_surface*; mir::scene::operator*; mir::shell::AbstractShell::?AbstractShell*; mir::shell::AbstractShell::AbstractShell*; mir::shell::AbstractShell::add_display*; mir::shell::AbstractShell::add_prompt_provider_for*; - mir::shell::AbstractShell::clear_drag_and_drop_handle*; mir::shell::AbstractShell::close_session*; mir::shell::AbstractShell::create_surface*; mir::shell::AbstractShell::destroy_surface*; @@ -605,11 +563,9 @@ global: mir::shell::AbstractShell::raise*; mir::shell::AbstractShell::raise_surface*; mir::shell::AbstractShell::remove_display*; - mir::shell::AbstractShell::request_drag_and_drop*; mir::shell::AbstractShell::request_move*; mir::shell::AbstractShell::request_resize*; mir::shell::AbstractShell::send_to_back*; - mir::shell::AbstractShell::set_drag_and_drop_handle*; mir::shell::AbstractShell::set_focus_to*; mir::shell::AbstractShell::set_popup_grab_tree*; mir::shell::AbstractShell::set_surface_attribute*; @@ -618,46 +574,6 @@ global: mir::shell::AbstractShell::surface_at*; mir::shell::AbstractShell::surface_ready*; mir::shell::AbstractShell::swap_z_order*; - mir::shell::AbstractShell::update_focused_surface_confined_region*; - mir::shell::BasicWindowManager::?BasicWindowManager*; - mir::shell::BasicWindowManager::BasicWindowManager*; - mir::shell::BasicWindowManager::active_display*; - mir::shell::BasicWindowManager::add_display*; - mir::shell::BasicWindowManager::add_session*; - mir::shell::BasicWindowManager::add_surface*; - mir::shell::BasicWindowManager::clear_drag_and_drop_handle*; - mir::shell::BasicWindowManager::find_session*; - mir::shell::BasicWindowManager::focus_next_session*; - mir::shell::BasicWindowManager::focused_session*; - mir::shell::BasicWindowManager::focused_surface*; - mir::shell::BasicWindowManager::forget*; - mir::shell::BasicWindowManager::handle_keyboard_event*; - mir::shell::BasicWindowManager::handle_pointer_event*; - mir::shell::BasicWindowManager::handle_raise_surface*; - mir::shell::BasicWindowManager::handle_request_move*; - mir::shell::BasicWindowManager::handle_touch_event*; - mir::shell::BasicWindowManager::info_for*; - mir::shell::BasicWindowManager::modify_surface*; - mir::shell::BasicWindowManager::raise_tree*; - mir::shell::BasicWindowManager::remove_display*; - mir::shell::BasicWindowManager::remove_session*; - mir::shell::BasicWindowManager::remove_surface*; - mir::shell::BasicWindowManager::set_drag_and_drop_handle*; - mir::shell::BasicWindowManager::set_focus_to*; - mir::shell::BasicWindowManager::set_surface_attribute*; - mir::shell::BasicWindowManager::surface_at*; - mir::shell::CanonicalWindowManagerPolicy::CanonicalWindowManagerPolicy*; - mir::shell::CanonicalWindowManagerPolicy::handle_delete_surface*; - mir::shell::CanonicalWindowManagerPolicy::handle_displays_updated*; - mir::shell::CanonicalWindowManagerPolicy::handle_keyboard_event*; - mir::shell::CanonicalWindowManagerPolicy::handle_modify_surface*; - mir::shell::CanonicalWindowManagerPolicy::handle_new_surface*; - mir::shell::CanonicalWindowManagerPolicy::handle_place_new_surface*; - mir::shell::CanonicalWindowManagerPolicy::handle_pointer_event*; - mir::shell::CanonicalWindowManagerPolicy::handle_raise_surface*; - mir::shell::CanonicalWindowManagerPolicy::handle_session_info_updated*; - mir::shell::CanonicalWindowManagerPolicy::handle_set_state*; - mir::shell::CanonicalWindowManagerPolicy::handle_touch_event*; mir::shell::DefaultWindowManager::handle_keyboard_event*; mir::shell::DisplayConfigurationController::?DisplayConfigurationController*; mir::shell::DisplayConfigurationController::DisplayConfigurationController*; @@ -668,9 +584,6 @@ global: mir::shell::FocusController::?FocusController*; mir::shell::FocusController::FocusController*; mir::shell::FocusController::operator*; - mir::shell::Id::Id*; - mir::shell::Id::operator*; - mir::shell::Id::serialize_to_string*; mir::shell::IdleHandler::?IdleHandler*; mir::shell::IdleHandler::IdleHandler*; mir::shell::InputTargeter::?InputTargeter*; @@ -686,7 +599,6 @@ global: mir::shell::ShellWrapper::ShellWrapper*; mir::shell::ShellWrapper::add_display*; mir::shell::ShellWrapper::add_prompt_provider_for*; - mir::shell::ShellWrapper::clear_drag_and_drop_handle*; mir::shell::ShellWrapper::close_session*; mir::shell::ShellWrapper::create_surface*; mir::shell::ShellWrapper::destroy_surface*; @@ -701,11 +613,9 @@ global: mir::shell::ShellWrapper::raise*; mir::shell::ShellWrapper::raise_surface*; mir::shell::ShellWrapper::remove_display*; - mir::shell::ShellWrapper::request_drag_and_drop*; mir::shell::ShellWrapper::request_move*; mir::shell::ShellWrapper::request_resize*; mir::shell::ShellWrapper::send_to_back*; - mir::shell::ShellWrapper::set_drag_and_drop_handle*; mir::shell::ShellWrapper::set_focus_to*; mir::shell::ShellWrapper::set_popup_grab_tree*; mir::shell::ShellWrapper::set_surface_attribute*; @@ -714,14 +624,6 @@ global: mir::shell::ShellWrapper::surface_at*; mir::shell::ShellWrapper::surface_ready*; mir::shell::ShellWrapper::swap_z_order*; - mir::shell::SurfaceInfo::SurfaceInfo*; - mir::shell::SurfaceInfo::can_be_active*; - mir::shell::SurfaceInfo::can_morph_to*; - mir::shell::SurfaceInfo::constrain_resize*; - mir::shell::SurfaceInfo::is_visible*; - mir::shell::SurfaceInfo::must_have_parent*; - mir::shell::SurfaceInfo::must_not_have_parent*; - mir::shell::SurfaceInfo::needs_titlebar*; mir::shell::SurfaceSpecification::is_empty*; mir::shell::SurfaceSpecification::set_size*; mir::shell::SurfaceSpecification::update_from*; @@ -736,42 +638,20 @@ global: mir::shell::SurfaceStackWrapper::surface_at*; mir::shell::SurfaceStackWrapper::swap_z_order*; mir::shell::SystemCompositorWindowManager::SystemCompositorWindowManager*; - mir::shell::SystemCompositorWindowManager::add_display*; - mir::shell::SystemCompositorWindowManager::add_session*; - mir::shell::SystemCompositorWindowManager::add_surface*; - mir::shell::SystemCompositorWindowManager::handle_keyboard_event*; - mir::shell::SystemCompositorWindowManager::handle_pointer_event*; - mir::shell::SystemCompositorWindowManager::handle_raise_surface*; - mir::shell::SystemCompositorWindowManager::handle_request_move*; - mir::shell::SystemCompositorWindowManager::handle_request_resize*; - mir::shell::SystemCompositorWindowManager::handle_touch_event*; - mir::shell::SystemCompositorWindowManager::modify_surface*; mir::shell::SystemCompositorWindowManager::on_session_added*; mir::shell::SystemCompositorWindowManager::on_session_ready*; mir::shell::SystemCompositorWindowManager::on_session_removed*; - mir::shell::SystemCompositorWindowManager::remove_display*; - mir::shell::SystemCompositorWindowManager::remove_session*; - mir::shell::SystemCompositorWindowManager::remove_surface*; - mir::shell::SystemCompositorWindowManager::set_surface_attribute*; - mir::shell::WindowManagementPolicy::?WindowManagementPolicy*; - mir::shell::WindowManagementPolicy::WindowManagementPolicy*; - mir::shell::WindowManagementPolicy::operator*; mir::shell::WindowManager::?WindowManager*; mir::shell::WindowManager::WindowManager*; mir::shell::WindowManager::operator*; - mir::shell::WindowManagerTools::?WindowManagerTools*; - mir::shell::WindowManagerTools::WindowManagerTools*; - mir::shell::WindowManagerTools::operator*; mir::shell::operator*; mir::terminate_with_current_exception*; mir::time::Alarm::?Alarm*; mir::time::Alarm::Alarm*; - mir::time::Alarm::State*; mir::time::Alarm::operator*; mir::time::AlarmFactory::?AlarmFactory*; mir::time::AlarmFactory::AlarmFactory*; mir::time::AlarmFactory::operator*; - mir::unregister_interest*; non-virtual?thunk?to?mir::BasicCallback::lock*; non-virtual?thunk?to?mir::BasicCallback::operator*; non-virtual?thunk?to?mir::BasicCallback::unlock*; @@ -868,7 +748,6 @@ global: non-virtual?thunk?to?mir::DefaultServerStatusListener::started*; non-virtual?thunk?to?mir::DefaultServerStatusListener::stop_receiving_input*; non-virtual?thunk?to?mir::DisplayChanger::?DisplayChanger*; - non-virtual?thunk?to?mir::Executor::?Executor*; non-virtual?thunk?to?mir::GLibMainLoop::create_alarm*; non-virtual?thunk?to?mir::GLibMainLoop::enqueue*; non-virtual?thunk?to?mir::GLibMainLoop::enqueue_with_guaranteed_execution*; @@ -885,6 +764,9 @@ global: non-virtual?thunk?to?mir::LockableCallbackWrapper::lock*; non-virtual?thunk?to?mir::LockableCallbackWrapper::operator*; non-virtual?thunk?to?mir::LockableCallbackWrapper::unlock*; + non-virtual?thunk?to?mir::ObserverMultiplexer::register_early_observer*; + non-virtual?thunk?to?mir::ObserverMultiplexer::register_interest*; + non-virtual?thunk?to?mir::ObserverMultiplexer::unregister_interest*; non-virtual?thunk?to?mir::ServerActionQueue::?ServerActionQueue*; non-virtual?thunk?to?mir::ServerConfiguration::?ServerConfiguration*; non-virtual?thunk?to?mir::ServerStatusListener::?ServerStatusListener*; @@ -906,7 +788,6 @@ global: non-virtual?thunk?to?mir::frontend::InputConfigurationChanger::?InputConfigurationChanger*; non-virtual?thunk?to?mir::frontend::PointerInputDispatcher::?PointerInputDispatcher*; non-virtual?thunk?to?mir::frontend::PromptSession::?PromptSession*; - non-virtual?thunk?to?mir::frontend::Session::?Session*; non-virtual?thunk?to?mir::frontend::SessionAuthorizer::?SessionAuthorizer*; non-virtual?thunk?to?mir::frontend::Surface::?Surface*; non-virtual?thunk?to?mir::frontend::SurfaceStack::?SurfaceStack*; @@ -941,8 +822,6 @@ global: non-virtual?thunk?to?mir::input::TouchVisualizer::?TouchVisualizer*; non-virtual?thunk?to?mir::input::VTFilter::?VTFilter*; non-virtual?thunk?to?mir::input::VTFilter::handle*; - non-virtual?thunk?to?mir::register_early_observer*; - non-virtual?thunk?to?mir::register_interest*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetector::?ApplicationNotRespondingDetector*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetector::Observer::?Observer*; non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::?ApplicationNotRespondingDetectorWrapper*; @@ -953,7 +832,6 @@ global: non-virtual?thunk?to?mir::scene::ApplicationNotRespondingDetectorWrapper::unregister_session*; non-virtual?thunk?to?mir::scene::BufferStreamFactory::?BufferStreamFactory*; non-virtual?thunk?to?mir::scene::ClipboardObserver::?ClipboardObserver*; - non-virtual?thunk?to?mir::scene::CoordinateTranslator::?CoordinateTranslator*; non-virtual?thunk?to?mir::scene::DataExchangeSource::?DataExchangeSource*; non-virtual?thunk?to?mir::scene::IdleHub::?IdleHub*; non-virtual?thunk?to?mir::scene::IdleStateObserver::?IdleStateObserver*; @@ -992,15 +870,12 @@ global: non-virtual?thunk?to?mir::scene::NullSurfaceObserver::frame_posted*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::hidden_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::input_consumed*; - non-virtual?thunk?to?mir::scene::NullSurfaceObserver::keymap_changed*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::left_output*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::moved_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::orientation_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::placed_relative*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::reception_mode_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::renamed*; - non-virtual?thunk?to?mir::scene::NullSurfaceObserver::resized_to*; - non-virtual?thunk?to?mir::scene::NullSurfaceObserver::start_drag_and_drop*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::transformation_set_to*; non-virtual?thunk?to?mir::scene::NullSurfaceObserver::window_resized_to*; non-virtual?thunk?to?mir::scene::Observer::?Observer*; @@ -1054,7 +929,6 @@ global: non-virtual?thunk?to?mir::shell::AbstractShell::?AbstractShell*; non-virtual?thunk?to?mir::shell::AbstractShell::add_display*; non-virtual?thunk?to?mir::shell::AbstractShell::add_prompt_provider_for*; - non-virtual?thunk?to?mir::shell::AbstractShell::clear_drag_and_drop_handle*; non-virtual?thunk?to?mir::shell::AbstractShell::close_session*; non-virtual?thunk?to?mir::shell::AbstractShell::create_surface*; non-virtual?thunk?to?mir::shell::AbstractShell::destroy_surface*; @@ -1069,11 +943,9 @@ global: non-virtual?thunk?to?mir::shell::AbstractShell::raise*; non-virtual?thunk?to?mir::shell::AbstractShell::raise_surface*; non-virtual?thunk?to?mir::shell::AbstractShell::remove_display*; - non-virtual?thunk?to?mir::shell::AbstractShell::request_drag_and_drop*; non-virtual?thunk?to?mir::shell::AbstractShell::request_move*; non-virtual?thunk?to?mir::shell::AbstractShell::request_resize*; non-virtual?thunk?to?mir::shell::AbstractShell::send_to_back*; - non-virtual?thunk?to?mir::shell::AbstractShell::set_drag_and_drop_handle*; non-virtual?thunk?to?mir::shell::AbstractShell::set_focus_to*; non-virtual?thunk?to?mir::shell::AbstractShell::set_popup_grab_tree*; non-virtual?thunk?to?mir::shell::AbstractShell::set_surface_attribute*; @@ -1082,42 +954,6 @@ global: non-virtual?thunk?to?mir::shell::AbstractShell::surface_at*; non-virtual?thunk?to?mir::shell::AbstractShell::surface_ready*; non-virtual?thunk?to?mir::shell::AbstractShell::swap_z_order*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::active_display*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::add_display*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::add_session*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::add_surface*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::clear_drag_and_drop_handle*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::find_session*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::focus_next_session*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::focused_session*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::focused_surface*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::forget*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::handle_keyboard_event*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::handle_pointer_event*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::handle_raise_surface*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::handle_request_move*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::handle_touch_event*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::info_for*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::modify_surface*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::raise_tree*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::remove_display*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::remove_session*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::remove_surface*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::set_drag_and_drop_handle*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::set_focus_to*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::set_surface_attribute*; - non-virtual?thunk?to?mir::shell::BasicWindowManager::surface_at*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_delete_surface*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_displays_updated*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_keyboard_event*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_modify_surface*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_new_surface*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_place_new_surface*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_pointer_event*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_raise_surface*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_session_info_updated*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_set_state*; - non-virtual?thunk?to?mir::shell::CanonicalWindowManagerPolicy::handle_touch_event*; non-virtual?thunk?to?mir::shell::DefaultWindowManager::handle_keyboard_event*; non-virtual?thunk?to?mir::shell::DisplayConfigurationController::?DisplayConfigurationController*; non-virtual?thunk?to?mir::shell::DisplayLayout::?DisplayLayout*; @@ -1128,7 +964,6 @@ global: non-virtual?thunk?to?mir::shell::ShellReport::?ShellReport*; non-virtual?thunk?to?mir::shell::ShellWrapper::add_display*; non-virtual?thunk?to?mir::shell::ShellWrapper::add_prompt_provider_for*; - non-virtual?thunk?to?mir::shell::ShellWrapper::clear_drag_and_drop_handle*; non-virtual?thunk?to?mir::shell::ShellWrapper::close_session*; non-virtual?thunk?to?mir::shell::ShellWrapper::create_surface*; non-virtual?thunk?to?mir::shell::ShellWrapper::destroy_surface*; @@ -1143,11 +978,9 @@ global: non-virtual?thunk?to?mir::shell::ShellWrapper::raise*; non-virtual?thunk?to?mir::shell::ShellWrapper::raise_surface*; non-virtual?thunk?to?mir::shell::ShellWrapper::remove_display*; - non-virtual?thunk?to?mir::shell::ShellWrapper::request_drag_and_drop*; non-virtual?thunk?to?mir::shell::ShellWrapper::request_move*; non-virtual?thunk?to?mir::shell::ShellWrapper::request_resize*; non-virtual?thunk?to?mir::shell::ShellWrapper::send_to_back*; - non-virtual?thunk?to?mir::shell::ShellWrapper::set_drag_and_drop_handle*; non-virtual?thunk?to?mir::shell::ShellWrapper::set_focus_to*; non-virtual?thunk?to?mir::shell::ShellWrapper::set_popup_grab_tree*; non-virtual?thunk?to?mir::shell::ShellWrapper::set_surface_attribute*; @@ -1163,29 +996,12 @@ global: non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::send_to_back*; non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::surface_at*; non-virtual?thunk?to?mir::shell::SurfaceStackWrapper::swap_z_order*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::add_display*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::add_session*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::add_surface*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::handle_keyboard_event*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::handle_pointer_event*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::handle_raise_surface*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::handle_request_move*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::handle_request_resize*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::handle_touch_event*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::modify_surface*; non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::on_session_added*; non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::on_session_ready*; non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::on_session_removed*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::remove_display*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::remove_session*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::remove_surface*; - non-virtual?thunk?to?mir::shell::SystemCompositorWindowManager::set_surface_attribute*; - non-virtual?thunk?to?mir::shell::WindowManagementPolicy::?WindowManagementPolicy*; non-virtual?thunk?to?mir::shell::WindowManager::?WindowManager*; - non-virtual?thunk?to?mir::shell::WindowManagerTools::?WindowManagerTools*; non-virtual?thunk?to?mir::time::Alarm::?Alarm*; non-virtual?thunk?to?mir::time::AlarmFactory::?AlarmFactory*; - non-virtual?thunk?to?mir::unregister_interest*; std::hash::operator*; typeinfo?for?mir::BasicCallback; typeinfo?for?mir::DefaultServerConfiguration; @@ -1193,7 +1009,6 @@ global: typeinfo?for?mir::DisplayChanger; typeinfo?for?mir::DisplayServer; typeinfo?for?mir::EmergencyCleanup; - typeinfo?for?mir::Executor; typeinfo?for?mir::GLibMainLoop; typeinfo?for?mir::LockableCallback; typeinfo?for?mir::LockableCallbackWrapper; @@ -1225,7 +1040,6 @@ global: typeinfo?for?mir::frontend::InputConfigurationChanger; typeinfo?for?mir::frontend::PointerInputDispatcher; typeinfo?for?mir::frontend::PromptSession; - typeinfo?for?mir::frontend::Session; typeinfo?for?mir::frontend::SessionAuthorizer; typeinfo?for?mir::frontend::SessionCredentials; typeinfo?for?mir::frontend::Surface; @@ -1260,7 +1074,6 @@ global: typeinfo?for?mir::scene::BufferStreamFactory; typeinfo?for?mir::scene::Clipboard; typeinfo?for?mir::scene::ClipboardObserver; - typeinfo?for?mir::scene::CoordinateTranslator; typeinfo?for?mir::scene::DataExchangeSource; typeinfo?for?mir::scene::IdleHub; typeinfo?for?mir::scene::IdleStateObserver; @@ -1285,7 +1098,6 @@ global: typeinfo?for?mir::scene::SessionListener; typeinfo?for?mir::scene::SessionLock; typeinfo?for?mir::scene::SessionLockObserver; - typeinfo?for?mir::scene::Snapshot; typeinfo?for?mir::scene::StreamInfo; typeinfo?for?mir::scene::Surface; typeinfo?for?mir::scene::SurfaceEventSource; @@ -1302,31 +1114,24 @@ global: typeinfo?for?mir::scene::TextInputState; typeinfo?for?mir::scene::TextInputStateObserver; typeinfo?for?mir::shell::AbstractShell; - typeinfo?for?mir::shell::BasicWindowManager; - typeinfo?for?mir::shell::CanonicalWindowManagerPolicy; typeinfo?for?mir::shell::DefaultWindowManager; typeinfo?for?mir::shell::DisplayConfigurationController; typeinfo?for?mir::shell::DisplayLayout; typeinfo?for?mir::shell::FocusController; - typeinfo?for?mir::shell::Id; typeinfo?for?mir::shell::IdleHandler; typeinfo?for?mir::shell::InputTargeter; typeinfo?for?mir::shell::PersistentSurfaceStore::Id; typeinfo?for?mir::shell::PersistentSurfaceStore; - typeinfo?for?mir::shell::SessionInfo; typeinfo?for?mir::shell::Shell; typeinfo?for?mir::shell::ShellReport; typeinfo?for?mir::shell::ShellWrapper; typeinfo?for?mir::shell::StreamSpecification; typeinfo?for?mir::shell::SurfaceAspectRatio; - typeinfo?for?mir::shell::SurfaceInfo; typeinfo?for?mir::shell::SurfaceSpecification; typeinfo?for?mir::shell::SurfaceStack; typeinfo?for?mir::shell::SurfaceStackWrapper; typeinfo?for?mir::shell::SystemCompositorWindowManager; - typeinfo?for?mir::shell::WindowManagementPolicy; typeinfo?for?mir::shell::WindowManager; - typeinfo?for?mir::shell::WindowManagerTools; typeinfo?for?mir::time::Alarm; typeinfo?for?mir::time::AlarmFactory; typeinfo?for?std::hash; @@ -1361,7 +1166,6 @@ global: virtual?thunk?to?mir::DefaultServerStatusListener::resumed*; virtual?thunk?to?mir::DefaultServerStatusListener::started*; virtual?thunk?to?mir::DefaultServerStatusListener::stop_receiving_input*; - virtual?thunk?to?mir::shell::AbstractShell::?AbstractShell*; virtual?thunk?to?mir::shell::AbstractShell::add_display*; virtual?thunk?to?mir::shell::AbstractShell::add_prompt_provider_for*; virtual?thunk?to?mir::shell::AbstractShell::close_session*; @@ -1373,7 +1177,6 @@ global: virtual?thunk?to?mir::shell::AbstractShell::focused_surface*; virtual?thunk?to?mir::shell::AbstractShell::get_surface_attribute*; virtual?thunk?to?mir::shell::AbstractShell::handle*; - virtual?thunk?to?mir::shell::AbstractShell::handle_surface_created*; virtual?thunk?to?mir::shell::AbstractShell::open_session*; virtual?thunk?to?mir::shell::AbstractShell::raise*; virtual?thunk?to?mir::shell::AbstractShell::raise_surface*; @@ -1384,26 +1187,11 @@ global: virtual?thunk?to?mir::shell::AbstractShell::set_focus_to*; virtual?thunk?to?mir::shell::AbstractShell::set_popup_grab_tree*; virtual?thunk?to?mir::shell::AbstractShell::set_surface_attribute*; - virtual?thunk?to?mir::shell::AbstractShell::setting_focus_to*; virtual?thunk?to?mir::shell::AbstractShell::start_prompt_session_for*; virtual?thunk?to?mir::shell::AbstractShell::stop_prompt_session*; virtual?thunk?to?mir::shell::AbstractShell::surface_at*; virtual?thunk?to?mir::shell::AbstractShell::surface_ready*; virtual?thunk?to?mir::shell::AbstractShell::swap_z_order*; - virtual?thunk?to?mir::shell::BasicWindowManager::?BasicWindowManager*; - virtual?thunk?to?mir::shell::BasicWindowManager::add_display*; - virtual?thunk?to?mir::shell::BasicWindowManager::add_session*; - virtual?thunk?to?mir::shell::BasicWindowManager::add_surface*; - virtual?thunk?to?mir::shell::BasicWindowManager::handle_keyboard_event*; - virtual?thunk?to?mir::shell::BasicWindowManager::handle_pointer_event*; - virtual?thunk?to?mir::shell::BasicWindowManager::handle_raise_surface*; - virtual?thunk?to?mir::shell::BasicWindowManager::handle_request_move*; - virtual?thunk?to?mir::shell::BasicWindowManager::handle_touch_event*; - virtual?thunk?to?mir::shell::BasicWindowManager::modify_surface*; - virtual?thunk?to?mir::shell::BasicWindowManager::remove_display*; - virtual?thunk?to?mir::shell::BasicWindowManager::remove_session*; - virtual?thunk?to?mir::shell::BasicWindowManager::remove_surface*; - virtual?thunk?to?mir::shell::BasicWindowManager::set_surface_attribute*; virtual?thunk?to?mir::shell::ShellWrapper::add_display*; virtual?thunk?to?mir::shell::ShellWrapper::focus_next_session*; virtual?thunk?to?mir::shell::ShellWrapper::focus_prev_session*; @@ -1421,18 +1209,14 @@ global: vtable?for?mir::DefaultServerConfiguration; vtable?for?mir::DefaultServerStatusListener; vtable?for?mir::DisplayChanger; - vtable?for?mir::DisplayServer; vtable?for?mir::EmergencyCleanup; - vtable?for?mir::Executor; vtable?for?mir::GLibMainLoop; vtable?for?mir::LockableCallback; vtable?for?mir::LockableCallbackWrapper; vtable?for?mir::MainLoop; - vtable?for?mir::Server; vtable?for?mir::ServerActionQueue; vtable?for?mir::ServerConfiguration; vtable?for?mir::ServerStatusListener; - vtable?for?mir::WaylandExtensionHook; vtable?for?mir::compositor::BufferStream; vtable?for?mir::compositor::Compositor; vtable?for?mir::compositor::CompositorReport; @@ -1442,10 +1226,6 @@ global: vtable?for?mir::compositor::Scene; vtable?for?mir::compositor::SceneElement; vtable?for?mir::compositor::ScreenShooter; - vtable?for?mir::detail::FdSources; - vtable?for?mir::detail::GMainContextHandle; - vtable?for?mir::detail::GSourceHandle; - vtable?for?mir::detail::SignalSources; vtable?for?mir::frontend::BufferSink; vtable?for?mir::frontend::BufferStream; vtable?for?mir::frontend::Connector; @@ -1455,9 +1235,7 @@ global: vtable?for?mir::frontend::InputConfigurationChanger; vtable?for?mir::frontend::PointerInputDispatcher; vtable?for?mir::frontend::PromptSession; - vtable?for?mir::frontend::Session; vtable?for?mir::frontend::SessionAuthorizer; - vtable?for?mir::frontend::SessionCredentials; vtable?for?mir::frontend::Surface; vtable?for?mir::frontend::SurfaceStack; vtable?for?mir::graphics::CloneDisplayConfigurationPolicy; @@ -1479,10 +1257,8 @@ global: vtable?for?mir::input::Seat; vtable?for?mir::input::SeatObserver; vtable?for?mir::input::Surface; - vtable?for?mir::input::TouchVisualizer::Spot; vtable?for?mir::input::TouchVisualizer; vtable?for?mir::input::VTFilter; - vtable?for?mir::input::Validator; vtable?for?mir::input::VirtualInputDevice; vtable?for?mir::scene::ApplicationNotRespondingDetector::Observer; vtable?for?mir::scene::ApplicationNotRespondingDetector; @@ -1490,7 +1266,6 @@ global: vtable?for?mir::scene::BufferStreamFactory; vtable?for?mir::scene::Clipboard; vtable?for?mir::scene::ClipboardObserver; - vtable?for?mir::scene::CoordinateTranslator; vtable?for?mir::scene::DataExchangeSource; vtable?for?mir::scene::IdleHub; vtable?for?mir::scene::IdleStateObserver; @@ -1499,67 +1274,43 @@ global: vtable?for?mir::scene::NullSessionListener; vtable?for?mir::scene::NullSurfaceObserver; vtable?for?mir::scene::Observer; - vtable?for?mir::scene::OutputProperties; - vtable?for?mir::scene::OutputPropertiesCache; vtable?for?mir::scene::PromptSession; - vtable?for?mir::scene::PromptSessionCreationParameters; vtable?for?mir::scene::PromptSessionListener; vtable?for?mir::scene::PromptSessionManager; vtable?for?mir::scene::SceneChangeNotification; vtable?for?mir::scene::SceneReport; vtable?for?mir::scene::Session; - vtable?for?mir::scene::SessionContainer; vtable?for?mir::scene::SessionCoordinator; vtable?for?mir::scene::SessionEventHandlerRegister; vtable?for?mir::scene::SessionEventSink; vtable?for?mir::scene::SessionListener; vtable?for?mir::scene::SessionLock; vtable?for?mir::scene::SessionLockObserver; - vtable?for?mir::scene::Snapshot; - vtable?for?mir::scene::StreamInfo; vtable?for?mir::scene::Surface; vtable?for?mir::scene::SurfaceEventSource; vtable?for?mir::scene::SurfaceFactory; vtable?for?mir::scene::SurfaceObserver; vtable?for?mir::scene::SurfaceObservers; - vtable?for?mir::scene::SurfaceStateTracker; - vtable?for?mir::scene::TextInputChange::CursorPosition; - vtable?for?mir::scene::TextInputChange::TextInputKeySym; - vtable?for?mir::scene::TextInputChange::TextInputPreeditStyle; - vtable?for?mir::scene::TextInputChange; vtable?for?mir::scene::TextInputChangeHandler; vtable?for?mir::scene::TextInputHub; - vtable?for?mir::scene::TextInputState; vtable?for?mir::scene::TextInputStateObserver; vtable?for?mir::shell::AbstractShell; - vtable?for?mir::shell::BasicWindowManager; - vtable?for?mir::shell::CanonicalWindowManagerPolicy; vtable?for?mir::shell::DefaultWindowManager; vtable?for?mir::shell::DisplayConfigurationController; vtable?for?mir::shell::DisplayLayout; vtable?for?mir::shell::FocusController; - vtable?for?mir::shell::Id; vtable?for?mir::shell::IdleHandler; vtable?for?mir::shell::InputTargeter; - vtable?for?mir::shell::PersistentSurfaceStore::Id; vtable?for?mir::shell::PersistentSurfaceStore; - vtable?for?mir::shell::SessionInfo; vtable?for?mir::shell::Shell; vtable?for?mir::shell::ShellReport; vtable?for?mir::shell::ShellWrapper; - vtable?for?mir::shell::StreamSpecification; - vtable?for?mir::shell::SurfaceAspectRatio; - vtable?for?mir::shell::SurfaceInfo; - vtable?for?mir::shell::SurfaceSpecification; vtable?for?mir::shell::SurfaceStack; vtable?for?mir::shell::SurfaceStackWrapper; vtable?for?mir::shell::SystemCompositorWindowManager; - vtable?for?mir::shell::WindowManagementPolicy; vtable?for?mir::shell::WindowManager; - vtable?for?mir::shell::WindowManagerTools; vtable?for?mir::time::Alarm; vtable?for?mir::time::AlarmFactory; - vtable?for?std::hash; }; local: *; }; diff --git a/tools/symbols_map_generator/main.py b/tools/symbols_map_generator/main.py index f48ad6fadff..d5b8a88f36d 100755 --- a/tools/symbols_map_generator/main.py +++ b/tools/symbols_map_generator/main.py @@ -109,10 +109,23 @@ def is_function_inline(node: clang.cindex.CursorKind): # There is no explicit way to check if a function is inlined # but seeing that if it is a FUNCTION_DECL and it has # a definition is good enough. - return node.is_definition() + return node.is_definition() -def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str], current_namespace: str = "") -> set[str]: +def get_namespace_str(node: clang.cindex.Cursor) -> list[str]: + if node.kind == clang.cindex.CursorKind.TRANSLATION_UNIT: + return [] + + spelling = node.spelling + if is_operator(node): + spelling = "operator" + elif node.kind == clang.cindex.CursorKind.DESTRUCTOR: + spelling = f"?{node.spelling[1:]}" + + return get_namespace_str(node.semantic_parent) + [spelling] + + +def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str]) -> set[str]: # Ignore private and protected variables if (node.access_specifier == clang.cindex.AccessSpecifier.PRIVATE): return result @@ -129,11 +142,7 @@ def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str], cur and not node.is_pure_virtual_method() and not node.is_anonymous()): - if current_namespace: - namespace_str = f"{current_namespace}::{create_node_symbol_name(node)}" - else: - namespace_str = create_node_symbol_name(node) - + namespace_str = "::".join(get_namespace_str(node)) _logger.debug(f"Emitting node {namespace_str} in file {node.location.file.name}") # Classes and structs have a specific output @@ -215,15 +224,9 @@ def search_class_hierarchy_for_virtual_thunk(derived: clang.cindex.Cursor): if clang.cindex.conf.lib.clang_Location_isInSystemHeader(node.location): _logger.debug(f"Node is in a system header={node.location.file.name}") return result - - if node.kind != clang.cindex.CursorKind.TRANSLATION_UNIT: - if not current_namespace: - current_namespace = node.spelling - else: - current_namespace = f"{current_namespace}::{node.spelling}" for child in node.get_children(): - traverse_ast(child, filename, result, current_namespace) + traverse_ast(child, filename, result) else: _logger.debug(f"Nothing to process for node={node.spelling} in file={node.location.file.name}") From 916e553bc5c166d89c141f3238445ef37fef135a Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Tue, 23 Apr 2024 10:14:15 -0400 Subject: [PATCH 13/29] cmake: update MIRSERVER_ABI to 61 Co-authored-by: Alan Griffiths --- src/server/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 84d1efcbcbe..9fda33ee171 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -164,7 +164,7 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/include/server/mir DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/mirserver-internal" ) -set(MIRSERVER_ABI 60) # Be sure to increment MIR_VERSION_MINOR at the same time +set(MIRSERVER_ABI 61) # Be sure to increment MIR_VERSION_MINOR at the same time set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map) set_target_properties( From a51ddb6bc7db2a69b56cad951c8d2d4932c1e6af Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Tue, 23 Apr 2024 13:28:53 -0400 Subject: [PATCH 14/29] pr feedback: remove GLConfig --- include/miral/miral/custom_renderer.h | 2 +- src/miral/custom_renderer.cpp | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/include/miral/miral/custom_renderer.h b/include/miral/miral/custom_renderer.h index f9e22172c1a..64f6e100ecf 100644 --- a/include/miral/miral/custom_renderer.h +++ b/include/miral/miral/custom_renderer.h @@ -49,7 +49,7 @@ class CustomRenderer std::unique_ptr, std::shared_ptr) >; - CustomRenderer(Builder&& renderer, std::shared_ptr const&); + explicit CustomRenderer(Builder&& renderer); void operator()(mir::Server& server) const; private: struct Self; diff --git a/src/miral/custom_renderer.cpp b/src/miral/custom_renderer.cpp index 610c3cdd332..93be6235ace 100644 --- a/src/miral/custom_renderer.cpp +++ b/src/miral/custom_renderer.cpp @@ -25,7 +25,7 @@ namespace class RendererFactory : public mir::renderer::RendererFactory { public: - explicit RendererFactory(miral::CustomRenderer::Builder const& renderer) + explicit RendererFactory(miral::CustomRenderer::Builder&& renderer) : renderer{renderer} { } @@ -39,25 +39,22 @@ class RendererFactory : public mir::renderer::RendererFactory } private: - miral::CustomRenderer::Builder const& renderer; + miral::CustomRenderer::Builder const renderer; }; } struct miral::CustomRenderer::Self { - Self(Builder const& renderer, std::shared_ptr const& config) - : factory(std::make_shared(renderer)), - config{config} + explicit Self(Builder&& renderer) + : factory(std::make_shared(std::move(renderer))) { } std::shared_ptr factory; - std::shared_ptr config; }; -miral::CustomRenderer::CustomRenderer( - Builder&& renderer, std::shared_ptr const& config) - : self{std::make_shared(renderer, config)} +miral::CustomRenderer::CustomRenderer(Builder&& renderer) + : self{std::make_shared(std::move(renderer))} { } @@ -65,7 +62,4 @@ void miral::CustomRenderer::operator()(mir::Server &server) const { std::function()> builder = [&]() { return self->factory; }; server.override_the_renderer_factory(builder); - - if (self->config) - server.override_the_gl_config([&]() { return self->config; }); } \ No newline at end of file From 70f061db69ed1ebfd8760c2b6d30bfe06fbb33cf Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Tue, 23 Apr 2024 13:42:40 -0400 Subject: [PATCH 15/29] bugfix: remove reference to GLConfig --- include/miral/miral/custom_renderer.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/miral/miral/custom_renderer.h b/include/miral/miral/custom_renderer.h index 64f6e100ecf..510356565e8 100644 --- a/include/miral/miral/custom_renderer.h +++ b/include/miral/miral/custom_renderer.h @@ -26,7 +26,6 @@ class Server; namespace graphics { class GLRenderingProvider; -class GLConfig; namespace gl { class OutputSurface; From c244f13a66456f1ff558bbe7b729a136b90685a4 Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Wed, 24 Apr 2024 15:12:49 +1000 Subject: [PATCH 16/29] =?UTF-8?q?mir::Signal:=20Rename=20flag=20variable?= =?UTF-8?q?=20to=20=E2=80=9Craised=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/common/mir/signal.h | 2 +- src/common/signal.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/common/mir/signal.h b/include/common/mir/signal.h index bf5c2503ed7..33045e91b23 100644 --- a/include/common/mir/signal.h +++ b/include/common/mir/signal.h @@ -68,7 +68,7 @@ class Signal */ void wait(); private: - std::atomic flag; + std::atomic raised; }; } diff --git a/src/common/signal.cpp b/src/common/signal.cpp index 9a7914ea74d..f3f969d26ef 100644 --- a/src/common/signal.cpp +++ b/src/common/signal.cpp @@ -17,18 +17,18 @@ #include "mir/signal.h" mir::Signal::Signal() - : flag{false} + : raised{false} { } void mir::Signal::raise() { - flag = true; - flag.notify_all(); + raised = true; + raised.notify_all(); } void mir::Signal::wait() { - flag.wait(false); - flag = false; + raised.wait(false); + raised = false; } From 380f0cefe8dfe88df595ef8dda0e46befa39e0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Wed, 24 Apr 2024 13:43:30 +0200 Subject: [PATCH 17/29] ci: work around actions/runner-images#8846 --- .github/workflows/spread.yml | 2 ++ .github/workflows/symbols-check.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/spread.yml b/.github/workflows/spread.yml index 65c368395b4..4bc347541ce 100644 --- a/.github/workflows/spread.yml +++ b/.github/workflows/spread.yml @@ -79,6 +79,8 @@ jobs: sudo snap install spread-mir-ci sudo snap connect spread-mir-ci:lxd lxd:lxd lxc profile set default security.privileged=true security.nesting=true + # work around https://github.com/actions/runner-images/issues/8846 + sudo rm /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update sudo apt-get install --yes binfmt-support qemu-user-static echo "LXD_DIR=/var/snap/lxd/common/lxd" >> $GITHUB_ENV diff --git a/.github/workflows/symbols-check.yml b/.github/workflows/symbols-check.yml index 2a760e604d9..0b8d67d3836 100644 --- a/.github/workflows/symbols-check.yml +++ b/.github/workflows/symbols-check.yml @@ -22,6 +22,8 @@ jobs: - name: Install dependencies run: | + # work around https://github.com/actions/runner-images/issues/8846 + sudo rm /etc/apt/sources.list.d/microsoft-prod.list wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - sudo add-apt-repository --update "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main" sudo apt install libclang1-19 From 6652ef7918110f10e2a7c15c936b81637f2c3867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Wed, 24 Apr 2024 10:41:19 +0200 Subject: [PATCH 18/29] ci: stable snapcraft is fine for Miriway now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …and edge is looking for credentials elsewhere now --- .github/workflows/snap.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index c2a90f54244..f28fdd7cc9d 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -80,7 +80,6 @@ jobs: - snap: Miriway/Miriway track: latest review-opts: --allow-classic - snapcraft-channel: edge steps: - name: Check out code From f8574698a3005e4b4824d789712d48059c120b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Tue, 27 Feb 2024 15:37:35 +0100 Subject: [PATCH 19/29] spread: refresh Fedora versions --- .github/workflows/spread.yml | 1 + spread.yaml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spread.yml b/.github/workflows/spread.yml index 4bc347541ce..85220adce48 100644 --- a/.github/workflows/spread.yml +++ b/.github/workflows/spread.yml @@ -47,6 +47,7 @@ jobs: "lxd:ubuntu-22.04:spread/build/ubuntu:clang" "lxd:fedora-38:spread/build/fedora:amd64" "lxd:fedora-39:spread/build/fedora:amd64" + "lxd:fedora-40:spread/build/fedora:amd64" "lxd:fedora-rawhide:spread/build/fedora:amd64" "lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_devel" "lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_proposed" diff --git a/spread.yaml b/spread.yaml index 0d227c2c037..27e4c24854c 100644 --- a/spread.yaml +++ b/spread.yaml @@ -11,8 +11,9 @@ backends: - ubuntu-22.04 - fedora-38 - fedora-39 + - fedora-40 - fedora-rawhide: - image: images:fedora/39 + image: images:fedora/40 environment: ARCH: amd64 From 9e024ed863ae3749e64950a2c624f0007deb937f Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Wed, 24 Apr 2024 12:37:09 +0100 Subject: [PATCH 20/29] Platforms do not need to depend on /src/include/common --- {src/include => include}/common/mir/c_memory.h | 0 {src/include => include}/common/mir/output_type_names.h | 0 src/platforms/CMakeLists.txt | 8 +------- src/platforms/common/server/CMakeLists.txt | 4 ---- src/platforms/common/server/kms-utils/CMakeLists.txt | 8 ++++---- src/platforms/evdev/CMakeLists.txt | 1 - 6 files changed, 5 insertions(+), 16 deletions(-) rename {src/include => include}/common/mir/c_memory.h (100%) rename {src/include => include}/common/mir/output_type_names.h (100%) diff --git a/src/include/common/mir/c_memory.h b/include/common/mir/c_memory.h similarity index 100% rename from src/include/common/mir/c_memory.h rename to include/common/mir/c_memory.h diff --git a/src/include/common/mir/output_type_names.h b/include/common/mir/output_type_names.h similarity index 100% rename from src/include/common/mir/output_type_names.h rename to include/common/mir/output_type_names.h diff --git a/src/platforms/CMakeLists.txt b/src/platforms/CMakeLists.txt index 24f378fa1a9..3218059f9c6 100644 --- a/src/platforms/CMakeLists.txt +++ b/src/platforms/CMakeLists.txt @@ -31,14 +31,8 @@ set(MIR_SERVER_PLATFORM_PATH set(server_common_include_dirs ${PROJECT_SOURCE_DIR}/include/renderers/gl ${PROJECT_SOURCE_DIR}/include/renderers/sw -) - -# TODO platform implementations shouldn't depend on private APIs -set(server_common_include_dirs - ${server_common_include_dirs} + ${PROJECT_SOURCE_DIR}/include/common ${CMAKE_CURRENT_SOURCE_DIR}/common/server - ${PROJECT_SOURCE_DIR}/src/include/platform - ${PROJECT_SOURCE_DIR}/src/include/common ) set(server_symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/common/server/symbols.map) diff --git a/src/platforms/common/server/CMakeLists.txt b/src/platforms/common/server/CMakeLists.txt index 5940a26ba92..192322e587a 100644 --- a/src/platforms/common/server/CMakeLists.txt +++ b/src/platforms/common/server/CMakeLists.txt @@ -2,10 +2,6 @@ if (MIR_BUILD_PLATFORM_GBM_KMS OR MIR_BUILD_PLATFORM_GBM_X11 OR MIR_BUILD_PLATFO add_subdirectory(kms-utils/) endif() -include_directories( - ${server_common_include_dirs} -) - add_compile_definitions(MIR_LOG_COMPONENT_FALLBACK="server_platform_common") add_library(server_platform_common STATIC diff --git a/src/platforms/common/server/kms-utils/CMakeLists.txt b/src/platforms/common/server/kms-utils/CMakeLists.txt index 7ad604c44de..a29b4284744 100644 --- a/src/platforms/common/server/kms-utils/CMakeLists.txt +++ b/src/platforms/common/server/kms-utils/CMakeLists.txt @@ -1,7 +1,3 @@ -include_directories( - ${PROJECT_SOURCE_DIR}/src/include/common -) - set(KMS_UTILS_STATIC_LIBRARY "kms_utils") set(KMS_UTILS_STATIC_LIBRARY ${KMS_UTILS_STATIC_LIBRARY} PARENT_SCOPE) @@ -12,6 +8,10 @@ add_library(${KMS_UTILS_STATIC_LIBRARY} STATIC kms_connector.h ) +target_include_directories(${KMS_UTILS_STATIC_LIBRARY} + PUBLIC ${server_common_include_dirs} +) + target_link_libraries(${KMS_UTILS_STATIC_LIBRARY} PkgConfig::DRM ) diff --git a/src/platforms/evdev/CMakeLists.txt b/src/platforms/evdev/CMakeLists.txt index 9a7f2efc94a..ababc105fda 100644 --- a/src/platforms/evdev/CMakeLists.txt +++ b/src/platforms/evdev/CMakeLists.txt @@ -1,7 +1,6 @@ include_directories( ${LIBINPUT_CFLAGS} ${PROJECT_SOURCE_DIR}/src/include/platform # udev Context - ${PROJECT_SOURCE_DIR}/src/include/common # raii.h ) add_library(mirevdevutilsobjects OBJECT From 74f9e57ebff37edbf745a62221811550ce36d025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Wed, 24 Apr 2024 13:57:26 +0200 Subject: [PATCH 21/29] ci: refresh core24 --- .github/workflows/refresh-downstreams.yml | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/refresh-downstreams.yml diff --git a/.github/workflows/refresh-downstreams.yml b/.github/workflows/refresh-downstreams.yml new file mode 100644 index 00000000000..922ad330c52 --- /dev/null +++ b/.github/workflows/refresh-downstreams.yml @@ -0,0 +1,37 @@ +name: Refresh downstreams + +on: + push: + branches: + - main + +jobs: + Refresh: + runs-on: ubuntu-latest + + timeout-minutes: 5 + + strategy: + fail-fast: false + matrix: + ref: + - core24 + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + # so that we know what to cherry-pick from + fetch-depth: 2 + + - name: Update `${{ matrix.ref }}` + env: + GIT_COMMITTER_NAME: "Mir CI Bot" + GIT_COMMITTER_EMAIL: "mir-ci-bot@canonical.com" + run: | + # bring downstream changes on top of HEAD + git fetch origin ${{ matrix.ref }} + git cherry-pick HEAD..origin/${{ matrix.ref }} + + # and force-push to downstream + git push --force origin HEAD:${{ matrix.ref }} From 329309724cd2f0f50de53f170f41d8a5862ff112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Wed, 24 Apr 2024 14:02:17 +0200 Subject: [PATCH 22/29] spread: drop fedora-38 --- .github/workflows/spread.yml | 1 - spread.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/spread.yml b/.github/workflows/spread.yml index 85220adce48..60c11dc885c 100644 --- a/.github/workflows/spread.yml +++ b/.github/workflows/spread.yml @@ -45,7 +45,6 @@ jobs: "lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_arm64" "lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_armhf" "lxd:ubuntu-22.04:spread/build/ubuntu:clang" - "lxd:fedora-38:spread/build/fedora:amd64" "lxd:fedora-39:spread/build/fedora:amd64" "lxd:fedora-40:spread/build/fedora:amd64" "lxd:fedora-rawhide:spread/build/fedora:amd64" diff --git a/spread.yaml b/spread.yaml index 27e4c24854c..c429e26d6de 100644 --- a/spread.yaml +++ b/spread.yaml @@ -9,7 +9,6 @@ backends: - alpine-3.19 - alpine-edge - ubuntu-22.04 - - fedora-38 - fedora-39 - fedora-40 - fedora-rawhide: From de06804f18d537abe0b0fc662fecdff4c37ac863 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 24 Apr 2024 09:38:05 -0400 Subject: [PATCH 23/29] libmirserver60 to libmirserver61 --- debian/control | 6 +++--- debian/libmirserver60.install | 1 - debian/libmirserver61.install | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 debian/libmirserver60.install create mode 100644 debian/libmirserver61.install diff --git a/debian/control b/debian/control index f8105459b47..b5a66acec71 100644 --- a/debian/control +++ b/debian/control @@ -63,7 +63,7 @@ Vcs-Git: https://github.com/MirServer/mir #TODO: Packaging infrastructure for better dependency generation, # ala pkg-xorg's xviddriver:Provides and ABI detection. -Package: libmirserver60 +Package: libmirserver61 Section: libs Architecture: linux-any Multi-Arch: same @@ -142,7 +142,7 @@ Section: libdevel Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: libmirserver60 (= ${binary:Version}), +Depends: libmirserver61 (= ${binary:Version}), libmirplatform-dev (= ${binary:Version}), libmircommon-dev (= ${binary:Version}), libglm-dev, @@ -159,7 +159,7 @@ Section: libdevel Architecture: linux-any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: libmirserver60 (= ${binary:Version}), +Depends: libmirserver61 (= ${binary:Version}), libmirplatform-dev (= ${binary:Version}), libmircommon-dev (= ${binary:Version}), libmircore-dev (= ${binary:Version}), diff --git a/debian/libmirserver60.install b/debian/libmirserver60.install deleted file mode 100644 index 724289fcc94..00000000000 --- a/debian/libmirserver60.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libmirserver.so.60 diff --git a/debian/libmirserver61.install b/debian/libmirserver61.install new file mode 100644 index 00000000000..0e7379ba642 --- /dev/null +++ b/debian/libmirserver61.install @@ -0,0 +1 @@ +usr/lib/*/libmirserver.so.61 From d65e889224d46cf7ac2343bd95e6207003e707ee Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 24 Apr 2024 10:12:32 -0400 Subject: [PATCH 24/29] regeneration libmiral7.symbols --- debian/libmiral7.symbols | 2 ++ src/miral/symbols.map | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/libmiral7.symbols b/debian/libmiral7.symbols index 23f3b47eae1..606b1a4d279 100644 --- a/debian/libmiral7.symbols +++ b/debian/libmiral7.symbols @@ -48,6 +48,8 @@ libmiral.so.7 libmiral7 #MINVER# (c++)"miral::CursorTheme::CursorTheme(std::__cxx11::basic_string, std::allocator > const&)@MIRAL_5.0" 5.0.0 (c++)"miral::CursorTheme::operator()(mir::Server&) const@MIRAL_5.0" 5.0.0 (c++)"miral::CursorTheme::~CursorTheme()@MIRAL_5.0" 5.0.0 + (c++)"miral::CustomRenderer::CustomRenderer(std::function > (std::unique_ptr >, std::shared_ptr)>&&)@MIRAL_5.0" 5.0.0 + (c++)"miral::CustomRenderer::operator()(mir::Server&) const@MIRAL_5.0" 5.0.0 (c++)"miral::DisplayConfiguration::DisplayConfiguration(miral::DisplayConfiguration const&)@MIRAL_5.0" 5.0.0 (c++)"miral::DisplayConfiguration::DisplayConfiguration(miral::MirRunner const&)@MIRAL_5.0" 5.0.0 (c++)"miral::DisplayConfiguration::add_output_attribute(std::__cxx11::basic_string, std::allocator > const&)@MIRAL_5.0" 5.0.0 diff --git a/src/miral/symbols.map b/src/miral/symbols.map index 593f650779e..b3b581a3f73 100644 --- a/src/miral/symbols.map +++ b/src/miral/symbols.map @@ -449,7 +449,6 @@ global: typeinfo?for?miral::Zone; vtable?for?miral::ApplicationAuthorizer; vtable?for?miral::CanonicalWindowManagerPolicy; - vtable?for?miral::CustomRenderer; vtable?for?miral::FdHandle; vtable?for?miral::MinimalWindowManager; vtable?for?miral::WaylandExtensions::Context; From eabd7c01256fa995cc6967b257792a93e1a0116b Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 24 Apr 2024 10:59:56 -0400 Subject: [PATCH 25/29] minor: take self by value Co-authored-by: Alan Griffiths --- src/miral/custom_renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miral/custom_renderer.cpp b/src/miral/custom_renderer.cpp index 6ade0dc4514..121ba1c3973 100644 --- a/src/miral/custom_renderer.cpp +++ b/src/miral/custom_renderer.cpp @@ -44,6 +44,6 @@ miral::CustomRenderer::CustomRenderer(Builder&& renderer) void miral::CustomRenderer::operator()(mir::Server &server) const { - std::function()> builder = [&]() { return self; }; + std::function()> builder = [self=self] { return self; }; server.override_the_renderer_factory(builder); } \ No newline at end of file From 7b28349b6c2476d0b6341edd682bdde017179558 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 24 Apr 2024 11:00:10 -0400 Subject: [PATCH 26/29] minor: whitespace around Server& Co-authored-by: Alan Griffiths --- src/miral/custom_renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miral/custom_renderer.cpp b/src/miral/custom_renderer.cpp index 121ba1c3973..45208122f7b 100644 --- a/src/miral/custom_renderer.cpp +++ b/src/miral/custom_renderer.cpp @@ -42,7 +42,7 @@ miral::CustomRenderer::CustomRenderer(Builder&& renderer) { } -void miral::CustomRenderer::operator()(mir::Server &server) const +void miral::CustomRenderer::operator()(mir::Server& server) const { std::function()> builder = [self=self] { return self; }; server.override_the_renderer_factory(builder); From fbca7af534dc95a1e9d156da0b22a70ae3ab4b34 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 24 Apr 2024 11:09:36 -0400 Subject: [PATCH 27/29] Fix for erroneously deleting VTT symbols --- src/server/symbols.map | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/symbols.map b/src/server/symbols.map index e8e1d1ef015..0939336b26d 100644 --- a/src/server/symbols.map +++ b/src/server/symbols.map @@ -1,6 +1,10 @@ MIR_SERVER_INTERNAL_2.17 { global: extern "C++" { + VTT?for?mir::DefaultServerConfiguration; + VTT?for?mir::scene::ApplicationNotRespondingDetectorWrapper; + VTT?for?mir::shell::ShellWrapper; + VTT?for?mir::shell::SystemCompositorWindowManager; mir::BasicCallback::BasicCallback*; mir::BasicCallback::lock*; mir::BasicCallback::operator*; From 948f24abfc2bf70aa593d8f57f63dc37b1883c97 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 24 Apr 2024 13:35:04 -0400 Subject: [PATCH 28/29] Generating VTT symbols for public virtual base classes --- src/server/symbols.map | 5 +++-- tools/symbols_map_generator/main.py | 27 ++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/server/symbols.map b/src/server/symbols.map index 0939336b26d..4430311d6b9 100644 --- a/src/server/symbols.map +++ b/src/server/symbols.map @@ -2,9 +2,10 @@ MIR_SERVER_INTERNAL_2.17 { global: extern "C++" { VTT?for?mir::DefaultServerConfiguration; - VTT?for?mir::scene::ApplicationNotRespondingDetectorWrapper; + VTT?for?mir::DefaultServerStatusListener; + VTT?for?mir::shell::AbstractShell; + VTT?for?mir::shell::Shell; VTT?for?mir::shell::ShellWrapper; - VTT?for?mir::shell::SystemCompositorWindowManager; mir::BasicCallback::BasicCallback*; mir::BasicCallback::lock*; mir::BasicCallback::operator*; diff --git a/tools/symbols_map_generator/main.py b/tools/symbols_map_generator/main.py index d5b8a88f36d..d81cc57bfd8 100755 --- a/tools/symbols_map_generator/main.py +++ b/tools/symbols_map_generator/main.py @@ -104,6 +104,29 @@ def has_vtable(node: clang.cindex.Cursor): return False +def derived_virtual_base_class(node: clang.cindex.Cursor): + # This method assumes that the node is a class/struct + + result = False + for child in node.get_children(): + if child.kind != clang.cindex.CursorKind.CXX_BASE_SPECIFIER: + continue + + if clang.cindex.conf.lib.clang_isVirtualBase(child): + result = True + else: + class_or_struct_node = clang.cindex.conf.lib.clang_getCursorDefinition(child) + if class_or_struct_node is None: + continue + + result = derived_virtual_base_class(class_or_struct_node) + + if result: + break + + return result + + def is_function_inline(node: clang.cindex.CursorKind): # This method assumes that the node is a FUNCTION_DECL. # There is no explicit way to check if a function is inlined @@ -125,7 +148,7 @@ def get_namespace_str(node: clang.cindex.Cursor) -> list[str]: return get_namespace_str(node.semantic_parent) + [spelling] -def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str]) -> set[str]: +def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str]) -> set[str]: # Ignore private and protected variables if (node.access_specifier == clang.cindex.AccessSpecifier.PRIVATE): return result @@ -150,6 +173,8 @@ def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str]) -> or node.kind == clang.cindex.CursorKind.STRUCT_DECL): if has_vtable(node): result.add(f"vtable?for?{namespace_str};") + if derived_virtual_base_class(node): + result.add(f"VTT?for?{namespace_str};") result.add(f"typeinfo?for?{namespace_str};") else: def add_internal(s: str): From 1652cebb1e6d85c42689afaacf810b72098df1b8 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 25 Apr 2024 08:25:57 -0400 Subject: [PATCH 29/29] Final naming nit --- tools/symbols_map_generator/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/symbols_map_generator/main.py b/tools/symbols_map_generator/main.py index d81cc57bfd8..b5c048eff05 100755 --- a/tools/symbols_map_generator/main.py +++ b/tools/symbols_map_generator/main.py @@ -104,7 +104,7 @@ def has_vtable(node: clang.cindex.Cursor): return False -def derived_virtual_base_class(node: clang.cindex.Cursor): +def has_virtual_base_class(node: clang.cindex.Cursor): # This method assumes that the node is a class/struct result = False @@ -119,7 +119,7 @@ def derived_virtual_base_class(node: clang.cindex.Cursor): if class_or_struct_node is None: continue - result = derived_virtual_base_class(class_or_struct_node) + result = has_virtual_base_class(class_or_struct_node) if result: break @@ -173,7 +173,7 @@ def traverse_ast(node: clang.cindex.Cursor, filename: str, result: set[str]) -> or node.kind == clang.cindex.CursorKind.STRUCT_DECL): if has_vtable(node): result.add(f"vtable?for?{namespace_str};") - if derived_virtual_base_class(node): + if has_virtual_base_class(node): result.add(f"VTT?for?{namespace_str};") result.add(f"typeinfo?for?{namespace_str};") else: