ekg2  GIT master
Definicje | Funkcje | Zmienne
Dokumentacja pliku nc-stuff.c
#include "ekg2.h"
#include "ecurses.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 "bindings.h"
#include "backlog.h"
#include "contacts.h"
#include "input.h"
#include "notify.h"
#include "nc-stuff.h"
#include "spell.h"
#include "statusbar.h"
Wykres zależności załączania dla nc-stuff.c:

Definicje

#define __init_bg(x, y)
 

Funkcje

void ncurses_prompt_set (window_t *w, const gchar *str)
 
int ncurses_session_disconnect_handler (void *data, va_list ap)
 
int color_pair (int fg, int bg)
 
void ncurses_commit (void)
 
void ncurses_resize (void)
 
static G_GNUC_CONST int fstring_attr2ncurses_attr (fstr_attr_t chattr)
 
wchar_t ncurses_fixchar (wchar_t ch, int *attr)
 
gboolean ncurses_simple_print (WINDOW *w, const char *s, fstr_attr_t attr, gssize maxx)
 
const char * ncurses_fstring_print (WINDOW *w, const char *s, const fstr_attr_t *attr, gssize maxx)
 
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 (void)
 
int ncurses_window_kill (window_t *w)
 
void ncurses_abort (void)
 
void ncurses_init (void)
 
void ncurses_deinit (void)
 
int ncurses_window_new (window_t *w)
 

Zmienne

WINDOW * ncurses_input = NULL
 
WINDOW * ncurses_contacts = NULL
 
wchar_t * ncurses_history [1000]
 
int ncurses_history_index = 0
 
int ncurses_debug = 0
 
int ncurses_screen_height
 
int ncurses_screen_width
 
static struct termios old_tio
 
int winch_pipe [2]
 
int have_winch_pipe = 0
 

Dokumentacja definicji

◆ __init_bg

#define __init_bg (   x,
 
)
Wartość:
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);

Dokumentacja funkcji

◆ cmd_mark()

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

◆ color_pair()

int color_pair ( int  fg,
int  bg 
)

◆ draw_thin_red_line()

static void draw_thin_red_line ( window_t w,
int  y 
)
static

◆ fstring_attr2ncurses_attr()

static G_GNUC_CONST int fstring_attr2ncurses_attr ( fstr_attr_t  chattr)
static

◆ ncurses_abort()

void ncurses_abort ( void  )

◆ ncurses_clear()

void ncurses_clear ( window_t w,
int  full 
)

◆ ncurses_commit()

void ncurses_commit ( void  )

◆ ncurses_deinit()

void ncurses_deinit ( void  )

◆ ncurses_fixchar()

wchar_t ncurses_fixchar ( wchar_t  ch,
int *  attr 
)
inline

◆ ncurses_fstring_print()

const char* ncurses_fstring_print ( WINDOW *  w,
const char *  s,
const fstr_attr_t attr,
gssize  maxx 
)

ncurses_fstring_print()

Print fstring_t, making sure output width doesn't exceed max width. If it does, rewind to the previous linebreak possibility.

Parametry
w- target ncurses window.
s- locale-encoded string to print.
attr- attribute list (of length strlen(s)).
maxx- max output width expressed through the last column to print in or -1 if any.
Zwraca
Pointer to the character which the next print should begin at.

◆ ncurses_init()

void ncurses_init ( void  )

◆ ncurses_prompt_set()

void ncurses_prompt_set ( window_t w,
const gchar *  str 
)

ncurses_prompt_set()

Set window prompt, updating internal data as necessary.

Parametry
w- window to be updated
str- prompt target (uid/nickname) or NULL if none

◆ ncurses_redraw()

void ncurses_redraw ( window_t w)

◆ ncurses_refresh()

void ncurses_refresh ( void  )

◆ ncurses_resize()

void ncurses_resize ( void  )

◆ ncurses_session_disconnect_handler()

int ncurses_session_disconnect_handler ( void *  data,
va_list  ap 
)

◆ ncurses_simple_print()

gboolean ncurses_simple_print ( WINDOW *  w,
const char *  s,
fstr_attr_t  attr,
gssize  maxx 
)

ncurses_simple_print()

Print simple string, making sure it doesn't exceed max width.

Parametry
w- target ncurses window.
s- locale-encoded string to print.
attr- attribute set (one for the whole string).
maxx- max output width expressed through the last column to print in or -1 if any.
Zwraca
TRUE if whole string was printed, FALSE if maxwidth reached.
Nota
If printed string ends with a double-column char maxx may be exceeded. If necessary, provide decreased value.

◆ ncurses_window_kill()

int ncurses_window_kill ( window_t w)

◆ ncurses_window_new()

int ncurses_window_new ( window_t w)

Dokumentacja zmiennych

◆ have_winch_pipe

int have_winch_pipe = 0

◆ ncurses_contacts

WINDOW* ncurses_contacts = NULL

◆ ncurses_debug

int ncurses_debug = 0

◆ ncurses_history

wchar_t* ncurses_history[1000]

◆ ncurses_history_index

int ncurses_history_index = 0

◆ ncurses_input

WINDOW* ncurses_input = NULL

◆ ncurses_screen_height

int ncurses_screen_height

◆ ncurses_screen_width

int ncurses_screen_width

◆ old_tio

struct termios old_tio
static

◆ winch_pipe

int winch_pipe[2]