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

Non-Apple platform alternative for the Cocoa viewer ABI. More...

#include "ra8_viewer_view.h"
Include dependency graph for ra8_viewer_view_stub.c:

Go to the source code of this file.

Functions

ra8_err_t ra8_viewer_view_requirements (const ra8_viewer_reader_t *reader, ra8_viewer_view_requirements_t *out)
 Calculate the exact view workspace for reader.
ra8_err_t ra8_viewer_view_open (ra8_viewer_view_t **out, ra8_viewer_reader_t *reader, const char *title, void *workspace, size_t workspace_bytes, const ra8_viewer_view_requirements_t *requirements, ra8_viewer_workspace_report_t *report)
 Open a scrolling window into caller-owned first-party workspace.
bool ra8_viewer_view_pump (ra8_viewer_view_t *view)
 Drain pending events; true after the window closes.
void ra8_viewer_view_close (ra8_viewer_view_t *view)
 Close the window and reset borrowed view state without freeing it.

Detailed Description

Non-Apple platform alternative for the Cocoa viewer ABI.

Reports the absence of a desktop view without allocating a fake handle, while preserving the caller-workspace API on headless hosts.

Since
0.1.0

Definition in file ra8_viewer_view_stub.c.

Function Documentation

◆ ra8_viewer_view_close()

void ra8_viewer_view_close ( ra8_viewer_view_t * view)

Close the window and reset borrowed view state without freeing it.

Removes notifications, closes AppKit objects, and clears C references.

Parameters
[in,out]viewBound view, or NULL.
Precondition
view is NULL or came from a successful open.
No pump call is in progress.
Postcondition
The platform window is closed when non-NULL.
Caller workspace and reader ownership remain unchanged.
Note
Must execute on the creating thread; NULL is safe.
Since
0.1.0

Definition at line 48 of file ra8_viewer_view_stub.c.

Referenced by internal_run_window().

◆ ra8_viewer_view_open()

ra8_err_t ra8_viewer_view_open ( ra8_viewer_view_t ** out,
ra8_viewer_reader_t * reader,
const char * title,
void * workspace,
size_t workspace_bytes,
const ra8_viewer_view_requirements_t * requirements,
ra8_viewer_workspace_report_t * report )
nodiscard

Open a scrolling window into caller-owned first-party workspace.

Parameters
[out]outReceives the bound view on success.
[in]readerOpen reader that outlives the view.
[in]titleOptional NUL-terminated title.
[in,out]workspaceCaller-owned backing.
[in]workspace_bytesAccessible backing extent.
[in]requirementsUnmodified requirements result.
[out]reportExact required/supplied evidence.
Returns
k_ra8_ok on success or a platform/capacity error.

Definition at line 23 of file ra8_viewer_view_stub.c.

References k_ra8_err_not_supported, k_ra8_err_null_ptr, and ra8_viewer_view_requirements_t::required_bytes.

Referenced by internal_run_window().

◆ ra8_viewer_view_pump()

bool ra8_viewer_view_pump ( ra8_viewer_view_t * view)
nodiscard

Drain pending events; true after the window closes.

Definition at line 42 of file ra8_viewer_view_stub.c.

Referenced by internal_run_window().

◆ ra8_viewer_view_requirements()

ra8_err_t ra8_viewer_view_requirements ( const ra8_viewer_reader_t * reader,
ra8_viewer_view_requirements_t * out )
nodiscard

Calculate the exact view workspace for reader.

Definition at line 13 of file ra8_viewer_view_stub.c.

References k_ra8_err_not_supported, and k_ra8_err_null_ptr.

Referenced by internal_run_window().