Home | History | Annotate | Line # | Download | only in wscons
      1  1.11    martin /*	$NetBSD: wsksymvar.h,v 1.11 2008/04/28 20:24:01 martin Exp $ */
      2   1.2   hannken 
      3   1.2   hannken /*-
      4   1.2   hannken  * Copyright (c) 1997 The NetBSD Foundation, Inc.
      5   1.2   hannken  * All rights reserved.
      6   1.2   hannken  *
      7   1.2   hannken  * This code is derived from software contributed to The NetBSD Foundation
      8   1.2   hannken  * by Juergen Hannken-Illjes.
      9   1.2   hannken  *
     10   1.2   hannken  * Redistribution and use in source and binary forms, with or without
     11   1.2   hannken  * modification, are permitted provided that the following conditions
     12   1.2   hannken  * are met:
     13   1.2   hannken  * 1. Redistributions of source code must retain the above copyright
     14   1.2   hannken  *    notice, this list of conditions and the following disclaimer.
     15   1.2   hannken  * 2. Redistributions in binary form must reproduce the above copyright
     16   1.2   hannken  *    notice, this list of conditions and the following disclaimer in the
     17   1.2   hannken  *    documentation and/or other materials provided with the distribution.
     18   1.2   hannken  *
     19   1.2   hannken  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20   1.2   hannken  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21   1.2   hannken  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22   1.2   hannken  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23   1.2   hannken  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24   1.2   hannken  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25   1.2   hannken  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26   1.2   hannken  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27   1.2   hannken  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28   1.2   hannken  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29   1.2   hannken  * POSSIBILITY OF SUCH DAMAGE.
     30   1.2   hannken  */
     31   1.2   hannken 
     32   1.1   hannken #ifndef _DEV_WSCONS_WSKSYMVAR_H_
     33   1.1   hannken #define _DEV_WSCONS_WSKSYMVAR_H_
     34   1.1   hannken 
     35   1.1   hannken #ifndef _KERNEL
     36   1.1   hannken #include <sys/types.h>
     37   1.1   hannken #endif
     38   1.1   hannken 
     39   1.1   hannken typedef u_int16_t keysym_t;
     40   1.9   hannken typedef u_int32_t kbd_t;
     41   1.1   hannken 
     42   1.1   hannken struct wscons_keymap {
     43   1.1   hannken 	keysym_t command;
     44   1.1   hannken 	keysym_t group1[2];
     45   1.1   hannken 	keysym_t group2[2];
     46   1.1   hannken };
     47   1.1   hannken 
     48   1.1   hannken #ifdef _KERNEL
     49   1.1   hannken struct wscons_keydesc {
     50   1.1   hannken 	kbd_t	name;				/* name of this map */
     51   1.1   hannken 	kbd_t	base;				/* map this one is based on */
     52   1.1   hannken 	int	map_size;			/* size of map */
     53   1.1   hannken 	const keysym_t *map;			/* the map itself */
     54   1.1   hannken };
     55   1.1   hannken 
     56   1.6  drochner struct wskbd_mapdata {
     57   1.6  drochner 	const struct wscons_keydesc *keydesc;
     58   1.6  drochner 	kbd_t layout;
     59   1.6  drochner };
     60   1.8  drochner 
     61   1.8  drochner /* layout variant bits ignored by mapping code */
     62   1.8  drochner #define KB_HANDLEDBYWSKBD KB_METAESC
     63   1.6  drochner 
     64   1.1   hannken /*
     65   1.1   hannken  * Utility functions.
     66   1.1   hannken  */
     67  1.10  augustss void	wskbd_get_mapentry(const struct wskbd_mapdata *, int,
     68  1.10  augustss 			   struct wscons_keymap *);
     69  1.10  augustss void	wskbd_init_keymap(int, struct wscons_keymap **, int *);
     70  1.10  augustss int	wskbd_load_keymap(const struct wskbd_mapdata *,
     71  1.10  augustss                           struct wscons_keymap **, int *);
     72  1.10  augustss keysym_t wskbd_compose_value(keysym_t *);
     73   1.1   hannken 
     74   1.1   hannken #endif
     75   1.1   hannken 
     76   1.1   hannken #endif /* !_DEV_WSCONS_WSKSYMVAR_H_ */
     77