/[hurd]/hurd/console/console.h
ViewVC logotype

Diff of /hurd/console/console.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by marcus, Thu Jun 13 00:24:26 2002 UTC revision 1.6 by marcus, Mon Jun 17 01:42:06 2002 UTC
# Line 21  Line 21 
21    
22  #include <stdint.h>  #include <stdint.h>
23    
24    #define CONS_COLOR_BLACK        0
25    #define CONS_COLOR_RED          1
26    #define CONS_COLOR_GREEN        2
27    #define CONS_COLOR_YELLOW       3
28    #define CONS_COLOR_BLUE         4
29    #define CONS_COLOR_MAGENTA      5
30    #define CONS_COLOR_CYAN         6
31    #define CONS_COLOR_WHITE        7
32    
33    typedef struct
34    {
35    #define CONS_ATTR_INTENSITY_NORMAL      000000000000
36    #define CONS_ATTR_INTENSITY_BOLD        000000000001
37    #define CONS_ATTR_INTENSITY_DIM         000000000002
38      uint32_t intensity : 2;
39      uint32_t underlined : 1;
40      uint32_t blinking : 1;
41      uint32_t reversed : 1;
42      uint32_t concealed : 1;
43      uint32_t bgcol : 3;
44      uint32_t fgcol : 3;
45    } conchar_attr_t;
46      
47    typedef struct
48    {
49      wchar_t chr;
50      conchar_attr_t attr;
51    } conchar_t;
52    
53  struct cons_display  struct cons_display
54  {  {
55  #define CONS_MAGIC 0x48555244   /* Hex for "HURD".  */  #define CONS_MAGIC 0x48555244   /* Hex for "HURD".  */
# Line 61  struct cons_display Line 90  struct cons_display
90    /* Don't use this, use ((wchar_t *) cons_display +    /* Don't use this, use ((wchar_t *) cons_display +
91       cons_display.screen.matrix) instead.  This will make your client       cons_display.screen.matrix) instead.  This will make your client
92       upward compatible with future versions of this interface.  */       upward compatible with future versions of this interface.  */
93    wchar_t _matrix[0];    conchar_t _matrix[0];
94  };  };
95    
96    
97    #define CONS_KEY_UP             "\e[A"          /* Cursor up.  */
98    #define CONS_KEY_DOWN           "\e[B"          /* Cursor down.  */
99    #define CONS_KEY_RIGHT          "\e[C"          /* Cursor right.  */
100    #define CONS_KEY_LEFT           "\e[D"          /* Cursor left.  */
101    #define CONS_KEY_HOME           "\e[H"          /* Home key.  */
102    #define CONS_KEY_BACKSPACE      "\177"          /* Backspace key.  */
103    #define CONS_KEY_F1             "\eOP"          /* Function key 1.  */
104    #define CONS_KEY_F2             "\eOQ"          /* Function key 2.  */
105    #define CONS_KEY_F3             "\eOR"          /* Function key 3.  */
106    #define CONS_KEY_F4             "\eOS"          /* Function key 4.  */
107    #define CONS_KEY_F5             "\eOT"          /* Function key 5.  */
108    #define CONS_KEY_F6             "\eOU"          /* Function key 6.  */
109    #define CONS_KEY_F7             "\eOV"          /* Function key 7.  */
110    #define CONS_KEY_F8             "\eOW"          /* Function key 8.  */
111    #define CONS_KEY_F9             "\eOX"          /* Function key 9.  */
112    #define CONS_KEY_F10            "\eOY"          /* Function key 10.  */
113    #define CONS_KEY_DC             "\e[9"          /* Delete character.  */
114    #define CONS_KEY_NPAGE          "\e[U"          /* Next page.  */
115    #define CONS_KEY_PPAGE          "\e[V"          /* Previous page.  */
116    #define CONS_KEY_BTAB           "\e[Z"          /* Back tab key.  */
117    #define CONS_KEY_IC             "\e[@"          /* Insert char mode.  */
118    #define CONS_KEY_END            "\e[Y"          /* End key.  */
119    
120  #endif  /* _HURD_CONSOLE_H */  #endif  /* _HURD_CONSOLE_H */

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26