Mir
Loading...
Searching...
No Matches
mir Namespace Reference

Namespaces

namespace  scene
namespace  detail
namespace  geometry
 Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.
namespace  client
 Convenient C++ wrappers around the Mir toolkit API.
namespace  events
namespace  frontend
namespace  graphics
namespace  shell

Classes

class  AbnormalExit
class  AnonymousShmFile
class  FatalErrorStrategy
struct  IntOwnedFd
class  Fd
class  IntWrapper
class  optional_value
class  ShmFile

Typedefs

typedef std::unique_ptr< MirEvent, void(*)(MirEvent *)> EventUPtr

Functions

auto mir_depth_layer_get_index (MirDepthLayer depth_layer) -> unsigned int
 Returns the height of a MirDepthLayer.
void fatal_error_except (char const *reason,...)
 Throws an exception that will typically kill the Mir server and propagate from mir::run_mir.
void fatal_error_abort (char const *reason,...)
 An alternative to fatal_error_except() that kills the program and dump core as cleanly as possible.
template<typename Tag, typename ValueType>
std::ostream & operator<< (std::ostream &out, IntWrapper< Tag, ValueType > const &value)
template<typename Tag, typename ValueType>
constexpr bool operator== (IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
template<typename Tag, typename ValueType>
constexpr bool operator!= (IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
template<typename Tag, typename ValueType>
constexpr bool operator<= (IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
template<typename Tag, typename ValueType>
constexpr bool operator>= (IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
template<typename Tag, typename ValueType>
constexpr bool operator< (IntWrapper< Tag, ValueType > const &lhs, IntWrapper< Tag, ValueType > const &rhs)
template<typename T>
bool operator== (optional_value< T > const &lhs, optional_value< T > const &rhs)
template<typename T>
bool operator!= (optional_value< T > const &lhs, optional_value< T > const &rhs)
template<typename T>
bool operator== (optional_value< T > const &lhs, T const &rhs)
template<typename T>
bool operator!= (optional_value< T > const &lhs, T const &rhs)
template<typename T>
bool operator== (T const &lhs, optional_value< T > const &rhs)
template<typename T>
bool operator!= (T const &lhs, optional_value< T > const &rhs)
std::ostream & operator<< (std::ostream &out, MirInputEventModifier modifier)
std::ostream & operator<< (std::ostream &out, MirKeyboardAction action)
std::ostream & operator<< (std::ostream &out, MirTouchAction action)
std::ostream & operator<< (std::ostream &out, MirTouchTooltype tool)
std::ostream & operator<< (std::ostream &out, MirPointerAction action)
std::ostream & operator<< (std::ostream &out, MirPromptSessionState state)
std::ostream & operator<< (std::ostream &out, MirOrientation orientation)
std::ostream & operator<< (std::ostream &out, MirSurfaceAttrib attribute) MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowAttrib instead")
std::ostream & operator<< (std::ostream &out, MirWindowAttrib attribute)
std::ostream & operator<< (std::ostream &out, MirSurfaceFocusState state) MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowFocusState instead")
std::ostream & operator<< (std::ostream &out, MirWindowFocusState state)
std::ostream & operator<< (std::ostream &out, MirSurfaceVisibility state) MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowVisibility instead")
std::ostream & operator<< (std::ostream &out, MirWindowVisibility state)
std::ostream & operator<< (std::ostream &out, MirSurfaceType type) MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowType instead")
std::ostream & operator<< (std::ostream &out, MirWindowType type)
std::ostream & operator<< (std::ostream &out, MirSurfaceState state) MIR_FOR_REMOVAL_IN_VERSION_1("use << with MirWindowState instead")
std::ostream & operator<< (std::ostream &out, MirWindowState state)
std::ostream & operator<< (std::ostream &out, MirPromptSessionEvent const &event)
std::ostream & operator<< (std::ostream &out, MirResizeEvent const &event)
std::ostream & operator<< (std::ostream &out, MirOrientationEvent const &event)
std::ostream & operator<< (std::ostream &out, MirInputEvent const &event)
std::ostream & operator<< (std::ostream &out, MirCloseWindowEvent const &event)
std::ostream & operator<< (std::ostream &out, MirKeymapEvent const &event)
std::ostream & operator<< (std::ostream &out, MirWindowEvent const &event)
std::ostream & operator<< (std::ostream &out, MirInputDeviceStateEvent const &event)
std::ostream & operator<< (std::ostream &out, MirWindowPlacementEvent const &event)
std::ostream & operator<< (std::ostream &out, MirWindowOutputEvent const &event)
std::ostream & operator<< (std::ostream &out, MirEvent const &event)

Variables

void(* fatal_error )(char const *reason,...)
 fatal_error() is strictly for "this should never happen" situations that you cannot recover from.

Typedef Documentation

◆ EventUPtr

typedef std::unique_ptr<MirEvent, void(*)(MirEvent*)> mir::EventUPtr

Function Documentation

◆ fatal_error_abort()

void mir::fatal_error_abort ( char const * reason,
... )

An alternative to fatal_error_except() that kills the program and dump core as cleanly as possible.

Parameters
[in]reasonA printf-style format string.

◆ fatal_error_except()

void mir::fatal_error_except ( char const * reason,
... )

Throws an exception that will typically kill the Mir server and propagate from mir::run_mir.

Parameters
[in]reasonA printf-style format string.

◆ mir_depth_layer_get_index()

auto mir::mir_depth_layer_get_index ( MirDepthLayer depth_layer) ->unsignedint

Returns the height of a MirDepthLayer.

As the name implies, the returned value is usable as an array index (0 is returned for the bottommost layer and there are no gaps between layers). The values returned for each layer are in no way stable across Mir versions, and are only meaningful relative to each other.

◆ operator!=() [1/4]

template<typename Tag, typename ValueType>
bool mir::operator!= ( IntWrapper< Tag, ValueType > const & lhs,
IntWrapper< Tag, ValueType > const & rhs )
inlineconstexpr

◆ operator!=() [2/4]

template<typename T>
bool mir::operator!= ( optional_value< T > const & lhs,
optional_value< T > const & rhs )
inline

◆ operator!=() [3/4]

template<typename T>
bool mir::operator!= ( optional_value< T > const & lhs,
T const & rhs )
inline

◆ operator!=() [4/4]

template<typename T>
bool mir::operator!= ( T const & lhs,
optional_value< T > const & rhs )
inline

◆ operator<()

template<typename Tag, typename ValueType>
bool mir::operator< ( IntWrapper< Tag, ValueType > const & lhs,
IntWrapper< Tag, ValueType > const & rhs )
inlineconstexpr

◆ operator<<() [1/29]

template<typename Tag, typename ValueType>
std::ostream & mir::operator<< ( std::ostream & out,
IntWrapper< Tag, ValueType > const & value )

◆ operator<<() [2/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirCloseWindowEvent const & event )

◆ operator<<() [3/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirEvent const & event )

◆ operator<<() [4/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirInputDeviceStateEvent const & event )

◆ operator<<() [5/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirInputEvent const & event )

◆ operator<<() [6/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirInputEventModifier modifier )

◆ operator<<() [7/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirKeyboardAction action )

◆ operator<<() [8/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirKeymapEvent const & event )

◆ operator<<() [9/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirOrientation orientation )

◆ operator<<() [10/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirOrientationEvent const & event )

◆ operator<<() [11/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirPointerAction action )

◆ operator<<() [12/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirPromptSessionEvent const & event )

◆ operator<<() [13/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirPromptSessionState state )

◆ operator<<() [14/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirResizeEvent const & event )

◆ operator<<() [15/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirSurfaceAttrib attribute )

◆ operator<<() [16/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirSurfaceFocusState state )

◆ operator<<() [17/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirSurfaceState state )

◆ operator<<() [18/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirSurfaceType type )

◆ operator<<() [19/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirSurfaceVisibility state )

◆ operator<<() [20/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirTouchAction action )

◆ operator<<() [21/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirTouchTooltype tool )

◆ operator<<() [22/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowAttrib attribute )

◆ operator<<() [23/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowEvent const & event )

◆ operator<<() [24/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowFocusState state )

◆ operator<<() [25/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowOutputEvent const & event )

◆ operator<<() [26/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowPlacementEvent const & event )

◆ operator<<() [27/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowState state )

◆ operator<<() [28/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowType type )

◆ operator<<() [29/29]

std::ostream & mir::operator<< ( std::ostream & out,
MirWindowVisibility state )

◆ operator<=()

template<typename Tag, typename ValueType>
bool mir::operator<= ( IntWrapper< Tag, ValueType > const & lhs,
IntWrapper< Tag, ValueType > const & rhs )
inlineconstexpr

◆ operator==() [1/4]

template<typename Tag, typename ValueType>
bool mir::operator== ( IntWrapper< Tag, ValueType > const & lhs,
IntWrapper< Tag, ValueType > const & rhs )
inlineconstexpr

◆ operator==() [2/4]

template<typename T>
bool mir::operator== ( optional_value< T > const & lhs,
optional_value< T > const & rhs )
inline

◆ operator==() [3/4]

template<typename T>
bool mir::operator== ( optional_value< T > const & lhs,
T const & rhs )
inline

◆ operator==() [4/4]

template<typename T>
bool mir::operator== ( T const & lhs,
optional_value< T > const & rhs )
inline

◆ operator>=()

template<typename Tag, typename ValueType>
bool mir::operator>= ( IntWrapper< Tag, ValueType > const & lhs,
IntWrapper< Tag, ValueType > const & rhs )
inlineconstexpr

Variable Documentation

◆ fatal_error

void(* mir::fatal_error) (char const *reason,...) ( char const * reason,
... )
extern

fatal_error() is strictly for "this should never happen" situations that you cannot recover from.

By default it points at fatal_error_abort(). Note the reason parameter is a simple char* so its value is clearly visible in stack trace output.

Remarks
There is no attempt to make this thread-safe, if it needs to be changed that should be done before spinning up the Mir server.
Parameters
[in]reasonA printf-style format string.

Copyright © 2012-2026 Canonical Ltd.
Generated on Mon Mar 16 14:59:04 UTC 2026
This documentation is licensed under the GPL version 2 or 3.