forked from KolibriOS/kolibrios
- Removed non existing functions from math.h.
- Added "sys_change_window" function to kos32sys1.h. - Installed "pragma pack" for the structure in kolibrisys.h. git-svn-id: svn://kolibrios.org@8403 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -156,6 +156,16 @@ void sys_create_window(int x, int y, int w, int h, const char *name,
|
||||
"S"(0) : "memory");
|
||||
};
|
||||
|
||||
static inline
|
||||
void sys_change_window(int new_x, int new_y, int new_w, int new_h)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
"int $0x40"
|
||||
::"a"(67), "b"(new_x), "c"(new_y), "d"(new_w),"S"(new_h)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
static inline
|
||||
void define_button(uint32_t x_w, uint32_t y_h, uint32_t id, uint32_t color)
|
||||
{
|
||||
@@ -208,6 +218,17 @@ void draw_text_sys(const char *text, int x, int y, int len, color_t color)
|
||||
"S"(len),"c"(color)
|
||||
:"memory");
|
||||
}
|
||||
static inline
|
||||
void draw_text_sys_bg(const char *text, int x, int y, int len, color_t color, color_t bg)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
"int $0x40"
|
||||
::"a"(4),"d"(text),
|
||||
"b"((x << 16) | y),
|
||||
"S"(len),"c"(color), "D"(bg)
|
||||
:"memory");
|
||||
}
|
||||
|
||||
|
||||
static inline
|
||||
uint32_t get_skin_height(void)
|
||||
@@ -343,8 +364,7 @@ uint64_t get_ns_count(void)
|
||||
return val;
|
||||
};
|
||||
|
||||
static inline
|
||||
oskey_t get_key(void)
|
||||
static inline oskey_t get_key(void)
|
||||
{
|
||||
oskey_t val;
|
||||
__asm__ __volatile__(
|
||||
@@ -608,6 +628,16 @@ static inline void draw_number_sys(int32_t number, int x, int y, int len, color_
|
||||
:"a"(47), "b"(fmt), "c"(number), "d"((x << 16) | y), "S"(color));
|
||||
}
|
||||
|
||||
static inline void draw_number_sys_bg(int32_t number, int x, int y, int len, color_t color, color_t bg){
|
||||
register uint32_t fmt;
|
||||
fmt = len << 16 | 0x80000000; // no leading zeros + width
|
||||
// fmt = len << 16 | 0x00000000; // leading zeros + width
|
||||
__asm__ __volatile__(
|
||||
"int $0x40"
|
||||
:
|
||||
:"a"(47), "b"(fmt), "c"(number), "d"((x << 16) | y), "S"(color), "D"(bg));
|
||||
}
|
||||
|
||||
static inline
|
||||
uint32_t get_mouse_eventstate(void)
|
||||
{
|
||||
@@ -712,24 +742,6 @@ int start_app(char *app_name, char *args){
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
static inline char *getcwd(char *buf, size_t size)
|
||||
{
|
||||
int rc = get_current_folder(buf, size);
|
||||
if (rc > size)
|
||||
{
|
||||
errno = ERANGE;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return buf;
|
||||
}
|
||||
*/
|
||||
// end section
|
||||
|
||||
|
||||
|
||||
//added nonstatic inline because incomfortabre stepping in in debugger
|
||||
void __attribute__ ((noinline)) debug_board_write_str(const char* str);
|
||||
void __attribute__ ((noinline)) debug_board_printf(const char *format,...);
|
||||
|
Reference in New Issue
Block a user