BCC - FEMA

Fórum de Ciências da Computação da FEMA
 
InícioFAQBuscarRegistrar-seLogin
Compartilhe | 
 

 Biblioteca <conio2.h>

Ver o tópico anterior Ver o tópico seguinte Ir em baixo 
AutorMensagem
Admin
Admin


Número de Mensagens: 3
Data de inscrição: 09/03/2008

MensagemAssunto: Biblioteca <conio2.h>   Sex Mar 14, 2008 10:17 am

Biblioteca conio2.h

Licença: Freeware

Site de Acesso: 4shared.com

Arrow baixar

Você pode colocar usar este código:
Código:
/** @file conio2.h
* A conio implementation for Mingw/Dev-C++.
*
*
* Offered for use in the public domain without any warranty.
*/
#ifndef _CONIO2_H_
#define _CONIO2_H_
#include
#ifdef UNICODE
#include // we need wchar_t
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* Colors which you can use in your application.
*/
typedef enum
{
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 */
} COLORS;
[url=http://bccfema.ingoo.us/]/*@{*/[/url]
/**
* This defines enables you to use all MinGW conio.h functions without
* underscore.
*/
#define cgets _cgets
#define cprintf _cprintf
#define cputs _cputs
#define cscanf _cscanf
#ifdef UNICODE
#define cgetws _cgetws
#define getwch _getwch
#define getwche _getwche
#define putwch _putwch
#define ungetwch _ungetwch
#define cputws _cputws
#define cwprintf _cwprintf
#define cwscanf _cwscanf
#endif
[url=http://bccfema.ingoo.us/]/*@}*/[/url]
/**
* 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.
*/
#ifndef _CONIO_NO_GETTEXT_
#define gettext _conio_gettext
#endif
#define ScreenClear clrscr
/**
* @anchor cursortypes
* @name Cursor types
* Predefined cursor types. */
[url=http://bccfema.ingoo.us/]/*@{*/[/url]
#define _NOCURSOR 0 /**< no cursor */
#define _SOLIDCURSOR 100 /**< cursor filling whole cell */
#define _NORMALCURSOR 20 /**< cursor filling 20 percent of cell height */
[url=http://bccfema.ingoo.us/]/*@}*/[/url]
/**
* Structure holding information about screen.
* @see gettextinfo
* @see inittextinfo
*/
struct text_info {
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. If you don't
called the inittextinfo on the
beginning of the application, this always
will be black background and light gray
foreground */
unsigned char screenwidth; /**< screen width */
unsigned char screenheight; /**< screen height */
};
/**
* Structure used by gettext/puttext.
* @see _conio_gettext
* @see puttext
*/
struct char_info {
#ifdef UNICODE
wchar_t letter; /**< character value */
#else
char letter; /**< character value */
#endif
unsigned short attr; /**< attribute value */
};
/**
* Returns information of the screen.
* @see text_info
*/
void gettextinfo (struct text_info * info);
/**
* Call this if you need real value of normattr attribute in the text_info
* structure.
* @see text_info
*/
void inittextinfo (void);
/**
* Clears rest of the line from cursor position to the end of line without
* moving the cursor.
*/
void clreol (void);
/**
* Clears whole screen.
*/
void clrscr (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 delline (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 insline (void);
/**
* 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 char_info
* @see puttext
* @param left Left coordinate of the rectangle, inclusive, starting from 1.
* @param top Top coordinate of the rectangle, inclusive, starting from 1.
* @param right Right coordinate of the rectangle, inclusive, starting from 1.
* @param bottom Bottom coordinate of the rectangle, inclusive, starting from 1.
* @param buf You have to pass buffer of size
* (right - left + 1) * (bottom - top + 1) * sizeof(char_info).
*/
void _conio_gettext (int left, int top, int right, int bottom,
struct char_info * buf);
/**
* Puts text back to the screen.
* @see char_info
* @see _conio_gettext
* @param left Left coordinate of the rectangle, inclusive, starting from 1.
* @param top Top coordinate of the rectangle, inclusive, starting from 1.
* @param right Right coordinate of the rectangle, inclusive, starting from 1.
* @param bottom Bottom coordinate of the rectangle, inclusive, starting from 1.
* @param buf You have to pass buffer of size
* (right - left + 1) * (bottom - top + 1) * sizeof(char_info).
*/
void puttext (int left, int top, int right, int bottom, struct char_info * buf);
/**
* Copies text.
* @param left Left coordinate of the rectangle, inclusive, starting from 1.
* @param top Top coordinate of the rectangle, inclusive, starting from 1.
* @param right Right coordinate of the rectangle, inclusive, starting from 1.
* @param bottom Bottom coordinate of the rectangle, inclusive, starting from 1.
* @param destleft Left coordinate of the destination rectangle.
* @param desttop Top coordinate of the destination rectangle.
*/
void movetext (int left, int top, int right, int bottom, int destleft,
int desttop);
/**
* Moves cursor to the specified position.
* @param x horizontal position
* @param y vertical position
*/
void gotoxy(int x, int y);
/**
* Puts string at the specified position.
* @param x horizontal position
* @param y vertical position
* @param str string
*/
void cputsxy (int x, int y, char * str);
/**
* Puts char at the specified position.
* @param x horizontal position
* @param y vertical position
* @param ch char
*/
void putchxy (int x, int y, char ch);
/**
* Sets the cursor type.
* @see @ref cursortypes
* @param type cursor type, under Win32 it is height of the cursor in percents
*/
void _setcursortype (int type);
/**
* Sets attribute of text.
* @param _attr new text attribute
*/
void textattr (int _attr);
/**
* Sets text attribute back to value it had after program start.
* It uses text_info's normattr value.
* @see text_info
*/
void normvideo (void);
/**
* Sets text background color.
* @see COLORS
* @param color new background color
*/
void textbackground (int color);
/**
* Sets text foreground color.
* @see COLORS
* @param color new foreground color
*/
void textcolor (int color);
/**
* Reads the cursor X position.
* @returns cursor X position
*/
int wherex (void);
/**
* Reads the cursor Y position.
* @returns cursor Y position
*/
int wherey (void);
/**
* Reads password. This function behaves like cgets.
*
* @see cgets
* @param prompt prompt which will be displayed to user
* @param 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 [url=http://bccfema.ingoo.us/file://\\0]\\0[/url].
*/
char * getpass (const char * prompt, char * str);
/**
* Makes foreground colors light.
* If the current foreground color is less than DARKGRAY adds
* 8 to the its value making dark colors light.
* @see COLORS
* @see lowvideo
*/
void highvideo (void);
/**
* Makes foreground colors dark.
* If the current foreground color is higher than LIGHTGRAY substracts
* 8 from its value making light colors dark.
* @see COLORS
* @see highvideo
*/
void lowvideo (void);
[url=http://bccfema.ingoo.us/]/*@{*/[/url]
/** Link with libmsvcr70.a or libmsvcr70d.a or libmsvcr71.a or libmsvcr71d.a
* if you want any of these functions. */
#ifdef UNICODE
_CRTIMP wchar_t * __cdecl _cgetws(wchar_t *);
_CRTIMP unsigned short __cdecl _getwch(void);
_CRTIMP unsigned short __cdecl _getwche(void);
_CRTIMP unsigned short __cdecl _putwch(wchar_t);
_CRTIMP unsigned short __cdecl _ungetwch(unsigned short);
_CRTIMP int __cdecl _cputws(const wchar_t *);
_CRTIMP int __cdecl _cwprintf(const wchar_t *, ...);
_CRTIMP int __cdecl _cwscanf(const wchar_t *, ...);
#endif
[url=http://bccfema.ingoo.us/]/*@}*/[/url]
#ifdef __cplusplus
}
#endif
#endif /* _CONIO2_H_ */

Então, é só salvar como arquivo Header no seu Devccp com o nome conio2.h...

Roteiro Instalação Conio2.h:
- Faça o download da bilioteca para a sua máquina
- Carregue o DevC++
- Acesse o menu "Tools" ou "Ferramentas"
- Acesse a opção "Package Manager"
- Acesse a opção "Package"
- Acesse a opção "Install"
- Selecione o arquivo de instalação que foi baixado "conio-2.0-1mol"
- Instale
Depois de intalado:
- Acesse o menu "Tools" ou "Ferramentas"
- Acesse a opção "Compiler Options" ou "Opções do Compilador"
- Acesse a opção "Package"
- Na aba compiler: (conforme figura em anexo)
- selecione (marque) a caixa de opções "add these commands..." ou "adicionar os comandos.."
- digite na caixa texto abaixo desta opção o seguinte comando: "-lconio" (veja figura em anexo)

- Finalize tudo

Para utilizar a biblioteca acrescente a linha #include , no incio de cada programa


Última edição por Admin em Dom Mar 23, 2008 10:08 am, editado 2 vez(es) (Razão : DOWNLOAD)
Voltar ao Topo Ir em baixo
Ver perfil do usuário http://bccfema.ingoo.us
 

Biblioteca <conio2.h>

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo 
Página 1 de 1

 Tópicos similares

-
» Masturbação amador na biblioteca
» Jovem masturbasse na biblioteca-XXX
» Configurando o Code Blocks para biblioteca Gl GLut GLU
» Biblioteca do Vaticano disponibiliza 256 manuscritos online
» Cavaco Silva assinala 500 anos da Biblioteca Geral da Universidade de Coimbra no Facebook

Permissão deste fórum:Você não pode responder aos tópicos neste fórum
BCC - FEMA :: Programação :: Linguagem C / C++ :: Download-