windowman
The window manager for SkyOS. Lets you start a file or function, with a visible or invisible window.
This also has functions to set the active window.
This API will be globalized as SkyOS.window, and windows will be stored in SkyOS.window.wins, numerically indexed with the returned window id.
| wins | Windows that currently exist(and are running) |
|---|---|
| activeWindow = 0 | Currently active widnow, index wins with this. |
| bottombarOpen = true | Whether or not the bottom bar is open. |
| topbarOpen = true | Whether or not the top bar is open. |
| newWindow(program [, name [, visible [, env, ...]]]) | Create a new window with a function to run The table resulting from this function (stored in SkyOS.window.wins) will be indexed key/value with the window's id. |
| closeWindow(win) | Close a window, it calls SkyOS.close() and then kills the process. |
| foreground(window) | Bring a window to the foreground, also calls the SkyOS.visible(isVisible) callback functions. |
- winsSource
Windows that currently exist(and are running)
- activeWindow = 0Source
Currently active widnow, index
winswith this.- bottombarOpen = trueSource
Whether or not the bottom bar is open.
- topbarOpen = trueSource
Whether or not the top bar is open.
- newWindow(program [, name [, visible [, env, ...]]])Source
Create a new window with a function to run The table resulting from this function (stored in
SkyOS.window.wins) will be indexed key/value with the window's id. The table will look like this: win.pid is a number containing the coroutine pid, used to terminating, pausing, etc of the window. win.win is a table with the actual window object. this is a mirror of win.env.term. win.env is the environment of the window, with all of it's values.Parameters
- program string Path to program to run.
- name? string Name to call the program (passed to coroutine manager). Defaults to the name of the program.
- visible? boolean Whether or not this process is visible. Defaults to false.
- env? table Environment to pass to function/program. Defaults to _ENV.
- ... Arguments to pass to the function/program.
Returns
- number Window ID of the window, interface it with
SkyOS.window.wins[id].
- closeWindow(win)Source
Close a window, it calls
SkyOS.close()and then kills the process.Parameters
- win table Window, pull from
SkyOS.window.wins.
- win table Window, pull from
- foreground(window)Source
Bring a window to the foreground, also calls the
SkyOS.visible(isVisible)callback functions.Parameters
- window table | number Window table or ID to bring to the front.