home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / utils / iodprint.idl < prev    next >
Text File  |  1997-04-02  |  5KB  |  161 lines

  1. //#====START_GENERATED_PROLOG======================================
  2. //#
  3. //#
  4. //#   COMPONENT_NAME: odpagepart
  5. //#
  6. //#   CLASSES: none
  7. //#
  8. //#   ORIGINS: 82,27
  9. //#
  10. //#
  11. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12. //#   All Rights Reserved
  13. //#   Licensed Materials - Property of IBM
  14. //#   US Government Users Restricted Rights - Use, duplication or
  15. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. //#       
  17. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. //#   OR PERFORMANCE OF THIS SOFTWARE.
  24. //#
  25. //#====END_GENERATED_PROLOG========================================
  26. //#
  27. /* @(#) 1.8 com/src/samples/utils/iodprint.idl, odpagepart, od96os2, odos29712d 3/7/97 13:08:51 [3/21/97 17:48:15] */
  28.  
  29.  
  30. #ifndef _IODPRINT_
  31. #define _IODPRINT_
  32.  
  33. #ifndef _EXTENSN_
  34. #include <extensn.idl>
  35. #endif
  36.  
  37.  
  38.  
  39. //======================================================================
  40. // Classes defined in this interface
  41. //======================================================================
  42.  
  43. interface  ODPrintExtension;
  44.  
  45.  
  46. //======================================================================
  47. // Classes used by this interface
  48. //======================================================================
  49.  
  50. interface ODPart;
  51. interface ODFrame;
  52. interface ODFacet;
  53. interface ODShape;
  54.  
  55.  
  56. //======================================================================
  57. // Type definitions used by this interface
  58. //======================================================================
  59.  
  60. typedef unsigned long HMODULE;
  61. typedef somToken      PRNINFO;
  62.  
  63. #ifdef _PLATFORM_OS2_
  64. typedef somToken      PPRNLISTINFO;
  65. typedef somToken      PHCINFO;
  66. #endif
  67.  
  68. #ifdef _PLATFORM_WIN32_
  69. typedef somToken      LPPRINTDLG;
  70. #endif
  71.  
  72.  
  73. //======================================================================
  74. // ODPrintExtension Implementation
  75. //======================================================================
  76.  
  77. interface ODPrintExtension : ODExtension
  78. {
  79.    ODBoolean PrinterSetup(in HWND hwnd);
  80.    ODBoolean PrintDocument(in ODFrame frame, in ODEventData event);
  81.    ODBoolean HandlePrinting(in ODFrame frame, in char *pszQueueName);
  82.    ODBoolean DisplayPrintDialog(in PRNINFO *pPi, in HWND hwnd, in char *pszTitle);
  83.    ODBoolean PrintPages(in ODFrame frame, in PRNINFO *pPI);
  84.    ODFacet BeginPrinting(in ODFrame rootFrame, in PRNINFO *pPI);
  85.    ODBoolean PrintPage(in ODFacet prFacet, in PRNINFO *pPI, in ODBoolean lastPage);
  86.    void EndPrinting(in ODFacet prFacet);
  87.    ODShape SetPrintingFrameShape(in ODFrame frame);
  88.    void QuerySelectedPrinter(in char *pszQueueName, in ODBoolean displayErrors);
  89.    HWND GetPrintProgressHWND();
  90.    short GetCurrentPrinterForm();
  91.    char* GetCurrentPrinterQueuePhysicalName();
  92.    char* GetCurrentPrinterQueueDisplayName();
  93.    long GetCurrentPrinterPageWidth();
  94.    long GetCurrentPrinterPageHeight();
  95.    long GetCurrentPrinterClipWidth();
  96.    long GetCurrentPrinterClipHeight();
  97.    HMODULE GetResourceHandle();
  98.    void Initialize(in ODPart base, in char *pszQueueName);
  99.  
  100.  
  101. #ifdef __SOMIDL__
  102.   implementation
  103.   {
  104.         dllname = "IODUtils.dll";
  105.         functionprefix = ODPrintExtension;
  106.         majorversion = 1;
  107.         minorversion = 0;
  108.  
  109.         override:
  110.                 somInit,
  111.                 somUninit;
  112.  
  113.         releaseorder:
  114.                 PrinterSetup,
  115.                 PrintDocument,
  116.                 HandlePrinting,
  117.                 DisplayPrintDialog,
  118.                 PrintPages,
  119.                 BeginPrinting,
  120.                 PrintPage,
  121.                 EndPrinting,
  122.                 SetPrintingFrameShape,
  123.                 QuerySelectedPrinter,
  124.                 GetPrintProgressHWND,
  125.                 GetCurrentPrinterForm,
  126.                 GetCurrentPrinterQueuePhysicalName,
  127.                 GetCurrentPrinterQueueDisplayName,
  128.                 GetCurrentPrinterPageWidth,
  129.                 GetCurrentPrinterPageHeight,
  130.                 GetCurrentPrinterClipWidth,
  131.                 GetCurrentPrinterClipHeight,
  132.                 GetResourceHandle,
  133.                 Initialize;
  134.  
  135.         //=======================================
  136.         // ODPrintExtension Instance Variables
  137.         //=======================================
  138.  
  139. #ifdef _PLATFORM_OS2_
  140.                 PPRNLISTINFO       ppliInfo;       // Printer Stuff
  141.                 PHCINFO            pForms;         // Forms supported by printer
  142.                 long               cForms;         // Number of Forms supported
  143. #endif
  144.  
  145. #ifdef _PLATFORM_WIN32_
  146.                 LPPRINTDLG         printDlg;       // Printer Stuff
  147. #endif
  148.  
  149.                 HWND               PrintHWND;      // Print progress dialog handle
  150.  
  151.   }; // end implementation section
  152.  
  153. #endif //__SOMIDL__
  154.  
  155. }; // end interface definition
  156.  
  157.  
  158. #endif //_IODPRINT_
  159.  
  160.  
  161.