home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / win100b / wktsmt.h < prev    next >
Text File  |  1991-10-19  |  4KB  |  163 lines

  1. /*
  2.  * Smart terminal module header file
  3.  * 
  4.  * Copyright (c) 1990, 1991 by
  5.  * William S. Hall
  6.  * 3665 Benton Street  #66
  7.  * Santa Clara, CA 95051
  8.  *
  9.  */
  10.  
  11. #define MAXROWS        30
  12. #define MAXCOLUMNS    132
  13. #define MAXTEXTBUFFERS    5
  14.  
  15. typedef struct _SMT {
  16.     HWND hWnd;            /* smart term window handle */
  17.     HWND hMain;
  18.     HWND hStatic;
  19.     HBRUSH hbr;
  20.     HFONT hFont;
  21.     DWORD TextColor;
  22.     DWORD BGColor;
  23.     short MaxCols;
  24.     short MaxLines;
  25.     int MaxTextLines;
  26.     short CharWidth;
  27.     short CharHeight;
  28.     int BufSize;
  29.     WORD *lines[MAXTEXTBUFFERS * MAXROWS];
  30.     short TopScroll;
  31.     short BottomScroll;
  32.     short TopOrgLine, BottomOrgLine;
  33.     int scrollback;
  34.     int MaxScrollBack;
  35.     int scrollforward;
  36.     BOOL OriginMode;
  37.     short CurLine, CurLineOffset;
  38.     short CurSaveX, CurSaveY;
  39.     short SaveAttrib;
  40.     WORD *pVidBuffer;
  41.     POINT Pos;            /* caret position */
  42.     WORD Attrib;
  43.     BOOL SmoothScroll;
  44.     short ScrollUnits;
  45.     BOOL HaveToWrap;
  46.     BOOL Wrap;
  47.     BOOL ICToggle;
  48.     BOOL MarginBell;
  49.     RECT rect;        /* terminal window rectangle */
  50.     RECT vrect;        /* visible rectangle (static window) */
  51.     RECT srect;        /* scrolling rectangle */
  52.     char TabStops[MAXCOLUMNS];
  53.     LOGFONT lfnt;
  54.     int NFontWidth, NFontHeight;
  55.     int SFontWidth, SFontHeight;
  56.     BOOL NBold;
  57.     BOOL SBold;
  58.     BOOL Bold;
  59.     BOOL NSymbol;
  60.     BOOL SSymbol;
  61.     BOOL Symbol;
  62. } SMT;
  63. typedef SMT *PSMT;
  64.  
  65. typedef struct _SETFONT {
  66.     int nwidth;
  67.     int nheight;
  68.     int swidth;
  69.     int sheight;
  70.     char FaceName[LF_FACESIZE];
  71.  
  72. } SETFONT;
  73.  
  74. /* function declarations */
  75. long FAR PASCAL SmartTermWndProc(HWND, unsigned, WORD, LONG);
  76. BOOL NEAR RegisterTermWindow(HANDLE hInstance);
  77. HWND NEAR MakeAndShowTermWindow(HANDLE hInstance,HANDLE hPrevInstance,
  78.                 HWND hPar,
  79.                 PSMT pSmt, DWORD tcolor, DWORD bgcolor,
  80.                 short x,short y,short rows,short cols,
  81.                 BOOL Wrap,
  82.                 char *fontface,
  83.                 short nwidth, short nheight,
  84.                 short swidth, short sheight);
  85. void SmartTermWndCreate(HWND hWnd, LONG lParam);
  86. HFONT FAR SetFontData(PSMT pSmt);
  87.  
  88. #define VA_NORMAL    0
  89. #define VA_BOLD        1
  90. #define VA_UNDERLINE    2
  91. #define VA_BLINK    4
  92. #define VA_REVERSE    8
  93. #define VA_DIM        16
  94. #define VA_SELECT    32
  95. #define VA_MARK        64
  96. #define VA_SPECIAL    128
  97.  
  98. #define SMT_CARETFUNCTION    WM_USER
  99. #define SM_CREATECARET        1
  100. #define SM_DESTROYCARET        2
  101. #define SM_HIDECARET        3
  102. #define SM_SHOWCARET        4
  103. #define SM_GETCARETPOS        5
  104.  
  105. #define SMT_STRINGINPUT        WM_USER + 1
  106. #define SMT_SIZEPARENT        WM_USER + 2
  107.  
  108. #define SMT_COMMAND        WM_USER + 3
  109. #define SM_CURSORHOME        1
  110. #define SM_CURSORUP        2
  111. #define SM_CURSORDOWN        3
  112. #define SM_CURSORRIGHT        4
  113. #define SM_CURSORLEFT        5
  114. #define SM_CLRTOENDOFLINE    6
  115. #define SM_CLRTOENDOFPAGE    7
  116. #define SM_POSITIONCURSOR    8
  117. #define SM_REVERSEINDEX        9
  118. #define SM_INDEX        10
  119. #define SM_NEXTLINE        11
  120. #define SM_ALIGNSCREEN        12
  121. #define SM_SAVECURSOR        13
  122. #define SM_CLEARSCREEN        14
  123. #define SM_CLEARTOTOPOFPAGE    15
  124. #define SM_CLEARTOLINESTART    16
  125. #define SM_CLEARLINE        17
  126. #define SM_DELETECHAR        18
  127. #define SM_INSERTLINE        19
  128. #define SM_DELETELINE        20
  129. #define SM_SETTAB        21
  130. #define SM_VIDEOATTRIB        22
  131. #define SM_SCROLLREGION        23
  132. #define SM_FILLSCREEN        24
  133. #define SM_HSCROLL        25
  134. #define SM_SETCOLS        26
  135. #define SM_LEFTMARGIN        27
  136. #define SM_TAB            28
  137. #define SM_BKSP            29
  138. #define SM_SETCHARSET        30
  139. #define SM_ORIGINMODE        31
  140. #define SM_SETFONT        32
  141. #define SM_SCROLLBACK        33
  142. #define SM_PAGEBACK        34
  143. #define SM_HOMEEND        35
  144.  
  145. #define SMT_SHOWWINDOW        WM_USER + 4
  146.  
  147. #define SMT_SETATTRIBUTE    WM_USER + 5
  148. #define SMT_GETATTRIBUTE    WM_USER + 6
  149. #define SM_COLORCHANGE        1
  150. #define SM_AUTOWRAP        2
  151. #define SM_INSERT        3
  152. #define SM_MARGINBELL        4
  153. #define SM_SMOOTHSCROLL        5
  154. #define SM_SCREENSIZE        6
  155. #define SM_FONTFACE        7
  156. #define SM_NORMALFONT        8
  157. #define SM_SMALLFONT        9
  158. #define SM_SCROLLUNITS        10
  159.  
  160. #define SMT_COPYLINES        WM_USER + 7
  161. #define SMT_INVERT        WM_USER + 8
  162.  
  163.