diff --git a/index.html b/index.html index 42d854b..a577851 100644 --- a/index.html +++ b/index.html @@ -63,6 +63,12 @@ width: 100%; display: block; } + + #graphics { + position: absolute; + width: 100%; + height: 100%; + } @@ -74,4 +80,5 @@ + diff --git a/sys/graphics.js b/sys/graphics.js new file mode 100644 index 0000000..7cf3e58 --- /dev/null +++ b/sys/graphics.js @@ -0,0 +1,55 @@ +var graphics_canvas = null +var graphics_context = null + + +function enableGraphics() { + graphics_canvas = document.createElement("canvas") + graphics_canvas.id = "graphics" + graphics_context = graphics_canvas.getContext("2d") + document.body.appendChild(graphics_canvas) +} + +function getGraphics() { + return graphics_context +} + +function disableGraphics() { + graphics_canvas.remove() + graphics_canvas = null + graphics_context = null +} + +function hasGraphicsImplementation() { + return false +} + +/** returns wid and context */ +function createWindow(options) { + writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n") + throw new Error("There is no zcom implementation"); +} + +function moveWindow(wid, x, y, w, h) { + writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n") + throw new Error("There is no zcom implementation") +} + +function signalWindow(wid, signal) { + writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n") + throw new Error("There is no zcom implementation") +} + +function closeWindow(wid) { + writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n") + throw new Error("There is no zcom implementation") +} + +function getWindow(wid) { + writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n") + throw new Error("There is no zcom implementation") +} + +function listWindows() { + writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n") + throw new Error("There is no zcom implementation") +} \ No newline at end of file diff --git a/sys/system.js b/sys/system.js index 13ccc6f..776f87a 100644 --- a/sys/system.js +++ b/sys/system.js @@ -157,22 +157,6 @@ function executeCommand(args, read=readStdin, write=writeStdout) { return process } -function loadApp(name) { - fetch("app/"+name+".js") - .then(o => o.text()) - .then(o => { - writeFile("/app/"+name+".js", o) - }) -} - -function loadAppAndExecute(name) { - fetch("app/"+name+".js") - .then(o => o.text()) - .then(o => { - writeFile("/app/"+name+".js", o) - }) -} - async function resetSystem() { clearFileSystem()