use async_trait::async_trait;
use crate::errors::Result;
use crate::models::{
ClickRequest, DisplayId, Frame, KeyPressRequest, PermissionRequest, PermissionSnapshot,
TypeRequest, UiMap, WindowFilter, WindowHandle, WindowInfo,
};
#[async_trait]
pub trait DesktopBackend: Send + Sync {
async fn list_windows(&self, filter: WindowFilter) -> Result<Vec<WindowInfo>>;
async fn observe_window(&self, window: WindowHandle) -> Result<UiMap>;
async fn capture_display(&self, display: DisplayId) -> Result<Frame>;
async fn focus_window(&self, window: WindowHandle) -> Result<()>;
async fn click(&self, request: ClickRequest) -> Result<()>;
async fn type_text(&self, request: TypeRequest) -> Result<()>;
async fn keypress(&self, request: KeyPressRequest) -> Result<()>;
async fn permissions(&self) -> Result<PermissionSnapshot>;
async fn request_permissions(&self, needs: PermissionRequest) -> Result<PermissionSnapshot>;
}