shithub: libmujs

Download patch

ref: 2dced7cf692a7043ed253d626b1250707801ff85
parent: be0685e89e085561342cbc98e3cb5b28d3063f10
author: Tor Andersson <[email protected]>
date: Mon Jun 5 06:20:16 EDT 2017

Update docs website.

--- a/docs/about.html
+++ b/docs/about.html
@@ -2,10 +2,25 @@
 <html>
 <head>
 <link href="style.css" rel="stylesheet">
-<title>MuJS: about</title>
+<title>About MuJS</title>
 </head>
+
 <body>
 
+<header>
+<h1>About MuJS</h1>
+</header>
+
+<nav>
+<a href="/index.html">ABOUT</a>
+<a href="/docs/reference.html">REFERENCE</a>
+<a href="/docs/examples.html">EXAMPLES</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">SOURCE</a>
+<a href="https://bugs.ghostscript.com/">BUGS</a>
+</nav>
+
+<article>
+
 <h2>What is MuJS?</h2>
 
 <p>
@@ -80,4 +95,12 @@
 MuJS is free open source software distributed under the
 <a href="https://opensource.org/licenses/ISC">ISC license</a>.
 
+</article>
+
+<footer>
+<a href="http://artifex.com"><img src="artifex-logo.png" align="right"></a>
+Copyright &copy; 2013-2017 Artifex Software Inc.
+</footer>
+
 </body>
+</html>
binary files /dev/null b/docs/artifex-logo.png differ
--- a/docs/examples.html
+++ b/docs/examples.html
@@ -2,12 +2,25 @@
 <html>
 <head>
 <link href="style.css" rel="stylesheet">
-<title>MuJS: examples</title>
+<title>MuJS Examples</title>
 </head>
+
 <body>
 
+<header>
 <h1>MuJS Examples</h1>
+</header>
 
+<nav>
+<a href="/index.html">ABOUT</a>
+<a href="/docs/reference.html">REFERENCE</a>
+<a href="/docs/examples.html">EXAMPLES</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">SOURCE</a>
+<a href="https://bugs.ghostscript.com/">BUGS</a>
+</nav>
+
+<article>
+
 <h2>A stand-alone interpreter</h2>
 
 <pre>
@@ -103,6 +116,7 @@
 
 	return result;
 }
+</pre>
 
 <h2>Callbacks from C to JS</h2>
 
@@ -198,4 +212,12 @@
 }
 </pre>
 
+</article>
+
+<footer>
+<a href="http://artifex.com"><img src="artifex-logo.png" align="right"></a>
+Copyright &copy; 2013-2017 Artifex Software Inc.
+</footer>
+
 </body>
+</html>
--- a/docs/reference.html
+++ b/docs/reference.html
@@ -2,12 +2,25 @@
 <html>
 <head>
 <link href="style.css" rel="stylesheet">
-<title>MuJS: reference manual</title>
+<title>MuJS Reference Manual</title>
 </head>
+
 <body>
 
+<header>
 <h1>MuJS Reference Manual</h1>
+</header>
 
+<nav>
+<a href="/index.html">ABOUT</a>
+<a href="/docs/reference.html">REFERENCE</a>
+<a href="/docs/examples.html">EXAMPLES</a>
+<a href="http://git.ghostscript.com/?p=mujs.git;a=summary">SOURCE</a>
+<a href="https://bugs.ghostscript.com/">BUGS</a>
+</nav>
+
+<article>
+
 <h2>Introduction</h2>
 
 <p>
@@ -171,6 +184,18 @@
 
 Set a new panic function, and return the old one.
 
+<h3>Report</h3>
+
+<pre>
+typedef void (*js_Report)(js_State *J, const char *message);
+
+void js_setreport(js_State *J, js_Report report);
+</pre>
+
+<p>
+Set a callback function for reporting various warnings
+and garbage collection statistics.
+
 <h3>Garbage collection</h3>
 
 <pre>
@@ -179,7 +204,8 @@
 
 <p>
 Force a garbage collection pass.
-If the report argument is non-zero, print a summary of garbage collection statistics to stdout.
+If the report argument is non-zero, send a summary of garbage collection statistics to
+the report callback function.
 
 <h3>Loading and compiling scripts</h3>
 
@@ -658,4 +684,12 @@
 <p>
 WIP: Delete the reference from the registry.
 
+</article>
+
+<footer>
+<a href="http://artifex.com"><img src="artifex-logo.png" align="right"></a>
+Copyright &copy; 2013-2017 Artifex Software Inc.
+</footer>
+
 </body>
+</html>
--- a/docs/style.css
+++ b/docs/style.css
@@ -1,16 +1,33 @@
-@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic|Source+Code+Pro);
+h1, nav, footer { font-family: sans-serif; }
 
-body {
-	font-family: 'Source Sans Pro', sans-serif;
-	font-size: 12pt;
-	margin: 3pc;
-	max-width: 45em;
-	text-align: justify;
+a { text-decoration: none; }
+a:hover { text-decoration: underline; }
+h2 { font-size: 1.25rem; }
+h3 { font-size: 1.12rem; }
+ul li { list-style-type: circle; }
+pre, table, ol, dl { margin-left: 2rem; }
+li { margin: 0; }
+th, td { text-align: left; vertical-align: top; }
+
+body { margin: 0; }
+h1 {
+	font-weight: normal;
+	margin: 0;
+	padding: 1rem 2rem;
+	background-color: #36648b;
+	color: white;
 }
-pre, tt, code {
-	font-family: 'Source Code Pro', monospaced;
-	font-size: 11pt;
+nav {
+	padding: 1rem 2rem;
+	background-color: #ddd;
 }
-h2 {
-	border-bottom: 2px solid black;
+nav a { color: #303030; padding-right: 2rem; }
+article {
+	max-width: 50rem;
+	margin: 2rem;
+}
+footer {
+	background-color: #ddd;
+	color: #303030;
+	padding: 1rem 2rem;
 }