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

  1. /**********************************************
  2. *   Linux include file for MMMX Editor        *
  3. *   Contains Linux  Spacific functions        *
  4. *    ( Tested on i386 RedHat Linux 3.0+ )     *
  5. ***********************************************/
  6.  
  7. #ifndef __INCLUDED_MMM_LINUX__
  8. #define __INCLUDED_MMM_LINUX__
  9.  
  10. #define EXECUTER_FILENAME "__mmm__.bat"
  11. //&<<&#include 
  12. #include "mmmx.h"
  13. #include "mmmgrep.h"
  14. #include <sys/types.h>
  15. #include <unistd.h>
  16. #include <errno.h>
  17. #include <fcntl.h>
  18. #include <linux/tty.h>
  19. #include <linux/kd.h>
  20. #include <linux/vt.h>
  21. #include <signal.h>
  22. #include <termios.h>       /* for tcget(set)attr */
  23. #include <sys/ioctl.h>
  24. #include <dirent.h>
  25. #include <sys/stat.h>
  26. //&>>&1 0 1 11
  27.  
  28. void DrawLine(char *Str, int PosY, char Attr,int slen);
  29.  
  30. //&<<&class mmm_Screen {
  31. class mmm_Screen {
  32.    char *v_screen;
  33.    int need;
  34.    int WIDTH,HEIGHT;
  35.    int curatr;
  36.    int OldScr,OldCl;            /// only for compatibility ?
  37.    char *OldCurs,OldAttr;       /// only for compatibility ?
  38.    void setatr(int atr);
  39. public:
  40.    mmm_Screen();
  41.    ~mmm_Screen();
  42.    void SetCursor(int x,int y,int attr);
  43.    void ClrCursor();
  44.    void Line(char *str,int len,int x,int y);
  45.    int &Need(){ return need; }
  46.    int GetH(){ return HEIGHT; }
  47.    int GetW(){ return WIDTH; }
  48.    void View(){};
  49.    };
  50. //&>>&1 0 1 B
  51. extern mmm_Screen mmm_screen;
  52.  
  53. //&<<&class mmm_KeyBoard{
  54. class mmm_KeyBoard{
  55.     int ed_gflag;
  56.     struct termios t1;
  57.     int om;
  58.     void InitKeyboardLayout();
  59.     char *InitDefaultAltCase();
  60. public:
  61.     char *AltCase;
  62.     char keys[4][108];
  63.     int LastScanCode;
  64.     void SetACode(int n);
  65.     mmm_KeyBoard();
  66.     ~mmm_KeyBoard();
  67.     int GetScan();
  68.     friend void SegmentViolationHandler(int a);
  69.     void ChangeConsole(int num);
  70. };
  71. //&>>&C 0 C 11
  72. extern mmm_KeyBoard mmm_KBD;
  73.  
  74. void MkScan(int scancode);
  75.  
  76. #endif
  77. //&>>&12 0 12 1B
  78.