home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 August / PCWorld_2001-08_cd.bin / Software / Topware / fprint / fpdk400.exe / include / fpapi.h < prev    next >
C/C++ Source or Header  |  2000-07-18  |  3KB  |  112 lines

  1. //
  2. //    fpapi.h
  3. //
  4. //        FinePrint API main header file
  5. //
  6. //        Copyright (c) 1999-2000 FinePrint Software
  7. //        All Rights Reserved.
  8. //
  9. #ifndef inc_fpapi
  10. #define inc_fpapi
  11. #include "fpdefs.h"
  12.  
  13. // opaque handles into FinePrint API
  14. typedef DWORD HFinePrint;        // session handle from fpOpen
  15. typedef DWORD HFpStat;            // stationery handle from fpCreateStationery
  16.  
  17. // job count structure
  18. struct FpJobCount {
  19.     DWORD    cJobsPending;        // number of print jobs queued in the Dispatcher
  20.     DWORD    cJobsDeferred;        // number of print jobs queued in the FinePrint UI
  21.     DWORD    cJobsCumulative;    // cumulative number of print jobs handled
  22.                                 // since Dispatcher startup
  23. };
  24.  
  25. // job status structure
  26. struct FpJobStatus {
  27.     BOOL    fAppTerm;            // =1 if the printing app has terminated
  28.     BOOL    fJobStarted;        // =1 if the print job started (StartDoc)
  29.     BOOL    fJobCompleted;        // =1 if the print job completed (EndDoc)
  30.     BOOL    fTimeout;            // =1 if we timed out waiting for the job
  31. };
  32.  
  33. // function prototypes
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. void __stdcall        fpClearCallbackDll (HFinePrint hfp);
  39. FpError __stdcall    fpClose (HFinePrint hfp, BOOL fDeleteJobs);
  40. FpError __stdcall    fpCloseStationery (HFinePrint hfp, HFpStat hStat);
  41. FpError __stdcall    fpCreateStationery (
  42.                         HFinePrint    hfp,
  43.                         LPCTSTR        pszStat,
  44.                         HFpStat        *phStat);
  45. FpError __stdcall    fpDeleteStationery (HFinePrint hfp, LPCTSTR pszStat);
  46. FpError __stdcall    fpDisplayDialog (HFinePrint hfp, DWORD *pdwDlg);
  47. FpError __stdcall    fpGetFinePrinterName (
  48.                         int        iPrinter,
  49.                         LPTSTR    pszFinePrinter);
  50. FpError __stdcall    fpGetJobCount (HFinePrint hfp, FpJobCount *pjc);
  51. DWORD __stdcall        fpGetLayoutAttr (
  52.                         HFinePrint    hfp,
  53.                         eLayoutItem    li,
  54.                         void        *pAttr,
  55.                         DWORD        cbAttr);
  56. DWORD __stdcall        fpGetStationeryAttr (
  57.                         HFinePrint        hfp,
  58.                         HFpStat            hStat,
  59.                         eStatItem        si,
  60.                         eStatItemAttr    sia,
  61.                         void            *pAttr,
  62.                         DWORD            cbAttr);
  63. DWORD __stdcall        fpGetVersion ();
  64. DWORD __stdcall        fpGetVersionReq ();
  65. FpError __stdcall    fpOpen (LPCTSTR pszFinePrinter, HFinePrint *phfp);
  66. FpError __stdcall    fpOpenStationery (
  67.                         HFinePrint    hfp,
  68.                         LPCTSTR        pszStat,
  69.                         HFpStat        *phStat);
  70. FpError __stdcall    fpPrintAllJobs (
  71.                         HFinePrint    hfp,
  72.                         LPCTSTR        pszOutputFile,
  73.                         BOOL        fShowProgress,
  74.                         BOOL        fDeleteJobsWhenDone);
  75. FpError __stdcall    fpSaveSettings (HFinePrint hfp);
  76. FpError __stdcall    fpSetCallbackDll (
  77.                         HFinePrint    hfp,
  78.                         LPCTSTR        pszCallbackDll,
  79.                         DWORD        *pcEntryPoints);
  80. FpError __stdcall    fpSetDeferAll (HFinePrint hfp, BOOL fDeferAll);
  81. FpError __stdcall    fpSetDestPrinterAttr (
  82.                         HFinePrint    hfp,
  83.                         LPCTSTR        pszDestPrinter,
  84.                         LPCTSTR        pszSetting,
  85.                         DWORD        dwValue);
  86. FpError __stdcall    fpSetLayoutAttr (
  87.                         HFinePrint    hfp,
  88.                         eLayoutItem    li,
  89.                         const void    *pAttr);
  90. FpError __stdcall    fpSetShowDlg (
  91.                         HFinePrint    hfp,
  92.                         DWORD        dwShowDlg);
  93. FpError __stdcall    fpSetStationeryAttr (
  94.                         HFinePrint        hfp,
  95.                         HFpStat            hStat,
  96.                         eStatItem        si,
  97.                         eStatItemAttr    sia,
  98.                         const void        *pAttr);
  99. FpError __stdcall    fpWaitForJob (
  100.                         HFinePrint            hfp,
  101.                         const FpJobCount    *pjcOrig,
  102.                         HANDLE                hProcess,
  103.                         DWORD                cSecTimeoutStart,
  104.                         DWORD                cSecTimeoutPrint,
  105.                         FpJobStatus            *pjs);
  106.  
  107. #ifdef __cplusplus
  108. };
  109. #endif
  110.  
  111. #endif
  112.