ELinks 0.16.1.1
mouse.c File Reference

Support for mouse interface. More...

#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "config/home.h"
#include "config/options.h"
#include "dialogs/status.h"
#include "intl/libintl.h"
#include "main/select.h"
#include "main/timer.h"
#include "osdep/ascii.h"
#include "osdep/osdep.h"
#include "session/session.h"
#include "terminal/hardio.h"
#include "terminal/itrm.h"
#include "terminal/kbd.h"
#include "terminal/mouse.h"
#include "terminal/terminal.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/string.h"
#include "util/time.h"
Include dependency graph for mouse.c:

Macros

#define HPUX_PIPE   1
#define write_sequence(fd, seq)
#define INIT_TWIN_MOUSE_SEQ   "\033[?9h"
 Send MIT Mouse Row & Column on Button Press.
#define INIT_XWIN_MOUSE_SEQ   "\033[?1000h"
 Send Mouse X & Y on button press and release.
#define DONE_TWIN_MOUSE_SEQ   "\033[?9l"
 Don't Send MIT Mouse Row & Column on Button Press.
#define DONE_XWIN_MOUSE_SEQ   "\033[?1000l"
 Don't Send Mouse X & Y on button press and release.
#define get_mouse_x_position(itrm, esclen)
#define get_mouse_y_position(itrm, esclen)
#define TW_BUTT_LEFT   1
#define TW_BUTT_MIDDLE   2
#define TW_BUTT_RIGHT   4

Functions

void send_mouse_init_sequence (int h)
void send_mouse_done_sequence (int h)
void disable_mouse (void)
static int mouse_lock_exists (void)
void enable_mouse (void)
void toggle_mouse (struct session *ses)
static int decode_mouse_position (struct itrm *itrm, int from)
int decode_terminal_mouse_escape_sequence (struct itrm *itrm, struct interlink_event *ev, int el, int v)

Variables

struct itrmditrm
int mouse_enabled

Detailed Description

Support for mouse interface.

Macro Definition Documentation

◆ DONE_TWIN_MOUSE_SEQ

#define DONE_TWIN_MOUSE_SEQ   "\033[?9l"

Don't Send MIT Mouse Row & Column on Button Press.

◆ DONE_XWIN_MOUSE_SEQ

#define DONE_XWIN_MOUSE_SEQ   "\033[?1000l"

Don't Send Mouse X & Y on button press and release.

◆ get_mouse_x_position

#define get_mouse_x_position ( itrm,
esclen )
Value:
static int decode_mouse_position(struct itrm *itrm, int from)
Definition mouse.c:138
A connection between a terminal and a master ELinks process.
Definition itrm.h:97

◆ get_mouse_y_position

#define get_mouse_y_position ( itrm,
esclen )
Value:

◆ HPUX_PIPE

#define HPUX_PIPE   1

◆ INIT_TWIN_MOUSE_SEQ

#define INIT_TWIN_MOUSE_SEQ   "\033[?9h"

Send MIT Mouse Row & Column on Button Press.

◆ INIT_XWIN_MOUSE_SEQ

#define INIT_XWIN_MOUSE_SEQ   "\033[?1000h"

Send Mouse X & Y on button press and release.

◆ TW_BUTT_LEFT

#define TW_BUTT_LEFT   1

◆ TW_BUTT_MIDDLE

#define TW_BUTT_MIDDLE   2

◆ TW_BUTT_RIGHT

#define TW_BUTT_RIGHT   4

◆ write_sequence

#define write_sequence ( fd,
seq )
Value:
hard_write(fd, seq, sizeof(seq) - 1)
ssize_t hard_write(int fd, const char *data, size_t datalen)
Definition hardio.c:99

Function Documentation

◆ decode_mouse_position()

int decode_mouse_position ( struct itrm * itrm,
int from )
static

◆ decode_terminal_mouse_escape_sequence()

int decode_terminal_mouse_escape_sequence ( struct itrm * itrm,
struct interlink_event * ev,
int el,
int v )
Returns
length of the escape sequence or -1 if the caller needs to set up the ESC delay timer.

◆ disable_mouse()

void disable_mouse ( void )

◆ enable_mouse()

void enable_mouse ( void )

◆ mouse_lock_exists()

int mouse_lock_exists ( void )
static

◆ send_mouse_done_sequence()

void send_mouse_done_sequence ( int h)

◆ send_mouse_init_sequence()

void send_mouse_init_sequence ( int h)

◆ toggle_mouse()

void toggle_mouse ( struct session * ses)

Variable Documentation

◆ ditrm

struct itrm* ditrm
extern

◆ mouse_enabled

int mouse_enabled