Understand the MiddleDrag architecture and layers
mainMiddleDrag uses a modular, layered architecture designed for separation of concerns and testability. The project is organized into five primary functional layers:
- Core Layer: Handles low-level interactions, including private Apple framework bindings (
MultitouchFramework), gesture detection (GestureRecognizer), mouse event synthesis (MouseEventGenerator), and device monitoring protocols (TouchDeviceProviding). - Model Layer: Contains pure data structures for touch data (
TouchModels) and gesture state/configuration (GestureModels). - Manager Layer: Contains the business logic and coordination. Key components include the
MultitouchManager(main coordinator),DeviceMonitor(lifecycle/callbacks), andAccessibilityMonitor(permission polling). - UI Layer: Manages user-facing elements like the
MenuBarControllerandAlertHelper. - Utility Layer: Provides cross-cutting services such as
PreferencesManager(persistence),ScreenHelper(multi-monitor coordinate conversion),UpdateManager(Sparkle-based updates), andLaunchAtLoginManager.