Method

class pywayland.scanner.method.Method(name: str, since: Optional[str], description: Optional[pywayland.scanner.description.Description], arg: List[pywayland.scanner.argument.Argument])

Scanner for methods

Corresponds to event and requests defined on an interface

imports(interface: str, module_imports: Dict[str, str]) → List[Tuple[str, str]]

Get the imports required for each of the interfaces

Parameters:
  • interface – The name of the interface that the method is a part of.
  • module_imports – A mapping from the name of an interface in the associated module that the interface comes from.
Returns:

A list of 2-tuples, each specifying the path to an imported module and the imported class.

output(printer: pywayland.scanner.printer.Printer, opcode: int, in_class: str, module_imports: Dict[str, str]) → None

Generate the output for the given method to the printer

output_doc(printer: pywayland.scanner.printer.Printer) → None

Output the documentation for the interface