The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
idunn_canvas_hooks_t Struct Reference

what a canvas does; each hook can be NULL. More...

#include </home/runner/work/ginnOS-docs/ginnOS-docs/ginnOS/src/lib/idunn/include/idunn.h>

Data Fields

void(*) draw (idunn_widget_t *canvas, gfx_buffer_t *buf, gfx_rect_t rect, void *data)
 draw the canvas, which is at rect in the window.
bool(*) input (idunn_widget_t *canvas, const idunn_input_t *in, void *data)
void(*) resize (idunn_widget_t *canvas, int32_t width, int32_t height, void *data)
 the canvas has a new size (also the first time it is laid out)
void(*) frame (idunn_widget_t *canvas, void *data)
 before a frame is drawn, while the window still holds the last frame: move pixels (idunn_canvas_move) and say what to draw again.

Detailed Description

what a canvas does; each hook can be NULL.

Field Documentation

◆ draw

void(*) idunn_canvas_hooks_t::draw(idunn_widget_t *canvas, gfx_buffer_t *buf, gfx_rect_t rect, void *data)

draw the canvas, which is at rect in the window.

only the part in buf->clip must be drawn (the rest is still right).

◆ input

bool(*) idunn_canvas_hooks_t::input(idunn_widget_t *canvas, const idunn_input_t *in, void *data)
Returns
true if it used the input (else it goes to the parents)

◆ resize

void(*) idunn_canvas_hooks_t::resize(idunn_widget_t *canvas, int32_t width, int32_t height, void *data)

the canvas has a new size (also the first time it is laid out)

◆ frame

void(*) idunn_canvas_hooks_t::frame(idunn_widget_t *canvas, void *data)

before a frame is drawn, while the window still holds the last frame: move pixels (idunn_canvas_move) and say what to draw again.


The documentation for this struct was generated from the following file: