PHP stays the program: JumPHP\Tauri\App starts the Tauri runtime (tauri/, a Rust C library loaded with FFI) from its main thread; Tauri runs its native loop there and calls PHP back at every frame, like the browser engine. Pages talk to PHP with window.jumphp (invoke / send / on); PHP drives windows, dialogs, notifications and decides what closing does. Native only, Linux for now. - tauri/: libjumphp_tauri (jt_run / jt_poll / jt_send / jt_version), pages served from the app's folder at run time - engine: JumPHP\Tauri (App, Window, AppMain, TauriRuntime, FakeRuntime, NativeCommands), JumPHP\Native (Dialog, FilePicker, Notification, Shell; providers tauri / sdl / browser / none), Testing\AppTestCase (no window) - bin/jumphp app:new / app:run / app:test / app:shot / app:export, tauri:setup / tauri:build (tools/app-commands.sh); run / test / shot hand over to them for an app, pages skips apps - app:export: export:standalone with optional settings (extension list with FFI, boot class, native library, injected php.ini); unset, games build and find the same micro as before (same key) - skeleton-app/, games/hello-desktop (a notepad), docker/tauri, docs/tauri.md + docs/tauri.fr.md, AGENTS.md §16 Nothing changes for SDL games (desktop, browser, standalone, Android, Apple). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JkYTqpYNZKwTnRZHQRD5HP
55 lines
2 KiB
HTML
55 lines
2 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Hello Desktop</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="brand"><img src="icon.png" alt=""><div><h1>Hello Desktop</h1><p>HTML on the outside, PHP on the inside.</p></div></div>
|
|
<div class="clock" title="sent by PHP every second"><span id="clock">--:--:--</span><small id="uptime"></small></div>
|
|
</header>
|
|
|
|
<main>
|
|
<section class="editor">
|
|
<div class="toolbar">
|
|
<button id="open">Open…</button>
|
|
<button id="save">Save</button>
|
|
<button id="saveAs" class="ghost">Save as…</button>
|
|
<span id="fileName" class="file">Untitled</span>
|
|
</div>
|
|
<textarea id="text" spellcheck="false" placeholder="Write here. Open, Save and closing the window go through PHP and your system's own dialogs."></textarea>
|
|
<p id="status" class="status">Ready.</p>
|
|
</section>
|
|
|
|
<aside>
|
|
<div class="card">
|
|
<h2>Ask PHP</h2>
|
|
<form id="greet"><input id="name" placeholder="Your name" autocomplete="off"><button>Greet</button></form>
|
|
<p id="greeting" class="answer"></p>
|
|
</div>
|
|
<div class="card">
|
|
<h2>The system</h2>
|
|
<div class="buttons">
|
|
<button class="ghost" data-native="message">Message box</button>
|
|
<button class="ghost" data-native="confirm">Confirm</button>
|
|
<button class="ghost" id="notify">Notification</button>
|
|
<button class="ghost" data-native="folder">Pick a folder</button>
|
|
</div>
|
|
<p id="native" class="answer small"></p>
|
|
</div>
|
|
<div class="card drop" id="drop">
|
|
<h2>Drop files here</h2>
|
|
<ul id="dropped"><li class="muted">PHP looks at what you drop on the window.</li></ul>
|
|
</div>
|
|
<div class="card">
|
|
<h2>Running on</h2>
|
|
<dl id="info"></dl>
|
|
</div>
|
|
</aside>
|
|
</main>
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|