root/drivers/char/selection.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. scr_writew
  2. scr_readw
  3. scr_writew
  4. scr_readw

   1 /*
   2  * selection.h
   3  *
   4  * Interface between console.c, tty_io.c, vt.c, vc_screen.c and selection.c
   5  */
   6 extern int sel_cons;
   7 
   8 extern void clear_selection(void);
   9 extern int set_selection(const int arg, struct tty_struct *tty);
  10 extern int paste_selection(struct tty_struct *tty);
  11 extern int sel_loadlut(const int arg);
  12 extern int mouse_reporting(void);
  13 extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry);
  14 
  15 extern unsigned long video_num_columns;
  16 extern unsigned long video_num_lines;
  17 extern unsigned long video_size_row;
  18 
  19 extern void do_unblank_screen(void);
  20 extern unsigned short *screen_pos(int currcons, int w_offset, int viewed);
  21 extern unsigned short screen_word(int currcons, int offset, int viewed);
  22 extern void complement_pos(int currcons, int offset);
  23 extern void invert_screen(int currcons, int offset, int count, int shift);
  24 
  25 #define reverse_video_char(a)   (((a) & 0x88) | ((((a) >> 4) | ((a) << 4)) & 0x77))
  26 #define reverse_video_short(a)  (((a) & 0x88ff) | \
  27         (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4))
  28 /* this latter line used to have masks 0xf000 and 0x0f00, but selection
  29    requires a self-inverse operation; moreover, the old version looks wrong */
  30 
  31 extern void getconsxy(int currcons, char *p);
  32 extern void putconsxy(int currcons, char *p);
  33 
  34 /* how to access screen memory */
  35 #ifdef __alpha__
  36  
  37 static inline void scr_writew(unsigned short val, unsigned short * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  38 {
  39         if ((long) addr < 0)
  40                 *addr = val;
  41         else
  42                 writew(val, (unsigned long) addr);
  43 }
  44 
  45 static inline unsigned short scr_readw(unsigned short * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  46 {
  47         if ((long) addr < 0)
  48                 return *addr;
  49         return readw((unsigned long) addr);
  50 }
  51 
  52 #else
  53 
  54 static inline void scr_writew(unsigned short val, unsigned short * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  55 {
  56         *addr = val;
  57 }
  58 
  59 static inline unsigned short scr_readw(unsigned short * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  60 {
  61         return *addr;
  62 }
  63 
  64 #endif

/* [previous][next][first][last][top][bottom][index][help] */