Documentation · Kit differences

What changed, kit by kit.

Every public header air/OS changes, shown as a diff against Haiku, with what it is for and the commits behind it. Behaviour changes in unchanged APIs, and the private APIs the system’s apps use, are listed alongside.

Interface Kit

libbe.so

Most of the fork's API work is here: fractional scaling, frame-accurate presentation, dark mode and colour emoji, plus a private accessibility interface.

Added

BScreen::DeviceScale() and B_DEVICE_PIXEL_BITMAP

interface/Screen.h, interface/InterfaceDefs.hHaiku reference ↗

  class BScreen {
          BRect       Frame();
+         float       DeviceScale();
+             // frame buffer pixels per coordinate unit, 1.5 at 150%

  enum bitmap_drawing_options {
      B_FILTER_BITMAP_BILINEAR    = 0x00000100,
      B_WAIT_FOR_RETRACE      = 0x00000800,
+     B_DEVICE_PIXEL_BITMAP       = 0x00001000
  };

air/OS draws the desktop at the density of each monitor (100–300%, including fractional steps). Apps keep working in logical coordinates. DeviceScale() tells an app how many frame buffer pixels make one coordinate unit, so it can render a bitmap at full resolution. A bitmap drawn with B_DEVICE_PIXEL_BITMAP holds frame buffer pixels: it is placed one to one at the pixel where the destination's top-left corner falls, and is not scaled to the destination rectangle.

Added

BScreen::WaitForOutputRetrace() and GetScanTiming()

interface/Screen.hHaiku reference ↗

+ typedef struct display_scan_timing {
+     uint32      output_id;  // 0: the outputs share one blank
+     uint32      flags;      // B_SCAN_TIMING_FROM_HARDWARE / _FROM_BLANK
+     BRect       frame;      // the output, in screen coordinates
+     clipping_rect   device_frame;   // and in frame buffer pixels
+     bigtime_t   scan_start; // system_time() of a frame's start
+     bigtime_t   period;     // the next ones every period
+     uint32      generation; // changes with the layout and modes
+ } display_scan_timing;

          status_t    WaitForRetrace(bigtime_t timeout);
+         status_t    WaitForOutputRetrace(BRect frame,
+                 bigtime_t timeout = B_INFINITE_TIMEOUT);
+         status_t    GetScanTiming(BRect frame,
+                 display_scan_timing* timing);

With several monitors, each has its own refresh. WaitForOutputRetrace() waits for the next frame of the monitor that shows frame (a window's frame, for example) rather than the main screen's. GetScanTiming() tells a video player or game when that monitor's frames start and how long they last, so it can schedule presentation instead of polling. scan_start comes from the hardware where the driver can read it (B_SCAN_TIMING_FROM_HARDWARE), or from the blank interrupt (B_SCAN_TIMING_FROM_BLANK).

Behaviour

B_WAIT_FOR_RETRACE is honoured

interface/InterfaceDefs.hHaiku reference ↗

Haiku accepts the B_WAIT_FOR_RETRACE bitmap drawing option but ignores it. In air/OS a bitmap drawn with it reaches the screen at the next vertical blank of its monitor, without tearing. app_server also copies to the screen once per frame, just after the blank, on every output. MediaPlayer already passes the flag.

Added

Dark mode: ui_dark_mode() and set_ui_dark_mode()

interface/InterfaceDefs.hHaiku reference ↗

  rgb_color   tint_color(rgb_color color, float tint);

+ // Light or dark appearance (air/OS). Each has its own palette of UI colors;
+ // switching makes the other palette current, and applications get
+ // B_COLORS_UPDATED as for any change of colors.
+ bool        ui_dark_mode();
+ void        set_ui_dark_mode(bool dark);

There are two complete palettes of UI colours, light and dark, switched in Screen preferences. Colours an app never set follow the current appearance. A switch arrives as an ordinary B_COLORS_UPDATED, which now also carries the colours being replaced in a "be:previous colors" message: BTextView uses it to recolour text that was in the old system text colour, and an app with custom colours can do the same. Summit uses ui_dark_mode() to answer the web's prefers-color-scheme.

Added

B_COLOR_GLYPHS_AS_SHAPES

interface/Font.hHaiku reference ↗

  enum {
      B_DISABLE_ANTIALIASING  = 0x00000001,
      B_FORCE_ANTIALIASING    = 0x00000002,
+     B_COLOR_GLYPHS_AS_SHAPES = 0x00000004
  };

air/OS draws colour emoji, including sequences (ZWJ families, flags, keycaps, skin tones). This font flag draws colour glyphs in the high colour, in the shape of their pixels, for text shadows and outlines. The same happens automatically when the font has a false bold width. In BTextView an emoji sequence counts as one character for the caret, selection and deletion.

Added

Touchpad wheel phases

interface/Input.h

+ // "be:wheel_phase" of a B_MOUSE_WHEEL_CHANGED message from a touchpad
+ enum input_wheel_phase {
+     B_WHEEL_PHASE_NONE  = 0,
+     B_WHEEL_PHASE_BEGAN = 1,
+     B_WHEEL_PHASE_CHANGED   = 2,
+     B_WHEEL_PHASE_ENDED = 3
+ };

Two-finger scrolling on a touchpad is smooth. B_MOUSE_WHEEL_CHANGED from a touchpad carries "be:wheel_precise_delta_x" and "be:wheel_precise_delta_y" (float) and "be:wheel_phase". Messages in the middle of a gesture can have whole-step deltas of 0; the stock views ignore those, and an app that scrolls by the precise deltas should too.

Behaviour

Drawing on a scaled desktop

BView, BBitmap, BFontHaiku reference ↗

On a scaled desktop app_server renders text and shapes at the frame buffer's density, but bitmaps are enlarged (with area sampling), so content an app draws offscreen at logical size comes out soft. Prefer drawing directly, or render at DeviceScale() and draw with B_DEVICE_PIXEL_BITMAP. Other differences: a BBitmap made from a vector icon keeps its vector form and is drawn sharp at any density (writing to Bits() drops it); CopyBits() by a fraction of a pixel becomes a redraw; B_SCREEN_CHANGED carries "device scale" (float); subpixel anti-aliasing is off while scaled; fractional font sizes are measured at their exact size, so StringWidth() of 13.8-point text differs slightly from Haiku's even at 100%.

Behaviour

Windows, menus and alerts on several monitors

BWindow, BMenu, BAlertHaiku reference ↗

Each monitor is its own region of the desktop. BWindow::Zoom() fills the monitor holding most of the window. CenterOnScreen() and MoveOnScreen() use the window's monitor (or the mouse's while the window is hidden). Alerts open on the mouse's monitor, and menus, submenus and tool tips stay on the monitor they open on. When a monitor is unplugged, its windows move to one that remains.

Added

B_DIRECT_DEVICE_PIXELS window flag

interface/Window.hHaiku reference ↗

      B_NO_SERVER_SIDE_WINDOW_MODIFIERS   = 0x00000200,
+     B_DIRECT_DEVICE_PIXELS          = 0x00000400
+         // a BDirectWindow that draws in the frame buffer's own pixels,
+         // so it stays connected when the desktop is drawn at a higher
+         // density (see direct_buffer_info::device_scale)

See the Game Kit below: without this flag a BDirectWindow is disconnected while the desktop is scaled.

Private

Accessibility: BAccessible

private/interface/Accessible.h, AccessibilityProtocol.h

+ class BAccessible {
+ public:
+     virtual accessible_role Role() const = 0;
+     virtual BString     Name() const;
+     virtual BString     Value() const;
+     virtual uint64      States() const;
+     virtual BRect       Frame() const;
+     virtual int32       CountChildren() const;
+     virtual BAccessible*    ChildAt(int32 index) const;
+     virtual status_t    PerformAction(accessible_action action);
+         void        NotifyEvent(accessible_event event,
+                 const BMessage* details = NULL);
+     static  status_t    Attach(BView* view, BAccessible* root);
+     static  status_t    SetName(BView* view, const char* name);
+     static  status_t    SetDescription(BView* view, const char* description);
+     static  void        Announce(const char* text, bool interrupt = false);
+     ...
+ };

A system accessibility interface for screen readers. Standard views (BControl, BTextView, BListView, BMenu, BSlider, BColumnListView, BWindow) report themselves and their events with no work from the app. An app can name an icon-only button with SetName(), or attach its own tree of nodes (a web view's document) with Attach(). Nothing runs until an assistive tool connects to accessibility_server; until then each hook costs one branch. Used by the ScreenReader app; Summit is the planned first big client.

Private

Window capture

private/interface/WindowInfo.h

BPrivate::read_window_bitmap() returns a window's whole content even where other windows cover it, and do_window_action() with kWindowActionCaptureStart / kWindowActionCaptureStop marks the window's tab while it is being shared. Summit uses it for getDisplayMedia() window sharing.

Application Kit

libbe.so

No public header changes. Notifications can now answer the app that posted them, and there are new system protocols for media keys and shutdown.

Behaviour

Notifications that answer

BNotification (notification_server)Haiku reference ↗

BNotification has no new methods, but the server reads extra fields from the archived notification. With "_reply:target" (a BMessenger) set, a click sends "_reply:activated" back (with "button": 0 for the notification itself, 1 and up for buttons) instead of launching the app. "_reply:closed" is sent when it goes away, and "_buttons" (strings) adds buttons under the text. Terminal uses this for OSC 99 desktop notifications.

Private

Media keys: kMsgMediaKey

private/shared/MediaKeys.h

Play/pause, next and previous keys (including Bluetooth keyboards' consumer keys) go to the app that is playing, else to the active one. The system first sends a query (kMsgMediaKey, 'mkey'); an app answers with reply_media_key_query() and handles the key with reply_media_key_handled(). MediaPlayer, Amp and airTime answer it; /bin/mediakey sends keys from scripts.

Private

B_REG_QUIT_USER_APPS

private/app/RegistrarDefs.h

Runs only the first phase of a shutdown: user apps get the normal quit request and can save their work or refuse. The reply names the app that refused. System Updater uses it before installing an update.

Game Kit

libgame.so

BDirectWindow works on a scaled desktop, in the frame buffer's own pixels.

Changed

direct_buffer_info: device_scale and app_server's drawing copy

game/DirectWindow.hHaiku reference ↗

      area_id         bits_area;
-     uint32          _reserved1[10];
+     uint32          device_scale;       // percent; 0 without the flag
+     area_id         drawing_bits_area;  // app_server's copy, or -1
+     int32           drawing_bytes_per_row;
+     uint32          _reserved1[7];
      uint32          clip_list_count;

A window created with B_DIRECT_DEVICE_PIXELS stays connected on a scaled desktop. device_scale is the density in percent (200 at 200%, not 2). Above 100, window_bounds and the clipping are in frame buffer pixels, not window coordinates. Without the flag, direct windows are disconnected while the desktop is scaled, as before. The three fields reuse reserved space, so the structure's size and binary layout are unchanged.

Added

BDirectWindow::MarkDrawingBitsStale()

game/DirectWindow.hHaiku reference ↗

          status_t    SetFullScreen(bool enable);
+         void        MarkDrawingBitsStale(const clipping_rect* rects,
+                     uint32 count);

app_server draws into its own copy of the screen (drawing_bits_area, unless it is −1) and copies that to the frame buffer, so anything written only to the frame buffer is overwritten by the next copy. A direct window either draws into both, or calls MarkDrawingBitsStale() with the rectangles it wrote to the frame buffer alone.

Media Kit

libmedia.so

No public header changes. Device selection, default-change notifications and recording now work as documented, and a private now-playing library was added.

Behaviour

B_MEDIA_DEFAULT_CHANGED is sent

BMediaRoster::StartWatching()Haiku reference ↗

Haiku never sent this notification. air/OS sends it with "default" (the node type) and "node" after SetAudioOutput(), SetAudioInput() and device rescans, so an app can follow the user's choice of output.

Behaviour

Choosing audio devices

media_server

Changing the default output moves the system mixer while sound plays. Devices plugged in later appear, built-in speakers are preferred over a graphics card's HDMI or DisplayPort audio, and the user's choices are kept by device name across reboots and replugs. The Deskbar has Output and Input submenus.

Behaviour

Recording: Mixer Monitor and BMediaRecorder

system mixer, BMediaRecorder

The system mixer has a second output, "Mixer Monitor", for recording what the computer plays. BMediaRecorder connected straight to a sound card's input now starts that producer as its own time source, so recording from the card works without the mixer.

Private

Now playing: MediaSession

private/media_controls/MediaSession.h, MediaControls.h

+ class MediaSession {
+ public:
+         status_t    Register(const BMessenger& target, ...);
+         status_t    SetMetadata(const char* title, ...);    // with artwork
+         status_t    SetPlaybackState(media_session_state state, ...);
+         status_t    SetSupportedActions(uint32 actions);
+         status_t    ParseAction(const BMessage* message, ...);
+ };

media_controls_server keeps a system-wide "now playing" list shown in a Deskbar replicant. Apps register with MediaSession (in the static library libmedia_controls.a), publish title, artist and artwork, and receive play, pause, next and seek requests. MediaPlayer uses the class; Summit and airTime speak the message protocol directly.

Device Kit

libdevice.so

Game pad rumble, gap-free isochronous USB input, and a class for small auxiliary displays.

Added

BJoystick: device IDs and rumble

device/Joystick.hHaiku reference ↗

+         status_t    GetDeviceIDs(uint16* outVendorID,
+                     uint16* outProductID);
+         bool        HasRumble();
+         bool        HasTriggerRumble();
+         status_t    SetRumble(uint16 strongMagnitude,
+                     uint16 weakMagnitude, bigtime_t duration,
+                     uint16 leftTriggerMagnitude = 0,
+                     uint16 rightTriggerMagnitude = 0);

GetDeviceIDs() returns the USB or Bluetooth vendor and product IDs, for controller mapping databases (0 where the transport has none). SetRumble() drives the force-feedback motors: magnitudes run from 0 to 65535, strong is the low-frequency (left) motor and weak the high-frequency (right) one, and the trigger motors exist where HasTriggerRumble() says so. A call replaces the running effect; a duration of 0 stops it, and B_INFINITE_TIMEOUT keeps it running until the next call or Close(). Xbox One/Series pads over USB and Bluetooth LE game pads now also appear as BJoystick devices.

Added

BUSBEndpoint: isochronous streams

device/USBKit.hHaiku reference ↗

+ struct usb_stream_packet_header {
+     uint16  length;
+     uint16  flags;  // B_USB_STREAM_PACKET_ERROR, B_USB_STREAM_PACKET_GAP
+ };

  class BUSBEndpoint {
+     status_t    StartIsochronousStream(size_t packetSize,
+                 uint32 packetsPerTransfer = 32,
+                 uint32 transferCount = 4,
+                 size_t bufferSize = 0) const;
+     ssize_t     ReadIsochronousStream(void* data, size_t length,
+                 bigtime_t timeout) const;
+     status_t    StopIsochronousStream() const;

One IsochronousTransfer() at a time loses whatever the device sends between calls. A stream keeps transferCount transfers queued in the system and buffers up to bufferSize bytes. ReadIsochronousStream() returns packets back to back, each as a usb_stream_packet_header followed by its data (empty packets are left out); B_USB_STREAM_PACKET_GAP marks lost packets. There is one stream per device. The UVC webcam driver is built on this.

Added

BAuxDisplay

device/AuxDisplay.h, drivers/auxdisplay.h

+ class BAuxDisplay {
+ public:
+     static  int32       CountDisplays();
+         status_t    SetTo(int32 index = 0);
+         int32       Width() const;
+         int32       Height() const;
+         bool        HasTouch() const;
+         status_t    SetBacklight(float brightness);
+         BBitmap*    Bitmap();   // B_RGB32, accepts views
+         status_t    Present();
+         status_t    Present(const BBitmap* bitmap);
+         status_t    WaitForTouch(aux_display_touch_event* events,
+                     int32* _count, bigtime_t timeout);
+     ...
+ };

A small screen beside the desktop that a program draws on itself, such as a Raspberry Pi's DSI panel or a USB LCD. It is not part of app_server's desktop: one program at a time draws into Bitmap() (views can be attached to it) and calls Present(). Drivers publish these displays under /dev/auxdisplay with the interface in drivers/auxdisplay.h, which also carries touch events.

Network Kit

libbnetapi.so

Link speed, a Wi-Fi password parameter, a service order for the default route, and .local names.

Added

BNetworkInterface::LinkSpeed()

net/NetworkInterface.hHaiku reference ↗

          uint32      Metric() const;
+         uint64      LinkSpeed() const;
+                 // in bit/s, 0 if unknown

The speed the driver reports (SIOCGIFLINKSPEED). For Wi-Fi it is the last transmit rate.

Added

BNetworkRoster::AddPersistentNetwork() with a password

net/NetworkRoster.hHaiku reference ↗

          status_t    AddPersistentNetwork(
                  const wireless_network& network);
+         status_t    AddPersistentNetwork(
+                 const wireless_network& network,
+                 const char* password);

Saves a Wi-Fi network together with its password, so it joins automatically later. The networks file is now written with mode 0600, because it holds passwords.

Behaviour

Service order and the default route

network stack, net_server

The default route is chosen at each lookup: an interface with a link first, then the lowest metric, then the faster link. Haiku uses the order in which routes were added. Wired interfaces default to metric 1000 and wireless ones to 2000, so Ethernet is preferred over Wi-Fi. The user can reorder services in Network preferences; that sends net_server kMsgSetServiceOrder (private, net/NetServer.h). A DHCP lease is kept when the link drops briefly.

Behaviour

.local names and HTTPS on ARM64

getaddrinfo(), BSecureSocketHaiku reference ↗

getaddrinfo() resolves .local names over multicast DNS. An app can publish a name with mdns_server (MDNS_REGISTER_NAME, private net/mdns_server.h), as Summit does for WebRTC. BSecureSocket finds Haiku's CA bundle even when OpenSSL was built without its path, as on ARM64.

Private

Location service

private/net/location_server.h

location_server answers LOCATION_GET_POSITION with latitude, longitude, accuracy, source and time, or B_NOT_ALLOWED when the user has location switched off. Intended for Summit's geolocation.

Bluetooth Kit

libbluetooth.so

Bluetooth Low Energy, Secure Simple Pairing events, link policy and A2DP audio. The Haiku Book does not document the Bluetooth Kit; Haiku's headers are the reference.

Added

LE commands and events

bluetooth/HCI/btHCI_command.h, btHCI_event.h, btHCI_acl.h

+ #define OGF_LE_CONTROL          0x08
+ #define OCF_LE_SET_EVENT_MASK       0x0001
+ #define OCF_LE_READ_BUFFER_SIZE     0x0002
+ #define OCF_LE_SET_SCAN_PARAMETERS  0x000b
+ #define OCF_LE_SET_SCAN_ENABLE      0x000c
+ #define OCF_LE_CREATE_CONN      0x000d
+ #define OCF_LE_CREATE_CONN_CANCEL   0x000e
+ #define OCF_LE_START_ENCRYPTION     0x0019
+ struct hci_cp_le_create_conn { ... };
+ struct hci_cp_le_start_encryption { ... };
+ #define HCI_EVENT_LE_META           0x3E
+ struct hci_ev_le_conn_complete { ... };
+ #define HCI_ACL_PACKET_START_NON_FLUSHABLE  0x0

The HCI definitions an LE host needs: scanning, connecting, encryption, the LE meta event and connection-complete subevent, and the non-flushable start flag LE links use.

Private

LE, HID-over-GATT and A2DP libraries

private/bluetooth/LE*.h, A2dpSource.h, SbcEncoder.h

libbluetooth carries a private LE stack (pairing sessions with legacy pairing, bond store, ATT client, HID-over-GATT service and mouse decoder) and an A2DP source with an SBC encoder. They are used by the LE mouse input add-on, the bluetooth_audio media add-on and Bluetooth preferences. RemoteDevice::GetFriendlyName() now returns the address rather than "Not Valid name" when no name is known, and connecting no longer waits for a remote-name request.

Support Kit

libroot.so, libbe.so

One fix to an inline function that matters on ARM64.

Changed

atomic_test_and_set() is a strong compare-and-swap

support/SupportDefs.hHaiku reference ↗

  atomic_test_and_set(int32* value, int32 newValue, int32 testAgainst)
  {
-     __atomic_compare_exchange_n(value, &testAgainst, newValue, 1,
+     /* strong: a weak exchange may fail spuriously (a store-exclusive can
+        fail for no reason) and still return testAgainst, as if it had set */
+     __atomic_compare_exchange_n(value, &testAgainst, newValue, 0,
          __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);

The same for atomic_test_and_set64(). On ARM64 a weak exchange can fail spuriously and still return testAgainst, so callers wrongly believed they had set the value. Code compiled against air/OS's header gets the strong version; there is nothing to change in your source.

Storage Kit

libbe.so

No public header changes.

Behaviour

Add-ons with future modification times load at once

AddOnMonitorHandler

An add-on whose modification time lies in the future (a machine with its clock behind) was treated as still being written and not loaded. It now loads immediately.

Package Kit

libpackage.so

No public header changes.

Private

Deferred activation

private/package/ActivationTransaction.h

BActivationTransaction::SetDeferActivation() stages a package change that takes effect at the next boot rather than immediately. System Updater uses it to install a release and start it on trial.

Tracker Kit and Quick Look

libtracker.so, libquicklook.so

A public add-on API for Quick Look previews, plus private protocols for network shares and the Deskbar.

Added

Quick Look preview add-ons

add-ons/quick_look/QuickLook.h

+ #define B_QUICK_LOOK_PREVIEW_CHANGED 'QLpc'

+ class BQuickLookPreview : public BView {
+     virtual BSize       PreferredContentSize();
+     virtual BString     Summary();  // "1920 × 1080 pixels"
+     virtual void        Start();
+     virtual void        Stop();
+     virtual void        DirectConnected(direct_buffer_info* info);
+ protected:
+         void        NotifyChanged();
+ };

+ class BQuickLookAddOn {
+     virtual float       Supports(const entry_ref& ref,
+                     const char* mimeType) = 0;  // 0 .. 1
+     virtual BQuickLookPreview* CreatePreview(const entry_ref& ref,
+                     const char* mimeType, BString* error) = 0;
+ };

+ extern "C" BQuickLookAddOn* instantiate_quick_look_add_on(image_id image);

Pressing the space bar in Tracker previews the selected file in a panel hosted by quick_look_server. Add-ons in add-ons/quick_look bid on a file with Supports() (0 to 1, cheap: it is asked for every file shown); the highest bidder makes a BQuickLookPreview view. The panel is a BDirectWindow, so previews that play video can draw into the frame buffer. Apps that own playback code ship their own add-on, so there is one media stack. Link with -lquicklook.

Private

Network shares, places and per-monitor backgrounds

private/mount/MountServer.h, private/tracker/tracker_private.h

mount_server keeps SMB network shares and mounts them at startup; Tracker's settings and Mount menu talk to it with kGetNetworkShares, kSetNetworkShare, kMountNetworkShare and related messages. Deskbar asks Tracker to open Home, the boot volume and Trash on the main display (kTrackerOpenOnMainDisplay). The desktop background is drawn whole on each monitor.

Graphics drivers (accelerants)

add-ons/accelerants

Optional hooks for several monitors on one device, per-monitor blanks, device-side copies to the screen, and resume.

Added

Display outputs

add-ons/graphics/Accelerant.h

+     B_GET_DISPLAY_OUTPUT_COUNT = 0x600,
+     B_GET_DISPLAY_OUTPUTS,
+     B_GET_DISPLAY_OUTPUT_MODES,
+     B_SET_DISPLAY_LAYOUT,
+     B_SET_DISPLAY_CHANGE_PORT,
+     B_GET_DISPLAY_OUTPUT_RETRACE_SEMAPHORE,
+     B_GET_DISPLAY_OUTPUT_SCAN_LINE,

+ typedef struct {
+     uint32      id;     // the connector, stable
+     char        name[32];   // "DP-2"
+     uint32      flags;      // CONNECTED, ENABLED, SCALABLE, INTERNAL, MIRROR
+     int32       x, y;       // its region of the frame buffer
+     uint16      width, height;
+     uint16      scale;      // percent
+     uint16      render_scale;   // frame buffer pixels per logical pixel, percent
+     display_timing  native_timing, timing;
+     uint32      edid_length;
+     uint8       edid[512];
+ } display_output;

A device that drives several monitors describes each as a region of one frame buffer, with its own timing, scale and EDID. B_SET_DISPLAY_LAYOUT arranges and enables them (outputs left out are disabled) and returns the mode for the whole frame buffer, which takes effect with B_SET_DISPLAY_MODE. Connect and disconnect events go to the port given with B_SET_DISPLAY_CHANGE_PORT. Each output has its own retrace semaphore and scan-line position, which app_server uses for tear-free flushing per monitor. A device without these hooks drives one monitor, as in Haiku. Used by the nvidia_rm, amdgpu and ARM display drivers.

Added

Frame buffer sources and shadows

add-ons/graphics/Accelerant.h

+     B_CREATE_FRAME_BUFFER_SOURCE = 0x700,
+     B_DELETE_FRAME_BUFFER_SOURCE,
+     B_COPY_TO_FRAME_BUFFER,
+     B_CREATE_FRAME_BUFFER_SHADOW,
+     B_COPY_FRAME_BUFFER_SOURCE,

+ typedef struct {
+     uint32      id;
+     void*       bits;       // in the caller's address space
+     uint32      bytes_per_row;
+     uint16      width, height;
+     color_space space;
+ } frame_buffer_source;

A source is memory the device can read: app_server draws into it and has the device copy rectangles to the same place on screen, so the CPU never touches the frame buffer. A shadow is a source only the device reaches, normally in video memory, filled from a source and copied to the screen, so what was drawn is not copied twice by the CPU. Any error means the caller copies itself.

Added

B_WAIT_FOR_DISPLAY_RESTORE

add-ons/graphics/Accelerant.h

+ typedef status_t (*wait_for_display_restore)(bigtime_t timeout);
+     /* Returns B_OK when the accelerant restored the display state after it
+        was lost (e.g. when resuming from suspend) and the screen contents need
+        to be redrawn, B_TIMED_OUT when nothing happened within timeout. */

Lets app_server redraw the screen after a resume from suspend.

Device drivers

kernel modules

Power management for suspend, more PCI host topologies, USB device speed and keep-awake, and USB Audio 2.0 descriptors.

Added

PCI: suspend and resume a function

drivers/bus/PCI.h, drivers/PCI.h

  typedef struct pci_device_module_info {
+     status_t (*suspend_device)(pci_device* device, uint8 state);
+     status_t (*resume_device)(pci_device* device);
  } pci_device_module_info;

+ #define PCI_pm_status_pme_enable    0x0100
+ #define PCI_pm_status_pme_status    0x8000

suspend_device() saves the configuration space and puts the function into D3hot; resume_device() returns it to D0 and restores BARs, MSI and MSI-X, which a function without No_Soft_Reset loses. For drivers that power their device down while the system sleeps.

Added

PCI host topologies

drivers/bus/PCI.h, drivers/bus/PCIInterrupts.h

+ #define B_PCI_MSI_CONTROLLER_ADDRESS "pci/msi/controller_address"
+ #define B_PCI_MSI_REQUESTER_BASE "pci/msi/requester_base"
+ #define B_PCI_MSI_REQUESTER_COUNT "pci/msi/requester_count"

  typedef struct pci_controller_module_info {
+     status_t    (*get_root_bus)(void* cookie, uint32 index, uint8* bus);
  } pci_controller_module_info;

+ #define B_PCI_INTX_MODULE_NAME "bus_managers/pci/intx/v1"
+ typedef struct pci_intx_module_info { ... } pci_intx_module_info;

get_root_bus() lets a controller report several host bridges in one segment (multi-die processors). The MSI requester attributes describe a simple requester-ID translation on ARM64 hosts with an ITS. PCIInterrupts.h adds a module for wide legacy INTx routing.

Added

USB: device speed and keep-awake

drivers/USB3.h

+ #define B_USB_KEEP_AWAKE        'kpaw'
+ typedef struct usb_keep_awake_args {
+     usb_device  device;
+     bool        keep_awake;
+ } usb_keep_awake_args;

+ #define B_USB_GET_DEVICE_SPEED      'gspd'
+ enum { B_USB_DEVICE_SPEED_LOW = 0, ..._FULL, ..._HIGH, ..._SUPER, ..._SUPER_PLUS };

usb_ioctl() opcodes. B_USB_KEEP_AWAKE keeps a device's link up during suspend to idle (a network adapter keeping its link for wake-on-LAN). B_USB_GET_DEVICE_SPEED tells a driver whether isochronous intervals count 125 µs microframes or 1 ms frames.

Added

USB Audio 2.0

drivers/usb/USB_audio.h

  enum { // Audio Interface Protocol Codes
      USB_AUDIO_PROTOCOL_UNDEFINED = 0x00,
+     USB_AUDIO_PROTOCOL_IP_VERSION_02_00 = 0x20  // R2
  };
+ typedef struct { ... } usb_audio_streaming_endpoint_descriptor_r2;
+ enum { USB_AUDIO_V2_CUR = 0x01, USB_AUDIO_V2_RANGE, USB_AUDIO_V2_MEM };
+ enum { USB_AUDIO_CS_SAM_FREQ_CONTROL = 0x01, USB_AUDIO_CS_CLOCK_VALID_CONTROL };
+ enum { USB_AUDIO_FORMAT_V2_PCM = 1 << 0, ... };

The descriptors, request codes, clock controls and format bits of USB Audio Class 2.0, used by the usb_audio driver for UAC2 DACs.

Added

ACPI: leaving a sleep state

drivers/ACPI.h

  struct acpi_module_info {
+     /* Leaving a sleep state: called with interrupts disabled and
+        \a prepare set first, then again with interrupts enabled. */
+     status_t    (*leave_sleep_state)(uint8 state, bool prepare);
  };

The counterpart of entering a sleep state, used by suspend to RAM on x86-64.

Neural Kit

libneural.so

New in air/OS. See the Neural Kit guide, its reference and examples.

Unchanged

No API changes in the Kernel Kit, Locale Kit, Mail Kit, Translation Kit, MIDI 2 Kit, Layout API. Use Haiku’s documentation as it is.

Reviewed 10 November 2026 against air/OS master bf526f982b. Public headers were compared in full; behaviour changes and private APIs were selected for what an app developer can notice. Small internal fixes are left out and are in the changelog.