summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/DLL.htm')
-rw-r--r--doc/DLL.htm213
1 files changed, 81 insertions, 132 deletions
diff --git a/doc/DLL.htm b/doc/DLL.htm
index 878fce4b..5f9c41c9 100644
--- a/doc/DLL.htm
+++ b/doc/DLL.htm
@@ -1,85 +1,58 @@
<!doctype html>
-<html>
+<html lang="en">
<head>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
-<link rel="shortcut icon" type="image/png" href="../../images/favicon.png">
-<title>How to Use the Ghostscript Dynamic Link Library (DLL)</title>
- <!-- Originally: dll.txt -->
-<link href="style.css" rel="stylesheet" type="text/css">
-<link href="gs-style.css" rel="stylesheet" type="text/css">
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="user-scalable=yes, initial-scale=1, width=device-width">
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,200i,300,300i,400,400i,600,600i,700,700i,900,900i" rel="stylesheet">
+ <link rel="shortcut icon" href="images/favicon.svg">
+ <title>How to Use the Ghostscript Dynamic Link Library (DLL)</title>
+ <link href="default.css" rel="stylesheet" type="text/css">
</head>
<body>
+ <header><div class="title"><a href="index.html"><h1 aria-label="title">Ghostscript documentation</h1><h2 aria-label="version"></h2></a></div><a href="Search.htm" aria-label="Search" id="searchSite"><div class="search"></div></a></header>
+ <main>
+ <article>
+ <div class="outer">
- <div class="header">
- <div class="row">
- <div class="col-lt-6 logo"><a href="https://www.ghostscript.com/"><img src="images/ghostscript_logo.png" width="108" height="119" alt=""></a></div>
- <div class="col-6"><div class="row"><div class="artifexlogo"><a href="https://artifex.com" target="_blank"><img src="images/Artifex_logo.png" width="194" height="40" alt=""></a></div>
- <div class="col-12"><div class="button button1"><a href="https://artifex.com/contact-us/" title="Contact Us" target="_blank">Contact Us</a></div>
- <div class="button button2 hidden-xs"><a href="https://www.ghostscript.com/download.html" title="Download">Download</a></div></div></div>
- </div>
- </div>
- </div>
-
- <div class="banner">
- <div class="row">
- <div class="col-12">How to Use the Ghostscript Dynamic Link Library (DLL)</div>
- </div>
- </div>
-
- <div class="main">
- <div class="row">
- <div id="sidebar">
- <div class="sidebar-item"></div>
- <div class="col-2 leftnav">
-<ul>
- <li><a href="https://www.ghostscript.com/">Home</a></li>
- <li><a href="https://www.ghostscript.com/license.html">Licensing</a></li>
- <li><a href="https://www.ghostscript.com/releases.html">Releases</a></li>
- <li><a href="https://www.ghostscript.com/documentation.html" title="Documentation">Documentation</a></li>
- <li><a href="https://www.ghostscript.com/download.html" title="Download">Download</a></li>
- <li><a href="https://www.ghostscript.com/performance.html" title="Performance">Performance</a></li>
- <li><a href="http://jbig2dec.com/" title="jbig2dec">jbig2dec</a></li>
- <li><a href="http://git.ghostscript.com/?p=ghostpdl.git;a=summary">Source</a></li>
- <li><a href="http://bugs.ghostscript.com/">Bugs</a></li>
- <li><a href="https://www.ghostscript.com/faq.html" title="FAQ">FAQ</a></li>
- </ul>
- </div>
- </div>
- <div class="col-10 page">
-
+ <div class="inner">
<!--START EDITING HERE-->
-<h2>Table of contents</h2>
+<h1>How to Use the Ghostscript Dynamic Link Library (DLL)</h1>
-<ul>
-<li><a href="#DLL">What is the Ghostscript DLL?</a></li>
-<li><a href="#Common_functions">Platform-independent DLL functions</a></li>
-<ul>
-<li><a href="#revision"><code>gsdll_revision()</code></a></li>
-<li><a href="#init"><code>gsdll_init()</code></a></li>
-<li><a href="#execute_begin"><code>gsdll_execute_begin()</code></a></li>
-<li><a href="#execute_cont"><code>gsdll_execute_cont()</code></a></li>
-<li><a href="#execute_end"><code>gsdll_execute_end()</code></a></li>
-<li><a href="#exit"><code>gsdll_exit()</code></a></li>
-<li><a href="#lock_device"><code>gsdll_lock_device()</code></a></li>
-</ul>
-<li><a href="#Callback">Callback function</a></li>
-<li><a href="#OS2_device">Ghostscript DLL device for OS/2</a></li>
-<ul>
-<li><a href="#OS2_bmp"><code>gsdll_get_bitmap()</code></a></li>
-<li><a href="#OS2_example">Example DLL usage for OS/2</a></li>
-</ul>
-<li><a href="#Win_device">Ghostscript DLL device for MS Windows</a></li>
-<ul>
-<li><a href="#Win_copydib"><code>gsdll_copy_dib()</code></a></li>
-<li><a href="#Win_copypalette"><code>gsdll_copy_palette()</code></a></li>
-<li><a href="#Win_draw"><code>gsdll_draw()</code></a></li>
-<li><a href="#Win_get_row"><code>gsdll_get_bitmap_row()</code></a></li>
-</ul>
-<li><a href="#Win16">Ghostscript DLL Device for 16-bit MS Windows</a></li>
+<h2><a name="toc"></a>Table of contents</h2>
+<ul class="toc">
+ <li><a href="#DLL">What is the Ghostscript DLL?</a></li>
+ <li><a href="#Common_functions">Platform-independent DLL functions</a></li>
+ <li>
+ <ul>
+ <li><a href="#revision"><code>gsdll_revision()</code></a></li>
+ <li><a href="#init"><code>gsdll_init()</code></a></li>
+ <li><a href="#execute_begin"><code>gsdll_execute_begin()</code></a></li>
+ <li><a href="#execute_cont"><code>gsdll_execute_cont()</code></a></li>
+ <li><a href="#execute_end"><code>gsdll_execute_end()</code></a></li>
+ <li><a href="#exit"><code>gsdll_exit()</code></a></li>
+ <li><a href="#lock_device"><code>gsdll_lock_device()</code></a></li>
+ </ul>
+ </li>
+ <li><a href="#Callback">Callback function</a></li>
+ <li><a href="#OS2_device">Ghostscript DLL device for OS/2</a></li>
+ <li>
+ <ul>
+ <li><a href="#OS2_bmp"><code>gsdll_get_bitmap()</code></a></li>
+ <li><a href="#OS2_example">Example DLL usage for OS/2</a></li>
+ </ul>
+ </li>
+ <li><a href="#Win_device">Ghostscript DLL device for MS Windows</a></li>
+ <li>
+ <ul>
+ <li><a href="#Win_copydib"><code>gsdll_copy_dib()</code></a></li>
+ <li><a href="#Win_copypalette"><code>gsdll_copy_palette()</code></a></li>
+ <li><a href="#Win_draw"><code>gsdll_draw()</code></a></li>
+ <li><a href="#Win_get_row"><code>gsdll_get_bitmap_row()</code></a></li>
+ </ul>
+ </li>
+ <li><a href="#Win16">Ghostscript DLL Device for 16-bit MS Windows</a></li>
</ul>
<!-- [1.2 end table of contents] =========================================== -->
@@ -154,7 +127,7 @@ The seven functions provided by the DLL are
<li><code>int GSDLLAPI <a href="#execute_cont">gsdll_execute_cont</a>(const char *str, int len);</code></li>
<li><code>int GSDLLAPI <a href="#execute_end">gsdll_execute_end</a>(void);</code></li>
<li><code>int GSDLLAPI <a href="#exit">gsdll_exit</a>(void);</code></li>
-<li><code>int GSDLLAPI <a href="#lock_device">gsdll_lock_device</a>(unsigned char *device, int flag);</code></li>
+<li><code>int GSDLLAPI <a href="#lock_device">gsdll_lock_device</a>(unsigned char *device, int flag);</code>
<p>
where <code>GSDLLAPI</code> is defined under OS/2 as
@@ -169,6 +142,7 @@ and under MS Windows as
<blockquote><code>
#define GSDLLAPI CALLBACK _export
</code></blockquote>
+</li>
</ul>
<h3><a name="revision"></a><code>gsdll_revision()</code></h3>
@@ -263,26 +237,26 @@ code = gsdll_execute_cont(command, strlen(command));
<a name="cont_returns"></a>
<table>
<tr>
- <th colspan="3">Return codes from gsdll_execute_cont()</th>
+ <th colspan="2">Return codes from gsdll_execute_cont()</th>
</tr>
<tr>
<th align="left">Code</th>
- <th>&nbsp;&nbsp;&nbsp;&nbsp;</th>
+
<th align="left">Status</th>
</tr>
<tr>
<td align="left">0</td>
- <td>&nbsp;</td>
+
<td>No errors</td>
</tr>
<tr>
<td align="left">&lt; 0</td>
- <td>&nbsp;</td>
+
<td>Error</td>
</tr>
<tr>
<td align="left">&lt;= -100</td>
- <td>&nbsp;</td>
+
<td>"<code>quit</code>" has been executed, or fatal error.
<code>gsdll_exit()</code> must then be called: do not call
<code>gsdll_execute_end()</code>.</td>
@@ -351,16 +325,16 @@ locking.
<table>
<tr>
- <th colspan="3">Locking and unlocking devices</th>
+ <th colspan="2">Locking and unlocking devices</th>
</tr>
<tr>
<td>To lock a device</td>
- <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+
<td><code>gsdll_lock_device(device, 1)</code>;</td>
</tr>
<tr>
<td>To unlock a device</td>
- <td>&nbsp;</td>
+
<td><code>gsdll_lock_device(device, 0)</code>;</td>
</tr>
</table>
@@ -447,67 +421,67 @@ char *p;
<table>
<tr>
- <th colspan="5">Messages used by callback</th>
+ <th colspan="3">Messages used by callback</th>
</tr>
<tr>
<th align="left">Symbol</th>
- <th>&nbsp;&nbsp;</th>
- <th align="left"></th>
- <th>&nbsp;&nbsp;</th>
+
+ <th align="left">Value</th>
+
<th align="left">Use</th>
</tr>
<tr>
<td><code>GSDLL_STDIN</code></td>
- <td>&nbsp;</td>
+
<td>1</td>
- <td>&nbsp;</td>
+
<td>get <code>count</code> characters to <code>str</code> from stdin, return number of characters read</td>
</tr>
<tr>
<td><code>GSDLL_STDOUT</code></td>
- <td>&nbsp;</td>
+
<td>2</td>
- <td>&nbsp;</td>
+
<td>put <code>count</code> characters from <code>str</code>
to stdout, return number of characters written</td>
</tr>
<tr>
<td><code>GSDLL_DEVICE</code></td>
- <td>&nbsp;</td>
+
<td>3</td>
- <td>&nbsp;</td>
+
<td>device <code>str</code> has been opened if
<code>count</code>&nbsp;=&nbsp;1, closed if
<code>count</code>&nbsp;=&nbsp;0</td>
</tr>
<tr>
<td><code>GSDLL_SYNC</code></td>
- <td>&nbsp;</td>
+
<td>4</td>
- <td>&nbsp;</td>
+
<td>sync_output for device <code>str</code></td>
</tr>
<tr>
<td><code>GSDLL_PAGE</code></td>
- <td>&nbsp;</td>
+
<td>5</td>
- <td>&nbsp;</td>
+
<td>output_page for device <code>str</code></td>
</tr>
<tr>
<td><code>GSDLL_SIZE</code></td>
- <td>&nbsp;</td>
+
<td>6</td>
- <td>&nbsp;</td>
+
<td>resize for device <code>str</code>:
LOWORD(<code>count</code>) is new <code>xsize</code>,
HIWORD(<code>count</code>) is new <code>ysize</code></td>
</tr>
<tr>
<td><code>GSDLL_POLL</code></td>
- <td>&nbsp;</td>
+
<td>7</td>
- <td>&nbsp;</td>
+
<td>Called from <code>gp_check_interrupt()</code><br>
Can be used by the caller to poll the message queue.
Normally returns 0. To abort
@@ -753,7 +727,7 @@ if (!code) {
<hr>
<p>
-<small>Copyright &copy; 2000-2021 Artifex Software, Inc. All rights reserved.</small>
+<small>Copyright &copy; 2000-2022 Artifex Software, Inc. All rights reserved.</small>
<p>
This software is provided AS-IS with no warranty, either express or
@@ -766,40 +740,15 @@ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200,
Novato, CA 94945, U.S.A., +1(415)492-9861, for further information.
<p>
-<small>Ghostscript version 9.55.0, 27 September 2021
+<small>Ghostscript version 9.56.0, 29 March 2022
<!-- [3.0 end visible trailer] ============================================= -->
<!--FINISH EDITING HERE-->
-
- </div>
- </div>
- </div>
-
- <div class="footer">
- <div class="row">
- <div class="col-7 footleft">
- <ul>
- <li><a href="https://artifex.com/contact-us/" target="blank">CONTACT US</a></li>
- <li><a href="https://artifex.com/about-us/" target="blank">ABOUT</a></li>
- <li><a href="https://ghostscript.com/security.html">SECURITY</a></li>
- </ul>
- </div>
- <div class="col-1 footcenter">
- <ul>
- <li><a href="https://artifex.com/support/" target="blank">SUPPORT</a></li>
- <li><a href="https://artifex.com/blog/artifex/" target="blank">BLOG</a></li>
- <li><a href="https://artifex.com/privacy-policy/" target="blank">PRIVACY</a></li>
- </ul>
- </div>
- <div class="col-ft-3 footright"><img src="images/Artifex_logo.png" width="194" height="40" alt=""/> <br>
- © Copyright 2019-2021 Artifex Software, Inc. <br>
- All rights reserved.
- </div>
- </div>
- </div>
-
- <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
- <script src="index.js"></script>
+ </div><!-- close inner -->
+ </div><!-- close outer -->
+ </article>
+ </main>
+ <script src="site.js"></script>
</body>
</html>