| 1 |
<!doctype html> |
| 2 |
<!-- BASED ON: qt/5.15.2/wasm_32/plugins/platforms/wasm_shell.html --> |
| 3 |
<html lang="en-us"> |
| 4 |
<head> |
| 5 |
<meta charset="utf-8"> |
| 6 |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
| 7 |
<title>QtRVSim: RISV-V simulator for education</title> |
| 8 |
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png"> |
| 9 |
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"> |
| 10 |
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png"> |
| 11 |
<link rel="manifest" href="./manifest.json"> |
| 12 |
<link rel="mask-icon" href="./safari-pinned-tab.svg" color="#d5875b"> |
| 13 |
<meta name="apple-mobile-web-app-title" content="QtRVSim"> |
| 14 |
<meta name="application-name" content="QtRVSim"> |
| 15 |
<meta name="msapplication-TileColor" content="#da532c"> |
| 16 |
<meta name="theme-color" content="#ffffff"> |
| 17 |
|
| 18 |
<style> |
| 19 |
html, body { |
| 20 |
padding: 0; |
| 21 |
margin: 0; |
| 22 |
overflow: hidden; |
| 23 |
height: 100% |
| 24 |
} |
| 25 |
|
| 26 |
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */ |
| 27 |
canvas { |
| 28 |
border: 0 none; |
| 29 |
background-color: white; |
| 30 |
height: 100%; |
| 31 |
width: 100%; |
| 32 |
} |
| 33 |
|
| 34 |
/* The content editable property is set to true for the canvas in order to support |
| 35 |
clipboard events. Hide the resulting focus frame and set the cursor back to |
| 36 |
the default cursor. */ |
| 37 |
canvas { |
| 38 |
outline: 0 solid transparent; |
| 39 |
caret-color: transparent; |
| 40 |
cursor: default |
| 41 |
} |
| 42 |
</style> |
| 43 |
</head> |
| 44 |
<body onload="init()"> |
| 45 |
<figure id="qtspinner" style="overflow:visible;"> |
| 46 |
<div style="margin-top:1.5em; line-height:150%; text-align: center;"> |
| 47 |
<img height=200; src="logo.svg" style="display:block; margin: auto;" width="320" alt="Qt"> |
| 48 |
<strong>Qt for WebAssembly: qtrvsim_gui</strong> |
| 49 |
<div id="qtstatus"></div> |
| 50 |
<noscript>JavaScript is disabled. Please enable JavaScript to use this application.</noscript> |
| 51 |
</div> |
| 52 |
</figure> |
| 53 |
<canvas contenteditable="true" id="qtcanvas" oncontextmenu="event.preventDefault()"></canvas> |
| 54 |
|
| 55 |
<script type='text/javascript'> |
| 56 |
function init() { |
| 57 |
var spinner = document.querySelector('#qtspinner'); |
| 58 |
var canvas = document.querySelector('#qtcanvas'); |
| 59 |
var status = document.querySelector('#qtstatus') |
| 60 |
|
| 61 |
var qtLoader = QtLoader({ |
| 62 |
canvasElements: [canvas], |
| 63 |
showLoader: function (loaderStatus) { |
| 64 |
spinner.style.display = 'block'; |
| 65 |
canvas.style.display = 'none'; |
| 66 |
status.innerHTML = loaderStatus + "..."; |
| 67 |
}, |
| 68 |
showError: function (errorText) { |
| 69 |
status.innerHTML = errorText; |
| 70 |
spinner.style.display = 'block'; |
| 71 |
canvas.style.display = 'none'; |
| 72 |
}, |
| 73 |
showExit: function () { |
| 74 |
status.innerHTML = "Application exit"; |
| 75 |
if (qtLoader.exitCode !== undefined) |
| 76 |
status.innerHTML += " with code " + qtLoader.exitCode; |
| 77 |
if (qtLoader.exitText !== undefined) |
| 78 |
status.innerHTML += " (" + qtLoader.exitText + ")"; |
| 79 |
spinner.style.display = 'block'; |
| 80 |
canvas.style.display = 'none'; |
| 81 |
}, |
| 82 |
showCanvas: function () { |
| 83 |
spinner.style.display = 'none'; |
| 84 |
canvas.style.display = 'block'; |
| 85 |
}, |
| 86 |
}); |
| 87 |
qtLoader.loadEmscriptenModule("qtrvsim_gui"); |
| 88 |
} |
| 89 |
</script> |
| 90 |
<script src="qtloader.js" type="text/javascript"></script> |
| 91 |
</body> |
| 92 |
</html> |