Macaw OS C reference

Input, sound and the system

#include <macaw.h>

These are the calls in #include <macaw.h> for the keyboard and mouse, sound and music, files, the network, the system and saved passwords. They work like the Lua calls of the same names in Input and sound, Networking and Files and the system, and C explains how text, lists and your own functions pass between you and them. Keys are named by text, like "left", "space" or "z". None of the network calls waits: each does what it can straight away, so call it again from _update until it's done.

Modules

The keyboard and mouse
btn, btnp, mouse, textinput, keysp, keyspname
Sound
sfx, play, tone, note, stop, music
Songs and the music chip
playsong, stopsong, loadsong, playloadedsong, freesong, music_volume and more
Time
now, deltatime
Folders and files
fileexists, isfolder, makefolder, listfolder, fileinfo
Markdown
markdown
The clipboard
getclipboard, setclipboard
The desktop
openpath, getpref, setpref
The network
net_online, net_dial, net_connect, net_send, net_readline, net_read and more
The system
platform, ismac, modkey, memory, sys_version, sys_fps and more
Saved passwords (Nestchain)
nest_set, nest_get, nest_has, nest_remove, nest_list, nest_listitem and more
Handy maths for games
rnd, mid, clamp, sgn, lerp, flr