plugins/ncurses/old.c File Reference

#include "ekg2-config.h"
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include "compat/strlcpy.h"
#include <ekg/bindings.h>
#include <ekg/debug.h>
#include <ekg/windows.h>
#include <ekg/xmalloc.h>
#include <ekg/commands.h>
#include <ekg/sessions.h>
#include <ekg/plugins.h>
#include <ekg/recode.h>
#include <ekg/stuff.h>
#include <ekg/themes.h>
#include <ekg/userlist.h>
#include <ekg/vars.h>
#include <ekg/queries.h>
#include "old.h"
#include "completion.h"
#include "bindings.h"
#include "contacts.h"
#include "mouse.h"

Defines

#define __fgcolor(x, y, z)
#define __bgcolor(x, y)   case x: bgcolor = y; break;
#define __add_format(x, z)
#define __add_format_emp(x, y)   __add_format(x, y ? (char *) empty_format : NULL)
#define __add_format_dup(x, y, z)   __add_format(x, y ? xstrdup(z) : NULL)
#define __add_format_emp_st(x, y)   case y: __add_format(x, (char *) empty_format) break
#define __add_format_emp_st(x, y)   case y: __add_format("query_" x, (char *) empty_format); break
#define __init_bg(x, y)
#define GET_TIME(tv)   (gettimeofday(&tv, (struct timezone *)NULL))
#define DIF_TIME(t1, t2)
#define lastlog_edge   WF_BOTTOM
#define lastlog_margin   1
#define lastlog_frame   WF_TOP
#define lastlog_wrap   0

Functions

int ncurses_password_input (void *data, va_list ap)
int ncurses_lineslen ()
static int ncurses_typingsend (const int len, const int first)
int ncurses_typing (int type, void *data)
void ncurses_window_gone (window_t *w)
int ncurses_session_disconnect_handler (void *data, va_list ap)
void ncurses_update_real_prompt (ncurses_window_t *n)
static int color_pair (int fg, int bg)
static int color_pair_bold (int fg, int bold, int bg)
void ncurses_commit ()
void ncurses_main_window_mouse_handler (int x, int y, int mouse_state)
int ncurses_backlog_add (window_t *w, fstring_t *str)
int ncurses_backlog_split (window_t *w, int full, int removed)
void ncurses_resize ()
static int fstring_attr2ncurses_attr (short chattr)
static CHAR_T ncurses_fixchar (CHAR_T ch, int *attr)
int cmd_mark (const char *name, const char **params, session_t *session, const char *target, int quiet)
static void draw_thin_red_line (window_t *w, int y)
void ncurses_redraw (window_t *w)
void ncurses_clear (window_t *w, int full)
void ncurses_refresh ()
static void update_header ()
static int window_printat (WINDOW *w, int x, int y, const char *format, struct format_data *data, int fgcolor, int bold, int bgcolor)
static char * ncurses_window_activity (void)
void update_statusbar (int commit)
int ncurses_window_kill (window_t *w)
void ncurses_init ()
void ncurses_deinit ()
void ncurses_line_adjust ()
void ncurses_lines_adjust ()
void ncurses_input_update ()
static void print_char (WINDOW *w, int y, int x, CHAR_T ch, int attr)
static int ekg_getch (int meta, unsigned int *ch)
int ncurses_watch_winch (int type, int fd, watch_type_t watch, void *data)
void ncurses_redraw_input (unsigned int ch)
int ncurses_watch_stdin (int type, int fd, watch_type_t watch, void *data)
void header_statusbar_resize (const char *dummy)
void changed_backlog_size (const char *var)
static int ncurses_ui_window_lastlog (window_t *lastlog_w, window_t *w)
int ncurses_lastlog_update (window_t *w)
void ncurses_lastlog_new (window_t *w)
int ncurses_window_new (window_t *w)

Variables

static WINDOW * ncurses_status = NULL
static WINDOW * ncurses_header = NULL
WINDOW * ncurses_input = NULL
WINDOW * ncurses_contacts = NULL
CHAR_T * ncurses_history [HISTORY_MAX]
int ncurses_history_index = 0
CHAR_T * ncurses_line = NULL
CHAR_T * ncurses_yanked = NULL
CHAR_T ** ncurses_lines = NULL
int ncurses_line_start = 0
int ncurses_line_index = 0
int ncurses_lines_start = 0
int ncurses_lines_index = 0
int ncurses_input_size = 1
int ncurses_debug = 0
int ncurses_noecho = 0
static int ncurses_screen_height
static int ncurses_screen_width
static struct termios old_tio
int winch_pipe [2]
int have_winch_pipe = 0
int ncurses_typing_mod = 0
static int ncurses_typing_count = 0
window_tncurses_typing_win = NULL
static time_t ncurses_typing_time = 0
static char ncurses_funnything [5] = "|/-\\"
CHAR_T * ncurses_passbuf
volatile int sigint_count
static int ncurses_redraw_input_already_exec = 0

Define Documentation

#define __add_format ( x,
 ) 

Value:

{ \
                formats[formats_count].name = x; \
                formats[formats_count].text = z; \
                formats_count++; \
        }

#define __add_format_dup ( x,
y,
 )     __add_format(x, y ? xstrdup(z) : NULL)

#define __add_format_emp ( x,
 )     __add_format(x, y ? (char *) empty_format : NULL)

#define __add_format_emp_st ( x,
 )     case y: __add_format("query_" x, (char *) empty_format); break

#define __add_format_emp_st ( x,
 )     case y: __add_format(x, (char *) empty_format) break

#define __bgcolor ( x,
 )     case x: bgcolor = y; break;

#define __fgcolor ( x,
y,
 ) 

Value:

case x: fgcolor = z; bold = 0; break; \
                case y: fgcolor = z; bold = 1; break;

#define __init_bg ( x,
 ) 

Value:

init_pair(x, COLOR_BLACK, y); \
        init_pair(x + 1, COLOR_RED, y); \
        init_pair(x + 2, COLOR_GREEN, y); \
        init_pair(x + 3, COLOR_YELLOW, y); \
        init_pair(x + 4, COLOR_BLUE, y); \
        init_pair(x + 5, COLOR_MAGENTA, y); \
        init_pair(x + 6, COLOR_CYAN, y); \
        init_pair(x + 7, COLOR_WHITE, y);

#define DIF_TIME ( t1,
t2   ) 

Value:

((t2.tv_sec -t1.tv_sec) *1000+ \
                         (t2.tv_usec-t1.tv_usec)/1000)

#define GET_TIME ( tv   )     (gettimeofday(&tv, (struct timezone *)NULL))

#define lastlog_edge   WF_BOTTOM

#define lastlog_frame   WF_TOP

#define lastlog_margin   1

#define lastlog_wrap   0


Function Documentation

void changed_backlog_size ( const char *  var  ) 

int cmd_mark ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

static int color_pair ( int  fg,
int  bg 
) [static]

static int color_pair_bold ( int  fg,
int  bold,
int  bg 
) [inline, static]

static void draw_thin_red_line ( window_t w,
int  y 
) [static]

static int ekg_getch ( int  meta,
unsigned int *  ch 
) [static]

static int fstring_attr2ncurses_attr ( short  chattr  )  [inline, static]

void header_statusbar_resize ( const char *  dummy  ) 

int ncurses_backlog_add ( window_t w,
fstring_t str 
)

int ncurses_backlog_split ( window_t w,
int  full,
int  removed 
)

void ncurses_clear ( window_t w,
int  full 
)

void ncurses_commit (  ) 

void ncurses_deinit (  ) 

static CHAR_T ncurses_fixchar ( CHAR_T  ch,
int *  attr 
) [inline, static]

void ncurses_init (  ) 

void ncurses_input_update (  ) 

void ncurses_lastlog_new ( window_t w  ) 

int ncurses_lastlog_update ( window_t w  ) 

void ncurses_line_adjust (  ) 

void ncurses_lines_adjust (  ) 

int ncurses_lineslen (  ) 

void ncurses_main_window_mouse_handler ( int  x,
int  y,
int  mouse_state 
)

int ncurses_password_input ( void *  data,
va_list  ap 
)

void ncurses_redraw ( window_t w  ) 

void ncurses_redraw_input ( unsigned int  ch  ) 

void ncurses_refresh (  ) 

void ncurses_resize (  ) 

int ncurses_session_disconnect_handler ( void *  data,
va_list  ap 
)

int ncurses_typing ( int  type,
void *  data 
)

static int ncurses_typingsend ( const int  len,
const int  first 
) [inline, static]

static int ncurses_ui_window_lastlog ( window_t lastlog_w,
window_t w 
) [static]

void ncurses_update_real_prompt ( ncurses_window_t n  ) 

int ncurses_watch_stdin ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
)

int ncurses_watch_winch ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
)

static char* ncurses_window_activity ( void   )  [static]

void ncurses_window_gone ( window_t w  ) 

int ncurses_window_kill ( window_t w  ) 

int ncurses_window_new ( window_t w  ) 

static void print_char ( WINDOW *  w,
int  y,
int  x,
CHAR_T  ch,
int  attr 
) [static]

static void update_header (  )  [static]

void update_statusbar ( int  commit  ) 

static int window_printat ( WINDOW *  w,
int  x,
int  y,
const char *  format,
struct format_data data,
int  fgcolor,
int  bold,
int  bgcolor 
) [static]


Variable Documentation

int have_winch_pipe = 0

WINDOW* ncurses_contacts = NULL

int ncurses_debug = 0

char ncurses_funnything[5] = "|/-\\" [static]

WINDOW* ncurses_header = NULL [static]

CHAR_T* ncurses_history[HISTORY_MAX]

int ncurses_history_index = 0

WINDOW* ncurses_input = NULL

int ncurses_input_size = 1

CHAR_T* ncurses_line = NULL

int ncurses_line_index = 0

int ncurses_line_start = 0

CHAR_T** ncurses_lines = NULL

int ncurses_lines_index = 0

int ncurses_lines_start = 0

int ncurses_noecho = 0

CHAR_T* ncurses_passbuf

int ncurses_redraw_input_already_exec = 0 [static]

int ncurses_screen_height [static]

int ncurses_screen_width [static]

WINDOW* ncurses_status = NULL [static]

int ncurses_typing_count = 0 [static]

int ncurses_typing_mod = 0

time_t ncurses_typing_time = 0 [static]

window_t* ncurses_typing_win = NULL

CHAR_T* ncurses_yanked = NULL

struct termios old_tio [static]

volatile int sigint_count

int winch_pipe[2]


Generated on Mon Jan 5 22:30:54 2009 for ekg2 by  doxygen 1.5.1