class pywayland.scanner.method.Method(name: str, since: str | None, description: Description | None, arg: list[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

  • 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.

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

output(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