ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
board_view_stub.c File Reference

Headless no-op board view for non-Apple builds (Linux CI). More...

#include <stdint.h>
#include "board_view.h"
Include dependency graph for board_view_stub.c:

Go to the source code of this file.

Functions

board_view_tboard_view_open (board_view_storage_t *storage, uint16_t width_px, uint16_t height_px, const char *title)
 Report that no desktop window is available on this build.
void board_view_present (board_view_t *view, emu_presentation_workspace_t *presentation)
 No-op surface presentation (no window to present to).
bool board_view_pump (board_view_t *view)
 No-op event pump; report the (absent) window as closed.
bool board_view_poll_click (board_view_t *view, uint16_t *x, uint16_t *y)
 No-op click poll (no window can report a mouse-down).
bool board_view_poll_drag (board_view_t *view, uint16_t *x, uint16_t *y)
 No-op drag poll (headless: no window to drag).
bool board_view_poll_release (board_view_t *view)
 No-op release poll (headless: no window, no mouse-up events).
int32_t board_view_poll_scroll (board_view_t *view)
 No-op scroll poll (headless: no window to scroll).
void board_view_close (board_view_t *view)
 No-op window close (nothing was opened).

Detailed Description

Headless no-op board view for non-Apple builds (Linux CI).

ra8_emulator's live window (board_view.m) is Cocoa, so it only builds on macOS. Off the APPLE path – a Linux CI runner with no window server – this file is compiled in its place to satisfy the exact same C-ABI declared in board_view.h, with zero AppKit/CoreGraphics references. Every entry point is a headless no-op: board_view_open reports failure (returns nullptr) so main.c takes its existing "could not open window; continuing headless" branch and the run proceeds without a window. The –ppm snapshot path and the smoke harness, which never open a window, are unaffected. The CMakeLists selects exactly one of board_view.m (APPLE) or this file (non-APPLE), so the two never coexist in a link.

Since
0.1.0

Definition in file board_view_stub.c.

Function Documentation

◆ board_view_close()

void board_view_close ( board_view_t * view)

No-op window close (nothing was opened).

Close the window and release its resources.

Parameters
[in]viewAlways nullptr from board_view_open (unused).

Definition at line 140 of file board_view_stub.c.

Referenced by priv_run_hold_view().

◆ board_view_open()

board_view_t * board_view_open ( board_view_storage_t * storage,
uint16_t width_px,
uint16_t height_px,
const char * title )

Report that no desktop window is available on this build.

Open a desktop window of the given pixel size.

Parameters
[in,out]storageCaller-owned handle storage (unused, headless).
[in]width_pxContent width in pixels (unused, headless).
[in]height_pxContent height in pixels (unused, headless).
[in]titleWindow title (unused, headless).
Returns
Always nullptr – there is no window server off the APPLE path.

Definition at line 35 of file board_view_stub.c.

Referenced by internal_run_open_view().

◆ board_view_poll_click()

bool board_view_poll_click ( board_view_t * view,
uint16_t * x,
uint16_t * y )

No-op click poll (no window can report a mouse-down).

Report the most recent unprocessed left mouse-down, once.

Parameters
[in]viewAlways nullptr from board_view_open (unused).
[out]xClick column (unused, never written).
[out]yClick row (unused, never written).
Returns
Always false – a headless build reports no clicks.

Definition at line 83 of file board_view_stub.c.

Referenced by internal_run_loop_view().

◆ board_view_poll_drag()

bool board_view_poll_drag ( board_view_t * view,
uint16_t * x,
uint16_t * y )

No-op drag poll (headless: no window to drag).

Report the current position of a held-button drag, once.

Parameters
[in]viewAlways nullptr from board_view_open (unused).
[out]xDrag column (unused, never written).
[out]yDrag row (unused, never written).
Returns
Always false – a headless build reports no drags.

Definition at line 103 of file board_view_stub.c.

Referenced by internal_run_loop_view().

◆ board_view_poll_release()

bool board_view_poll_release ( board_view_t * view)

No-op release poll (headless: no window, no mouse-up events).

Report whether the primary mouse button was released since the last poll.

Parameters
[in]viewAlways nullptr from board_view_open (unused).
Returns
Always false – a headless build reports no releases.

Definition at line 117 of file board_view_stub.c.

Referenced by internal_run_loop_view().

◆ board_view_poll_scroll()

int32_t board_view_poll_scroll ( board_view_t * view)

No-op scroll poll (headless: no window to scroll).

Drain the accumulated console scroll-wheel notches since the last poll.

Parameters
[in]viewAlways nullptr from board_view_open (unused).
Returns
Always 0.

Definition at line 129 of file board_view_stub.c.

Referenced by internal_run_loop_view().

◆ board_view_present()

void board_view_present ( board_view_t * view,
emu_presentation_workspace_t * presentation )

No-op surface presentation (no window to present to).

Snapshot an RGB565 fd surface and request a redraw.

Parameters
[in]viewAlways nullptr from board_view_open (unused).
[in,out]presentationFd-backed surface (unused, headless).

Definition at line 53 of file board_view_stub.c.

Referenced by internal_run_view_maybe_present(), and priv_run_hold_view().

◆ board_view_pump()

bool board_view_pump ( board_view_t * view)

No-op event pump; report the (absent) window as closed.

Drain pending UI events; report whether the window was closed.

Parameters
[in]viewAlways nullptr from board_view_open (unused).
Returns
Always true – there is no live window to keep a loop running.

Definition at line 65 of file board_view_stub.c.

Referenced by internal_run_loop_view(), and priv_run_hold_view().