gettextinfo
raw OCR
Gets text mode video information.
Defined in header <conio.h>
Syntax
#include <conio.h>
void gettextinfo(struct textinfo *r);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ |
Remarks
gettextinfo fills in the text_info structure pointed to by r with the current text video information.
The text info structure is defined in conio.h as follows:
struct text_info {
| unsigned char winleft; | /left window coordinate */ |
| unsigned char wintop; | /top window coordinate */ |
| unsigned char winright; | /right window coordinate */ |
| unsigned char winbottom; | /bottom window coordinate */ |
| unsigned char attribute; | /text attribute */ |
| unsigned char normattr; | /normal attribute */ |
| unsigned char currmode; | /BW40, BW80, C40, C80, or C4350 |
| unsigned char screenheight; | /text screen's height */ |
| unsigned char screenwidth; | /text screen's width */ |
| unsigned char curx; | /x-coordinate in current window |
| unsigned char cury; }; | /y-coordinate in current window |
Return value
gettextinfo returns nothing; the results are returned in the structure pointed to by r.
See also
Example
Unclude <conio.h>
int main (void)
11
struct text_info ti;
gettextinfo(&ti) ;
cprintf ("window left %2d\r\n" ,ti.winleft);
cprintf ("window top %2d\r\n" ,ti.wintop) ;
cprintf ("window right %2d\r\n" ,ti.winright);
cprintf ("window bottom I2d\r\n" ,ti.winbottom);
cprintf ("attribute %2d\r\n" ,ti.attribute);
cprintf ("normal attribute %2d\r\n" ,ti.normattr);
cprintf ("current mode %2d\r\n" ,ti.currmode);
cprintf ("screen height %2d\r\n" ,ti.screenheight
cprintf ("screen width %2d\r\n" ,ti.screenwidth)
cprintf ("current x %2d\r\n" (ti.curx);
cprintf ("current y %2d\r\n" ,ti.cury);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/conio.h/gettextinfo/
· short form /3.1/gettextinfo/