Antkeeper  0.0.1
Public Member Functions | Friends | List of all members
app::display Class Reference

Virtual display. More...

#include <display.hpp>

Public Member Functions

void set_index (int index) noexcept
 Sets the index of the display. More...
 
void set_name (const std::string &name) noexcept
 Sets the name of the display. More...
 
void set_bounds (const geom::rectangle< int > &bounds) noexcept
 Sets the bounds of the display. More...
 
void set_usable_bounds (const geom::rectangle< int > &bounds) noexcept
 Sets the usable bounds of the display, which excludes areas reserved by the OS for things like menus or docks. More...
 
void set_refresh_rate (int rate) noexcept
 Sets the refresh rate of the display. More...
 
void set_dpi (float dpi) noexcept
 Sets the DPI of the display. More...
 
void set_orientation (display_orientation orientation) noexcept
 Sets the orientation of the display. More...
 
const int & get_index () const noexcept
 Returns the index of the display. More...
 
const std::string & get_name () const noexcept
 Returns the name of the display. More...
 
const geom::rectangle< int > & get_bounds () const noexcept
 Returns the bounds of the display, in display units. More...
 
const geom::rectangle< int > & get_usable_bounds () const noexcept
 Returns the usable bounds of the display, which excludes areas reserved by the OS for things like menus or docks, in display units. More...
 
const int & get_refresh_rate () const noexcept
 Returns the refresh rate of the display, in Hz. More...
 
const float & get_dpi () const noexcept
 Returns the DPI of the display. More...
 
const display_orientationget_orientation () const noexcept
 Returns the current orientation of the display. More...
 
const bool & is_connected () const noexcept
 Returns true if the display is connected, false otherwise. More...
 
event::channel< display_connected_event > & get_connected_channel () noexcept
 Returns the channel through which display connected events are published. More...
 
event::channel< display_disconnected_event > & get_disconnected_channel () noexcept
 Returns the channel through which display disconnected events are published. More...
 
event::channel< display_orientation_changed_event > & get_orientation_changed_channel () noexcept
 Returns the channel through which display orientation changed events are published. More...
 

Friends

class window_manager
 
class sdl_window_manager
 

Detailed Description

Virtual display.

Definition at line 34 of file display.hpp.

Member Function Documentation

◆ get_bounds()

const geom::rectangle<int>& app::display::get_bounds ( ) const
inlinenoexcept

Returns the bounds of the display, in display units.

Definition at line 118 of file display.hpp.

◆ get_connected_channel()

event::channel<display_connected_event>& app::display::get_connected_channel ( )
inlinenoexcept

Returns the channel through which display connected events are published.

Definition at line 154 of file display.hpp.

◆ get_disconnected_channel()

event::channel<display_disconnected_event>& app::display::get_disconnected_channel ( )
inlinenoexcept

Returns the channel through which display disconnected events are published.

Definition at line 160 of file display.hpp.

◆ get_dpi()

const float& app::display::get_dpi ( ) const
inlinenoexcept

Returns the DPI of the display.

Definition at line 136 of file display.hpp.

◆ get_index()

const int& app::display::get_index ( ) const
inlinenoexcept

Returns the index of the display.

Definition at line 106 of file display.hpp.

◆ get_name()

const std::string& app::display::get_name ( ) const
inlinenoexcept

Returns the name of the display.

Definition at line 112 of file display.hpp.

◆ get_orientation()

const display_orientation& app::display::get_orientation ( ) const
inlinenoexcept

Returns the current orientation of the display.

Definition at line 142 of file display.hpp.

◆ get_orientation_changed_channel()

event::channel<display_orientation_changed_event>& app::display::get_orientation_changed_channel ( )
inlinenoexcept

Returns the channel through which display orientation changed events are published.

Definition at line 166 of file display.hpp.

◆ get_refresh_rate()

const int& app::display::get_refresh_rate ( ) const
inlinenoexcept

Returns the refresh rate of the display, in Hz.

Definition at line 130 of file display.hpp.

◆ get_usable_bounds()

const geom::rectangle<int>& app::display::get_usable_bounds ( ) const
inlinenoexcept

Returns the usable bounds of the display, which excludes areas reserved by the OS for things like menus or docks, in display units.

Definition at line 124 of file display.hpp.

◆ is_connected()

const bool& app::display::is_connected ( ) const
inlinenoexcept

Returns true if the display is connected, false otherwise.

Definition at line 148 of file display.hpp.

◆ set_bounds()

void app::display::set_bounds ( const geom::rectangle< int > &  bounds)
inlinenoexcept

Sets the bounds of the display.

Parameters
boundsBounds of the display, in display units.

Definition at line 62 of file display.hpp.

◆ set_dpi()

void app::display::set_dpi ( float  dpi)
inlinenoexcept

Sets the DPI of the display.

Parameters
dpiDPI.

Definition at line 90 of file display.hpp.

◆ set_index()

void app::display::set_index ( int  index)
inlinenoexcept

Sets the index of the display.

Parameters
indexIndex of the display.

Definition at line 42 of file display.hpp.

◆ set_name()

void app::display::set_name ( const std::string &  name)
inlinenoexcept

Sets the name of the display.

Parameters
nameName of the display.

Definition at line 52 of file display.hpp.

◆ set_orientation()

void app::display::set_orientation ( display_orientation  orientation)
inlinenoexcept

Sets the orientation of the display.

Parameters
orientationDisplay orientation.

Definition at line 100 of file display.hpp.

◆ set_refresh_rate()

void app::display::set_refresh_rate ( int  rate)
inlinenoexcept

Sets the refresh rate of the display.

Parameters
rateRefresh rate, in Hz.

Definition at line 80 of file display.hpp.

◆ set_usable_bounds()

void app::display::set_usable_bounds ( const geom::rectangle< int > &  bounds)
inlinenoexcept

Sets the usable bounds of the display, which excludes areas reserved by the OS for things like menus or docks.

Definition at line 70 of file display.hpp.

Friends And Related Function Documentation

◆ sdl_window_manager

friend class sdl_window_manager
friend

Definition at line 173 of file display.hpp.

◆ window_manager

friend class window_manager
friend

Definition at line 172 of file display.hpp.


The documentation for this class was generated from the following file: