diff options
author | Benji Dial <benji6283@gmail.com> | 2021-02-18 11:56:08 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-02-18 11:56:08 -0500 |
commit | 00cc8736f10098dedf6b856b9ad8bd0094211263 (patch) | |
tree | 4cd252a614b26cb3dcf4a20c142feeffbb4c3c2a /src/user/popups/info.c | |
parent | 9d8ce7688f051fc5cd9e917faf3b1e49a3e620ab (diff) | |
download | portland-os-00cc8736f10098dedf6b856b9ad8bd0094211263.tar.gz |
vbe support, truecolor window manager pixbufs
Diffstat (limited to 'src/user/popups/info.c')
-rw-r--r-- | src/user/popups/info.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/user/popups/info.c b/src/user/popups/info.c index 667d440..eac155b 100644 --- a/src/user/popups/info.c +++ b/src/user/popups/info.c @@ -18,7 +18,7 @@ static const struct key_packet info_quits[] = { { .key_id = 0 } }; -void info_popup(struct popup *into, const char *msg, uint8_t fg, uint8_t bg) { +void info_popup(struct popup *into, const char *msg, _pixel_t fg, _pixel_t bg) { if (!info_font) info_font = get_font(FONT); @@ -41,7 +41,7 @@ void info_popup(struct popup *into, const char *msg, uint8_t fg, uint8_t bg) { const uint32_t pitch = info_font->space_width * w + 2 * PADDING; const uint32_t height = info_font->space_height * h + 2 * PADDING; - uint8_t *const pixbuf = get_block(pitch * height); + _pixel_t *const pixbuf = get_block(pitch * height * 4); for (uint32_t y = 0; y < height; ++y) for (uint32_t x = 0; x < pitch; ++x) @@ -63,13 +63,13 @@ void info_popup(struct popup *into, const char *msg, uint8_t fg, uint8_t bg) { into->handle = _new_window(pitch, height, pixbuf); } -void info_popupf_v(struct popup *into, const char *text, uint8_t fg, uint8_t bg, va_list args) { +void info_popupf_v(struct popup *into, const char *text, _pixel_t fg, _pixel_t bg, va_list args) { char *const msg = format_v(text, args); info_popup(into, msg, fg, bg); free_block(msg); } -void info_popupf(struct popup *into, const char *text, uint8_t fg, uint8_t bg, ...) { +void info_popupf(struct popup *into, const char *text, _pixel_t fg, _pixel_t bg, ...) { va_list args; va_start(args, bg); info_popupf_v(into, text, fg, bg, args); |