(self)
Set all ctypes functions and attach them to attributes.
Set all ctypes functions and attach them to attributes.
Set all ctypes functions and attach them to attributes .
def _set_cfunctions(self):
        """ Set all ctypes functions and attach them to attributes. """

        cfactory = self._cfactory
        attrs = {
            "xlib": self.xlib,
            "xrandr": self.xrandr,
        }
        for func, (attr, argtypes, restype) in CFUNCTIONS.items():
            try:
                cfactory(
                    attr=attrs[attr],
                    errcheck=validate,
                    func=func,
                    argtypes=argtypes,
                    restype=restype,
                )  # type: ignore
            except AttributeError:
                pass
def _set_cfunctions ( self ) : cfactory = self . _cfactory attrs = { "xlib" : self . xlib , "xrandr" : self . xrandr , } for func , ( attr , argtypes , restype ) in CFUNCTIONS . items ( ) : try : cfactory ( attr = attrs [ attr ] , errcheck = validate , func = func , argtypes = argtypes , restype = restype , ) # type: ignore except AttributeError : pass