[Phase L5-2] OCR 화면 텍스트 추출 기능 구현

OcrHandler.cs 신규 생성 (Handlers/, 220줄):
- prefix="ocr" — "화면 영역 텍스트 추출" / "클립보드 이미지 텍스트 추출" 2가지 옵션
- ExecuteRegionOcrAsync(): 180ms 대기 → 전체 화면 캡처 → RegionSelectWindow 오버레이 → 영역 크롭
- ExecuteClipboardOcrAsync(): 클립보드 BitmapSource → System.Drawing.Bitmap 변환 → OCR
- RunOcrOnBitmapAsync(): Bitmap → 임시 PNG → WinStorageFile → WinBitmapDecoder → WinOcrEngine.RecognizeAsync()
  (기존 ClipboardHistoryService.ImageCache.cs 패턴 재사용, 5,000자 상한)
- HandleOcrResult(): 클립보드 복사 + 런처 입력창 자동 채움 + 완료 알림

App.xaml.cs:
- OcrHandler 등록 (Phase L5-2 주석)

LauncherWindow.Keyboard.cs:
- F4 키: 런처 Hide → OcrHandler.__ocr_region__ 즉시 실행 (백그라운드 Task)

HelpDetailWindow.Shortcuts.cs:
- F4 단축키 항목 추가 (F3 바로 다음, 아이콘 \uE8D2, 색상 #0F766E)

HelpDetailWindow.xaml.cs:
- "런처 탐색" 카테고리에 F4/OCR 항목 추가

Services/L10n.cs:
- Phase L5 신기능 팁 5종 추가 (OCR F4, ocr 예약어, 전용 핫키 설정, hotkey 예약어, OCR 입력창 채움)

docs/LAUNCHER_ROADMAP.md:
- L5-2  완료 표시

빌드: 경고 0, 오류 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 12:19:13 +09:00
parent c12e863e3a
commit ce02343624
7 changed files with 309 additions and 1 deletions

View File

@@ -180,6 +180,8 @@ public partial class App : System.Windows.Application
// ─── Phase L5 핸들러 ──────────────────────────────────────────────────
// Phase L5-1: 전용 핫키 목록 관리 (prefix=hotkey)
commandResolver.RegisterHandler(new HotkeyHandler(settings));
// Phase L5-2: OCR 화면 텍스트 추출 (prefix=ocr)
commandResolver.RegisterHandler(new OcrHandler());
// ─── 플러그인 로드 ────────────────────────────────────────────────────
var pluginHost = new PluginHost(settings, commandResolver);