Создал(а) 'Main'

Gleb Zaharov 2024-03-14 09:45:55 +01:00
commit 27d030c56e

87
Main.md Normal file

@ -0,0 +1,87 @@
# Graphics
## Objects
### `Color`
Functions:
- `rgb(r: u8, g: u8, b: u8) -> Color`
- `r(&self) -> u8`
- `g(&self) -> u8`
- `b(&self) -> u8`
- `as_rgb_val(self) -> u32`
Returns Color as u32 for system API
### `Dot`
Attributes:
- `x: u32`
- `y: u32`
### `Size`
Attributes:
- `width: u32`
- `height: u32`
## Functions
### `display_message`
Displays text on the window
System API: [#4](http://wiki.kolibrios.org/wiki/SysFn04/ru)
Arguments:
- `start`: [Dot](#dot) - top left coordinates of text
- `color`: [Color](#color) - foreground color of text
- `text`: &[CStr](https://docs.rs/cstr_core/latest/cstr_core/struct.CStr.html) - guess what
- `bg_color`: Option<[Color](#color)> - if not nul: background color
### `display_message_str`
Same as `display_message`, but text is `&str` instead of `&CStr`
# System
## Enums
### `Lang`
Fields:
- English
- Finnish
- German
- Russian
- French
- Estonian
- Spanish
- Italian
## Functions
### `get_lang`
System API: [#26.5](http://wiki.kolibrios.org/wiki/SysFn26/ru#.D0.9F.D0.BE.D0.B4.D1.84.D1.83.D0.BD.D0.BA.D1.86.D0.B8.D1.8F_5_-_.D0.BF.D0.BE.D0.BB.D1.83.D1.87.D0.B8.D1.82.D1.8C_.D1.8F.D0.B7.D1.8B.D0.BA_.D1.81.D0.B8.D1.81.D1.82.D0.B5.D0.BC.D1.8B.)
Returns: [Lang](#lang)
### `debug_write`
Prints text to system board
System API: [#63.1](http://wiki.kolibrios.org/wiki/SysFn63/ru)
Arguments:
- `text`: &str, &String or &CStr
# Threads
## Enums
### `Event`
Fields:
- Redraw
- KeyPress
- BtnPress
- BgRedraw
- Mouse
- IPC
- Network
- Debug
## Functions
### `exit`
System API: [#-1](http://wiki.kolibrios.org/wiki/SysFn-1/ru)
### `fetch_event`
System API: [#10](http://wiki.kolibrios.org/wiki/SysFn10/ru)
Returns: Option<[Event](#event)>