home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / H_DBCS / VGAEMU.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  5KB  |  74 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /*static char *SCCSID = "@(#)vgaemu     1.0 92/05/01";*/
  13.  
  14. /**********************  START OF SPECIFICATIONS  ***********************/
  15. /*                                                                      */
  16. /*  SOURCE FILE NAME:    VGAEMU.H                                       */
  17. /*                                                                      */
  18. /*  DESCRIPTIVE NAME:    Video buffer, font buffer, work variables      */
  19. /*                       definitions for text mode emulation            */
  20. /*                       with VGA graphics mode for VGA version OS/2.   */
  21. /*                                                                      */
  22. /*  COPYRIGHT:           na                                             */
  23. /*                                                                      */
  24. /*  STATUS:              na                                             */
  25. /*                                                                      */
  26. /*  NOTES:               None                                           */
  27. /*                                                                      */
  28. /*  CHANGE HISTORY:                                                     */
  29. /*                      92/05/01    Initial coding (T.Sobue)            */
  30. /*                                                                      */
  31. /***********************  END OF SPECIFICATIONS  ************************/
  32.  
  33. #define MAX_ROWS        26              // maximun row count
  34. #define MAX_COLS        82              // maximun column count
  35. #define CELL_SIZE       4               // cell size (char/attr0/attr1/attr2)
  36.  
  37. #define FONT_HEIGHT     18              // font height
  38. #define FONT_HEIGHT2    19              // font height in font file
  39. #define FONT_HEIGHT2    19              // font height
  40. #define MAX_SBCS_FONT   256             // number of SBCS character font
  41.  
  42. #define MAX_PLANE       4               // max APA plane
  43. #define MAX_SAVE_CHAR   2               // max save char count for text cursor
  44.  
  45. typedef struct {
  46.     USHORT CodePage;                                        // code page
  47.     USHORT FontType0;                                       // font type 0
  48.     USHORT FontType1;                                       // font type 1
  49.     USHORT FontID;                                          // font ID
  50. } SBCS_FONT_TYPE;
  51.  
  52. struct VGASBCSFont {
  53.     SBCS_FONT_TYPE FontType;                                // font attr
  54.     UCHAR          FontImage[MAX_SBCS_FONT * FONT_HEIGHT2]; // font image
  55. };
  56.  
  57. struct VGATextEmulationBuffer {
  58.     UCHAR  shadow[MAX_ROWS][MAX_COLS][CELL_SIZE];           // text video buffer
  59.     ULONG  APAStart;                                        // APA start address
  60.     USHORT GridColor;                                       // grid draw color
  61.     USHORT CsrRow;                                          // cursor row position
  62.     USHORT CsrCol;                                          // cursor column position
  63.     USHORT CsrStart;                                        // cursor start line
  64.     USHORT CsrEnd;                                          // cursor end line
  65.     USHORT CsrWidth;                                        // cursor width
  66.     USHORT CsrAttrib;                                       // cursor attribute
  67.     USHORT CsrColor;                                        // cursor color
  68.     USHORT CsrScrWidth;                                     // screen width for cursor draw
  69.     USHORT SaveFlag;                                        // character save flag
  70.     UCHAR  SaveChar[MAX_SAVE_CHAR][MAX_PLANE][FONT_HEIGHT]; // character save area
  71.     struct VGASBCSFont BaseFont;                            // base SBCS font
  72.     struct VGASBCSFont ExtensionFont;                       // extension SBCS font
  73. };
  74.