home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / xmmx.zip / source / mmm_w95.h < prev    next >
C/C++ Source or Header  |  1996-12-14  |  2KB  |  83 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. #define BASE_CONFIG_FILE_NAME "mmm_base.cfg"
  12. //&<<&#include 
  13. #include <conio.h>
  14. #include <direct.h>
  15. #include <dos.h>
  16. #include <process.h>
  17. #include <windows.h>
  18. #include <wincon.h>
  19. #include "mmmx.h"
  20. #include "mmmgrep.h"
  21.  
  22. //&>>&7 0 7 11
  23.  
  24. //&<<&struct mmm_Screen;
  25. struct mmm_Screen{
  26.   int need;
  27.   SMALL_RECT Rect;
  28.   COORD Zero,Size;
  29.   COORD OldCur;
  30. #if 1
  31.   CHAR_INFO *scr;
  32. #else
  33.   char *scr;
  34. #endif
  35.   WORD *attrs; char **strs; int *lens;
  36.   WORD CCurAttr;
  37.   int HEIGHT;
  38. public:
  39.   mmm_Screen();
  40.   ~mmm_Screen();
  41.   void Init();
  42.   int GetH(){ return HEIGHT; }
  43.   int GetW(){ return Size.X; }
  44.   void DrawLine(char *Str, int PosY, char Attr,int slen);
  45.   int &Need(){ return need; }
  46.   void SetCursor(int x,int y,WORD attr);
  47.   void ClrCursor();
  48. };
  49. //&>>&12 0 12 D
  50. extern mmm_Screen mmm_screen;
  51.  
  52. //&<<&struct KeyRes;
  53. struct KeyRes{
  54.   BOOL keydown;
  55.   WORD scode;
  56.   DWORD ctrl;
  57. };
  58.  
  59. //&>>&0 0 0 0
  60. //&<<&struct mmm_KeyBoard;
  61. struct mmm_KeyBoard{
  62.     int bch,ech;
  63.     KeyRes *buf;
  64.     void InitKeyboardLayout();
  65.     char *InitDefaultAltCase();
  66. public:
  67.     char *AltCase;
  68.     char keys[4][128];
  69.     void SetACode(int n);
  70.     mmm_KeyBoard();
  71.     ~mmm_KeyBoard(){ delete buf; }
  72.     KeyRes &GetScan();
  73.     void GetEvent(int);
  74. };
  75. //&>>&7 0 7 14
  76. extern mmm_KeyBoard mmm_KBD;
  77. void MkScan(KeyRes &scancode);
  78. void _dos_setdrive(unsigned int n,unsigned int *t);
  79. void _dos_getdrive(unsigned int *res);
  80.  
  81. #endif
  82. //&>>&11 0 11 1B
  83.