The portable layer and the library now build for x86_64-unknown-haiku
and i586-pc-haiku with clang and a sysroot from clang-retro/unix-sdk.
The Haiku backend has two halves, as the Cocoa one has:
backend_haiku_be.cpp uses BApplication, BWindow, BView and BBitmap,
and backend_haiku.cpp connects them to the window manager of the
layer. The windows have no app_server border; the layer draws the
frame. Menus and tooltips float and do not take the focus. Keys,
modifiers, the mouse wheel, the cursor and the clipboard are mapped.
Other Haiku changes:
- the program path and argv come from the kernel and __libc_argv,
as Haiku has no /proc;
- the fonts come from the Haiku font folders (Noto Sans for the UI);
- the registry file is polled, as there is no inotify or kqueue;
- CSIZE, SIOCATMARK, ETOOMANYREFS, malloc.h and the tolower macro;
- CAsyncSocket::GetSockName and GetPeerName fail for an address that
is not IPv4, as on Windows (Haiku's sockaddr_in can hold an IPv6
address).
samples/showcase is a small SDI program with dialogs and common
controls. tests/run-haiku-tests.sh builds the tests and runs them in
Haiku in QEMU (unix-sdk's haiku-vm.py), and takes screenshots of the
sample. CI runs them in the nightly image for x86_64 and builds them
for i586. docs/haiku.md describes the port.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUCocRdmh1id7SXNMg
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>