From fe8377e2c723ec794bf1df4dc23920e4767b4d65 Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Fri, 18 Dec 2020 08:46:40 +0000 Subject: [PATCH] kos32sys.h: Add proc_info struct for SysFn 9 and system_color struct for get system colors git-svn-id: svn://kolibrios.org@8441 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../sources/newlib/libc/include/kos32sys.h | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/contrib/sdk/sources/newlib/libc/include/kos32sys.h b/contrib/sdk/sources/newlib/libc/include/kos32sys.h index 24ca4c05cb..be307fcf21 100644 --- a/contrib/sdk/sources/newlib/libc/include/kos32sys.h +++ b/contrib/sdk/sources/newlib/libc/include/kos32sys.h @@ -52,6 +52,40 @@ typedef struct int out_size; }ioctl_t; +#pragma pack(push, 1) +struct proc_info +{ + unsigned long cpu_usage; + unsigned short pos_in_stack; + unsigned short slot; + unsigned short reserved2; + char name[12]; + unsigned long address; + unsigned long memory_usage; + unsigned long ID; + unsigned long left,top; + unsigned long width,height; + unsigned short thread_state; + unsigned short reserved3; + unsigned long cleft, ctop, cwidth, cheight; + unsigned char window_state; + unsigned char reserved4[1024-71]; +}; +#pragma pack(pop) + +struct kolibri_system_colors { + color_t frame_area; + color_t grab_bar; + color_t grab_bar_button; + color_t grab_button_text; + color_t grab_text; + color_t work_area; + color_t work_button; + color_t work_button_text; + color_t work_text; + color_t work_graph; +}; + static inline void begin_draw(void) { __asm__ __volatile__( @@ -478,6 +512,13 @@ static inline int GetScreenSize(void) return retval; } +static inline void get_system_colors(struct kolibri_system_colors *color_table) +{ + __asm__ volatile ("int $0x40" + : + :"a"(48),"b"(3),"c"(color_table),"d"(40) + ); +} static inline void get_proc_info(char *info) {