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)
def name(self) -> str: """The name of the output""" return ffi.string(self._ptr.name).decode()
def app_id(self) -> str: """The app id of the toplevel object""" return ffi.string(self._ptr.app_id).decode()
def title(self) -> str: """The title of the toplevel object""" return ffi.string(self._ptr.title).decode()
def serial(self) -> str: return ffi.string(self._ptr.serial).decode()
def model(self) -> str: return ffi.string(self._ptr.model).decode()
def make(self) -> str: return ffi.string(self._ptr.make).decode()
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()
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()