original_docstring: Loads the userland DRM library.
docstring: Loads the userland DRM library.
docstring_tokens: Loads the userland DRM library .
code: def _LoadDRMLibrary():
    """Loads the userland DRM library."""
    lib = ctypes.cdll.LoadLibrary('libdrm.so')
  
    lib.drmModeGetResources.argtypes = [ctypes.c_int]
    lib.drmModeGetResources.restype = ctypes.POINTER(DRMModeResource)
    lib.drmModeFreeResources.argtypes = [ctypes.POINTER(DRMModeResource)]
    lib.drmModeFreeResources.restype = None
  
    lib.drmModeGetConnector.argtypes = [ctypes.c_int, ctypes.c_uint32]
    lib.drmModeGetConnector.restype = ctypes.POINTER(DRMModeConnector)
    lib.drmModeFreeConnector.argtypes = [ctypes.POINTER(DRMModeConnector)]
    lib.drmModeFreeConnector.restype = None
  
    lib.drmModeGetEncoder.argtypes = [ctypes.c_int, ctypes.c_uint32]
    lib.drmModeGetEncoder.restype = ctypes.POINTER(DRMModeEncoder)
    lib.drmModeFreeEncoder.argtypes = [ctypes.POINTER(DRMModeEncoder)]
    lib.drmModeFreeEncoder.restype = None
  
    lib.drmModeGetCrtc.argtypes = [ctypes.c_int, ctypes.c_uint32]
    lib.drmModeGetCrtc.restype = ctypes.POINTER(DRMModeCrtc)
    lib.drmModeFreeCrtc.argtypes = [ctypes.POINTER(DRMModeCrtc)]
    lib.drmModeFreeCrtc.restype = None
  
    lib.drmModeGetFB.argtypes = [ctypes.c_int, ctypes.c_uint32]
    lib.drmModeGetFB.restype = ctypes.POINTER(DRMModeFB)
    lib.drmModeFreeFB.argtypes = [ctypes.POINTER(DRMModeFB)]
    lib.drmModeFreeFB.restype = None
  
    lib.drmModeGetPropertyBlob.argtypes = [ctypes.c_int, ctypes.c_uint32]
    lib.drmModeGetPropertyBlob.restype = ctypes.POINTER(DRMModePropertyBlob)
    lib.drmModeFreePropertyBlob.argtypes = [ctypes.POINTER(DRMModePropertyBlob)]
    lib.drmModeFreePropertyBlob.restype = None
  
    lib.drmIoctl.argtypes = [ctypes.c_int, ctypes.c_ulong, ctypes.c_voidp]
    lib.drmIoctl.restype = ctypes.c_int
  
    lib.drmSetMaster.argtypes = [ctypes.c_int]
    lib.drmSetMaster.restypes = ctypes.c_int
    lib.drmDropMaster.argtypes = [ctypes.c_int]
    lib.drmDropMaster.restypes = ctypes.c_int
  
    lib.drmModeConnectorSetProperty.argtypes = [ctypes.c_int, ctypes.c_uint32,
                                                ctypes.c_uint32, ctypes.c_uint64]
    lib.drmModeConnectorSetProperty.restype = ctypes.c_int
  
    return lib
code_tokens: def _LoadDRMLibrary ( ) : lib = ctypes . cdll . LoadLibrary ( 'libdrm.so' ) lib . drmModeGetResources . argtypes = [ ctypes . c_int ] lib . drmModeGetResources . restype = ctypes . POINTER ( DRMModeResource ) lib . drmModeFreeResources . argtypes = [ ctypes . POINTER ( DRMModeResource ) ] lib . drmModeFreeResources . restype = None lib . drmModeGetConnector . argtypes = [ ctypes . c_int , ctypes . c_uint32 ] lib . drmModeGetConnector . restype = ctypes . POINTER ( DRMModeConnector ) lib . drmModeFreeConnector . argtypes = [ ctypes . POINTER ( DRMModeConnector ) ] lib . drmModeFreeConnector . restype = None lib . drmModeGetEncoder . argtypes = [ ctypes . c_int , ctypes . c_uint32 ] lib . drmModeGetEncoder . restype = ctypes . POINTER ( DRMModeEncoder ) lib . drmModeFreeEncoder . argtypes = [ ctypes . POINTER ( DRMModeEncoder ) ] lib . drmModeFreeEncoder . restype = None lib . drmModeGetCrtc . argtypes = [ ctypes . c_int , ctypes . c_uint32 ] lib . drmModeGetCrtc . restype = ctypes . POINTER ( DRMModeCrtc ) lib . drmModeFreeCrtc . argtypes = [ ctypes . POINTER ( DRMModeCrtc ) ] lib . drmModeFreeCrtc . restype = None lib . drmModeGetFB . argtypes = [ ctypes . c_int , ctypes . c_uint32 ] lib . drmModeGetFB . restype = ctypes . POINTER ( DRMModeFB ) lib . drmModeFreeFB . argtypes = [ ctypes . POINTER ( DRMModeFB ) ] lib . drmModeFreeFB . restype = None lib . drmModeGetPropertyBlob . argtypes = [ ctypes . c_int , ctypes . c_uint32 ] lib . drmModeGetPropertyBlob . restype = ctypes . POINTER ( DRMModePropertyBlob ) lib . drmModeFreePropertyBlob . argtypes = [ ctypes . POINTER ( DRMModePropertyBlob ) ] lib . drmModeFreePropertyBlob . restype = None lib . drmIoctl . argtypes = [ ctypes . c_int , ctypes . c_ulong , ctypes . c_voidp ] lib . drmIoctl . restype = ctypes . c_int lib . drmSetMaster . argtypes = [ ctypes . c_int ] lib . drmSetMaster . restypes = ctypes . c_int lib . drmDropMaster . argtypes = [ ctypes . c_int ] lib . drmDropMaster . restypes = ctypes . c_int lib . drmModeConnectorSetProperty . argtypes = [ ctypes . c_int , ctypes . c_uint32 , ctypes . c_uint32 , ctypes . c_uint64 ] lib . drmModeConnectorSetProperty . restype = ctypes . c_int return lib
short_docstring: Loads the userland DRM library.
short_docstring_tokens: Loads the userland DRM library .
comment: """Loads the userland DRM library."""