blob: 35937a61da0610fd545910497e0b838cdc592445 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
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 Morton0aa42632007-08-22 14:02:01 -070014struct tty_struct;
15
Ralf Baechle120c0b62007-10-16 01:29:04 -070016struct tty_struct;
Jiri Slaby56676fb2020-02-19 08:39:43 +010017struct vc_data;
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
19extern void clear_selection(void);
20extern int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty);
21extern int paste_selection(struct tty_struct *tty);
22extern int sel_loadlut(char __user *p);
23extern int mouse_reporting(void);
24extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry);
25
Jiri Slaby56676fb2020-02-19 08:39:43 +010026bool vc_is_sel(struct vc_data *vc);
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028extern int console_blanked;
29
Jiri Slaby8ede5cc2016-03-31 10:08:16 +020030extern const unsigned char color_table[];
Jiri Slaby91e74ca2016-03-31 10:08:17 +020031extern unsigned char default_red[];
32extern unsigned char default_grn[];
33extern unsigned char default_blu[];
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
35extern unsigned short *screen_pos(struct vc_data *vc, int w_offset, int viewed);
36extern u16 screen_glyph(struct vc_data *vc, int offset);
37extern void complement_pos(struct vc_data *vc, int offset);
38extern void invert_screen(struct vc_data *vc, int offset, int count, int shift);
39
40extern void getconsxy(struct vc_data *vc, unsigned char *p);
41extern void putconsxy(struct vc_data *vc, unsigned char *p);
42
43extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org);
44extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org);
Nicolas Pitre432c9ed2010-10-01 00:10:44 -040045extern void vcs_scr_updated(struct vc_data *vc);
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
47#endif