System Variables
System-wide configurations (file types icons, list of default desktop wallpapers, open with menu, etc.) are set in src/lib/system.js
For data that need to be communicated across the system, win32.run uses Svelte Stores. (src/lib/store.js
). These data structures allow any page to subscribe and listen to their changes.
Example 1: any page can request to launch a program with
src/routes/xp/work_space.svelte
listens to these requests and launches the requested program
Example 2: the hard drive hardDrive
(in src/lib/store.js) is also a Svelte Store (actually it's just the inventory of files and folders, the real files' contents are saved in IndexedDB).
Any native program can make updates to win32 hard drive with hardDrive.update(...)
or hardDrive.set(...).
(Though you should use utilities functions in $lib/fs.js
like fs.save_file, fs.del_fs, fs.new_fs_item
)
src/routes/xp/programs/my_computer.svelte
subscribes to its changes and updates its UI accordingly
Last updated