ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
board_view.h
Go to the documentation of this file.
1
16
17#pragma once
18
19#include <stddef.h>
20#include <stdint.h>
21#include <sys/types.h>
22
23#include "emu_presentation.h"
24#include "ra8_attributes.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
31typedef struct board_view board_view_t;
32
34typedef struct {
35 uintptr_t words[4];
37
48 uint16_t width_px,
49 uint16_t height_px,
50 const char* title);
51
65
82size_t board_view_read_rgb888_fd(int fd, off_t position, void* buffer, size_t count);
83
97
121bool board_view_poll_click(board_view_t* view, uint16_t* x, uint16_t* y);
122
146bool board_view_poll_drag(board_view_t* view, uint16_t* x, uint16_t* y);
147
171
193
205
206#ifdef __cplusplus
207}
208#endif
bool board_view_poll_click(board_view_t *view, uint16_t *x, uint16_t *y)
Report the most recent unprocessed left mouse-down, once.
struct board_view board_view_t
Opaque desktop-window handle (defined in board_view.m).
Definition board_view.h:31
bool board_view_poll_drag(board_view_t *view, uint16_t *x, uint16_t *y)
Report the current position of a held-button drag, once.
bool board_view_pump(board_view_t *view)
Drain pending UI events; report whether the window was closed.
void board_view_present(board_view_t *view, emu_presentation_workspace_t *presentation)
Snapshot an RGB565 fd surface and request a redraw.
board_view_t * board_view_open(board_view_storage_t *storage, uint16_t width_px, uint16_t height_px, const char *title)
Open a desktop window of the given pixel size.
bool board_view_poll_release(board_view_t *view)
Report whether the primary mouse button was released since the last poll.
int32_t board_view_poll_scroll(board_view_t *view)
Drain the accumulated console scroll-wheel notches since the last poll.
void board_view_close(board_view_t *view)
Close the window and release its resources.
size_t board_view_read_rgb888_fd(int fd, off_t position, void *buffer, size_t count)
Expand an arbitrary byte range from a sealed RGB565 descriptor.
Bounded raw-descriptor presentation surface and scratch workspace.
Annotation-attribute framework macros for ra8-firmware.
Caller-owned pointer-aligned storage for one platform view handle.
Definition board_view.h:34
uintptr_t words[4]
Opaque backend state; 32 bytes on 64-bit hosts.
Definition board_view.h:35
One independent owned surface plus non-owning bounded scratch.