summaryrefslogtreecommitdiff
path: root/src/common/desktop.h
AgeCommit message (Collapse)Author
11 daysSimplify the public event and CPU APIBerke Güzel
Applications now need far less ceremony: hello.c is a 20-line loop that handles REFRESH, CLOSE and QUIT and draws into the surface's own pixels. - Fold GEOMETRY, STATE and FOCUS into one WINDOW event carrying size, scale and state; unchanged values send nothing. - Guarantee REFRESH once a window has a size and after every resize, never at size zero. - Merge DROP_HOVER into DROP with over/leave/data actions and give drag and drop actions enums. - Keep event strings valid until the next wait and drop yasl_event_release; empty or failed waits report NONE. - Replace copy-in presentation with a lent pixel buffer: yasl_cpu_pixels and yasl_cpu_present. - Remove yasl_poll_event, yasl_cpu_read_pixels, unused event fields and comments that restated names. - Wayland: resize floating windows in request_size instead of reporting it unsupported, and stop marking new GPU surfaces as Vulkan so yasl_vulkan_create_surface no longer fails with NATIVE_WINDOW_IN_USE. Also includes the in-progress public API refactor that was uncommitted in the tree (removal of the app/loop layer, new surface, GL and Vulkan entry points). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 daysAdd desktop services: open URI, notify, appearance, bell, and pathsBerke Güzel
wsap_term keeps per-platform code for opening links, notifications, the bell, high-contrast detection, the executable and bundle paths, and the default locale. These now live behind <yasl/desktop.h>. On Linux, src/platform/freedesktop serves both backends. Opening a URI runs xdg-open from PATH through a double fork, so the opener gets default signal dispositions, an empty mask, a new session, and none of the application's descriptors. Notifications and the Settings portal use the session bus through libdbus-1, an optional dependency behind -Ddbus. Appearance falls back to GTK_THEME without a portal. The bell uses xdg-system-bell on Wayland and the XKB bell on X11. Cocoa implements the same calls with NSWorkspace, UserNotifications, the effective appearance, NSBeep, the bundle, and CFLocale. That code is not built or run here; it needs a macOS check. The desktop test runs under dbus-run-session against a fake notification server and portal, and uses a fake xdg-open to check argument passing, signal state, and descriptor inheritance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>