The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386/include/pcvt_ioctl.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1992, 2000 Hellmuth Michaelis
    3  * Copyright (c) 1992, 1995 Joerg Wunsch.
    4  * Copyright (c) 1992, 1993 Brian Dunford-Shore and Holger Veit.
    5  * Copyright (C) 1992, 1993 Soeren Schmidt.
    6  * All rights reserved.
    7  *
    8  * For the sake of compatibility, portions of this code regarding the
    9  * X server interface are taken from Soeren Schmidt's syscons driver.
   10  *
   11  * This code is derived from software contributed to 386BSD by
   12  * Holger Veit.
   13  *
   14  * This code is derived from software contributed to Berkeley by
   15  * William Jolitz and Don Ahn.
   16  *
   17  * Redistribution and use in source and binary forms, with or without
   18  * modification, are permitted provided that the following conditions
   19  * are met:
   20  * 1. Redistributions of source code must retain the above copyright
   21  *    notice, this list of conditions and the following disclaimer.
   22  * 2. Redistributions in binary form must reproduce the above copyright
   23  *    notice, this list of conditions and the following disclaimer in the
   24  *    documentation and/or other materials provided with the distribution.
   25  * 3. All advertising materials mentioning features or use of this software
   26  *    must display the following acknowledgement:
   27  *      This product includes software developed by
   28  *      Hellmuth Michaelis, Brian Dunford-Shore, Joerg Wunsch, Holger Veit
   29  *      and Soeren Schmidt.
   30  * 4. The name authors may not be used to endorse or promote products
   31  *    derived from this software without specific prior written permission.
   32  *
   33  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
   34  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   35  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   36  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
   37  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   38  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   39  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   40  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   41  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   42  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   43  */
   44  
   45 /*---------------------------------------------------------------------------
   46  *
   47  *      pcvt_ioctl.h    ioctl's for the VT220 video driver 'pcvt'
   48  *      ---------------------------------------------------------
   49  *
   50  *      Last Edit-Date: [Fri Mar 31 10:22:29 2000]
   51  *
   52  * $FreeBSD: releng/6.0/sys/i386/include/pcvt_ioctl.h 139790 2005-01-06 22:18:23Z imp $
   53  * 
   54  *---------------------------------------------------------------------------*/
   55 
   56 #ifndef _MACHINE_PCVT_IOCTL_H_
   57 #define _MACHINE_PCVT_IOCTL_H_
   58 
   59 /* pcvt version information for VGAPCVTID ioctl */
   60 
   61 #define PCVTIDNAME    "pcvt"            /* driver id - string           */
   62 #define PCVTIDMAJOR   3                 /* driver id - major release    */
   63 #define PCVTIDMINOR   60                /* driver id - minor release    */
   64 
   65 #if !defined(_KERNEL)
   66 #include <sys/types.h>
   67 #endif
   68 #include <sys/ioccom.h>
   69 
   70 /*---------------------------------------------------------------------------*
   71  *              IOCTLs for MF II and AT Keyboards
   72  *---------------------------------------------------------------------------*/
   73 
   74 #define KBDRESET        _IO('K',  1)      /* reset keyboard / set defaults */
   75 #define KBDGTPMAT       _IOR('K', 2, int) /* get current typematic value   */
   76 #define KBDSTPMAT       _IOW('K', 3, int) /* set current typematic value   */
   77 
   78 /*      Typematic Delay Values  */
   79 
   80 #define KBD_TPD250      0x00                    /*  250 ms      */
   81 #define KBD_TPD500      0x20                    /*  500 ms      */
   82 #define KBD_TPD750      0x40                    /*  750 ms      */
   83 #define KBD_TPD1000     0x60                    /* 1000 ms      */
   84 
   85 /*      Typematic Repeat Rate   */
   86 
   87 #define KBD_TPM300      0x00                    /* 30.0 char/second */
   88 #define KBD_TPM267      0x01                    /* 26.7 char/second */
   89 #define KBD_TPM240      0x02                    /* 24.0 char/second */
   90 #define KBD_TPM218      0x03                    /* 21.8 char/second */
   91 #define KBD_TPM200      0x04                    /* 20.0 char/second */
   92 #define KBD_TPM185      0x05                    /* 18.5 char/second */
   93 #define KBD_TPM171      0x06                    /* 17.1 char/second */
   94 #define KBD_TPM160      0x07                    /* 16.0 char/second */
   95 #define KBD_TPM150      0x08                    /* 15.0 char/second */
   96 #define KBD_TPM133      0x09                    /* 13.3 char/second */
   97 #define KBD_TPM120      0x0A                    /* 12.0 char/second */
   98 #define KBD_TPM109      0x0B                    /* 10.9 char/second */
   99 #define KBD_TPM100      0x0C                    /* 10.0 char/second */
  100 #define KBD_TPM92       0x0D                    /*  9.2 char/second */
  101 #define KBD_TPM86       0x0E                    /*  8.6 char/second */
  102 #define KBD_TPM80       0x0F                    /*  8.0 char/second */
  103 #define KBD_TPM75       0x10                    /*  7.5 char/second */
  104 #define KBD_TPM67       0x11                    /*  6.7 char/second */
  105 #define KBD_TPM60       0x12                    /*  6.0 char/second */
  106 #define KBD_TPM55       0x13                    /*  5.5 char/second */
  107 #define KBD_TPM50       0x14                    /*  5.0 char/second */
  108 #define KBD_TPM46       0x15                    /*  4.6 char/second */
  109 #define KBD_TPM43       0x16                    /*  4.3 char/second */
  110 #define KBD_TPM40       0x17                    /*  4.0 char/second */
  111 #define KBD_TPM37       0x18                    /*  3.7 char/second */
  112 #define KBD_TPM33       0x19                    /*  3.3 char/second */
  113 #define KBD_TPM30       0x1A                    /*  3.0 char/second */
  114 #define KBD_TPM27       0x1B                    /*  2.7 char/second */
  115 #define KBD_TPM25       0x1C                    /*  2.5 char/second */
  116 #define KBD_TPM23       0x1D                    /*  2.3 char/second */
  117 #define KBD_TPM21       0x1E                    /*  2.1 char/second */
  118 #define KBD_TPM20       0x1F                    /*  2.0 char/second */
  119 
  120 #define KBDGREPSW       _IOR('K', 4, int)       /* get key repetition switch */
  121 #define KBDSREPSW       _IOW('K', 5, int)       /* set key repetition switch */
  122 #define         KBD_REPEATOFF   0
  123 #define         KBD_REPEATON    1
  124 
  125 #define KBDGLEDS        _IOR('K', 6, int)       /* get LED state */
  126 #define KBDSLEDS        _IOW('K', 7, int)       /* set LED state, does not influence */
  127 #define         KBD_SCROLLLOCK  0x0001          /* the driver's idea of lock key state */
  128 #define         KBD_NUMLOCK     0x0002
  129 #define         KBD_CAPSLOCK    0x0004
  130 #define KBDGLOCK        _IOR('K', 8, int)       /* gets state of SCROLL,NUM,CAPS */
  131 #define KBDSLOCK        _IOW('K', 9, int)       /* sets state of SCROLL,NUM,CAPS + LEDs */
  132 
  133 #define KBDMAXOVLKEYSIZE        15              /* + zero byte */
  134 
  135 struct kbd_ovlkey                               /* complete definition of a key */
  136 {
  137         u_short keynum;                         /* the key itself */
  138         u_short type;                           /* type of key, see below */
  139         u_char  subu;                           /* subtype, ignored on write */
  140         char    unshift[KBDMAXOVLKEYSIZE+1];    /* emitted string, unshifted */
  141         u_char  subs;                           /* subtype, ignored on write */
  142         char    shift[KBDMAXOVLKEYSIZE+1];      /* emitted string, shifted */
  143         u_char  subc;                           /* subtype, ignored on write */
  144         char    ctrl[KBDMAXOVLKEYSIZE+1];       /* emitted string, control */
  145         u_char  suba;                           /* subtype, ignored on write */
  146         char    altgr[KBDMAXOVLKEYSIZE+1];      /* emitted string, altgr */
  147 };
  148 
  149 /*      Max value for keynum field      */
  150 
  151 #define KBDMAXKEYS      128             /* Max No. of Keys */
  152 
  153 /*      Values for type field   */
  154 
  155 #define KBD_NONE        0       /* no function, key is disabled */
  156 #define KBD_SHIFT       1       /* keyboard shift */
  157 #define KBD_META        2       /* alternate shift, sets bit8 to ASCII code */
  158 #define KBD_NUM         3       /* numeric shift, keypad num / appl */
  159 #define KBD_CTL         4       /* control code generation */
  160 #define KBD_CAPS        5       /* caps shift - swaps case of letter */
  161 #define KBD_ASCII       6       /* ascii code generating key */
  162 #define KBD_SCROLL      7       /* stop output */
  163 #define KBD_FUNC        8       /* function key */
  164 #define KBD_KP          9       /* keypad keys */
  165 #define KBD_BREAK       10      /* ignored */
  166 #define KBD_ALTGR       11      /* AltGr Translation feature */
  167 #define KBD_SHFTLOCK    12      /* shiftlock */
  168 #define KBD_CURSOR      13      /* cursor keys */
  169 #define KBD_RETURN      14      /* RETURN/ENTER keys */
  170 
  171 /*      Values  for subtype field       */
  172 
  173 #define KBD_SUBT_STR    0       /* key is bound to a string */
  174 #define KBD_SUBT_FNC    1       /* key is bound to a function */
  175 
  176 
  177 #define KBD_OVERLOAD    0x8000  /* Key is overloaded, ignored in ioctl */
  178 #define KBD_MASK        (~KBD_OVERLOAD) /* mask for type */
  179 
  180 #define KBDGCKEY        _IOWR('K',16, struct kbd_ovlkey)        /* get current key values */
  181 #define KBDSCKEY        _IOW('K',17, struct kbd_ovlkey)         /* set new key assignment values*/
  182 #define KBDGOKEY        _IOWR('K',18, struct kbd_ovlkey)        /* get original key assignment values*/
  183 
  184 #define KBDRMKEY        _IOW('K',19, int)       /* remove a key assignment */
  185 #define KBDDEFAULT      _IO('K',20)             /* remove all key assignments */
  186 
  187 /*---------------------------------------------------------------------------*
  188  *              IOCTLs for Video Adapter
  189  *---------------------------------------------------------------------------*/
  190 
  191 /* Definition of PC Video Adaptor Types */
  192 
  193 #define UNKNOWN_ADAPTOR 0       /* Unidentified adaptor ... */
  194 #define MDA_ADAPTOR     1       /* Monochrome Display Adaptor/Hercules Graphics Card */
  195 #define CGA_ADAPTOR     2       /* Color Graphics Adaptor */
  196 #define EGA_ADAPTOR     3       /* Enhanced Graphics Adaptor */
  197 #define VGA_ADAPTOR     4       /* Video Graphics Adaptor/Array */
  198 
  199 /* Definitions of Monitor types */
  200 
  201 #define MONITOR_MONO    0       /* Monochrome Monitor */
  202 #define MONITOR_COLOR   1       /* Color Monitor */
  203 
  204 /* Types of VGA chips detectable by current driver version */
  205 
  206 #define VGA_F_NONE      0       /* FAMILY NOT KNOWN */
  207 #define VGA_UNKNOWN     0       /* default, no 132 columns      */
  208 
  209 #define VGA_F_TSENG     1       /* FAMILY TSENG */
  210 #define VGA_ET4000      1       /* Tseng Labs ET4000            */
  211 #define VGA_ET3000      2       /* Tseng Labs ET3000            */
  212 
  213 #define VGA_F_WD        2       /* FAMILY WD */
  214 #define VGA_PVGA        3       /* Western Digital Paradise VGA */
  215 #define VGA_WD90C00     4       /* Western Digital WD90C00      */
  216 #define VGA_WD90C10     5       /* Western Digital WD90C10      */
  217 #define VGA_WD90C11     6       /* Western Digital WD90C11      */
  218 
  219 #define VGA_F_V7        3       /* FAMILY VIDEO 7 */
  220 #define VGA_V7VEGA      7       /* Video 7 VEGA VGA */
  221 #define VGA_V7FWVR      8       /* Video 7 FASTWRITE/VRAM */
  222 #define VGA_V7V5        9       /* Video 7 Version 5 */
  223 #define VGA_V71024I     10      /* Video 7 1024i */
  224 #define VGA_V7UNKNOWN   11      /* Video 7 unknown board .. */
  225 
  226 #define VGA_F_TRI       4       /* FAMILY TRIDENT */
  227 #define VGA_TR8800BR    12      /* Trident TVGA 8800BR */
  228 #define VGA_TR8800CS    13      /* Trident TVGA 8800CS */
  229 #define VGA_TR8900B     14      /* Trident TVGA 8900B  */
  230 #define VGA_TR8900C     15      /* Trident TVGA 8900C  */
  231 #define VGA_TR8900CL    16      /* Trident TVGA 8900CL */
  232 #define VGA_TR9000      17      /* Trident TVGA 9000   */
  233 #define VGA_TR9100      18      /* Trident TVGA 9100   */
  234 #define VGA_TR9200      19      /* Trident TVGA 9200   */
  235 #define VGA_TRUNKNOWN   20      /* Trident unknown     */
  236 
  237 #define VGA_F_S3        5       /* FAMILY S3  */
  238 #define VGA_S3_911      21      /* S3 911 */
  239 #define VGA_S3_924      22      /* S3 924 */
  240 #define VGA_S3_80x      23      /* S3 801/805 */
  241 #define VGA_S3_928      24      /* S3 928 */
  242 #define VGA_S3_UNKNOWN  25      /* unknown S3 chipset */
  243 
  244 #define VGA_F_CIR       6       /* FAMILY CIRRUS */
  245 #define VGA_CL_GD5402   26      /* Cirrus CL-GD5402     */
  246 #define VGA_CL_GD5402r1 27      /* Cirrus CL-GD5402r1   */
  247 #define VGA_CL_GD5420   28      /* Cirrus CL-GD5420     */
  248 #define VGA_CL_GD5420r1 29      /* Cirrus CL-GD5420r1   */
  249 #define VGA_CL_GD5422   30      /* Cirrus CL-GD5422     */
  250 #define VGA_CL_GD5424   31      /* Cirrus CL-GD5424     */
  251 #define VGA_CL_GD5426   32      /* Cirrus CL-GD5426     */
  252 #define VGA_CL_GD5428   33      /* Cirrus CL-GD5428     */
  253 
  254 /*****************************************************************************/
  255 /* NOTE: update the 'scon' utility when adding support for more chipsets !!! */
  256 /*****************************************************************************/
  257 
  258 /* Definitions of Vertical Screen Sizes for EGA/VGA Adaptors */
  259 
  260 #define SIZ_25ROWS      0       /* VGA: 25 lines, 8x16 font */
  261                                 /* EGA: 25 lines, 8x14 font */
  262 #define SIZ_28ROWS      1       /* VGA: 28 lines, 8x14 font */
  263 #define SIZ_35ROWS      2       /* EGA: 35 lines, 8x10 font */
  264 #define SIZ_40ROWS      3       /* VGA: 40 lines, 8x10 font */
  265 #define SIZ_43ROWS      4       /* EGA: 43 lines, 8x8  font */
  266 #define SIZ_50ROWS      5       /* VGA: 50 lines, 8x8  font */
  267 
  268 /* Definitions of Font Sizes for EGA/VGA Adaptors */
  269 
  270 #define FNT_8x16        0       /* 8x16 Pixel Font, only VGA */
  271 #define FNT_8x14        1       /* 8x14 Pixel Font, EGA/VGA  */
  272 #define FNT_8x10        2       /* 8x10 Pixel Font, EGA/VGA  */
  273 #define FNT_8x8         3       /* 8x8  Pixel Font, EGA/VGA  */
  274 
  275 /* Definitions of Character Set (Font) Numbers */
  276 
  277 #define CH_SET0         0       /* Character Set (Font) 0, EGA/VGA */
  278 #define CH_SET1         1       /* Character Set (Font) 1, EGA/VGA */
  279 #define CH_SET2         2       /* Character Set (Font) 2, EGA/VGA */
  280 #define CH_SET3         3       /* Character Set (Font) 3, EGA/VGA */
  281 #define CH_SETMAX_EGA   3       /* EGA has 4 Character Sets / Fonts */
  282 #define CH_SET4         4       /* Character Set (Font) 4, VGA */
  283 #define CH_SET5         5       /* Character Set (Font) 5, VGA */
  284 #define CH_SET6         6       /* Character Set (Font) 6, VGA */
  285 #define CH_SET7         7       /* Character Set (Font) 7, VGA */
  286 #define CH_SETMAX_VGA   7       /* VGA has 8 Character Sets / Fonts */
  287 
  288 /* Definitions of Terminal Emulation Modes */
  289 
  290 #define M_HPVT          0       /* VTxxx and HP Mode, Labels & Status Line on */
  291 #define M_PUREVT        1       /* only VTxxx Sequences recognized, no Labels */
  292 
  293 /*---*/
  294 
  295 #define VGACURSOR       _IOW('V',100, struct cursorshape) /* set cursor shape */
  296 
  297 struct cursorshape {
  298         int screen_no;     /* screen number for which to set,               */
  299                            /*  or -1 to set on current active screen        */
  300         int start;         /* top scanline, range 0... Character Height - 1 */
  301         int end;           /* end scanline, range 0... Character Height - 1 */
  302 };
  303 
  304 #define VGALOADCHAR     _IOW('V',101, struct vgaloadchar) /* load vga char */
  305 
  306 struct vgaloadchar {
  307         int character_set;          /* VGA character set to load into */
  308         int character;              /* Character to load */
  309         int character_scanlines;    /* Scanlines per character */
  310         u_char char_table[32];      /* VGA character shape table */
  311 };
  312 
  313 #define VGASETFONTATTR  _IOW('V',102, struct vgafontattr) /* set font attr */
  314 #define VGAGETFONTATTR  _IOWR('V',103, struct vgafontattr) /* get font attr */
  315 
  316 struct vgafontattr {
  317         int character_set;          /* VGA character set */
  318         int font_loaded;            /* Mark font loaded or unloaded */
  319         int screen_size;            /* Character rows per screen */
  320         int character_scanlines;    /* Scanlines per character - 1 */
  321         int screen_scanlines;       /* Scanlines per screen - 1 byte */
  322 };
  323 
  324 #define VGASETSCREEN    _IOW('V',104, struct screeninfo) /* set screen info */
  325 #define VGAGETSCREEN    _IOWR('V',105, struct screeninfo) /* get screen info */
  326 
  327 struct screeninfo {
  328         int adaptor_type;       /* type of video adaptor installed      */
  329                                 /* read only, ignored on write          */
  330         int monitor_type;       /* type of monitor (mono/color)installed*/
  331                                 /* read only, ignored on write          */
  332         int totalfonts;         /* no of downloadable fonts             */
  333                                 /* read only, ignored on write          */
  334         int totalscreens;       /* no of virtual screens                */
  335                                 /* read only, ignored on write          */
  336         int screen_no;          /* screen number, this was got from     */
  337                                 /* on write, if -1, apply pure_vt_mode  */
  338                                 /* and/or screen_size to current screen */
  339                                 /* else to screen_no supplied           */
  340         int current_screen;     /* screen number, which is displayed.   */
  341                                 /* on write, if -1, make this screen    */
  342                                 /* the current screen, else set current */
  343                                 /* displayed screen to parameter        */
  344         int pure_vt_mode;       /* flag, pure VT mode or HP/VT mode     */
  345                                 /* on write, if -1, no change           */
  346         int screen_size;        /* screen size                          */
  347                                 /* on write, if -1, no change           */
  348         int force_24lines;      /* force 24 lines if 25 lines VT mode   */
  349                                 /* or 28 lines HP mode to get pure      */
  350                                 /* VT220 screen size                    */
  351                                 /* on write, if -1, no change           */
  352         int vga_family;         /* if adaptor_type = VGA, this reflects */
  353                                 /* the chipset family after a read      */
  354                                 /* nothing happens on write ...        */
  355         int vga_type;           /* if adaptor_type = VGA, this reflects */
  356                                 /* the chipset after a read             */
  357                                 /* nothing happens on write ...        */
  358         int vga_132;            /* set to 1 if driver has support for   */
  359                                 /* 132 column operation for chipset     */
  360                                 /* currently ignored on write           */
  361 };
  362 
  363 #define VGAREADPEL      _IOWR('V', 110, struct vgapel) /*r VGA palette entry */
  364 #define VGAWRITEPEL     _IOW('V', 111, struct vgapel)  /*w VGA palette entry */
  365 
  366 struct vgapel {
  367         unsigned idx;           /* index into palette, 0 .. 255 valid   */
  368         unsigned r, g, b;       /* RGB values, masked by VGA_PMASK (63) */
  369 };
  370 
  371 /* NOTE: The next ioctl is only valid if option PCVT_SCREENSAVER is configured*/
  372 /* this is *not* restricted to VGA's, but won't introduce new garbage...      */
  373 
  374 #define VGASCREENSAVER  _IOW('V', 112, int)     /* set timeout for screen     */
  375                                                 /* saver in seconds; 0 turns  */
  376                                                 /* it off                     */
  377 
  378 #define VGAPCVTID       _IOWR('V',113, struct pcvtid)   /* get driver id */
  379 
  380 struct pcvtid {                         /* THIS STRUCTURE IS NOW FROZEN !!! */
  381 #define PCVTIDNAMELN  16                /* driver id - string length    */
  382         char name[PCVTIDNAMELN];        /* driver name, == PCVTIDSTR    */
  383         int rmajor;                     /* revision number, major       */
  384         int rminor;                     /* revision number, minor       */
  385 };                                      /* END OF COLD PART ...         */
  386 
  387 #define VGAPCVTINFO     _IOWR('V',114, struct pcvtinfo) /* get driver info */
  388 
  389 struct pcvtinfo {                       /* compile time option values */
  390         u_int nscreens;                 /* PCVT_NSCREENS */
  391         u_int scanset;                  /* PCVT_SCANSET */
  392         u_int updatefast;               /* PCVT_UPDATEFAST */
  393         u_int updateslow;               /* PCVT_UPDATESLOW */
  394         u_int sysbeepf;                 /* PCVT_SYSBEEPF */
  395         u_int pcburst;                  /* PCVT_PCBURST */
  396         u_int kbd_fifo_sz;              /* PCVT_KBD_FIFO_SZ */
  397 
  398 /* config booleans */
  399 
  400         u_long compile_opts;            /* PCVT_xxxxxxxxxxxxxxx */
  401 
  402 #define CONF_VT220KEYB          0x00000001
  403 #define CONF_SCREENSAVER        0x00000002
  404 #define CONF_PRETTYSCRNS        0x00000004
  405 #define CONF_CTRL_ALT_DEL       0x00000008
  406 #define CONF_USEKBDSEC          0x00000010
  407 #define CONF_24LINESDEF         0x00000020
  408 #define CONF_SHOWKEYS           0x00000040
  409 #define CONF_NULLCHARS          0x00000080
  410 #define CONF_SETCOLOR           0x00000100
  411 #define CONF_132GENERIC         0x00000200
  412 #define CONF_XSERVER            0x00000400
  413 #define CONF_INHIBIT_NUMLOCK    0x00000800
  414 #define CONF_META_ESC           0x00001000
  415 #define CONF_SLOW_INTERRUPT     0x00002000
  416 #define CONF_NO_LED_UPDATE      0x00004000
  417 #define CONF_GREENSAVER         0x00008000
  418 };
  419 
  420 #define VGASETCOLMS     _IOW('V', 115, int) /* set number of columns (80/132)*/
  421 
  422 /*
  423  * start of USL VT compatibility stuff (in case XSERVER defined)
  424  * these definitions must match those ones used by syscons
  425  *
  426  * Note that some of the ioctl command definitions below break the Berkeley
  427  * style. They accept a parameter of type "int" (instead of Berkeley style
  428  * "int *") in order to pass a single integer to the ioctl. These macros
  429  * below are marked with a dummy "int" comment. Dont blame anyone else
  430  * than USL for that braindeadness. It is done here to be a bit source-
  431  * level compatible to SysV. (N.B., within the ioctl, the argument is
  432  * dereferenced by "int *" anyway. The translation is done by the upper-
  433  * level ioctl stuff.)
  434  */
  435 
  436 /*
  437  * NB: Some of the definitions below apparently override the definitions
  438  * in the KBD section above. But, due to BSDs encoding of the IO direction
  439  * and transfer size, the resulting ioctl cmds differ, so we can take them
  440  * here. The only real conflict would appear if we implemented KDGKBMODE,
  441  * which would be identical to KBDGLEDS above. Since this command is not
  442  * necessary for XFree86 2.0, we omit it.
  443  */
  444 
  445 /* #define KDGKBMODE    _IOR('K', 6, int) */ /* not yet implemented */
  446 
  447 #define KDSKBMODE       _IO('K', 7 /*, int */)
  448 #define K_RAW           0               /* keyboard returns scancodes   */
  449 #define K_XLATE         1               /* keyboard returns ascii       */
  450 
  451 #define KDMKTONE        _IO('K', 8 /*, int */)
  452 
  453 /* #define KDGETMODE    _IOR('K', 9, int) */ /* not yet implemented */
  454 
  455 #define KDSETMODE       _IO('K', 10 /*, int */)
  456 #define KD_TEXT         0               /* set text mode restore fonts  */
  457 #define KD_GRAPHICS     1               /* set graphics mode            */
  458 
  459 /* we cannot see any sense to support KD_TEXT0 or KD_TEXT1 */
  460 
  461 #define KDENABIO        _IO('K', 60) /* only allowed if euid == 0 */
  462 #define KDDISABIO       _IO('K', 61)
  463 
  464 #define KDGETLED        _IOR('K', 65, int)
  465 #define KDSETLED        _IO('K', 66 /*, int */)
  466 #define LED_CAP         1
  467 #define LED_NUM         2
  468 #define LED_SCR         4
  469 
  470 #define KDSETRAD        _IO('K', 67 /*, int */)
  471 
  472 /*
  473  * Note that since our idea of key mapping is much different from the
  474  * SysV style, we _only_ support mapping layers base (0), shifted (1),
  475  * alt (4), and alt-shift (5), and only for the basic keys (without
  476  * any function keys). This is what XFree86 2.0+ needs to establish
  477  * the default X keysym mapping.
  478  */
  479 #define GIO_KEYMAP      _IOR('k', 6, keymap_t)
  480 
  481 #define VT_OPENQRY      _IOR('v', 1, int)
  482 #define VT_SETMODE      _IOW('v', 2, vtmode_t)
  483 #define VT_GETMODE      _IOR('v', 3, vtmode_t)
  484 
  485 #define VT_RELDISP      _IO('v', 4 /*, int */)
  486 
  487 /* acceptable values for the VT_RELDISP command */
  488 
  489 #define VT_FALSE        0               /* release of VT refused */
  490 #define VT_TRUE         1               /* VT released */
  491 #define VT_ACKACQ       2               /* acknowledging VT acquisition */
  492 
  493 
  494 #define VT_ACTIVATE     _IO('v', 5 /*, int */)
  495 #define VT_WAITACTIVE   _IO('v', 6 /*, int */)
  496 #define VT_GETACTIVE    _IOR('v', 7, int)
  497 
  498 #ifndef _VT_MODE_DECLARED
  499 #define _VT_MODE_DECLARED
  500 struct vt_mode {
  501         char    mode;
  502 
  503 #define VT_AUTO         0               /* switching controlled by drvr */
  504 #define VT_PROCESS      1               /* switching controlled by prog */
  505 
  506         char    waitv;                  /* not implemented yet  SOS     */
  507         short   relsig;
  508         short   acqsig;
  509         short   frsig;                  /* not implemented yet  SOS     */
  510 };
  511 
  512 typedef struct vt_mode vtmode_t;
  513 #endif /* !_VT_MODE_DECLARED */
  514 
  515 #define NUM_KEYS        256
  516 #define NUM_STATES      8
  517 
  518 #ifndef _KEYMAP_DECLARED
  519 #define _KEYMAP_DECLARED
  520 struct keyent_t {
  521         u_char map[NUM_STATES];
  522         u_char spcl;
  523         u_char flgs;
  524 };
  525 
  526 struct keymap {
  527         u_short n_keys;
  528         struct keyent_t key[NUM_KEYS];
  529 };
  530 
  531 typedef struct keymap keymap_t;
  532 #endif /* !_KEYMAP_DECLARED */
  533 
  534 /* end of USL VT compatibility stuff */
  535 
  536 #endif /* !_MACHINE_PCVT_IOCTL_H_ */

Cache object: 0255de6e2bb987a683be688c1dc45d3f


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.