import type { TileLayoutDirection, TileLayoutState, ViewBounds, WindowSize } from "@edenapp/types"; import type { DisplayPort } from "../platform/ports"; import type { ViewManager } from "./ViewManager"; export declare class ViewHandler { private viewManager; private mouseTracker; private dragState; private resizeState; constructor(viewManager: ViewManager, display: DisplayPort); private requireCallerAppId; private getViewIdByAppId; private startDragForApp; private endDragForApp; private startResizeForApp; private endResizeForApp; /** * Update bounds for the caller's own view. */ handleUpdateOwnViewBounds(args: { bounds: ViewBounds; _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * Update bounds for any app view. * Requires "view/manage" permission. */ handleUpdateManagedViewBounds(args: { appId: string; bounds: ViewBounds; }): Promise<{ success: boolean; }>; /** * Show or hide the caller's own view. */ handleSetOwnViewVisibility(args: { visible: boolean; _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * Show or hide any app view. * Requires "view/manage" permission. */ handleSetManagedViewVisibility(args: { appId: string; visible: boolean; }): Promise<{ success: boolean; }>; /** * Bring caller's own view to the front and focus it. */ handleFocusOwnApp(args: { _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * Bring any app view to the front and focus it. * Requires "view/manage" permission. */ handleFocusManagedApp(args: { appId: string; }): Promise<{ success: boolean; }>; /** * Update the available workspace bounds (e.g. after taskbar resize). * Requires "view/manage" permission for app callers. */ handleUpdateWorkspaceBounds(args: { bounds: ViewBounds; windowSize: WindowSize; }): Promise<{ success: boolean; }>; /** * Toggle caller's own view between floating and tiled window modes. */ handleToggleOwnViewMode(args: { mode?: "floating" | "tiled"; _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * Toggle any app view between floating and tiled window modes. * Requires "view/manage" permission. */ handleToggleManagedViewMode(args: { appId: string; mode?: "floating" | "tiled"; }): Promise<{ success: boolean; }>; /** * Get adjacent tiled windows for the caller's app-frame layout controls. */ handleTileLayoutState(args: { _callerAppId?: string; }): Promise; /** Swap the caller with the tiled window on one edge. */ handleSwapTile(args: { direction: TileLayoutDirection; _callerAppId?: string; }): Promise; /** Temporarily cover the tiled window on one edge with the caller. */ handleExpandTile(args: { direction: TileLayoutDirection; _callerAppId?: string; }): Promise; /** * Start dragging caller's own view. */ handleStartOwnDrag(args: { startX: number; startY: number; _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * End drag operation for caller's own view. */ handleEndOwnDrag(args: { _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * Handle global mouse up event to stop any active drag/resize operations. * Requires "view/manage" permission for app callers. */ handleGlobalMouseUp(): Promise<{ success: boolean; }>; /** * Start resizing caller's own view. */ handleStartOwnResize(args: { startX: number; startY: number; direction?: "left" | "right" | "bottom" | "bottom-left" | "bottom-right"; _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * End resize operation for caller's own view. */ handleEndOwnResize(args: { _callerAppId?: string; }): Promise<{ success: boolean; }>; /** * Get the current dimensions of the main window. */ handleGetWindowSize(): Promise; /** * Set the interface scale (zoom factor) for all views. * @param scale - Scale factor as a string (e.g., "1.0" for 100%, "1.5" for 150%) */ handleSetInterfaceScale(args: { scale: string; }): Promise<{ success: boolean; }>; /** * Get the current interface scale. */ handleGetInterfaceScale(): Promise<{ scale: number; }>; dispose(): void; } //# sourceMappingURL=ViewHandler.d.ts.map