Skip to content

Maul Window 0.6.0

Choose a tag to compare

@siracozmen01 siracozmen01 released this 06 Oct 08:07
· 138 commits to main since this release

Maul Window 0.6.0 adds the requirements' optional parts: cursors from images, trigger rumble and motion for gamepads, and clipboard data by MIME type with the primary selection.

Added

  • Cursors made from images (mwin-0027): mwinCreateCursor takes up to four RGBA images of one cursor, for scale 1 and higher scales, at most 128 pixels a side, with a hotspot; mwinRequestCursorImage shows one over a window and mwinDestroyCursor ends it, within the context's cursors limit (default 16).
    • X11 through RENDER (libxcb-render0-dev is now a build requirement), Wayland as shared memory on a surface a viewport sizes, the web as PNG in a CSS image-set(), macOS as an NSCursor with a representation per image, Android as a PointerIcon. iOS has no pointer cursors to set.
  • Android serves cursor shape requests too.
  • Trigger rumble and motion as optional gamepad capabilities (mwin-0028): mwin_padTriggerRumble with mwinSetGamepadTriggerRumble, and mwin_padMotion with mwinSetGamepadMotion and mwinGetGamepadMotion (acceleration, rotation rate, and the angle turned since the last read, summed over every sample).
    • Trigger rumble: Windows.Gaming.Input on Microsoft's pads from the Xbox One on, the web where the actuator has trigger-rumble, GameController where the haptics reach the triggers.
    • Motion: Linux from the driver's motion sensors device (hid-playstation, hid-nintendo), GameController's GCMotion, Android 12 and later through the device's sensors.
  • Clipboard data by MIME type and the primary selection (mwin-0029): mwinRequestClipboardWriteData offers up to four typed items, one of them text, the bytes passed through unconverted; mwinRequestClipboardReadData and mwinGetClipboardData read one type back; mwinRequestPrimaryWrite, mwinRequestPrimaryRead and mwinGetPrimaryText keep the selected text apart from the clipboard.
    • X11 offers each type as its own target (INCR for large items) and owns PRIMARY; Wayland offers each type on its data source and uses the primary selection protocol where the compositor has it; Win32 registers a format per type ("PNG" and "HTML Format" for theirs); macOS and iOS use the type UTType names; the web writes a ClipboardItem, other types than text/plain, text/html and image/png as web custom formats (browsers may encode an image again). Android answers both unsupported.

Fixed

  • MWIN_NODISCARD is [[nodiscard]] under MSVC's C++17 compiler too; CI compiles every public header with MSVC as C17 and C++17.