CONIO: Namespace List

CONIO 2.1
  • Main Page
  • Namespaces
  • Data Structures
  • Files
  • Namespace List
  • Namespace Members
Namespace List
Here is a list of all documented namespaces with brief descriptions:
\ N conio This namespace contain all C++ specific things
Generated on Fri Dec 6 2013 20:09:46 for CONIO by doxygen 1.8.2


CONIO: conio Namespace Reference

  • Data Structures
  • Files
  • Namespace List
  • Namespace Members
Functions
conio Namespace Reference

This namespace contain all C++ specific things. More...

Functions

_Setxy | setxy (int x, int y)
setxy manipulator
_Setclr | setclr (int color)
setclr manipulator
_Setbk | setbk (int color)
setbk manipulator
_Setattr | setattr (int _attr)
setattr manipulator
_Setcrsrtype | setcrsrtype (int type)
setcrsrtype manipulator
std::ostream & | clrscr (std::ostream &o)
clrscr manipulator
std::ostream & | clreol (std::ostream &o)
clreol manipulator
std::ostream & | highvideo (std::ostream &o)
highvideo manipulator
std::ostream & | lowvideo (std::ostream &o)
lowvideo manipulator
std::ostream & | normvideo (std::ostream &o)
normvideo manipulator
std::ostream & | delline (std::ostream &o)
delline manipulator
std::ostream & | insline (std::ostream &o)
insline manipulator

Detailed Description

This namespace contain all C++ specific things.

Function Documentation

std::ostream& conio::clreol ( std::ostream & o )
inline

clreol manipulator

See Also
clreol(void)
std::ostream& conio::clrscr ( std::ostream & o )
inline

clrscr manipulator

See Also
clrscr(void)
std::ostream& conio::delline ( std::ostream & o )
inline

delline manipulator

See Also
delline(void)
std::ostream& conio::highvideo ( std::ostream & o )
inline

highvideo manipulator

See Also
highvideo(void)
std::ostream& conio::insline ( std::ostream & o )
inline

insline manipulator

See Also
insline(void)
std::ostream& conio::lowvideo ( std::ostream & o )
inline

lowvideo manipulator

See Also
lowvideo(void)
std::ostream& conio::normvideo ( std::ostream & o )
inline

normvideo manipulator

See Also
normvideo(void)
_Setattr conio::setattr ( int _attr )
inline

setattr manipulator

See Also
textattr
_Setbk conio::setbk ( int color )
inline

setbk manipulator

See Also
textbackground
_Setclr conio::setclr ( int color )
inline

setclr manipulator

See Also
textcolor
_Setcrsrtype conio::setcrsrtype ( int type )
inline

setcrsrtype manipulator

See Also
_setcursortype
_Setxy conio::setxy | ( | int | x,
 |  | int | y
 | ) |  |
inline

setxy manipulator

See Also
gotoxy


CONIO: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
Here is a list of all documented namespace members with links to the namespaces they belong to:
  • clreol() : conio
  • clrscr() : conio
  • delline() : conio
  • highvideo() : conio
  • insline() : conio
  • lowvideo() : conio
  • normvideo() : conio
  • setattr() : conio
  • setbk() : conio
  • setclr() : conio
  • setcrsrtype() : conio
  • setxy() : conio


CONIO: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • clreol() : conio
  • clrscr() : conio
  • delline() : conio
  • highvideo() : conio
  • insline() : conio
  • lowvideo() : conio
  • normvideo() : conio
  • setattr() : conio
  • setbk() : conio
  • setclr() : conio
  • setcrsrtype() : conio
  • setxy() : conio


CONIO: Data Structures

  • Data Fields
Data Structures
Here are the data structures with brief descriptions:
o N conio | This namespace contain all C++ specific things
o C char_info | Structure used by gettext/puttext
\ C text_info | Structure holding information about screen


CONIO: char_info Struct Reference

  • Data Fields
Data Fields
char_info Struct Reference

Structure used by gettext/puttext. More...

#include <conio2.h>

Data Fields

char | letter
character value
unsigned short | attr
attribute value

Detailed Description

Structure used by gettext/puttext.

See Also
_conio_gettext
puttext
The documentation for this struct was generated from the following file:
  • conio2.h


CONIO: text_info Struct Reference

  • Data Fields
Data Fields
text_info Struct Reference

Structure holding information about screen. More...

#include <conio2.h>

Data Fields

unsigned char | curx
cursor coordinate x
unsigned char | cury
cursor coordinate y
unsigned short | attribute
current text attribute
unsigned short | normattr
original value of text attribute after start of the application.
unsigned char | screenwidth
screen width
unsigned char | screenheight
screen height

Detailed Description

Structure holding information about screen.

See Also
gettextinfo
inittextinfo

Field Documentation

unsigned short text_info::normattr

original value of text attribute after start of the application.

If you don't called the inittextinfo on the beginning of the application, this always will be black background and light gray foreground

The documentation for this struct was generated from the following file:
  • conio2.h


CONIO: Data Fields

  • Data Fields
  • All
  • Variables
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
  • attr : char_info
  • attribute : text_info
  • curx : text_info
  • cury : text_info
  • letter : char_info
  • normattr : text_info
  • screenheight : text_info
  • screenwidth : text_info


CONIO: Data Fields - Variables

  • Data Fields
  • All
  • Variables
  • attr : char_info
  • attribute : text_info
  • curx : text_info
  • cury : text_info
  • letter : char_info
  • normattr : text_info
  • screenheight : text_info
  • screenwidth : text_info


CONIO: File List

  • File List
  • Globals
File List
Here is a list of all documented files with brief descriptions:
o * conio2.h | A conio implementation for Mingw/Dev-C++
\ * constream | A constream implementation for Mingw/Dev-C++


CONIO: conio2.h File Reference

  • File List
  • Globals
  • c:
  • prgrming
  • conio2
  • conio2
Data Structures | Macros | Enumerations | Functions
conio2.h File Reference

A conio implementation for Mingw/Dev-C++. More...

#include <conio.h>

Data Structures

struct | text_info
Structure holding information about screen. More...
struct | char_info
Structure used by gettext/puttext. More...

Macros

#define | gettext _conio_gettext
Define alias for _conio_gettext.
#define | cgets _cgets
This defines enables you to use all MinGW conio.h functions without underscore.
Cursor types

Predefined cursor types.

#define | _NOCURSOR 0
no cursor
#define | _SOLIDCURSOR 100
cursor filling whole cell
#define | _NORMALCURSOR 20
cursor filling 20 percent of cell height

Enumerations

enum COLORS {
BLACK, BLUE, GREEN, CYAN,
RED, MAGENTA, BROWN, LIGHTGRAY,
DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN,
LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE
}
Colors which you can use in your application. More...

Functions

void | gettextinfo (struct text_info *info)
Returns information of the screen.
void | inittextinfo (void)
Call this if you need real value of normattr attribute in the text_info structure.
void | clreol (void)
Clears rest of the line from cursor position to the end of line without moving the cursor.
void | clrscr (void)
Clears whole screen.
void | delline (void)
Delete the current line (line on which is cursor) and then moves all lines below one line up.
void | insline (void)
Insert blank line at the cursor position.
void | _conio_gettext (int left, int top, int right, int bottom, struct char_info *buf)
Gets text from the screen.
void | puttext (int left, int top, int right, int bottom, struct char_info *buf)
Puts text back to the screen.
void | movetext (int left, int top, int right, int bottom, int destleft, int desttop)
Copies text.
void | gotoxy (int x, int y)
Moves cursor to the specified position.
void | cputsxy (int x, int y, char *str)
Puts string at the specified position.
void | putchxy (int x, int y, char ch)
Puts char at the specified position.
void | _setcursortype (int type)
Sets the cursor type.
void | textattr (int _attr)
Sets attribute of text.
void | normvideo (void)
Sets text attribute back to value it had after program start.
void | textbackground (int color)
Sets text background color.
void | textcolor (int color)
Sets text foreground color.
int | wherex (void)
Reads the cursor X position.
int | wherey (void)
Reads the cursor Y position.
char * | getpass (const char *prompt, char *str)
Reads password.
void | highvideo (void)
Makes foreground colors light.
void | lowvideo (void)
Makes foreground colors dark.
void | delay (int ms)
Pauses program execution for a given time.
void | switchbackground (int color)
Replaces background color in the whole window.
void | flashbackground (int color, int ms)
Changes background color for a given time and then it restores it back.
void | clearkeybuf (void)
Clears the keyboard buffer.

Detailed Description

A conio implementation for Mingw/Dev-C++.

Written by: Hongli Lai hongl.nosp@m.i@te.nosp@m.lekab.nosp@m.el.n.nosp@m.l tkorrovi tkorr.nosp@m.ovi@.nosp@m.altav.nosp@m.ista.nosp@m..net on 2002/02/26. Andrew Westcott ajwes.nosp@m.tco@.nosp@m.users.nosp@m..sou.nosp@m.rcefo.nosp@m.rge..nosp@m.net Michal Molhanec micha.nosp@m.l@mo.nosp@m.lhane.nosp@m.c.ne.nosp@m.t

Offered for use in the public domain without any warranty.

Macro Definition Documentation

#define gettext _conio_gettext

Define alias for _conio_gettext.

If you want to use gettext function from some other library (e.g. GNU gettext) you have to define _CONIO_NO_GETTEXT_ so you won't get name conflict.

Enumeration Type Documentation

enum COLORS

Colors which you can use in your application.

Enumerator:
BLACK

black color

BLUE

blue color

GREEN

green color

CYAN

cyan color

RED

red color

MAGENTA

magenta color

BROWN

brown color

LIGHTGRAY

light gray color

DARKGRAY

dark gray color

LIGHTBLUE

light blue color

LIGHTGREEN

light green color

LIGHTCYAN

light cyan color

LIGHTRED

light red color

LIGHTMAGENTA

light magenta color

YELLOW

yellow color

WHITE

white color

Function Documentation

void _conio_gettext | ( | int | left,
 |  | int | top,
 |  | int | right,
 |  | int | bottom,
 |  | struct char_info * | buf
 | ) |  |

Gets text from the screen.

If you haven't defined _CONIO_NO_GETTEXT_ prior to including conio2.h you can use this function also under the gettext name.

See Also
char_info
puttext
Parameters
left | Left coordinate of the rectangle, inclusive, starting from 1.
top | Top coordinate of the rectangle, inclusive, starting from 1.
right | Right coordinate of the rectangle, inclusive, starting from 1.
bottom | Bottom coordinate of the rectangle, inclusive, starting from 1.
buf | You have to pass buffer of size (right - left + 1) * (bottom - top + 1) * sizeof(char_info).
void _setcursortype ( int type )

Sets the cursor type.

See Also
cursortypes
Parameters
type cursor type, under Win32 it is height of the cursor in percents
void clearkeybuf ( void )

Clears the keyboard buffer.

To see it in effect run conio_test and try to press a key during the 'Flashing...' phase.

void cputsxy | ( | int | x,
 |  | int | y,
 |  | char * | str
 | ) |  |

Puts string at the specified position.

Parameters
x | horizontal position
y | vertical position
str | string
void delay ( int ms )

Pauses program execution for a given time.

See Also
switchbackground
Parameters
ms miliseconds
void delline ( void )

Delete the current line (line on which is cursor) and then moves all lines below one line up.

Lines below the line are moved one line up.

void flashbackground | ( | int | color,
 |  | int | ms
 | ) |  |

Changes background color for a given time and then it restores it back.

You can use it for visual bell. Does not modify textbackground().

See Also
switchbackground
delay
Parameters
color | background color
ms | miliseconds
char* getpass | ( | const char * | prompt,
 |  | char * | str
 | ) |  |

Reads password.

This function behaves like cgets.

See Also
cgets
Parameters
prompt | prompt which will be displayed to user
str | string for the password. str[0] have to contain length of the str - 3
Returns
&str[2], the password will be stored in str beginning at str[2], in str[1] will be length of the string without \0, at str[2 + str[1]] will be \0.
void gettextinfo ( struct text_info * info )

Returns information of the screen.

See Also
text_info
void gotoxy | ( | int | x,
 |  | int | y
 | ) |  |

Moves cursor to the specified position.

Parameters
x | horizontal position
y | vertical position
void highvideo ( void )

Makes foreground colors light.

If the current foreground color is less than DARKGRAY adds 8 to the its value making dark colors light.

See Also
COLORS
lowvideo
void inittextinfo ( void )

Call this if you need real value of normattr attribute in the text_info structure.

See Also
text_info
void insline ( void )

Insert blank line at the cursor position.

Original content of the line and content of lines below moves one line down. The last line is deleted.

void lowvideo ( void )

Makes foreground colors dark.

If the current foreground color is higher than LIGHTGRAY substracts 8 from its value making light colors dark.

See Also
COLORS
highvideo
void movetext | ( | int | left,
 |  | int | top,
 |  | int | right,
 |  | int | bottom,
 |  | int | destleft,
 |  | int | desttop
 | ) |  |

Copies text.

Parameters
left | Left coordinate of the rectangle, inclusive, starting from 1.
top | Top coordinate of the rectangle, inclusive, starting from 1.
right | Right coordinate of the rectangle, inclusive, starting from 1.
bottom | Bottom coordinate of the rectangle, inclusive, starting from 1.
destleft | Left coordinate of the destination rectangle.
desttop | Top coordinate of the destination rectangle.
void normvideo ( void )

Sets text attribute back to value it had after program start.

It uses text_info's normattr value.

See Also
text_info
void putchxy | ( | int | x,
 |  | int | y,
 |  | char | ch
 | ) |  |

Puts char at the specified position.

Parameters
x | horizontal position
y | vertical position
ch | char
void puttext | ( | int | left,
 |  | int | top,
 |  | int | right,
 |  | int | bottom,
 |  | struct char_info * | buf
 | ) |  |

Puts text back to the screen.

See Also
char_info
_conio_gettext
Parameters
left | Left coordinate of the rectangle, inclusive, starting from 1.
top | Top coordinate of the rectangle, inclusive, starting from 1.
right | Right coordinate of the rectangle, inclusive, starting from 1.
bottom | Bottom coordinate of the rectangle, inclusive, starting from 1.
buf | You have to pass buffer of size (right - left + 1) * (bottom - top + 1) * sizeof(char_info).
void switchbackground ( int color )

Replaces background color in the whole window.

The text however is left intact. Does not modify textbackground().

See Also
flashbackground
Parameters
color background color
void textattr ( int _attr )

Sets attribute of text.

Parameters
_attr new text attribute
void textbackground ( int color )

Sets text background color.

See Also
COLORS
Parameters
color new background color
void textcolor ( int color )

Sets text foreground color.

See Also
COLORS
Parameters
color new foreground color
int wherex ( void )

Reads the cursor X position.

Returns
cursor X position
int wherey ( void )

Reads the cursor Y position.

Returns
cursor Y position


CONIO: constream File Reference

  • File List
  • Globals
  • c:
  • prgrming
  • conio2
  • conio2
Namespaces | Functions
constream File Reference

A constream implementation for Mingw/Dev-C++. More...

#include <iostream>
#include "conio2.h"

Namespaces

namespace conio
This namespace contain all C++ specific things.

Functions

_Setxy | conio::setxy (int x, int y)
setxy manipulator
_Setclr | conio::setclr (int color)
setclr manipulator
_Setbk | conio::setbk (int color)
setbk manipulator
_Setattr | conio::setattr (int _attr)
setattr manipulator
_Setcrsrtype | conio::setcrsrtype (int type)
setcrsrtype manipulator
std::ostream & | conio::clrscr (std::ostream &o)
clrscr manipulator
std::ostream & | conio::clreol (std::ostream &o)
clreol manipulator
std::ostream & | conio::highvideo (std::ostream &o)
highvideo manipulator
std::ostream & | conio::lowvideo (std::ostream &o)
lowvideo manipulator
std::ostream & | conio::normvideo (std::ostream &o)
normvideo manipulator
std::ostream & | conio::delline (std::ostream &o)
delline manipulator
std::ostream & | conio::insline (std::ostream &o)
insline manipulator

Detailed Description

A constream implementation for Mingw/Dev-C++.

Warning
There is not implemented constream class, only manipulators for iostream, so use them on cin/cout.
Author
Michal Molhanec micha.nosp@m.l@mo.nosp@m.lhane.nosp@m.c.ne.nosp@m.t

Offered for use in the public domain without any warranty.


CONIO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Enumerations
  • Enumerator
  • Macros
  • _
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • w
  • y
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- _ -

  • _conio_gettext() : conio2.h
  • _NOCURSOR : conio2.h
  • _NORMALCURSOR : conio2.h
  • _setcursortype() : conio2.h
  • _SOLIDCURSOR : conio2.h

- b -

  • BLACK : conio2.h
  • BLUE : conio2.h
  • BROWN : conio2.h

- c -

  • cgets : conio2.h
  • clearkeybuf() : conio2.h
  • clreol() : conio2.h
  • clrscr() : conio2.h
  • COLORS : conio2.h
  • cputsxy() : conio2.h
  • CYAN : conio2.h

- d -

  • DARKGRAY : conio2.h
  • delay() : conio2.h
  • delline() : conio2.h

- f -

  • flashbackground() : conio2.h

- g -

  • getpass() : conio2.h
  • gettext : conio2.h
  • gettextinfo() : conio2.h
  • gotoxy() : conio2.h
  • GREEN : conio2.h

- h -

  • highvideo() : conio2.h

- i -

  • inittextinfo() : conio2.h
  • insline() : conio2.h

- l -

  • LIGHTBLUE : conio2.h
  • LIGHTCYAN : conio2.h
  • LIGHTGRAY : conio2.h
  • LIGHTGREEN : conio2.h
  • LIGHTMAGENTA : conio2.h
  • LIGHTRED : conio2.h
  • lowvideo() : conio2.h

- m -

  • MAGENTA : conio2.h
  • movetext() : conio2.h

- n -

  • normvideo() : conio2.h

- p -

  • putchxy() : conio2.h
  • puttext() : conio2.h

- r -

  • RED : conio2.h

- s -

  • switchbackground() : conio2.h

- t -

  • textattr() : conio2.h
  • textbackground() : conio2.h
  • textcolor() : conio2.h

- w -

  • wherex() : conio2.h
  • wherey() : conio2.h
  • WHITE : conio2.h

- y -

  • YELLOW : conio2.h


CONIO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Enumerations
  • Enumerator
  • Macros
  • _conio_gettext() : conio2.h
  • _setcursortype() : conio2.h
  • clearkeybuf() : conio2.h
  • clreol() : conio2.h
  • clrscr() : conio2.h
  • cputsxy() : conio2.h
  • delay() : conio2.h
  • delline() : conio2.h
  • flashbackground() : conio2.h
  • getpass() : conio2.h
  • gettextinfo() : conio2.h
  • gotoxy() : conio2.h
  • highvideo() : conio2.h
  • inittextinfo() : conio2.h
  • insline() : conio2.h
  • lowvideo() : conio2.h
  • movetext() : conio2.h
  • normvideo() : conio2.h
  • putchxy() : conio2.h
  • puttext() : conio2.h
  • switchbackground() : conio2.h
  • textattr() : conio2.h
  • textbackground() : conio2.h
  • textcolor() : conio2.h
  • wherex() : conio2.h
  • wherey() : conio2.h


CONIO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Enumerations
  • Enumerator
  • Macros
  • COLORS : conio2.h


CONIO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Enumerations
  • Enumerator
  • Macros
  • BLACK : conio2.h
  • BLUE : conio2.h
  • BROWN : conio2.h
  • CYAN : conio2.h
  • DARKGRAY : conio2.h
  • GREEN : conio2.h
  • LIGHTBLUE : conio2.h
  • LIGHTCYAN : conio2.h
  • LIGHTGRAY : conio2.h
  • LIGHTGREEN : conio2.h
  • LIGHTMAGENTA : conio2.h
  • LIGHTRED : conio2.h
  • MAGENTA : conio2.h
  • RED : conio2.h
  • WHITE : conio2.h
  • YELLOW : conio2.h


CONIO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Enumerations
  • Enumerator
  • Macros
  • _NOCURSOR : conio2.h
  • _NORMALCURSOR : conio2.h
  • _SOLIDCURSOR : conio2.h
  • cgets : conio2.h
  • gettext : conio2.h


CONIO: Data Structure Index

  • Data Fields
Data Structure Index
C | T
C
T
char_info text_info
C | T


CONIO: c: Directory Reference

  • c:
c: Directory Reference

Directories

directory prgrming


CONIO: prgrming Directory Reference

  • c:
  • prgrming
prgrming Directory Reference

Directories

directory conio2


CONIO: conio2 Directory Reference

  • c:
  • prgrming
  • conio2
conio2 Directory Reference

Directories

directory conio2


CONIO: conio2 Directory Reference

  • c:
  • prgrming
  • conio2
  • conio2
conio2 Directory Reference

Files

file | conio2.h
A conio implementation for Mingw/Dev-C++.
file | constream
A constream implementation for Mingw/Dev-C++.
file | titledoc


CONIO: Main Page

CONIO Documentation

Borland-style CONIO implementation for MinGW/Dev-C++. Homepage

Send any improvements to this library to me, I'll do new release of this devpak.

For the example of use, look at example in the Examples\conio\conio_test.c subdirectory of your Dev-C++ directory. It's simple:

  1. Include conio2.h.
  2. Link with libconio.a (add -lconio parameter to linker).

Functions defined already in MinGW's conio.h

conio2.h automatically includes conio.h. It also provides several #defines so you can use all these functions without underscores.

char* _cgets (char*);
int _cprintf (const char*, ...);
int _cputs (const char*);
int _cscanf (char*, ...);
int _getch (void);
int _getche (void);
int _kbhit (void);
int _putch (int);
int _ungetch (int);
int getch (void);
int getche (void);
int kbhit (void);
int putch (int);
int ungetch (int);

About the makefile: The makefile is written for gcc and GNU make. The "all" target passes -m32 option to the gcc. The "all64" target passes -m64 option to the gcc.

Author
Hongli Lai hongl.nosp@m.i@te.nosp@m.lekab.nosp@m.el.n.nosp@m.l
tkorrovi tkorr.nosp@m.ovi@.nosp@m.altav.nosp@m.ista.nosp@m..net on 2002/02/26.
Andrew Westcott ajwes.nosp@m.tco@.nosp@m.users.nosp@m..sou.nosp@m.rcefo.nosp@m.rge..nosp@m.net
Michal Molhanec micha.nosp@m.l@mo.nosp@m.lhane.nosp@m.c.ne.nosp@m.t
Version
2.1
 Changes in 2.1 (2013-12-05 MM):
     clreol() fix (clear also the color attribute)
     new functions clearkeybuf(), delay(), switchbackground()
       and flashbackground()
     gettext & puttext code simplified
     64bit targets in the makefile

 Changes in 2.0:
    make library aware of console window size
    make library aware of console window position in console buffer
    added support for UNICODE Win32 API
    added constream-like manipulators for C++
    implemented highvideo(), insline(), lowvideo(), movetext(), normvideo(),
      gettextinfo(), getpass(), cputsxy(), putchxy(), inittextinfo()
    fixed delline()