示例#1
0
文件: log.py 项目: forksbot/pywlroots
def log_func_callback(importance: int, formatted_str) -> None:
    """Callback that logs the string at the given level"""
    log_str = ffi.string(formatted_str).decode()
    if importance == lib.WLR_ERROR:
        logger.error(log_str)
    elif importance == lib.WLR_INFO:
        logger.info(log_str)
    elif importance == lib.WLR_DEBUG:
        logger.debug(log_str)
示例#2
0
 def name(self) -> str:
     """The name of the output"""
     return ffi.string(self._ptr.name).decode()
示例#3
0
 def app_id(self) -> str:
     """The app id of the toplevel object"""
     return ffi.string(self._ptr.app_id).decode()
示例#4
0
 def title(self) -> str:
     """The title of the toplevel object"""
     return ffi.string(self._ptr.title).decode()
示例#5
0
文件: output.py 项目: m-col/pywlroots
 def serial(self) -> str:
     return ffi.string(self._ptr.serial).decode()
示例#6
0
文件: output.py 项目: m-col/pywlroots
 def model(self) -> str:
     return ffi.string(self._ptr.model).decode()
示例#7
0
文件: output.py 项目: m-col/pywlroots
 def make(self) -> str:
     return ffi.string(self._ptr.make).decode()
示例#8
0
文件: output.py 项目: m-col/pywlroots
 def description(self) -> Optional[str]:
     """The description of the output"""
     if self._ptr.description == ffi.NULL:
         return None
     return ffi.string(self._ptr.description).decode()
示例#9
0
 def name(self) -> str:
     return ffi.string(self._ptr.name).decode()
 def app_id(self) -> str | None:
     if self._ptr.app_id == ffi.NULL:
         return None
     return ffi.string(self._ptr.app_id).decode()
 def title(self) -> str | None:
     if self._ptr.title == ffi.NULL:
         return None
     return ffi.string(self._ptr.title).decode()