home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / mmm_pkg.zip / mmm_w95.h < prev    next >
C/C++ Source or Header  |  1996-12-05  |  2KB  |  82 lines

  1. /**********************************************
  2. *   WIN95 include file for MMMX Editor        *
  3. *   Contains WIN95/NT specific functions      *
  4. *     ( NT is untested )                      *
  5. ***********************************************/
  6.  
  7. #ifndef __INCLUDED_MMM_W95__
  8. #define __INCLUDED_MMM_W95__
  9.  
  10. #define EXECUTER_FILENAME "__mmm__.bat"
  11. //&<<&#include 
  12. #include <conio.h>
  13. #include <direct.h>
  14. #include <dos.h>
  15. #include <process.h>
  16. #include <windows.h>
  17. #include <wincon.h>
  18. #include "mmmx.h"
  19. #include "mmmgrep.h"
  20.  
  21. //&>>&7 0 7 11
  22.  
  23. //&<<&struct mmm_Screen;
  24. struct mmm_Screen{
  25.   int need;
  26.   SMALL_RECT Rect;
  27.   COORD Zero,Size;
  28.   COORD OldCur;
  29. #if 1
  30.   CHAR_INFO *scr;
  31. #else
  32.   char *scr;
  33. #endif
  34.   WORD *attrs; char **strs; int *lens;
  35.   WORD CCurAttr;
  36.   int HEIGHT;
  37. public:
  38.   mmm_Screen();
  39.   ~mmm_Screen();
  40.   void Init();
  41.   int GetH(){ return HEIGHT; }
  42.   int GetW(){ return Size.X; }
  43.   void DrawLine(char *Str, int PosY, char Attr,int slen);
  44.   int &Need(){ return need; }
  45.   void SetCursor(int x,int y,WORD attr);
  46.   void ClrCursor();
  47. };
  48. //&>>&12 0 12 D
  49. extern mmm_Screen mmm_screen;
  50.  
  51. //&<<&struct KeyRes;
  52. struct KeyRes{
  53.   BOOL keydown;
  54.   WORD scode;
  55.   DWORD ctrl;
  56. };
  57.  
  58. //&>>&0 0 0 0
  59. //&<<&struct mmm_KeyBoard;
  60. struct mmm_KeyBoard{
  61.     int bch,ech;
  62.     KeyRes *buf;
  63.     void InitKeyboardLayout();
  64.     char *InitDefaultAltCase();
  65. public:
  66.     char *AltCase;
  67.     char keys[4][108];
  68.     void SetACode(int n);
  69.     mmm_KeyBoard();
  70.     ~mmm_KeyBoard(){ delete buf; }
  71.     KeyRes &GetScan();
  72.     void GetEvent(int);
  73. };
  74. //&>>&A 0 A 11
  75. extern mmm_KeyBoard mmm_KBD;
  76. void MkScan(KeyRes &scancode);
  77. void _dos_setdrive(unsigned int n,unsigned int *t);
  78. void _dos_getdrive(unsigned int *res);
  79.  
  80. #endif
  81. //&>>&C 0 C 1B
  82.