Print.sgm 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <!-- $XConsortium: Print.sgm /main/6 1996/09/08 20:14:58 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN299.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN299.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>Print</RefEntryTitle>
  13. <ManVolNum>special file</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Symbol Role="Message">Print</Symbol></RefName>
  17. <RefPurpose>print a document
  18. </RefPurpose>
  19. </RefNameDiv>
  20. <!-- $XConsortium: Print.sgm /main/6 1996/09/08 20:14:58 rws $-->
  21. <!-- CDE Common Source Format, Version 1.0.0-->
  22. <!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
  23. <!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
  24. <!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
  25. <!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
  26. <RefSynopsisDiv>
  27. <Synopsis>[<Symbol Role="Variable">file</Symbol>] Print(in <Emphasis>mediaType contents</Emphasis>,
  28. in boolean <Emphasis>inquisitive</Emphasis>,
  29. in boolean <Emphasis>covert</Emphasis>
  30. [in title <Emphasis>docName</Emphasis>]);
  31. </Synopsis>
  32. </RefSynopsisDiv>
  33. <RefSect1>
  34. <Title>DESCRIPTION</Title>
  35. <Para>The
  36. <Symbol Role="Message">Print</Symbol> request causes the handler to print a document.
  37. The handler must act as if the user had issued,
  38. (via the handler's user interface)
  39. either a ``Print One'' or ``Print...'' command,
  40. depending on the value of the
  41. <Emphasis>inquisitive</Emphasis> argument.
  42. </Para>
  43. <Para>The
  44. <Emphasis>contents</Emphasis> argument
  45. is the contents of the document.
  46. If this argument is unset
  47. (in other words, has a value of
  48. <Literal>(char *)0</Literal>), then the contents of the document are in
  49. the file named in the message's
  50. <Symbol Role="Variable">file</Symbol> attribute.
  51. The data type
  52. (<Emphasis>mediaType</Emphasis>) of the
  53. <Emphasis>contents</Emphasis> argument should be
  54. <Literal>string</Literal>, unless nulls are valid in the given media type,
  55. in which case the data type must be
  56. <Literal>bytes</Literal>.</Para>
  57. <Para>The
  58. <Emphasis>inquisitive</Emphasis> argument is a
  59. <Literal>boolean</Literal> value
  60. indicating whether the handler is allowed to block on user input
  61. while carrying out the request.
  62. However, even if
  63. <Emphasis>inquisitive</Emphasis> is True, the handler is not required to seek such input.
  64. </Para>
  65. <Para>The
  66. <Emphasis>covert</Emphasis> argument is a
  67. <Literal>boolean</Literal> value indicating whether the handler may make itself apparent to the user
  68. as it carries out the request.
  69. If False, the recipient need not make itself apparent.
  70. </Para>
  71. <Para>If both the
  72. <Emphasis>inquisitive</Emphasis> argument and the
  73. <Emphasis>covert</Emphasis> argument are True, the recipient should attempt to limit its presence
  74. to the minimum needed to receive any user input desired;
  75. for example, through iconification.
  76. </Para>
  77. <Para>The
  78. <Emphasis>docName</Emphasis> argument contains the name of the document.
  79. If the
  80. <Emphasis>docName</Emphasis> argument is absent and the
  81. <Symbol Role="Variable">file</Symbol> attribute is set,
  82. the file name is considered to be the title of the document.
  83. This string would be suitable for display in a window title bar, for example.
  84. </Para>
  85. </RefSect1>
  86. <RefSect1>
  87. <Title>APPLICATION USAGE</Title>
  88. <Para>The
  89. &cdeman.ttmedia.ptype.declare; function can be used to register for,
  90. and help process, this message.
  91. </Para>
  92. <Para>This message can be sent with the
  93. &cdeman.ttmedia.load; function.
  94. </Para>
  95. </RefSect1>
  96. <RefSect1>
  97. <Title>EXAMPLES</Title>
  98. <Para>To print a PostScript document, the application can send a request of the form:
  99. </Para>
  100. <InformalExample Remap="indent">
  101. <ProgramListing>Print(in PostScript <Emphasis>contents</Emphasis>,
  102. in boolean <Emphasis>inquisitive</Emphasis>,
  103. in boolean <Emphasis>covert</Emphasis>);
  104. </ProgramListing>
  105. </InformalExample>
  106. <Para>with a first argument whose value is a vector of bytes such as:
  107. </Para>
  108. <InformalExample Remap="indent">
  109. <ProgramListing>%!&bsol;n/inch {72 mul} def...
  110. </ProgramListing>
  111. </InformalExample>
  112. <Para>The
  113. <Literal>&bsol;n</Literal> in the example represents the newline character.
  114. The notation is the same as in the &str-Z3;.
  115. </Para>
  116. <Para>To print a PostScript document contained in a file,
  117. the application can send the
  118. <Symbol Role="Message">Print</Symbol> request as above,
  119. with the
  120. <Symbol Role="Variable">file</Symbol> attribute set to the relevant file
  121. and with the value of the first argument not set.
  122. </Para>
  123. </RefSect1>
  124. <RefSect1>
  125. <Title>ERRORS</Title>
  126. <Para>The ToolTalk service may return one of the following errors
  127. in processing the
  128. <Symbol Role="Message">Print</Symbol> request:
  129. </Para>
  130. <VariableList>
  131. <VarListEntry>
  132. <Term>TT_DESKTOP_ENOENT</Term>
  133. <ListItem>
  134. <Para>The file that was alleged to contain the document does not exist.
  135. </Para>
  136. </ListItem>
  137. </VarListEntry>
  138. <VarListEntry>
  139. <Term>TT_DESKTOP_ENODATA</Term>
  140. <ListItem>
  141. <Para>The in-mode
  142. <Emphasis>contents</Emphasis> argument had no value and the
  143. <Symbol Role="Variable">file</Symbol> attribute
  144. of the message was not set.
  145. </Para>
  146. </ListItem>
  147. </VarListEntry>
  148. <VarListEntry>
  149. <Term>TT_MEDIA_ERR_FORMAT</Term>
  150. <ListItem>
  151. <Para>The document is not a valid instance of the media type.
  152. </Para>
  153. </ListItem>
  154. </VarListEntry>
  155. </VariableList>
  156. </RefSect1>
  157. <RefSect1>
  158. <Title>SEE ALSO</Title>
  159. <Para>&cdeman.ttmedia.ptype.declare;, &cdeman.ttmedia.load;; <Emphasis>Intro</Emphasis>, <Symbol Role="Message">Status</Symbol> requests.
  160. </Para>
  161. </RefSect1>
  162. </RefEntry>
  163. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->