home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / 32text / readme.t32 < prev    next >
Encoding:
Text File  |  1994-01-19  |  4.4 KB  |  121 lines

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