home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Basic / wst!blz1.dms / in.adf / docs / RomulusLibs.doc < prev    next >
Encoding:
Text File  |  1994-09-05  |  10.1 KB  |  296 lines

  1. Library Name:
  2.   romuluscrunchlib    #74
  3.   romulusprtlib       #70
  4.   romulusrequesterlib #69
  5.   romuluslocalelib    #68
  6.   romulusconsolelib   #67
  7.  
  8. Author:
  9.   Andre Bergmann, Am Pannesbusch 39a, 42281 Wuppertal 2, Germany
  10.  
  11. OverView:
  12.   Haven't been in touch with Andre for a while, sorry that I stuffed
  13.   up the inclusion of the prtlib in BUM6.
  14.  
  15. Commands:
  16.   status.b=CheckPrt
  17.   PrtCommand Command,Para1,Para2,Para3,Para4
  18.   PrtText <STRING>
  19.   Hardcopy ScreenPointer,X,Y,Width,Height,PrtWidth,PrtHeight,Flags
  20.   OpenConsole Window#,Console#
  21.   PrintCon Console#,Expression
  22.   NPrintCon Console#,Expression
  23.   CloseConsole Console#
  24.   EasyRequest Result=EasyRequest([#Window,]title$,body$,gtext$)
  25.   IsLocale
  26.   UseCatalog Catalogname
  27.   FreeCatalog
  28.   GetLocaleStr #StringNumber,DefaultString$
  29.  
  30. Authors Documentation:
  31.  
  32. ===========================================================================
  33.                          PRINTER LIBRARY
  34. ===========================================================================
  35.  
  36. This is a library for using the printer.device!!!
  37. There are only four commands included, but I think these are the most wanted
  38. ones...
  39.  
  40. Statement: CheckPrt
  41. ---------------------------------------------------------------------------
  42. Syntax: status.b=CheckPrt
  43.  
  44. Modes: AMIGA/BLITZ
  45.  
  46. Description:
  47.  
  48. Checks the state of the Printer and return it.
  49.  
  50. status: -1 = Printer Off
  51.   -3 = Printer Offline
  52.   -4 = Printer On
  53.  
  54. Bugs:
  55.  
  56. I had exculded this Routine, because it doesn' t worked 100%...
  57. I have now reincluded it and compiled with the newest version of the
  58. BB2 compiler...
  59. It seems that it now works 100%...
  60. ---------------------------------------------------------------------------
  61.  
  62. Statement: PrtCommand
  63. ---------------------------------------------------------------------------
  64. Syntax: PrtCommand Command,Para1,Para2,Para3,Para4
  65.  
  66. Modes: AMIGA
  67.  
  68. Description:
  69.  
  70. Send a ESC-Sequence to the printer.
  71.  
  72. Command: Escape-Sequence
  73.  
  74. Para1 - Para 4: Parameters for ESC-Sequence
  75.  
  76. Beispiel: PrtCommand 6,0,0,0,0 ;Kursiv on
  77.           PrtCommand 7,0,0,0,0 ;Kursiv off
  78. ---------------------------------------------------------------------------
  79.  
  80. Statement: PrtText
  81. ---------------------------------------------------------------------------
  82. Syntax: PrtText <STRING>
  83.  
  84. Mode: AMIGA
  85.  
  86. Description:
  87.  
  88. PrtText: Prints the text 'STRING' at your printer...
  89.          It' s the same like WriteFile(0,"PRT:"), but why have the AMIGA
  90.          a own printer.device...
  91.          So I think we should use it, right?
  92. ---------------------------------------------------------------------------
  93.  
  94. Statement: Hardcopy
  95. ---------------------------------------------------------------------------
  96. Syntax: Hardcopy ScreenPointer,X,Y,Width,Height,PrtWidth,PrtHeight,Flags
  97.  
  98. Mode: AMIGA
  99.  
  100. Description:
  101.  
  102. Prints the screen or a part of it at your printer.
  103.  
  104. ScreenPointer: Adress of the screen (Addr Screen(x))
  105. X............: \ Are the corners of the screen where we
  106. Y............: / want to start printing it to paper...
  107. Width........: Width of the screen part you want to print
  108. Height.......: Height of the screen part you want to print
  109. PrtWidth.....: Width of the print(on the paper)
  110. PrtHeight....: Height of the print(on the paper)
  111. Flags........: Printerflags...
  112.                Have a look to a documantation aout it, the most importent(?)
  113.                ones:
  114.                $40  - Centre graphic
  115.                $10  - Weidth= Maximum
  116.                $20  - Height = Maximum
  117.                $100,$200,$300,$400 - Printing quality($400 = Heighest)
  118.  
  119. Bugs:
  120.  
  121. Hm, it seems that the flags are not 100% taken...
  122. I haven' t find out why, but might be you do...
  123. I still working on it!
  124. But however, it works...
  125. ---------------------------------------------------------------------------
  126. ===========================================================================
  127.  
  128. BTW: This library is copyright 1992/93 by Andre Bergmann.
  129.      Use it on your own risk, I don' t take the responsibility for using it!
  130.      This source is PD, feel free to update it!
  131.      Please send me updates done by you and Bug Reports!
  132.      
  133.  
  134. Andre Bergmann
  135. Am Pannesbusch 39a
  136. 42281 Wuppertal 2
  137. Germany
  138. Tel: 0049/0202/702606
  139.  
  140. ===========================================================================
  141.                           CONSOLE LIBRARY
  142. ===========================================================================
  143.  
  144. - ConsoleLib(a little buggy yet):
  145.   - OpenConsole Window#,Console#
  146.     Open a CON: Port for the window, so ANSI output is possible.
  147.  
  148.   - PrintCon Console#,Expression
  149.     Write text to window-console.
  150.  
  151.   - NPrintCon Console#,Expression
  152.     Write text to window-console, and add a Linefeed.
  153.  
  154.   - CloseConsole Console#
  155.     Close the CON: Port, but NOT the window itself!
  156.  
  157.   Note:
  158.   These command work if you use them only for ONE window...
  159.   If you wanna use the CON's for more windows, so that object
  160.   are use it doesn' t work anymore...
  161.   Ya see, I need ya help, please...
  162.  
  163. ===========================================================================
  164.                           CRUNCH LIBRARY
  165. ===========================================================================
  166.  
  167. - CrunchLib:
  168.   - Implode Error/CrunchedLen=Bufferadr,DataLen,?Callback
  169.     Crunch a buffer using the Imploder algorythm.
  170.     The ?Callback could be a 0 for no own routine or a pointer
  171.     to an own routine for display or abort checking.
  172.     If the Imploder command jump to the callback in register d0
  173.     the current crunch position is presend.
  174.     The callback itself have to return True for cont crunching
  175.     or False for a break!
  176.     The command return the crunched buffer len or of course a break
  177.     or an error.
  178.     If a <0 is returned the callback returned a userbreak,
  179.     a return of 0 means an error happens.
  180.     Else the new buffer len is returned.
  181.  
  182.   - Deplode Success=Startadr
  183.     Decrunch a Imploder-Crunched buffer.
  184.     There is no need to give the crunched buffer len to the command,
  185.     imploder handle this by itself.
  186.     But be careful, if the alloceted buffer hasn' t enought space
  187.     the program crash.
  188.     
  189.     The buffer has to have a header like this:
  190.  
  191.     Type  Offset  Contents                   Function
  192.     LONG  0       "IMP!"                     To recongnize crunched files
  193.     LONG  4       Original Len               Datalen before packing
  194.     LONG  8       Crunched Len-$32           Datalen after packing
  195.     
  196.     So $a is the start of the datas...
  197.  
  198.     The decrunch routine NEED this header to decrunch!!!
  199.     Do memoryallocation for the buffer using a allocate for the Startadr+$4
  200.     size.
  201.  
  202.   - CrMDecrunch Bufferadr [,Destinationadr]
  203.     If the only parameter is the Bufferadr this routine works like the Deplode
  204.     command, but decrunch a CrunchMania crunched file.
  205.     If you use it with to parameters the decrunch will be done from
  206.     Bufferadr to Destinationadr, so 2 buffers have to been allocated.
  207.     The header for CrunchMania files have to look like this:
  208.  
  209.     Type  Offset  Contents                   Function
  210.     LONG  0       "CrM!"/"CrM2"              To recongnize crunched files
  211.     WORD  4       Minimum Security Distance  To savely decrunch Data when
  212.                                              Source AND Dest is in the same Memoryblock
  213.     LONG  6       Original Len               Datalen before packing
  214.     LONG  10 ($a) Crunched Len               Datalen after packing without header
  215.  
  216.     So at $d is the data startadress.
  217.  
  218.     This header is NEEDED for decrunching!
  219.  
  220.   - PPDecrunch Bufferadr,Bufferend,Destinationadr
  221.     This command decrunch a PowerPacker crunched file.
  222.     PowerPacker need two buffers for decrunching.
  223.     Also the lenght of the buffer must be given!
  224.     Sorry, I can' t find my PowerPacker archive where the header is
  225.     descripted...
  226.     Like Imploder and CrunchMania PowerPacker also support his own
  227.     file header.
  228.     Please have a look at the PowerPacker(.library) documentation!
  229.  
  230. ===========================================================================
  231.                           LOCALE LIBRARY
  232. ===========================================================================
  233.  
  234. - LocaleLib:
  235.   - IsLocale
  236.     There is now way to check the ROM-Version of the Kickstart
  237.     for locale presents.
  238.     Both, OS 2.0 and 2.1 have the ROM-Version 37.175!
  239.     So the command returns if the locale.library exists on the system.
  240.  
  241.   - UseCatalog Catalogname
  242.     Opens the catalog for your programm.
  243.     Might by your program is called BB2Program the catalog should
  244.     be called BB2Program.catalog.
  245.     But you' re also able to open a catalog from an other program,
  246.     like Term.catalog.
  247.     The catalog files are in an IFF format!!!
  248.     Read the Commodore documentation of it...
  249.  
  250.   - FreeCatalog
  251.     Removes the catalog that you opened with UseCatalog.
  252.  
  253.   - GetLocaleStr #StringNumber,DefaultString$
  254.     Read a string from the catalog that you opened with UseCatalog.
  255.     You have to give a defaultstring to that command.
  256.     If the asked string could be find in the catalog the default
  257.     string will be returned.
  258.     Else the string from the catalog will be returned.
  259.  
  260. ===========================================================================
  261.                          PRINTER LIBRARY
  262. ===========================================================================
  263.  
  264. - PrtLib:
  265.   - PrtText String
  266.     The given String will be send to your printer.
  267.  
  268.   - Hardcopy Screen#,X,Y,Width,Height,PtrWidth,PrtHeight,Flags
  269.     Send an image to your printer.
  270.     
  271.   - PrtCommand Command,Para1,Para2,Para3,Para4
  272.     Sends a command to your printer.
  273.  
  274.   Note:
  275.   Please read the doc files for the PrtLib!!! (ABOVE!!!)
  276.  
  277. ===========================================================================
  278.                         REQUESTER LIBRARY
  279. ===========================================================================
  280.  
  281. - RequestLib:
  282.   - EasyRequest Result=EasyRequest([#Window,]title$,body$,gtext$)
  283.     A intuition system requester will be open.
  284.     Optional you could give a window number.
  285.     The title$ is the displayed string in the top.
  286.     body$ is the displayed text in the requester, a Chr$(10)
  287.     means a linefeed.
  288.     gtext$ is the text for the gadgets.
  289.     Every gadgettext will be added by a '|'.
  290.     Examples:
  291.     "Ok" will only display one gadget in the requester.
  292.     "Ok|Cancel" add two gadgets to it.
  293.     "1|2|3|4|5" five gadgets are displayed.
  294.  
  295.  
  296.