home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 2 / chip_20018102_hu.iso / linux / X-4.1.0 / doc / readme.dps < prev    next >
Text File  |  2001-06-27  |  7KB  |  169 lines

  1.                                XFree86 and DPS
  2.  
  3.                     Juliusz Chroboczek, <jch@xfree86.org>
  4.  
  5.                               27 February 2001
  6.  
  7. 1.  Introduction
  8.  
  9. Display Postscript (or DPS for short) is a rendering extension for X11.  DPS
  10. is slightly atypical in that it is based on code mobility, the ability to
  11. send executable code from client to server.  Thus, a DPS client does not
  12. request that a line should be rendered; instead, it uploads code to the
  13. server which, when executed, causes a line to be drawn.
  14.  
  15. This document does not aim at teaching programming with DPS; it is only a
  16. summary description of the DPS support code included with XFree86.  More
  17. information about DPS, including a DPS bibliography, is available from the
  18. DPS extension site <URL:http://dps.sourceforge.net>.
  19.  
  20.      Note: Adobe, PostScript and Display PostScript are trademarks of
  21.      Adobe Systems Incorporated which may be registered in certain
  22.      jurisdictions.
  23.  
  24. As all X11 extensions, DPS consists of client-side and server-side compo-
  25. nents.  The DPS client side consists of a number of libraries and a number of
  26. tools for programming and configuration.  The DPS server side may consist
  27. either of an X server extension, or of a client-side process known as the
  28. ``DPS agent.''  In this latter case, the term ``server-side'' is somewhat
  29. misleading.
  30.  
  31. At the time of writing, only the client side is included with XFree86; the
  32. server side must be obtained separately.  Please see server side (section 3.,
  33. page 1) later in this document for more information.
  34.  
  35. 2.  The DPS client side
  36.  
  37. The DPS client side consists of four libraries and a number of basic tools
  38. for programming and configuration; these are all included with XFree86.
  39.  
  40. 2.1  Libraries
  41.  
  42. The libpsres library is a library for management of PostScript resources, on-
  43. disk files representing PostScript data structures such as fonts, font encod-
  44. ings, procsets, etc. It is closely related to the makepsres tool (see client-
  45. side tools (section 2.2, page 1) later in this document).
  46.  
  47. The basic DPS client library is libdps.  This library contains a number of
  48. functions for connection establishment, resource management, as well as stubs
  49. for all standard PostScript operators.  Normally, all DPS clients should link
  50. with libdps; in addition, libdps may be used for printing by non-DPS clients
  51. (this is done, for example, by Sun's JDK).  This library is documented in
  52. [CLRM] and [CLSX].
  53.  
  54. The libdpstk library contains a number of additional utilities for managing
  55. DPS contexts, user paths and user objects, and for previewing EPS files.  It
  56. is documented in [DPTX].
  57.  
  58. The libdpstkXm library contains four Motif widgets.  The DPS Scrolling Widget
  59. is a DPS drawing area that automatically manages issues such as scrolling,
  60. scaling, client-side backing store, incremental redisplay, etc. The Font
  61. Selection Box, and its associated Font Preview, present a convenient and pow-
  62. erful interface for choosing scalable fonts.  Finally, the Color Picker pre-
  63. sents an interface for choosing colours using either of the RGB or HSV
  64. spaces.  The latter three widgets are documented in [DPTX]; some summary
  65. Scrolling Widget documentation is available in the doc subdirectory of the
  66. DPS.tar.gz file, available from <URL:ftp://dps.source-
  67. forge.net/pub/dps/DPS.tar.gz>.
  68.  
  69. The source code for libdpstkXm is included with XFree86; however, as it
  70. depends on Motif, this library is not built by default.  A GTK-based library
  71. providing some of the functionality of libdpstkXm is available from the
  72. gtkDPS site <URL:http://www.gyve.org/gtkDPS/>.
  73.  
  74. 2.1.1  Libdps and Xt
  75.  
  76. In X11R5, libdps did not depend on libXt.  In X11R6, however, code was added
  77. to make the Xt main loop dispatch to sundry code on DPS events; with this
  78. addition, all programs that link with libdps need to link with libXt, whether
  79. they use Xt or not.
  80.  
  81. This state of affairs is unfortunately true of the version of libdps included
  82. with XFree86.  We are currently considering various solutions to this problem
  83. (including the use of weak linker symbols or splitting off the guilty func-
  84. tions into a separate library).
  85.  
  86. 2.2  Client-side tools
  87.  
  88. In addition to the libraries, the client side of DPS consists of two utili-
  89. ties.
  90.  
  91. The makepsres utility is used for managing PostScript resources.  Its basic
  92. operation consists in walking recursively a filesystem tree, noting all
  93. resources, and then writing out a ``Unix PostScript Resources,'' file, basi-
  94. cally a directory of all the resources found.  This utility is documented in
  95. the makepsres(1) manual page.
  96.  
  97. The pswrap utility is a stub generator for PostScript clients.  Roughly
  98. speaking, it takes as its input textual PostScript code, and generates a col-
  99. lection of C functions that transmit that code in pre-tokenised form to the
  100. DPS extension.  Pswrap is documented in [PSWRAP].
  101.  
  102. 2.3  Sample clients
  103.  
  104. XFree86 contains three sample DPS clients, dpsinfo, dpsexec and texteroids.
  105. They are documented in their respective manual pages.
  106.  
  107. A number of sample clients that depend on Motif are available in
  108. <URL:ftp://dps.sourceforge.net/pub/ftp/DPS.tar.gz>.  Additional sample
  109. clients can be found as part of GtkDPS (see above).
  110.  
  111. The GNUstep environment can be compiled to use DPS for all rendering; for
  112. more information, please see the GNUstep site <URL:http://www.gnustep.org>.
  113.  
  114. 3.  The DPS server side
  115.  
  116. In order to use DPS clients, you need to install a DPS server side, which can
  117. be either a server extension (a ``DPS/X extension''), or a separate process
  118. (referred to, variously, either as a ``DPS/NX agent'' or, rather confusingly,
  119. as ``Client-Side DPS'' (CSDPS).
  120.  
  121. 3.1  Display Ghostscript
  122.  
  123. Display Ghostscript (note the capitalisation), or DGS, is a client-side
  124. implementation of DPS based on the Ghostscript PostScript interpreter.  DGS
  125. is still in beta at the time of writing; it does, however, provide a very
  126. usable implementation of DPS, although it still has some problems with the
  127. semantics of multiple DPS contexts.
  128.  
  129. DGS is available from the GNUstep download area
  130. <URL:http://www.gnustep.org/resources/sources.html>.
  131.  
  132. 3.2  The DPS extension
  133.  
  134. The DPS extension is a much younger project aiming at producing an efficient
  135. server-side implementation of DPS.  The extension is currently in a state
  136. best described as alpha; current versions are known to crash the X server
  137. under some circumstances.
  138.  
  139. The DPS extension is available from the DPS extension site
  140. <URL:http://dps.sourceforge.net>.
  141.  
  142. 4.  References
  143.  
  144. Links to electronic versions of all of these, and more, are available from
  145. the DPS extension site <URL:http://dps.sourceforge.net>.
  146.  
  147. [PLRM2] PostScript language reference manual. Adobe Systems, 2nd ed. Addison-
  148. Wesley, 1990. ISBN 0-201-18127-4.
  149.  
  150. [PLRM] PostScript language reference. Adobe Systems Incorporated, 3rd ed.
  151. Addison-Wesley, 1999. ISBN 0-201-37922-8.
  152.  
  153. [INTRO] Display PostScript System. Introduction: Perspective for Software
  154. Developers. 15 April 1993.
  155.  
  156. [CLRM] Display PostScript System. Client Library Reference Manual. 15 April
  157. 1993.
  158.  
  159. [CLSX] Display PostScript System. Client Library Supplement for X. 15 April
  160. 1993.
  161.  
  162. [DPTX] Display PostScript System. Display PostScript Toolkit for X. 15 April
  163. 1993.
  164.  
  165. [PSWRAP] Display PostScript System. pswrap Reference Manual. 15 April 1993.
  166.  
  167.      Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/dps.sgml,v 1.1 2001/03/02 02:45:37 dawes Exp $
  168.  
  169.