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.

winsWindows that currently exist(and are running)
activeWindow = 0Currently active widnow, index wins with this.
bottombarOpen = trueWhether or not the bottom bar is open.
topbarOpen = trueWhether 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 wins with 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

  1. program string Path to program to run.
  2. name? string Name to call the program (passed to coroutine manager). Defaults to the name of the program.
  3. visible? boolean Whether or not this process is visible. Defaults to false.
  4. env? table Environment to pass to function/program. Defaults to _ENV.
  5. ... Arguments to pass to the function/program.

Returns

  1. 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

  1. win table Window, pull from SkyOS.window.wins.
foreground(window)Source

Bring a window to the foreground, also calls the SkyOS.visible(isVisible) callback functions.

Parameters

  1. window table | number Window table or ID to bring to the front.