home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / textmode.zip / readme.32t < prev    next >
Text File  |  1995-07-12  |  5KB  |  130 lines

  1. OS/2 32bit Textmode APIs (Vio/Kbd/Mou)  -   Beta
  2.  
  3. July 12, 1995
  4.  
  5. OS/2 for PowerPC provides 32 bit interfaces to the textmode functions
  6. (Vio, Kbd, Mou).  This library provides matching interfaces which
  7. can be run on OS/2 PC (v2.x and Warp).
  8.  
  9. These interfaces provide for a common interface to the textmode of
  10. OS/2 on both the PC and PowerPC.  These interfaces do not provide
  11. functions not in OS/2 PC.  It gives a 32 bit interface to the existing
  12. function.
  13.  
  14. Contents:
  15. =========
  16.  
  17. The package contains the following files.  This can be installed on
  18. any OS/2 2.x system.  The header files overlay header files for the
  19. existing 16 bit console support and are included using os2.h.  You
  20. should put them in a different directory, or backup the 16 bit
  21. versions.
  22.  
  23. This diskette contains the package in both compressed and expanded
  24. form.  The compressed version in in text32.zip.
  25.  
  26.     readme.t32   -  This file
  27.     bsesub.h     -  Header file describing console APIs
  28.     pmavio.h     -  Header file for AVIO window procedure
  29.     vio.doc      -  Documentation of Vio calls
  30.     kbd.doc      -  Documentation of Kbd calls
  31.     mou.doc      -  Documentation of Mou calls
  32.     os2char2.dll -  OS/2 2.x implementation of console APIs
  33.     os2char2.lib -  Implib for new console APIs
  34.     sysvals.c    -  AVIO testcase
  35.     sysvals.mak  -  Makefile for AVIO testcase
  36.     sysvals.def  -  Def file for AVIO testcase
  37.     32test.ico   -  Icon for 32 bit textmode
  38.  
  39.  
  40. Installation:
  41. ============
  42.  
  43. The header files overlay header files for the existing 16 bit
  44. console support, and you should put them in a different directory,
  45. or backup the 16 bit versions.  For these files to be found by
  46. os2.h, they must be in a directory pointed to by INCLUDE, or the
  47. -i option of the compiler.
  48.  
  49. os2char2.dll is a thunk layer to convert the new console APIs to the
  50. existing 16 bit APIs.  In general, all restrictions of the existing
  51. console support still exist when using os2char2.
  52.  
  53. os2char2.lib should be placed in your library directory, and must
  54. be specified in the compiler or link phases.
  55.  
  56. os2char2.dll must be placed in your libpath.  This is a separate
  57. DLL so that the existing DLLs do not need to be modified.
  58.  
  59. Limitations:
  60. ============
  61.  
  62. This code is simply a set of "thunks" from the new 32 bit APIs to
  63. the old 16 bit APIs.  All of the limitations of the old APIs is
  64. still present, and most of the new function is not available.
  65.  
  66. * KbdGetConsole will only return keyboard events, not mouse events.
  67.   The existing OS/2 2.1 methods must be used to get both key and
  68.   mouse events.
  69.  
  70. * The unicode functions are implemented for Kbd but do not support
  71.   DBCS codepages.  The VIO unicode functions are not implemented.
  72.  
  73. Examples:
  74. =========
  75.  
  76. In most cases, the 32 bit textmode APIs are the same as the 16 bit
  77. OS/2 1.x textmode APIs.  The following general changes have been
  78. made.  Most of these require changes to the declarations of the
  79. operands, and not of the API call itself.
  80.  
  81. 1. Most USHORT operands have been changed to ULONG.  This is
  82.    normally only a problem for return data fields.
  83. 2. All fields have been placed on natural alignment (4 byte
  84.    boundary for 4 byte fields).  The length of some structures
  85.    has changed.  This causes problems if a size is hard coded
  86.    instead of using sizeof.
  87. 3. Several names have been expanded.  For instance VioScrollDn is
  88.    now VioScrollDown.  There are defines for the old names.
  89. 4. The return code is APIRET which is an unsigned long (it was an
  90.    unsigned short).
  91.  
  92. Using 16 bit API:
  93.     USHORT  row, column, rc;       /* Variables were short */
  94.     HVIO    hvio;
  95.     BYTE    cell[2];
  96.     VIOCONFIGINFO  config;
  97.  
  98.     hvio = 0;
  99.     rc = VioGetCurPos (&row, &column, hvio);
  100.     rc = VioScrollDn (row, 0, row+3, column, 1, &cell, hvio);
  101.     config.cb = sizeof(VIOCONFIGINFO); /* All config items */
  102.     rc = VioGetConfig(0, &config, hvio);
  103.  
  104. Using 32 bit API:
  105.     ULONG   row, column, rc;           /* Change to ULONG */
  106.     HVIO    hvio;
  107.     BYTE    cell[2];
  108.     VIOCONFIGINFO  config;
  109.  
  110.     hvio = 0;
  111.     rc = VioGetCurPos (&row, &column, hvio);
  112.     rc = VioScrollDown (row, 0, row+3, column, 1, &cell, hvio);
  113.     config.cb = sizeof(VIOCONFIGINFO); /* Size of structure changed */
  114.     rc = VioGetConfig(0, &config, hvio);
  115.  
  116. Shipping the DLL
  117. ================
  118.  
  119. You may reship os2char2.dll but you may not use the name os2char2.dll.
  120. Any other name may be used.  This is done to prevent version conflicts
  121. when this dll is shipped with the system.
  122.  
  123. Feedback:
  124. =========
  125.  
  126. This is a preliminary version of this support, and is available
  127. "asis".  You can send comments concerning this package to the OS/2
  128. Developer Forum 2 (OS2DF2) on CompuServe.  This forum is only
  129. available to OS/2 Developer Connection members.
  130.