.. _program_listing_file_include_miroil_miroil_surface.h: Program Listing for File surface.h ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/miroil/miroil/surface.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright (C) Canonical, Ltd. * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License version 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 warranties of MERCHANTABILITY, * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #ifndef MIROIL_SURFACE_H #define MIROIL_SURFACE_H #include #include #include #include #include namespace mir { namespace scene { class Surface; } namespace graphics { class CursorImage; } namespace compositor { class BufferStream; } } namespace miroil { class SurfaceObserver; class SurfaceObserverImpl; using CompositorID = void const*; class Surface { public: Surface(std::shared_ptr wrapped); ~Surface() = default; mir::scene::Surface *get_wrapped() const; void add_observer(std::shared_ptr const& observer); void remove_observer(std::shared_ptr const& observer); mir::graphics::RenderableList generate_renderables(miroil::CompositorID id) const; bool is_confined_to_window(); void set_orientation(MirOrientation orientation); void set_confine_pointer_state(MirPointerConfinementState state); std::shared_ptr parent() const; mir::geometry::Point top_left() const; bool visible() const; // TODO a legacy of old interactions and needs removing int configure(MirWindowAttrib attrib, int value); // TODO a legacy of old interactions and needs removing int query(MirWindowAttrib attrib) const; // TODO a legacy of old interactions and needs removing void set_keymap(MirInputDeviceId id, std::string const& model, std::string const& layout, std::string const& variant, std::string const& options); private: std::shared_ptr wrapped; std::unordered_map, std::shared_ptr> observers; }; } #endif