Overview
SIMPLE_CLIPBOARD provides simple clipboard access for Eiffel applications on Windows. It uses inline C with Win32 API calls and is SCOOP-compatible.
Key Features
- Get and set text from Windows clipboard
- Check clipboard contents
- Clear clipboard
- Thread-safe operations
Quick Start
<library name="simple_clipboard" location="$SIMPLE_CLIPBOARD/simple_clipboard.ecf"/>
Basic Usage
local
cb: SIMPLE_CLIPBOARD
do
create cb
-- Copy to clipboard
cb.set_text ("Hello, World!")
-- Paste from clipboard
if attached cb.text as t then
print (t)
end
end
API Reference
| Feature | Description |
|---|---|
text: detachable STRING_32 | Get clipboard text |
set_text (str) | Set clipboard text |
has_text: BOOLEAN | Check if clipboard has text |
is_empty: BOOLEAN | Check if clipboard is empty |
clear | Clear clipboard |
copy_text (str) | Alias for set_text |
paste: detachable STRING_32 | Alias for text |
format_count: INTEGER | Number of formats available |
last_operation_succeeded: BOOLEAN | Status of last operation |