224,6 → 224,12 |
KSYS_FILE_UTF8 = 3 |
}; |
|
enum KSYS_TITLE_ENCODING { |
KSYS_TITLE_CP866 = 1, |
KSYS_TITLE_UTF16LE = 2, |
KSYS_TITLE_UTF8 = 3 |
}; |
|
KOSAPI int __strcmp(const char* s1, const char* s2) |
{ |
while ((*s1) && (*s1 == *s2)) { |
256,7 → 262,7 |
"D"(name), |
"S"(0) |
: "memory"); |
}; |
} |
|
/*================ Function 1 - put pixel in the window. ===============*/ |
|
626,10 → 632,16 |
|
KOSAPI void _ksys_kill_by_pid(uint32_t PID) |
{ |
asm_inline( |
"int $0x40" ::"a"(18), "b"(18), "c"(PID)); |
asm_inline("int $0x40" ::"a"(18), "b"(18), "c"(PID)); |
} |
|
/*========= Fuction 18, subfunction 19 - get/set mouse settings. ========*/ |
|
KOSAPI void _ksys_set_mouse_pos(int x, int y) // sub-subfunction 4 - set the position of the mouse cursor |
{ |
asm_inline("int $0x40" ::"a"(18), "b"(19), "c"(4), "d"(x * 65536 + y)); |
} |
|
/*===================== Function 18, subfunction 21 ====================*/ |
/*=====Get the slot number of the process / thread by identifier.. =====*/ |
|
763,7 → 775,13 |
return val; |
} |
|
KOSAPI uint32_t _ksys_load_cursor(void* path, uint32_t flags) // subfunction 4 - load cursor |
enum KSYS_CURSOR_SRC { |
KSYS_CURSOR_FROM_FILE = 0, |
KSYS_CURSOR_FROM_MEM = 1, |
KSYS_CURSOR_INDIRECT = 2 |
}; |
|
KOSAPI void* _ksys_load_cursor(void* path, uint32_t flags) // subfunction 4 - load cursor |
{ |
uint32_t val; |
asm_inline( |
774,7 → 792,7 |
return val; |
} |
|
KOSAPI uint32_t _ksys_set_cursor(uint32_t cursor) // subfunction 5 - set cursor |
KOSAPI void* _ksys_set_cursor(void* cursor) // subfunction 5 - set cursor |
{ |
uint32_t old; |
asm_inline( |
784,7 → 802,7 |
return old; |
} |
|
KOSAPI int _ksys_delete_cursor(uint32_t cursor) // subfunction 6 - delete cursor |
KOSAPI int _ksys_delete_cursor(void* cursor) // subfunction 6 - delete cursor |
{ |
int ret; |
asm_inline( |
1306,6 → 1324,16 |
|
#define _ksys_dir_rename _ksys_file_rename |
|
/*============ Function 71, subfunction 1 - set window title ============= */ |
|
KOSAPI void _ksys_set_window_title(const char* title) |
{ |
asm_inline("int $0x40" ::"a"(71), "b"(1), "c"(title) |
: "memory"); |
} |
|
#define _ksys_clear_window_title() _ksys_set_window_title(NULL) |
|
/*============= Function 77 - implements the POSIX subsystem. =============*/ |
|
KOSAPI int _ksys_posix_read(int pipefd, void* buff, int n) |