diff --git a/src/uterm.h b/src/uterm.h index f1045fa..cbeea7d 100644 --- a/src/uterm.h +++ b/src/uterm.h @@ -216,6 +216,13 @@ int uterm_display_get_dpms(const struct uterm_display *disp); int uterm_display_use(struct uterm_display *disp); int uterm_display_swap(struct uterm_display *disp); +int uterm_display_fill(struct uterm_display *disp, + uint8_t r, uint8_t g, uint8_t b, + unsigned int x, unsigned int y, + unsigned int width, unsigned int height); +int uterm_display_blit(struct uterm_display *disp, + const struct uterm_video_buffer *buf, + unsigned int x, unsigned int y); int uterm_display_fake_blend(struct uterm_display *disp, const struct uterm_video_buffer *buf, unsigned int x, unsigned int y, diff --git a/src/uterm_video.c b/src/uterm_video.c index 7d90a9e..1d34bff 100644 --- a/src/uterm_video.c +++ b/src/uterm_video.c @@ -412,6 +412,28 @@ int uterm_display_swap(struct uterm_display *disp) return VIDEO_CALL(disp->ops->swap, 0, disp); } +int uterm_display_fill(struct uterm_display *disp, + uint8_t r, uint8_t g, uint8_t b, + unsigned int x, unsigned int y, + unsigned int width, unsigned int height) +{ + if (!disp) + return -EINVAL; + + return VIDEO_CALL(disp->ops->fill, -EOPNOTSUPP, disp, r, g, b, x, y, + width, height); +} + +int uterm_display_blit(struct uterm_display *disp, + const struct uterm_video_buffer *buf, + unsigned int x, unsigned int y) +{ + if (!disp) + return -EINVAL; + + return VIDEO_CALL(disp->ops->blit, -EOPNOTSUPP, disp, buf, x, y); +} + int uterm_display_fake_blend(struct uterm_display *disp, const struct uterm_video_buffer *buf, unsigned int x, unsigned int y,