#include <stdio.h>
#include <string.h>
#include <avr/io.h>
#include <cio.h>
#include "CursesDev.h"
Go to the source code of this file.
Functions | |
static int | WOpen (IOCB *pIOCB) __attribute__((section(".lowtext"))) |
static int | WClose (IOCB *pIOCB) __attribute__((section(".lowtext"))) |
static int | WGetC (IOCB *pIOCB) __attribute__((section(".lowtext"))) |
static int | WRead (IOCB *pIOCB, char *b, int n) __attribute__((section(".lowtext"))) |
static int | WPutC (IOCB *pIOCB, int c) __attribute__((section(".lowtext"))) |
static int | WWrite (IOCB *pIOCB, char *b, int n) __attribute__((section(".lowtext"))) |
static int | WStatus (IOCB *pIOCB, int m) __attribute__((section(".lowtext"))) |
static int | WXio (IOCB *pIOCB, int cmd, void *pP) __attribute__((section(".lowtext"))) |
static int | WInit (void) |
void | CursesDevInit (void) |
void | InitWParams (struct _Wparams *pWP, int xpos, int ypos, int xsize, int ysize, int fg, int bg, int mode) |
Definition in file CursesDev.c.
void CursesDevInit | ( | void | ) |
void InitWParams | ( | struct _Wparams * | pWP, | |
int | xpos, | |||
int | ypos, | |||
int | xsize, | |||
int | ysize, | |||
int | fg, | |||
int | bg, | |||
int | mode | |||
) |
Initialize Windows Parameter Block
pWP | pointer to windows parameter block to initialize | |
xpos | X coordinate for upper left hand corner of window | |
ypos | Y coordinate for upper left hand corner of window | |
xsize | Horizontal width of window (including border) | |
ysize | Vertical height of window (including border) | |
fg | Forground color (color of characters) | |
bg | Background color (color of screen) | |
mode | border=1, no border = 0 |
Definition at line 216 of file CursesDev.c.
References _Wparams::bg, _Wparams::fg, _Wparams::mode, _Wparams::xpos, _Wparams::xsize, _Wparams::ypos, and _Wparams::ysize.
static int WClose | ( | IOCB * | pIOCB | ) | [static] |
Destroy a channel to WINDOW
pIOCB | pointer to the IO Control Block to be destroyed |
Definition at line 82 of file CursesDev.c.
References _iocb::dev_name, and free.
Referenced by WInit().
static int WGetC | ( | IOCB * | pIOCB | ) | [static] |
Destroy a channel to WINDOW
pIOCB | pointer to a IO Control Block |
Definition at line 94 of file CursesDev.c.
Referenced by WInit().
static int WInit | ( | void | ) | [static] |
static int WOpen | ( | IOCB * | pIOCB | ) | [static] |
Opens up a channel to a window
This function opens up the channel, but does not actually create the window. The user must also call XIO using the CURSESDEV_XIO_CREATEWINDOW command.
The device name will be of the form W:<Window title>. The text string "Window title" will be displayed on the title line of the window.
This function is reached by using the CioOpen function.
pIOCB | pointer to the IO Control Block created for this channel |
Definition at line 38 of file CursesDev.c.
Referenced by WInit().
static int WPutC | ( | IOCB * | pIOCB, | |
int | c | |||
) | [static] |
Destroy a channel to WINDOW
pIOCB | pointer to a IO Control Block | |
c | character to output |
Definition at line 120 of file CursesDev.c.
References _iocb::p, and waddch().
Referenced by WInit().
static int WRead | ( | IOCB * | pIOCB, | |
char * | b, | |||
int | n | |||
) | [static] |
Destroy a channel to WINDOW
pIOCB | pointer to a IO Control Block | |
b | character pointer to buffer | |
n | number of spaces in buffer |
Definition at line 108 of file CursesDev.c.
Referenced by WInit().
static int WStatus | ( | IOCB * | pIOCB, | |
int | m | |||
) | [static] |
Destroy a channel to WINDOW
pIOCB | pointer to a IO Control Block | |
m | flag to determine type of status to return |
Definition at line 153 of file CursesDev.c.
Referenced by WInit().
static int WWrite | ( | IOCB * | pIOCB, | |
char * | b, | |||
int | n | |||
) | [static] |
Destroy a channel to WINDOW
pIOCB | pointer to a IO Control Block | |
b | character pointer to buffer | |
n | number of spaces in buffer |
Definition at line 136 of file CursesDev.c.
References _iocb::p, and waddch().
Referenced by WInit().
static int WXio | ( | IOCB * | pIOCB, | |
int | cmd, | |||
void * | pP | |||
) | [static] |
Destroy a channel to WINDOW
pIOCB | pointer to a IO Control Block | |
cmd | XIO command to be executed | |
pP | pointer to extra parameters that are device and command dependent |
Definition at line 167 of file CursesDev.c.
References _Wparams::bg, BG, CURSESDEV_XIO_CREATEWINDOW, _iocb::dev_name, _Wparams::fg, FG, _Wparams::mode, newwin(), _iocb::p, scrollok, WinSetTitle(), _Wparams::xpos, _Wparams::xsize, _Wparams::ypos, and _Wparams::ysize.
Referenced by WInit().