blob: 5b890ef5b59facfbcc5d8ebfaf6ead2c26c54dee [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * selection.h
4 *
5 * Interface between console.c, tty_io.c, vt.c, vc_screen.c and selection.c
6 */
7
8#ifndef _LINUX_SELECTION_H_
9#define _LINUX_SELECTION_H_
10
11#include <linux/tiocl.h>
12#include <linux/vt_buffer.h>
13
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000014struct tty_struct;
Olivier Deprez0e641232021-09-23 10:07:05 +020015struct vc_data;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000016
17extern void clear_selection(void);
David Brazdil0f672f62019-12-10 10:32:29 +000018extern int set_selection_user(const struct tiocl_selection __user *sel,
19 struct tty_struct *tty);
20extern int set_selection_kernel(struct tiocl_selection *v,
21 struct tty_struct *tty);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000022extern int paste_selection(struct tty_struct *tty);
23extern int sel_loadlut(char __user *p);
24extern int mouse_reporting(void);
25extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry);
26
Olivier Deprez0e641232021-09-23 10:07:05 +020027bool vc_is_sel(struct vc_data *vc);
28
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000029extern int console_blanked;
30
31extern const unsigned char color_table[];
32extern unsigned char default_red[];
33extern unsigned char default_grn[];
34extern unsigned char default_blu[];
35
36extern unsigned short *screen_pos(struct vc_data *vc, int w_offset, int viewed);
37extern u16 screen_glyph(struct vc_data *vc, int offset);
38extern u32 screen_glyph_unicode(struct vc_data *vc, int offset);
39extern void complement_pos(struct vc_data *vc, int offset);
40extern void invert_screen(struct vc_data *vc, int offset, int count, int shift);
41
42extern void getconsxy(struct vc_data *vc, unsigned char *p);
43extern void putconsxy(struct vc_data *vc, unsigned char *p);
44
45extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org);
46extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org);
47extern void vcs_scr_updated(struct vc_data *vc);
48
49extern int vc_uniscr_check(struct vc_data *vc);
50extern void vc_uniscr_copy_line(struct vc_data *vc, void *dest, int viewed,
51 unsigned int row, unsigned int col,
52 unsigned int nr);
53
54#endif