Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Ralf Baechle | 120c0b6 | 2007-10-16 01:29:04 -0700 | [diff] [blame] | 14 | struct tty_struct; |
Jiri Slaby | dce05aa | 2020-02-19 08:39:43 +0100 | [diff] [blame] | 15 | struct vc_data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
| 17 | extern void clear_selection(void); |
Okash Khawaja | 496124e | 2019-04-17 13:21:13 +0100 | [diff] [blame] | 18 | extern int set_selection_user(const struct tiocl_selection __user *sel, |
| 19 | struct tty_struct *tty); |
| 20 | extern int set_selection_kernel(struct tiocl_selection *v, |
| 21 | struct tty_struct *tty); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | extern int paste_selection(struct tty_struct *tty); |
| 23 | extern int sel_loadlut(char __user *p); |
| 24 | extern int mouse_reporting(void); |
| 25 | extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry); |
| 26 | |
Jiri Slaby | dce05aa | 2020-02-19 08:39:43 +0100 | [diff] [blame] | 27 | bool vc_is_sel(struct vc_data *vc); |
| 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | extern int console_blanked; |
| 30 | |
Jiri Slaby | 8ede5cc | 2016-03-31 10:08:16 +0200 | [diff] [blame] | 31 | extern const unsigned char color_table[]; |
Jiri Slaby | 91e74ca | 2016-03-31 10:08:17 +0200 | [diff] [blame] | 32 | extern unsigned char default_red[]; |
| 33 | extern unsigned char default_grn[]; |
| 34 | extern unsigned char default_blu[]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Jiri Slaby | d73568c | 2020-08-18 10:56:51 +0200 | [diff] [blame] | 36 | extern unsigned short *screen_pos(const struct vc_data *vc, int w_offset, |
Jiri Slaby | b8209f6 | 2020-08-18 10:56:53 +0200 | [diff] [blame] | 37 | bool viewed); |
Jiri Slaby | d73568c | 2020-08-18 10:56:51 +0200 | [diff] [blame] | 38 | extern u16 screen_glyph(const struct vc_data *vc, int offset); |
| 39 | extern u32 screen_glyph_unicode(const struct vc_data *vc, int offset); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | extern void complement_pos(struct vc_data *vc, int offset); |
Jiri Slaby | b8209f6 | 2020-08-18 10:56:53 +0200 | [diff] [blame] | 41 | extern void invert_screen(struct vc_data *vc, int offset, int count, bool viewed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | |
Jiri Slaby | a5c6bd80 | 2020-08-18 10:56:52 +0200 | [diff] [blame] | 43 | extern void getconsxy(const struct vc_data *vc, unsigned char xy[static 2]); |
| 44 | extern void putconsxy(struct vc_data *vc, unsigned char xy[static const 2]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | |
Jiri Slaby | d73568c | 2020-08-18 10:56:51 +0200 | [diff] [blame] | 46 | extern u16 vcs_scr_readw(const struct vc_data *vc, const u16 *org); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); |
Nicolas Pitre | 432c9ed | 2010-10-01 00:10:44 -0400 | [diff] [blame] | 48 | extern void vcs_scr_updated(struct vc_data *vc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | |
Nicolas Pitre | d21b0be | 2018-06-26 23:56:41 -0400 | [diff] [blame] | 50 | extern int vc_uniscr_check(struct vc_data *vc); |
Jiri Slaby | d73568c | 2020-08-18 10:56:51 +0200 | [diff] [blame] | 51 | extern void vc_uniscr_copy_line(const struct vc_data *vc, void *dest, |
Jiri Slaby | b8209f6 | 2020-08-18 10:56:53 +0200 | [diff] [blame] | 52 | bool viewed, |
Nicolas Pitre | d21b0be | 2018-06-26 23:56:41 -0400 | [diff] [blame] | 53 | unsigned int row, unsigned int col, |
| 54 | unsigned int nr); |
| 55 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | #endif |