noteOS 1.0 · canvas desktop · BIOS → kernel

noteOS Dev Docs

Bureau desktop-like (macOS Bob / Win95) entièrement rendu sur un <canvas>, booté comme BobPhoneOS.

Architecture

bob.xem.yt/noteos  →  nginx (static)
                       ├─ /              canvas desktop
                       └─ /devdocs       ces docs

Boot chain

index.html
  └─ firmware.bios.js          # canvas + DPR, NoteBIOS.loadScript()
       └─ os/bootloader.js     # bootscreen
            ├─ os/api/*.js     # logger, io, net, graphics, input, wm, apps, cc
            ├─ os/kernel.js    # boucle render + input
            └─ apps/**/*.js    # Notes, Calc, Paint, BobStore, Settings

Tout le bureau est un <canvas id="screen">. Pas de DOM pour les fenêtres.

APIs runtime

NoteBIOS

NoteBIOS.canvas / .ctx / .W / .H / .base / .loadScript(url) / .resize()

NoteIO — filesystem virtuel (localStorage)

NoteIO.writeFile('/home/notes/main.txt', src)
NoteIO.readFile(path)
NoteIO.mkdir(path)
NoteIO.list(path)
NoteIO.readJSON / writeJSON

NoteGfx

NoteGfx.theme()  // macos | win95
NoteGfx.roundRect / text / hitRect / drawMenubar / drawDock / drawWindowChrome

NoteInput

NoteInput.on('tap'|'down'|'drag'|'dragend'|'key'|'wheel', fn)

NoteWM

NoteWM.open({ id, title, w, h, renderContent, onTap, onKey })
NoteWM.close(id) / focus(id) / minimize(id)

NoteApps

NoteApps.register({ id, name, glyph, launch(kernel) })
NoteApps.launch(id) / install(id) / list({ launcher: true })

NoteCC

NoteCC.toggle()  // Wi‑Fi, luminosité, volume, thème, notifs

NoteNet / NoteLog

NoteNet.fetchJSON(url)
NoteLog.info / warn / error / dump()

Window manager

Fenêtres draggables (title bar), close / minimize, focus par z-index. Le contenu est clipé dans la zone client.

Apps inclus

Ajouter une app

// apps/user/monapp.js
NoteApps.register({
  id: "monapp",
  name: "Mon App",
  glyph: "✨",
  preinstalled: true,
  launch: function (kernel) {
    return NoteWM.open({
      id: "monapp",
      title: "Mon App",
      w: 400, h: 300,
      renderContent: function (ctx, box, win) {
        NoteGfx.text(ctx, "Hello", box.x + 20, box.y + 40);
      }
    });
  }
});
// puis ajouter le script dans os/bootloader.js