.. _program_listing_file_include_miral_miral_output.h: Program Listing for File output.h ================================= |exhale_lsh| :ref:`Return to documentation for file ` (``include/miral/miral/output.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * 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_OUTPUT_H #define MIRAL_OUTPUT_H #include #include #include #include #include namespace mir { namespace graphics { struct DisplayConfigurationOutput; } } namespace miral { using namespace mir::geometry; class Output { public: struct PhysicalSizeMM { int width; int height; }; enum class Type { unknown, vga, dvii, dvid, dvia, composite, svideo, lvds, component, ninepindin, displayport, hdmia, hdmib, tv, edp }; explicit Output(const mir::graphics::DisplayConfigurationOutput &output); Output(Output const&); Output& operator=(Output const&); ~Output(); auto type() const -> Type; auto physical_size_mm() const -> PhysicalSizeMM; auto connected() const -> bool; auto used() const -> bool; auto pixel_format() const -> MirPixelFormat; auto refresh_rate() const -> double; auto power_mode() const -> MirPowerMode; auto orientation() const -> MirOrientation; auto scale() const -> float; auto form_factor() const -> MirFormFactor; auto extents() const -> Rectangle; auto id() const -> int; auto name() const -> std::string; auto attribute(std::string const& key) const -> std::optional; auto attributes_map() const -> std::map>; auto valid() const -> bool; auto is_same_output(Output const& other) const -> bool; auto logical_group_id() const -> int; private: std::shared_ptr self; }; bool operator==(Output::PhysicalSizeMM const& lhs, Output::PhysicalSizeMM const& rhs); inline bool operator!=(Output::PhysicalSizeMM const& lhs, Output::PhysicalSizeMM const& rhs) { return !(lhs == rhs); } auto equivalent_display_area(Output const& lhs, Output const& rhs) -> bool; } #endif //MIRAL_OUTPUT_H