1/* 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 14struct tty_struct; 15struct vc_data; 16 17void clear_selection(void); 18int set_selection_user(const struct tiocl_selection __user *sel, 19 struct tty_struct *tty); 20int set_selection_kernel(struct tiocl_selection *v, struct tty_struct *tty); 21int paste_selection(struct tty_struct *tty); 22int sel_loadlut(u32 __user *lut); 23int mouse_reporting(void); 24void mouse_report(struct tty_struct *tty, int butt, int mrx, int mry); 25 26bool vc_is_sel(const struct vc_data *vc); 27 28extern int console_blanked; 29 30extern const unsigned char color_table[]; 31extern unsigned char default_red[]; 32extern unsigned char default_grn[]; 33extern unsigned char default_blu[]; 34 35unsigned short *screen_pos(const struct vc_data *vc, int w_offset, bool viewed); 36u16 screen_glyph(const struct vc_data *vc, int offset); 37u32 screen_glyph_unicode(const struct vc_data *vc, int offset); 38void complement_pos(struct vc_data *vc, int offset); 39void invert_screen(struct vc_data *vc, int offset, int count, bool viewed); 40 41void getconsxy(const struct vc_data *vc, unsigned char xy[static 2]); 42void putconsxy(struct vc_data *vc, unsigned char xy[static const 2]); 43 44u16 vcs_scr_readw(const struct vc_data *vc, const u16 *org); 45void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); 46void vcs_scr_updated(struct vc_data *vc); 47 48int vc_uniscr_check(struct vc_data *vc); 49void vc_uniscr_copy_line(const struct vc_data *vc, void *dest, bool viewed, 50 unsigned int row, unsigned int col, unsigned int nr); 51 52#endif 53