home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / canon / bj364 / bj364d1.exe / BJL.BIN / SOURCE.ZIP / BJSETUP.H < prev    next >
Text File  |  1996-04-19  |  10KB  |  221 lines

  1. // ========================================================================================
  2. //    BJ Printer Setup Utility Program
  3. //    DOS Base
  4. //    BJ Printer (such as the A250 and A5311)
  5. //
  6. //    1. Version 1.00 [August 18, '95]      : Tsukasa Jackie AIBA    : created new
  7. //    2. Version 1.01 [September 21, '95]   : Tsukasa Jackie AIBA    : added A240
  8. //    3. Version 1.02 [September 26, '95]   : Tsukasa Jackie AIBA    : added mono display
  9. //    4. Version 1.03 [March 8, '96]        : Tsukasa Jackie AIBA    : added MultiPASS C2500
  10. //    5. Version 1.10 [April 30, '96]       : Tsukasa Jackie AIBA    : Added BJC-80/240/4200/4550
  11. //
  12. //    Copyright Canon Information Systems, Inc. 1995, 1996
  13. // ========================================================================================
  14.  
  15. // ***********************************************************************
  16. //        define global macro
  17. // ***********************************************************************
  18.  
  19. #define        BJC4100                 1
  20. #define        BJC210                  2
  21. #define        BJC80                   3
  22. #define        BJC240                  4
  23. #define        BJC4200                 5
  24. #define        BJC4550                 6
  25. #define        MPC2500                20
  26. #define        MPC30                  21
  27. #define        B380IF                 22
  28.  
  29. #define        INI_FILE                "bjl.reg"
  30.  
  31. #define        SVGA_COLOR              2           // Special
  32. #define        BW_COLOR                1           // Black & White
  33. #define        CO_COLOR                0           // Color
  34.  
  35. #define        BK_CHAR                 0xB0        // 0xB2 : background pattern
  36. #define        BK_COLOR1               0x07        // 0x03 : background
  37. #define        BK_COLOR2               0x08        // 0x01 : shadow
  38. #define        BK_COLOR3               0x08        // 0x01 : shadow2
  39.  
  40. #define        WHITE_RED               0x47
  41. #define        RED_WHITE               0x74
  42. #define        WHITE_CYAN              0x37
  43. #define        CYAN_WHITE              0x73
  44. #define        WHITE_BLUE              0x17
  45. #define        BLUE_WHITE              0x71
  46. #define        WHITE_GRAY              0x87
  47. #define        GRAY_WHITE              0x78
  48. #define        GRAY_BLUE               0x38
  49. #define        BLUE_GRAY               0x83
  50. #define        GRAY_CYAN               0xB8
  51. #define        CYAN_GRAY               0x8B
  52. #define        GRAY_YELLOW             0xE8
  53. #define        YELLOW_GRAY             0x8E
  54. #define        BLACK_GRAY              0x80
  55. #define        GRAY_BLACK              0x08
  56. #define        BLACK_RED               0x40
  57. #define        RED_BLACK               0x04
  58. #define        BLACK_WHITE2            0xF0
  59. #define        WHITE2_BLACK            0x0F
  60. #define        GRAY_WHITE2             0xF8
  61. #define        WHITE2_GRAY             0x8F
  62. #define        WHITE_BLACK             0x07
  63. #define        BLACK_WHITE             0x70
  64. #define        BLACK_CYAN              0x30
  65. #define        CYAN_BLACK              0x03
  66. #define        BLACK_GREEN             0x20
  67. #define        GREEN_BLACK             0x02
  68. #define        BLACK_BLUE              0x10
  69. #define        BLUE_BLACK              0x01
  70. #define        BLACK_MAGENTA           0x50
  71. #define        MAGENTA_BLACK           0x05
  72. #define        BLACK_BROWN             0x60
  73. #define        BROWN_BLACK             0x06
  74. #define        BLACK_YELLOW            0xE0
  75. #define        YELLOW_BLACK            0x0E
  76. #define        GRAY_GREEN              0xA8
  77. #define        GREEN_GRAY              0x8A
  78. #define        WHITE_GREEN             0x27
  79. #define        GREEN_WHITE             0x72
  80. #define        BLACK_LCYAN             0xB0
  81. #define        LCYAN_BLACK             0x0B
  82.  
  83. #define        EXIT_KEY                201
  84. #define        STATUS_KEY              202
  85. #define        SEND_KEY                203
  86. #define        DEFAULT_KEY             204
  87. #define        ABOUT_KEY               205
  88. #define        HELP_USE_KEY            206
  89.  
  90. #define        PRINTER                  6
  91. #define        MODE                     7
  92. #define        OPEN                     8
  93. #define        SAVE                     9 
  94. #define        DELETE                  10
  95. #define        QUIT                    11
  96.  
  97. #define        HE1                     12
  98. #define        HE2                     13
  99. #define        HE3                     14
  100. #define        HE4                     15
  101. #define        HE5                     16
  102. #define        HE6                     17
  103. #define        HE7                     18
  104. #define        HE8                     19
  105. #define        HE9                     20
  106. #define        HE0                     21
  107.  
  108. #define        OKAY                    24
  109. #define        CANCEL                  25
  110.  
  111. #define        PNG                    100
  112. #define        P1A                    101
  113. #define        P2A                    102
  114. #define        P3A                    103
  115. #define        P4A                    104
  116. #define        P4B                    105
  117. #define        P4C                    106
  118. #define        P5A                    107
  119. #define        P5B                    108
  120. #define        P5C                    109
  121. #define        P5D                    110
  122. #define        P5E                    111
  123. #define        P6A                    112
  124. #define        P7A                    113
  125. #define        P8A                    150
  126. #define        P8B                    151
  127. #define        P9A                    115
  128. #define        P9B                    116
  129. #define        P9C                    117
  130. #define        P9D                    118
  131. #define        P9E                    119
  132. #define        P9F                    120
  133. #define        P0A                    121
  134. #define        P0B                    122
  135.  
  136. #define        PRINTER_STR            "6"
  137. #define        MODE_STR               "7"
  138. #define        OPEN_STR               "8"
  139. #define        SAVE_STR               "9"
  140. #define        DELETE_STR            "10"
  141. #define        QUIT_STR              "11"
  142.  
  143. #define        OKAY_STR              "24"
  144. #define        CANCEL_STR            "25"
  145.  
  146. #define        FILE_ERROR             -1                        // _open() error
  147.  
  148. #define        LPT1                    0                        // printer port LPT1:
  149. #define        LPT2                    1                        // printer port LPT2:
  150.  
  151. #define        _WRITE                 _PRINTER_WRITE            // Printer function desired service (output)
  152. #define        _INIT                  _PRINTER_INIT             // Printer function desired service (reset)
  153. #define        _STATUS                _PRINTER_STATUS           // Printer function desired service (status)
  154.  
  155. #define        PRINTER_TIME_OUT       0x0001                    // Printer timed out
  156. #define        PRINTER_NOT_USED1      0x0002                    // Not used
  157. #define        PRINTER_NOT_USED2      0x0004                    // Not used
  158. #define        PRINTER_I_O_ERROR      0x0008                    // I/O error
  159. #define        PRINTER_SELECTED       0x0010                    // Printer selected
  160. #define        PRINTER_OUT_OF_PAPER   0x0020                    // Out of paper
  161. #define        PRINTER_ACKNOWLEDGE    0x0040                    // Acknowledge
  162. #define        PRINTER_NOT_BUSY       0x0080                    // Printer not busy
  163. #define        PRINTER_NO_ERROR       0x0000                    // No error
  164.  
  165. #define        WIN4_MENU              51                        // Number of Window 4's menu
  166. #define        WIN4_MENU_W            20                        // Number of Window 4's menu
  167. #define        WIN4_BUFF              WIN4_MENU*WIN4_MENU_W     // Number of Window 4's data buffer
  168.  
  169. #define        PRINTER_NAME           22                        // choice[22][0] = printer name
  170.  
  171. // ***********************************************************************
  172.  
  173. int                    colors, a240, reduction, printerID, printer_old, mode;
  174.  
  175. static struct hv_struct hvd = { -1, -1, -1, -1, 0x07, bd_cua };
  176.  
  177. FILE                   *fp_help;
  178. sed_type               window_0,    window_1,    window_2,    window_3,    window_4,    window_5,    win_20,    win_21;    //
  179. unsigned char          choice[WIN4_MENU][WIN4_MENU_W];
  180. unsigned char          choice_old;
  181. unsigned int           port;
  182. sed_type               sedlist[4];
  183.  
  184. // ***********************************************************************
  185. // ---------------------------------------------------- bjl_dos.c
  186.  
  187. extern                  spc_func            (spc_Jump);
  188.  
  189. void                    StartCheck          (void);
  190. int                     ChoiceDataInitial   (void);
  191. int                     iniFileWrite        (void);
  192. int                     EndDisplay          (void);
  193. int                     InitError           (void);
  194.  
  195. int                     MenuBar0            (VOID *sdata, int idata);
  196. int                     MenuBar1            (VOID *sdata, int idata);
  197. int                     MenuBar2            (VOID *sdata, int idata);
  198. int                     MenuBar3            (VOID *sdata, int idata);
  199. int                     MenuBar4            (VOID *sdata, int idata);
  200. int                     MenuBar5            (VOID *sdata, int idata);
  201.  
  202. extern unsigned int     _bios_printer       (unsigned int, unsigned int, unsigned int);
  203.  
  204. void                    CommandOutput       (unsigned char *,unsigned int,unsigned int,unsigned int);
  205.  
  206. void                    Win2_PopUp          (sed_type sed);
  207. void                    Win2_PopUp_Printer  (sed_type sed);
  208. void                    Win3_PopUp          (sed_type sed);
  209. int                     ModeSet             (VOID *sdata, int idata);
  210. int                     PrinterSet          (VOID *sdata, int idata);
  211. int                     SelectDisplay       (VOID *sdata, int idata);
  212. int                     PrinterCheck        (int check);
  213. void                    Win2_Menu_Sub       (void);
  214. void                    Win2_Menu_Main      (void);
  215. int                     Win3_Menu_Printer   (void);
  216. int                     Win4_Menu           (int first);
  217. int                     ConfirmDelete       (char *file);
  218. void                    PrinterIDNumber     (void);
  219. void                    PrinterName         (void);
  220. void                    EndHelpFile         (void);
  221.