diff options
Diffstat (limited to 'src/user/include/pland')
-rw-r--r-- | src/user/include/pland/syscall.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h index fd0b416..9518d09 100644 --- a/src/user/include/pland/syscall.h +++ b/src/user/include/pland/syscall.h @@ -18,6 +18,13 @@ typedef struct __attribute__ ((packed)) { uint8_t pad[23]; } _dir_info_entry_t; +typedef struct __attribute__ ((packed)) { + uint8_t r; + uint8_t g; + uint8_t b; + uint8_t pad; +} _pixel_t; + enum _scn { _SCN_OPEN_FILE, _SCN_CLOSE_FILE, @@ -177,7 +184,7 @@ static inline uint32_t _count_of_dir(uint8_t drive_number, const char *path) { return _sc2(_SCN_COUNT_OF_DIR, drive_number, (uint32_t)path); } -static inline _window_handle_t _new_window(uint16_t width, uint16_t height, void *pixel_buffer) { +static inline _window_handle_t _new_window(uint16_t width, uint16_t height, _pixel_t *pixel_buffer) { return (_window_handle_t)_sc3(_SCN_NEW_WINDOW, width, height, (uint32_t)pixel_buffer); } @@ -185,11 +192,11 @@ static inline void _delete_window(_window_handle_t window) { _sc1(_SCN_DELETE_WINDOW, (uint32_t)window); } -static inline void _resize_window(_window_handle_t window, uint16_t width, uint16_t height, const void *pixel_buffer) { +static inline void _resize_window(_window_handle_t window, uint16_t width, uint16_t height, const _pixel_t *pixel_buffer) { _sc4(_SCN_RESIZE_WINDOW, (uint32_t)window, width, height, (uint32_t)pixel_buffer); } -static inline void _reassign_pixbuf(_window_handle_t window, const void *pixel_buffer) { +static inline void _reassign_pixbuf(_window_handle_t window, const _pixel_t *pixel_buffer) { _sc2(_SCN_REASSIGN_PIXBUF, (uint32_t)window, (uint32_t)pixel_buffer); } |