unix_curses.h File Reference

This is really a .c file, not a .h file. It defines a wrapper around curses that is used by cursorwindow.c. This wrapper is what is needed not the raw curses calls. Thus a windows implementation of this file which only implements the wrapped curses functions -- by wrapping windows drawing calls is fine. More...

#include <cxxtls/cursorwindow.h>
#include <cxxtls/sequence_map.h>
#include <string>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <algorithm>
#include <cxxtls/file.h>
#include <cxxtls/user.h>
#include <cxxtls/machine.h>
#include <iostream>
#include <fstream>
#include <portable_io.h>
#include <cxxtls/cursesinterface.h>
#include <curses.h>
#include <term.h>
#include <termios.h>
Include dependency graph for unix_curses.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  cxxtls
 

The namespace that encapsulates most of the functionality in the CXX toolkit.


namespace  cxxtls::CursesInterface
 

A namespace that wraps the many functions that interact with the curses terminal used by the program.


Defines

#define NOMACROS

Functions

void alarm_handler (int signum)
void beepCursesTerminal ()
int clear ()
void closeCursesTerminal ()
void create_key_sequences_map ()
void getCursesCursor (int *row, int *col)
void getCursesScreenSize (int *row, int *col)
void insert_key_sequence (char const *s, int code)
void make_xterm_terminfo_file (FileName const &dir)
 Create the ascii form of the curses terminfo database for later use by the TIC program to create the binary form. If it exists, don't re-create it. If it does not exist, create it and warn the user to look in the documentation. Sadly, linux had to have a different set of key bindings from all other unixes...
void map_init_key_strings ()
int mapCursesKey (int curses_key)
void moveCursesCursor (int row, int col)
void openCursesTerminal ()
void paintCharString (long c, int count, int a, int row, int col)
void paintCharString (char const *r, int count, int a, int row, int col)
int read_key_char ()
int read_mapped_key (CursorWindow &)
void refreshCursesWindow ()
void setCursesAttributes (int a)
static void sigwinch_handler (int)

Variables

bool screen_resize_occurred = 0
sigset_t winch_blocker

Detailed Description

This is really a .c file, not a .h file. It defines a wrapper around curses that is used by cursorwindow.c. This wrapper is what is needed not the raw curses calls. Thus a windows implementation of this file which only implements the wrapped curses functions -- by wrapping windows drawing calls is fine.

Note that this file defines its own keyboard reading routine because the getch() function provided by curses doesn't consistently work across all situations where you do something like the following:

   rlogin machine1
   rlogin machine2
   rlogin machine3
   run a curses program
   and press a function key

In the above scenario, it is likely that your function key will be lost -- that is broken up into the individual characters that comprise the sequence.

The 'read_mapped_key' function solves this problem by exotic ioctl and termios magic.

Note that a user's XTerm resources can screw up function key bindings and there is nothing you can do to fix the problem automatically. We can only hope that the isn't doing such things....

Definition in file unix_curses.h.


Define Documentation

#define NOMACROS

Definition at line 81 of file unix_curses.h.


Function Documentation

int clear (  ) 

Here is the caller graph for this function:

Generated on Wed Feb 29 22:51:34 2012 for CXXUtilities by  doxygen 1.6.3