-
Notifications
You must be signed in to change notification settings - Fork 3
BatchWindows
BatchWindows is the window renderer used in Shivtanium.
It uses set /p for input. By default, it's started with an open file for input; Along with the Shivtanium Kernel being able to launch applications with set-up pipes, Everything printed to stdout in Shivtanium apps is redirected to BatchWindows.
Note that the spaces between arguments are
<tab>. In this way, you can input spaces into (for example) the Window Title.
¤CW <ID> <x> <y> <width> <height> <title> [<themes>]
-
ID- The window ID. -
x,y- The window position on the console. Can be changed later. -
width,height- The window size. Minimum size:12,3 -
title- The window title. (Note: Escape sequences in the title are not supported.) -
themes- The window theme(s). Themes are loaded from the resource pack'sthemesfolder. Multiple themes can be seperated by spaces. The reason why you would want more than 1 theme on a window is because there are special themes called "Thememods" which can disable the control UI, unfocused alternative colors, and more.
There are 2 ways to modify a window. The first method can accept multiple attributes in a single command, but it uses unsafe expansion and it can get slow:
¤MW <ID> <attribute>=<value> <another attribute>=<value> ...
-
attribute- A window attribute. Windows have a wide selection of attributes; Some examples might help:-
x,y- The window position on the console. -
l<n>- Text on line<n>. -
o<n>- Overlay on line<n>. Can be used for buttons & text inputs.
-
The second way properly handles all special characters, but it accepts only 1 attribute and it doesn't re-draw the window. For that, you'll need to finally use the ¤MW command;
¤TW <ID> <attribute>=<value>
- The parameters work in the same way as in the command above.
Example: ¤MW <ID> l2= Hello, world. - Displays Hello, world. on line 2. (The 2 spaces are for padding)
-
¤FOCUS <ID>- Focuses a window by it's ID. -
¤CTRL MINIMIZE <ID>- Minimizes / hides a window by it's ID. -
¤CTRL RESTORE <ID>- Restores / shows a window by it's ID. -
¤CTRL ORDER <Order of windows>- Hides all windows and only displays the specified windows. Can be used to change the order of windows.
-
¤CTRL APPLYTHEME <Theme ID>- Applies a loaded theme and changes the background if the theme has one. This doesn't change windows with a pre-specified theme. -
¤CTRL BSOD <cause> <message>- Shows a blue screen of death in the console and exits. Can be used for a crash handeler. -
¤CTRL PAUSE- Completely freezes DWM and ignores all input until the following message which also resumes it:¤CTRL RESUME -
¤EXIT- Stops DWM
