Beatmup
Beatmup::DRM::GBMDevice Class Reference

#include <drm.hpp>

Public Member Functions

 GBMDevice ()
 
 GBMDevice (Device &driDevice, ModeConnector &connector)
 
 ~GBMDevice ()
 
GBMDeviceoperator= (GBMDevice &&other)
 
struct gbm_device * getPointer ()
 

Private Member Functions

 GBMDevice (const GBMDevice &)=delete
 

Private Attributes

struct gbm_device * device
 

Detailed Description

Definition at line 196 of file drm.hpp.

Constructor & Destructor Documentation

◆ GBMDevice() [1/3]

Beatmup::DRM::GBMDevice::GBMDevice ( const GBMDevice )
privatedelete

◆ GBMDevice() [2/3]

Beatmup::DRM::GBMDevice::GBMDevice ( )
inline

Definition at line 201 of file drm.hpp.

201 : device(nullptr) {}
struct gbm_device * device
Definition: drm.hpp:199

◆ GBMDevice() [3/3]

Beatmup::DRM::GBMDevice::GBMDevice ( Device driDevice,
ModeConnector connector 
)
inline

Definition at line 203 of file drm.hpp.

203  : device(nullptr) {
204  device = gbm_create_device(driDevice.getHandle());
205  if (!device)
206  throw DRMError("Cannot get GBM device");
207  }

◆ ~GBMDevice()

Beatmup::DRM::GBMDevice::~GBMDevice ( )
inline

Definition at line 209 of file drm.hpp.

209  {
210  if (device)
211  gbm_device_destroy(device);
212  }

Member Function Documentation

◆ operator=()

GBMDevice& Beatmup::DRM::GBMDevice::operator= ( GBMDevice &&  other)
inline

Definition at line 214 of file drm.hpp.

214  {
215  device = other.device;
216  other.device = nullptr;
217  return *this;
218  }

◆ getPointer()

struct gbm_device* Beatmup::DRM::GBMDevice::getPointer ( )
inline

Definition at line 220 of file drm.hpp.

220  {
221  return device;
222  }

Member Data Documentation

◆ device

struct gbm_device* Beatmup::DRM::GBMDevice::device
private

Definition at line 199 of file drm.hpp.


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