Windows Platform Support
Windows Platform Support
Section titled “Windows Platform Support”Windows-specific implementation details for Toss.
Clipboard Format Handling
Section titled “Clipboard Format Handling”Windows supports multiple clipboard formats that need special handling:
- CF_TEXT: ANSI text (legacy)
- CF_UNICODETEXT: Unicode text (preferred)
- CF_HDROP: File list (HDROP)
- CF_DIB: Device-independent bitmap
- CF_BITMAP: Bitmap handle
Implementation Status: Format constants and structure created in windows_formats.rs. Full implementation requires Windows API integration.
Files:
rust_core/src/clipboard/windows_formats.rs
Priority: Handle CF_UNICODETEXT for text, CF_HDROP for files, CF_DIB for images.
Implementation Details
Section titled “Implementation Details”Text Handling
Section titled “Text Handling”Prefer CF_UNICODETEXT over CF_TEXT:
// Use CF_UNICODETEXT for textlet format = ClipboardFormat::UnicodeText;File Handling
Section titled “File Handling”Handle CF_HDROP for file lists:
// Parse HDROP formatlet files = parse_hdrop(data);Image Handling
Section titled “Image Handling”Support CF_DIB for images:
// Convert DIB to image formatlet image = dib_to_image(data);System Integration
Section titled “System Integration”- Credential Manager: Secure storage for device keys
- System Tray: Taskbar integration
- Notifications: Toast notifications
Logging and Diagnostics
Section titled “Logging and Diagnostics”Toss includes production-level logging for Windows diagnostics:
Log Locations
Section titled “Log Locations”| Log Type | Path |
|---|---|
| Application logs | %LOCALAPPDATA%\toss\logs\toss.log |
| Panic/crash logs | %LOCALAPPDATA%\toss\logs\panic.log |
Viewing Console Output
Section titled “Viewing Console Output”Windows GUI applications don’t show console output by default. To see Rust log output:
From Command Prompt (cmd.exe):
start /wait toss.exeFrom PowerShell:
& .\toss.exePowerShell naturally waits for the process to complete.
Crash Diagnostics
Section titled “Crash Diagnostics”When Toss encounters a crash (Rust panic), it will:
- Display a Windows MessageBox with crash details
- Write the panic information to
panic.log - Print to stderr (visible in console mode)
Accessing Logs from the App
Section titled “Accessing Logs from the App”Go to Settings → About → Open Log Folder to quickly access the logs directory.
Troubleshooting Silent Failures
Section titled “Troubleshooting Silent Failures”If the app doesn’t open or closes immediately:
- Run from command line with
start /wait toss.exe - Check
%LOCALAPPDATA%\toss\logs\for log files - Look for
panic.logfor crash information
Next Steps
Section titled “Next Steps”- Platform Overview - Return to platform overview
- Linux Implementation - Linux platform details