Exemple #1
0
    def set_driver(self, driver=None):
        """ Set the output driver.

            driver  -- A string describing the desired output driver or NULL
                       to choose the best driver automatically.
        """
        _lib.caca_set_display_driver.argtypes = [_Display, ctypes.c_char_p]
        _lib.caca_set_display_driver.restype  = ctypes.c_int

        if not driver:
            driver = ctypes.c_char_p(0)

        return _lib.caca_set_display_driver(self, driver)
    def set_driver(self, driver=None):
        """ Set the output driver.

            driver  -- A string describing the desired output driver or NULL
                       to choose the best driver automatically.
        """
        _lib.caca_set_display_driver.argtypes = [_Display, ctypes.c_char_p]
        _lib.caca_set_display_driver.restype = ctypes.c_int

        if not driver:
            driver = ctypes.c_char_p(0)
        else:
            if _PYTHON3 and isinstance(driver, str):
                driver = _str_to_bytes(driver)

        return _lib.caca_set_display_driver(self, driver)
Exemple #3
0
    def set_driver(self, driver=None):
        """ Set the output driver.

            driver  -- A string describing the desired output driver or NULL
                       to choose the best driver automatically.
        """
        _lib.caca_set_display_driver.argtypes = [_Display, ctypes.c_char_p]
        _lib.caca_set_display_driver.restype  = ctypes.c_int

        if not driver:
            driver = ctypes.c_char_p(0)
        else:
            if _PYTHON3 and isinstance(driver, str):
                driver = _str_to_bytes(driver)

        return _lib.caca_set_display_driver(self, driver)