English - VerySweetBread/kos.rs GitHub Wiki

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

Arguments:

  • start: Dot - top left coordinates of text
  • color: Color - foreground color of text
  • text: &CStr - guess what
  • bg_color: Option<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

Returns: Lang

debug_write

Prints text to system board

System API: #63.1

Arguments:

  • text: &str, &String or &CStr

Threads

Enums

Event

Fields:

  • Redraw
  • KeyPress
  • BtnPress
  • BgRedraw
  • Mouse
  • IPC
  • Network
  • Debug

Functions

exit

System API: #-1

fetch_event

System API: #10

Returns: Option<Event>