Mir
Namespaces | Classes | Typedefs | Functions | Variables
mir Namespace Reference

AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time. More...

Namespaces

 client
 Convenient C++ wrappers around the Mir toolkit API.
 
 cookie
 
 detail
 
 dispatch
 
 events
 
 frontend
 
 geometry
 Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.
 
 graphics
 
 input
 
 logging
 
 protobuf
 
 raii
 Utilities for exception safe use of paired function calls.
 
 renderer
 
 scene
 
 shell
 
 test
 
 time
 

Classes

class  AbnormalExit
 
class  AnonymousShmFile
 
class  CachedPtr
 
struct  EmptyDeleter
 
struct  ExtensionDescription
 
class  FatalErrorStrategy
 
class  Fd
 
struct  Flags
 
struct  IntOwnedFd
 
class  IntWrapper
 
struct  ModuleDeleter
 
class  optional_value
 
class  PosixRWMutex
 Implementation of the Mutex and SharedMutex C++14 concepts via POSIX pthread rwlock. More...
 
class  SharedLibrary
 
class  ShmFile
 

Typedefs

typedef std::unique_ptr< MirEvent, void(*)(MirEvent *)> EventUPtr
 
template<typename T >
using UniqueModulePtr = std::unique_ptr< T, ModuleDeleter< T > >
 Use UniqueModulePtr to ensure that your loadable libray outlives instances created within it. More...
 

Functions

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)
 
template<typename ReferenceTypename , typename EntryPoint >
void assert_entry_point_signature (EntryPoint)
 
template<typename Enum >
constexpr Flags< Enum > operator| (Flags< Enum > flags, Enum e) noexcept
 
template<typename Enum >
constexpr Flags< Enum > operator| (Enum e, Flags< Enum > flags) noexcept
 
template<typename Enum >
constexpr Enum operator & (Enum e, Flags< Enum > flags) noexcept
 
template<typename Enum >
constexpr Enum operator & (Flags< Enum > flags, Enum e) noexcept
 
template<typename Enum >
constexpr bool operator== (Flags< Enum > flags, Enum e) noexcept
 
template<typename Enum >
constexpr bool operator== (Enum e, Flags< Enum > flags) noexcept
 
template<typename Enum >
constexpr bool contains (Flags< Enum > flags, Enum e) noexcept
 
void logv (logging::Severity sev, const char *component, char const *fmt, va_list va)
 
void log (logging::Severity sev, const char *component, char const *fmt,...)
 
void log (logging::Severity sev, const char *component, std::string const &message)
 
void log (logging::Severity sev, char const *component, std::exception_ptr const &exception, std::string const &message)
 
void fatal_error_except (char const *reason,...)
 Throws an exception that will typically kill the Mir server and propagate from mir::run_mir. More...
 
void fatal_error_abort (char const *reason,...)
 An alternative to fatal_error_except() that kills the program and dump core as cleanly as possible. More...
 
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)
 

Variables

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

Detailed Description

AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time.

This is helpul for tests that botch create threads and use ASSERT macros for example (or any other condition that makes the test exit early). Using naked std::thread would call std::terminate under such conditions.

Typedef Documentation

◆ EventUPtr

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

◆ UniqueModulePtr

template<typename T >
using mir::UniqueModulePtr = typedef std::unique_ptr<T,ModuleDeleter<T> >

Use UniqueModulePtr to ensure that your loadable libray outlives instances created within it.

Use mir::make_module_ptr(...) or pass a function from your library to the constructor, to increase the lifetime of your library:

{
return mir::UniqueModulePtr<SomeInterface>(new Implementation, &library_entry_point);
}

The default constructor will not try to infer the dynamic library.

Function Documentation

◆ assert_entry_point_signature()

template<typename ReferenceTypename , typename EntryPoint >
void mir::assert_entry_point_signature ( EntryPoint  )

◆ contains()

template<typename Enum >
constexpr bool mir::contains ( Flags< Enum >  flags,
Enum  e 
)
noexcept

◆ 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.

◆ log() [1/3]

void mir::log ( logging::Severity  sev,
const char *  component,
char const *  fmt,
  ... 
)

◆ log() [2/3]

void mir::log ( logging::Severity  sev,
const char *  component,
std::string const &  message 
)

◆ log() [3/3]

void mir::log ( logging::Severity  sev,
char const *  component,
std::exception_ptr const &  exception,
std::string const &  message 
)

◆ logv()

void mir::logv ( logging::Severity  sev,
const char *  component,
char const *  fmt,
va_list  va 
)

◆ operator &() [1/2]

template<typename Enum >
constexpr Enum mir::operator& ( Enum  e,
Flags< Enum >  flags 
)
noexcept

◆ operator &() [2/2]

template<typename Enum >
constexpr Enum mir::operator& ( Flags< Enum >  flags,
Enum  e 
)
noexcept

◆ operator!=() [1/4]

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

◆ 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 >
constexpr bool mir::operator< ( IntWrapper< Tag, ValueType > const &  lhs,
IntWrapper< Tag, ValueType > const &  rhs 
)
inline

◆ operator<<() [1/29]

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

◆ operator<<() [2/29]

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

◆ operator<<() [3/29]

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

◆ operator<<() [4/29]

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

◆ operator<<() [5/29]

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

◆ operator<<() [6/29]

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

◆ operator<<() [7/29]

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

◆ operator<<() [8/29]

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

◆ operator<<() [9/29]

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

◆ operator<<() [10/29]

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

◆ operator<<() [11/29]

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

◆ operator<<() [12/29]

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

◆ operator<<() [13/29]

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

◆ operator<<() [14/29]

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

◆ operator<<() [15/29]

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

◆ operator<<() [16/29]

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

◆ operator<<() [17/29]

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

◆ operator<<() [18/29]

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

◆ operator<<() [19/29]

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

◆ operator<<() [20/29]

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

◆ operator<<() [21/29]

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

◆ operator<<() [22/29]

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

◆ operator<<() [23/29]

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

◆ operator<<() [24/29]

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

◆ operator<<() [25/29]

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

◆ operator<<() [26/29]

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

◆ operator<<() [27/29]

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

◆ operator<<() [28/29]

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

◆ operator<<() [29/29]

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

◆ operator<=()

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

◆ operator==() [1/6]

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

◆ operator==() [2/6]

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

◆ operator==() [3/6]

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

◆ operator==() [4/6]

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

◆ operator==() [5/6]

template<typename Enum >
constexpr bool mir::operator== ( Flags< Enum >  flags,
Enum  e 
)
noexcept

◆ operator==() [6/6]

template<typename Enum >
constexpr bool mir::operator== ( Enum  e,
Flags< Enum >  flags 
)
noexcept

◆ operator>=()

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

◆ operator|() [1/2]

template<typename Enum >
constexpr Flags<Enum> mir::operator| ( Flags< Enum >  flags,
Enum  e 
)
noexcept

◆ operator|() [2/2]

template<typename Enum >
constexpr Flags<Enum> mir::operator| ( Enum  e,
Flags< Enum >  flags 
)
noexcept

Variable Documentation

◆ fatal_error

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

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

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

Parameters
[in]reasonA printf-style format string.

Copyright © 2012-2018 Canonical Ltd.
Generated on Mon Feb 19 14:06:43 UTC 2018