SRM  v0.10.0-1
Simple Rendering Manager
SRMInterface Struct Reference

Interface for managing DRM devices (/dev/dri/card*). More...

#include <SRMCore.h>

Data Fields

int(* openRestricted )(const char *path, int flags, void *data)
 
void(* closeRestricted )(int fd, void *data)
 

Detailed Description

Interface for managing DRM devices (/dev/dri/card*).

SRM provides this interface for opening and closing DRM devices.
Rather than relying solely on the open() and close() functions, you have the option to use libseat for enabling multi-session support.
You can refer to the srm-multi-session example to see how to enable multi-session support with libseat.

Field Documentation

◆ openRestricted

int(* SRMInterface::openRestricted) (const char *path, int flags, void *data)

Function to open a DRM device. Must return the opened DRM device file descriptor.

Parameters
pathThe path to the DRM device file (e.g., /dev/dri/card0).
flagsFlags for opening the DRM device (e.g., O_RDWR).
dataA pointer to the user data provided in srmCoreCreate().
Returns
The file descriptor of the opened DRM device.

◆ closeRestricted

void(* SRMInterface::closeRestricted) (int fd, void *data)

Function to close a DRM device file descriptor.

Parameters
fdThe file descriptor of the DRM device to close.
dataA pointer to the user data provided in srmCoreCreate().