1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21da177e4SLinus Torvalds /* 31da177e4SLinus Torvalds * selection.h 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds * Interface between console.c, tty_io.c, vt.c, vc_screen.c and selection.c 61da177e4SLinus Torvalds */ 71da177e4SLinus Torvalds 81da177e4SLinus Torvalds #ifndef _LINUX_SELECTION_H_ 91da177e4SLinus Torvalds #define _LINUX_SELECTION_H_ 101da177e4SLinus Torvalds 111da177e4SLinus Torvalds #include <linux/tiocl.h> 121da177e4SLinus Torvalds #include <linux/vt_buffer.h> 131da177e4SLinus Torvalds 14120c0b6dSRalf Baechle struct tty_struct; 15dce05aa6SJiri Slaby struct vc_data; 161da177e4SLinus Torvalds 17*649f6fbeSJiri Slaby (SUSE) void clear_selection(void); 18*649f6fbeSJiri Slaby (SUSE) int set_selection_user(const struct tiocl_selection __user *sel, 19496124e5SOkash Khawaja struct tty_struct *tty); 20*649f6fbeSJiri Slaby (SUSE) int set_selection_kernel(struct tiocl_selection *v, struct tty_struct *tty); 21*649f6fbeSJiri Slaby (SUSE) int paste_selection(struct tty_struct *tty); 22*649f6fbeSJiri Slaby (SUSE) int sel_loadlut(u32 __user *lut); 23*649f6fbeSJiri Slaby (SUSE) int mouse_reporting(void); 24*649f6fbeSJiri Slaby (SUSE) void mouse_report(struct tty_struct *tty, int butt, int mrx, int mry); 251da177e4SLinus Torvalds 26d4c0c481SJiri Slaby (SUSE) bool vc_is_sel(const struct vc_data *vc); 27dce05aa6SJiri Slaby 281da177e4SLinus Torvalds extern int console_blanked; 291da177e4SLinus Torvalds 308ede5cceSJiri Slaby extern const unsigned char color_table[]; 3191e74ca5SJiri Slaby extern unsigned char default_red[]; 3291e74ca5SJiri Slaby extern unsigned char default_grn[]; 3391e74ca5SJiri Slaby extern unsigned char default_blu[]; 341da177e4SLinus Torvalds 35*649f6fbeSJiri Slaby (SUSE) unsigned short *screen_pos(const struct vc_data *vc, int w_offset, bool viewed); 36*649f6fbeSJiri Slaby (SUSE) u16 screen_glyph(const struct vc_data *vc, int offset); 37*649f6fbeSJiri Slaby (SUSE) u32 screen_glyph_unicode(const struct vc_data *vc, int offset); 38*649f6fbeSJiri Slaby (SUSE) void complement_pos(struct vc_data *vc, int offset); 39*649f6fbeSJiri Slaby (SUSE) void invert_screen(struct vc_data *vc, int offset, int count, bool viewed); 401da177e4SLinus Torvalds 41*649f6fbeSJiri Slaby (SUSE) void getconsxy(const struct vc_data *vc, unsigned char xy[static 2]); 42*649f6fbeSJiri Slaby (SUSE) void putconsxy(struct vc_data *vc, unsigned char xy[static const 2]); 431da177e4SLinus Torvalds 44*649f6fbeSJiri Slaby (SUSE) u16 vcs_scr_readw(const struct vc_data *vc, const u16 *org); 45*649f6fbeSJiri Slaby (SUSE) void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); 46*649f6fbeSJiri Slaby (SUSE) void vcs_scr_updated(struct vc_data *vc); 471da177e4SLinus Torvalds 48*649f6fbeSJiri Slaby (SUSE) int vc_uniscr_check(struct vc_data *vc); 49*649f6fbeSJiri Slaby (SUSE) void vc_uniscr_copy_line(const struct vc_data *vc, void *dest, bool viewed, 50*649f6fbeSJiri Slaby (SUSE) unsigned int row, unsigned int col, unsigned int nr); 51d21b0be2SNicolas Pitre 521da177e4SLinus Torvalds #endif 53