old_contents: from __future__ import annotations
  
  import typing
  from abc import ABCMeta, abstractmethod
  
  if typing.TYPE_CHECKING:
      from typing import List, Tuple, Union
  
      from libqtile import config
      from libqtile.core.manager import Qtile
  
  
  class Core(metaclass=ABCMeta):
      @abstractmethod
      def finalize(self):
          """Destructor/Clean up resources"""
  
      @property
      @abstractmethod
      def display_name(self) -> str:
          pass
  
      @abstractmethod
      def setup_listener(self, qtile: Qtile) -> None:
          """Setup a listener for the given qtile instance"""
  
      @abstractmethod
      def remove_listener(self) -> None:
          """Setup a listener for the given qtile instance"""
  
      @abstractmethod
      def update_desktops(self, groups, index: int) -> None:
          """Set the current desktops of the window manager"""
  
      @abstractmethod
      def get_screen_info(self) -> List[Tuple[int, int, int, int]]:
          """Get the screen information"""
  
      @abstractmethod
      def grab_key(self, key: Union[config.Key, config.KeyChord]) -> Tuple[int, int]:
          """Configure the backend to grab the key event"""
  
      @abstractmethod
      def ungrab_key(self, key: Union[config.Key, config.KeyChord]) -> Tuple[int, int]:
          """Release the given key event"""
  
      @abstractmethod
      def ungrab_keys(self) -> None:
          """Release the grabbed key events"""
  
      @abstractmethod
      def grab_button(self, mouse: config.Mouse) -> None:
          """Configure the backend to grab the mouse event"""
  
      @abstractmethod
      def ungrab_buttons(self) -> None:
          """Release the grabbed button events"""
  
      @abstractmethod
      def grab_pointer(self) -> None:
          """Configure the backend to grab mouse events"""
  
      @abstractmethod
      def ungrab_pointer(self) -> None:
          """Release grabbed pointer events"""
  
new_contents: from __future__ import annotations
  
  import typing
  from abc import ABCMeta, abstractmethod
  
  if typing.TYPE_CHECKING:
      from typing import List, Tuple, Union
  
      from libqtile import config
      from libqtile.core.manager import Qtile
  
  
  class Core(metaclass=ABCMeta):
      @abstractmethod
      def finalize(self):
          """Destructor/Clean up resources"""
  
      @property
      @abstractmethod
      def display_name(self) -> str:
          pass
  
      @abstractmethod
      def setup_listener(self, qtile: Qtile) -> None:
          """Setup a listener for the given qtile instance"""
  
      @abstractmethod
      def remove_listener(self) -> None:
          """Setup a listener for the given qtile instance"""
  
      @abstractmethod
      def update_desktops(self, groups, index: int) -> None:
          """Set the current desktops of the window manager"""
  
      @abstractmethod
      def get_screen_info(self) -> List[Tuple[int, int, int, int]]:
          """Get the screen information"""
  
      @abstractmethod
      def grab_key(self, key: Union[config.Key, config.KeyChord]) -> Tuple[int, int]:
          """Configure the backend to grab the key event"""
  
      @abstractmethod
      def ungrab_key(self, key: Union[config.Key, config.KeyChord]) -> Tuple[int, int]:
          """Release the given key event"""
  
      @abstractmethod
      def ungrab_keys(self) -> None:
          """Release the grabbed key events"""
  
      @abstractmethod
      def grab_button(self, mouse: config.Mouse) -> None:
          """Configure the backend to grab the mouse event"""
  
      @abstractmethod
      def ungrab_buttons(self) -> None:
          """Release the grabbed button events"""
  
      @abstractmethod
      def grab_pointer(self) -> None:
          """Configure the backend to grab mouse events"""
  
      @abstractmethod
      def ungrab_pointer(self) -> None:
          """Release grabbed pointer events"""
  
      def scan(self) -> None:
          """Scan for clients if required."""
  
subject: Add scan method to base core