neercs client
Defines | |
#define | debug(format,...) do {} while(0) |
Functions | |
void | mainloop (struct screen_list *screen_list) |
Main client loop. | |
int | create_pty (char *cmd, unsigned int w, unsigned int h, int *cpid) |
int | create_pty_grab (long pid, unsigned int w, unsigned int h, int *cpid) |
int | grab_process (long pid, char *ptyname, int ptyfd, int *newpid) |
long | select_process (struct screen_list *screen_list) |
long int | import_term (struct screen_list *screen_list, struct screen *sc, void const *data, unsigned int size) |
int | set_tty_size (int fd, unsigned int w, unsigned int h) |
int | update_terms (struct screen_list *screen_list) |
void | refresh_screens (struct screen_list *screen_list) |
int | update_screens_contents (struct screen_list *screen_list) |
int | install_fds (struct screen_list *screen_list) |
long long | get_us (void) |
void | attach (struct screen_list *screen_list) |
int | detach (struct screen_list *screen_list) |
int | request_attach (struct screen_list *screen_list) |
char * | build_socket_path (char *socket_dir, char *session_name, enum socket_type socktype) |
int | create_socket (struct screen_list *screen_list, enum socket_type socktype) |
char * | connect_socket (struct screen_list *screen_list, enum socket_type socktype) |
char ** | list_sockets (char *socket_dir, char *session_name) |
int | start_server (struct screen_list *screen_list) |
int | send_event (caca_event_t ev, struct screen_list *screen_list) |
int | send_delay (struct screen_list *screen_list) |
int | send_ansi_sequence (struct screen_list *screen_list, char *str) |
struct screen * | create_screen (int w, int h, char *command) |
struct screen * | create_screen_grab (int w, int h, int pid) |
int | destroy_screen (struct screen *s) |
int | add_screen (struct screen_list *list, struct screen *s) |
int | remove_screen (struct screen_list *list, int n, int please_kill) |
void | resize_screen (struct screen *s, int z, int h) |
void | update_windows_props (struct screen_list *screen_list) |
void | update_windows_props_cards (struct screen_list *screen_list) |
void | update_windows_props_hsplit (struct screen_list *screen_list) |
void | update_windows_props_full (struct screen_list *screen_list) |
void | update_windows_props_vsplit (struct screen_list *screen_list) |
void | update_windows_props_cube (struct screen_list *screen_list) |
void | wm_refresh (struct screen_list *screen_list) |
void | wm_refresh_card (struct screen_list *screen_list) |
void | wm_refresh_cube (struct screen_list *screen_list) |
void | wm_refresh_full (struct screen_list *screen_list) |
void | wm_refresh_hsplit (struct screen_list *screen_list) |
void | wm_refresh_vsplit (struct screen_list *screen_list) |
int | switch_screen_recurrent (struct screen_list *screen_list, struct recurrent *rec, void *user, long long unsigned int t) |
void | draw_thumbnails (struct screen_list *screen_list) |
void | draw_status (struct screen_list *screen_list) |
void | draw_help (struct screen_list *screen_list) |
int | help_handle_key (struct screen_list *screen_list, unsigned int c) |
int | update_window_list (int c, struct screen_list *screen_list) |
void | draw_list (struct screen_list *screen_list) |
void | draw_lock (struct screen_list *screen_list) |
int | update_lock (int c, struct screen_list *screen_list) |
int | validate_lock (struct screen_list *screen_list, char *user, char *pass) |
int | close_screen_recurrent (struct screen_list *, struct recurrent *rec, void *user, long long unsigned int t) |
void * | convert_input_ansi (unsigned int *c, int *size) |
int | handle_command_input (struct screen_list *screen_list, unsigned int c) |
void | screensaver_init (struct screen_list *screen_list) |
void | screensaver_kill (struct screen_list *screen_list) |
void | draw_screensaver (struct screen_list *screen_list) |
void | screensaver_flying_toasters (struct screen_list *screen_list) |
void | screensaver_flying_toasters_init (struct screen_list *screen_list) |
void | screensaver_flying_toasters_kill (struct screen_list *screen_list) |
int | handle_recurrents (struct screen_list *screen_list) |
int | add_recurrent (struct recurrent_list *list, int(*function)(struct screen_list *, struct recurrent *rec, void *user, long long unsigned int t), void *user) |
int | remove_recurrent (struct recurrent_list *list, int n) |
int | read_configuration_file (char *filename, struct screen_list *screen_list) |
int | parse_conf_line (char *buf, int size, struct screen_list *screen_list) |
int | get_key_value (char *line, struct option *option) |
int | fill_config (struct screen_list *screen_list) |
struct config_line * | get_config (const char *name) |
struct config_line * | get_config_option (void) |
Variables | |
uint8_t | iso2022_conv_state::ctrl8bit |
uint32_t | iso2022_conv_state::cn [2] |
uint8_t | iso2022_conv_state::glr [2] |
uint32_t | iso2022_conv_state::gn [4] |
uint8_t | iso2022_conv_state::ss |
caca_canvas_t * | screen::cv |
uint32_t | screen::clearattr |
uint8_t | screen::fg |
uint8_t | screen::bg |
uint8_t | screen::dfg |
uint8_t | screen::dbg |
uint8_t | screen::bold |
uint8_t | screen::blink |
uint8_t | screen::italics |
uint8_t | screen::negative |
uint8_t | screen::concealed |
uint8_t | screen::underline |
uint8_t | screen::faint |
uint8_t | screen::strike |
uint8_t | screen::proportional |
struct iso2022_conv_state | screen::conv_state |
int | screen::visible |
int | screen::fd |
unsigned char * | screen::buf |
long int | screen::total |
char * | screen::title |
int | screen::bell |
unsigned int | screen::scroll |
unsigned int | screen::s1 |
unsigned int | screen::s2 |
int | screen::pid |
int | screen::changed |
int | screen::x |
int | screen::y |
int | screen::w |
int | screen::h |
int | screen::orig_x |
int | screen::orig_y |
int | screen::orig_w |
int | screen::orig_h |
int | screen::report_mouse |
int | cube_props::side |
long long unsigned int | cube_props::duration |
int | screensaver::in_screensaver |
void * | screensaver::data |
int | comm::socket [2] |
char * | comm::socket_path [2] |
char * | comm::socket_dir |
char * | comm::session_name |
int | lock::lock_offset |
int | lock::lock_on_detach |
long long unsigned int | lock::autolock_timeout |
char | lock::lockpass [1024] |
char | lock::lockmsg [1024] |
int | modals::status |
int | modals::help |
int | modals::python_command |
int | modals::window_list |
int | modals::cur_in_list |
char * | sys::user_path |
int * | sys::to_grab |
char ** | sys::to_start |
int | sys::nb_to_grab |
int | sys::attach |
int | sys::forceattach |
int | screen_list::in_bell |
int | screen_list::was_in_bell |
int | screen_list::dont_update_coords |
int | screen_list::changed |
int | screen_list::delay |
int | screen_list::requested_delay |
int | screen_list::force_refresh |
int | screen_list::need_refresh |
int | screen_list::command |
int | screen_list::eyecandy |
long long unsigned int | screen_list::last_key_time |
long long unsigned int | screen_list::last_refresh_time |
struct comm | screen_list::comm |
struct lock | screen_list::lock |
struct modals | screen_list::modals |
struct interpreter_props | screen_list::interpreter_props |
struct screensaver | screen_list::screensaver |
int | screen_list::pty |
int | screen_list::prevpty |
int | screen_list::count |
int | screen_list::wm_type |
int | screen_list::border_size |
struct cube_props | screen_list::cube |
long long unsigned int | screen_list::last_switch |
struct screen ** | screen_list::screen |
struct option * | screen_list::config |
struct sys | screen_list::sys |
struct recurrent_list * | screen_list::recurrent_list |
char * | screen_list::title |
int | screen_list::width |
int | screen_list::height |
int | screen_list::old_x |
int | screen_list::old_y |
int | screen_list::mouse_button |
caca_canvas_t * | screen_list::cv |
caca_display_t * | screen_list::dp |
char * | option::value |
struct option * | option::next |
int(* | config_line::set )(const char *argv, struct screen_list *screen_list) |
char *(* | config_line::get )(struct screen_list *screen_list) |
void * | recurrent::user |
long long unsigned int | recurrent::start_time |
int | recurrent::kill_me |
struct recurrent ** | recurrent_list::recurrent |
Function Documentation
void mainloop | ( | struct screen_list * | screen_list | ) |
This is the main client loop.
Repeat forever:
- if data is available on the client socket, read it and interpret it:
- "DETACH": exit the loop
- "UPDATE": update screen with the given canvas data
- "REFRESH": refresh the whole display
- "CURSOR": set cursor position
- "TITLE": set window or display title
- wait for an input event with a 10ms timeout
int create_pty | ( | char * | cmd, | |
unsigned int | w, | |||
unsigned int | h, | |||
int * | cpid | |||
) |
}@