Skip to content

gui_toolkit 0.41.0

Choose a tag to compare

@sachahjkl sachahjkl released this 26 Oct 16:15
· 379 commits to master since this release
v0.41.0
c983a4e

Added

  • ui.post: calls posted from any thread (ui/post.odin, ui/post_queue.odin, docs/post.md): post(state or window, fn, data, word) runs fn(data, word) on the interface's thread at the start of the next begin_build (or drain_posts), and wakes the window once per drain. ui.Post_Queue is a bounded lock-free ring (Vyukov's MPMC queue, no allocation per message); a full ring blocks (default, nothing lost), drops the oldest (on_drop), grows into a spill list or fails (Post_Overflow); each producer's order holds in every mode. post_configure (capacity, overflow, calls per build, on_drop), drain_posts (bounded; needs_frame while calls wait), post_close, post_stats, set_post_wake. Example: examples/stream (a thread posting simulated server-sent events). Test: tests/post.
  • Notification area icon (platform/tray.odin, Windows tray_win32.odin on Shell_NotifyIconW version 4, stub elsewhere, docs/tray.md): tray_create, tray_set_icon (PNG) / tray_set_icon_rgba, tray_set_tooltip, tray_set_menu (items, separators, check and radio marks, disabled and default items, submenus; opened by a right click or the menu key), tray_show_menu, tray_notify (title, body, icon, silent, quiet time), tray_poll (clicks, double clicks, right and middle clicks, menu items, notification shown / clicked / timed out / hidden, hover, Recreated after the shell restarted: the icons are added again on TaskbarCreated), tray_destroy; destroy_window removes the window's icons. tray_test_hook and tray_inject for tests. Test: tests/tray.
  • Rich clipboard (platform/clipboard.odin, Windows clipboard_win32.odin, stub elsewhere, docs/clipboard.md): clipboard_set (text, HTML with its source URL, image, files in one write), clipboard_get_image (PNG, CF_DIBV5, CF_DIB, CF_BITMAP), clipboard_get_html (fragment and source URL), clipboard_get_files (CF_HDROP), clipboard_formats, clipboard_format_names, clipboard_sequence, clipboard_watch / clipboard_changed; images are written as PNG + CF_DIBV5 (alpha) + CF_DIB (over white). Pure conversions: dib_to_rgba (every DIB header and depth), rgba_to_dib, hdrop_encode / hdrop_decode, html_format_source_url; png_encode / png_decode. Test: tests/clipboard.
  • ui.splitter (ui/split.odin, docs/panes.md): a handle that resizes one pane (logical pixels, or any unit through unit) within its limits and the room the other pane keeps, the pane before or after the handle, double click / Enter back to the default, arrow keys and Home / End with the keyboard focus (optional), the resize cursor, a rule drawn in the accent colour while hot or held; finished says when to persist; nothing drawn or animated at rest.
  • ui.accordion: a header with a turning chevron that folds the content built in its block, with an animated height (no frame at rest), Enter / Space; the content is not built once folded.
  • ui/reorder.odin: a list reordered by dragging along X or Y, from Wren's tab strip: reorder_item_size, reorder_offset, reorder_slot, list_move, reorder_edge_scroll, reorder_moved, and the drag's state Reorder (reorder_frame, reorder_begin, reorder_dragging, reorder_item_pos: items slide to their slots, the dragged one follows the pointer).
  • Example examples/panes; tests tests/panes.