Annotation of sys/dev/wscons/wsemulvar.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: wsemulvar.h,v 1.7 2006/12/09 20:06:48 miod Exp $ */
2: /* $NetBSD: wsemulvar.h,v 1.6 1999/01/17 15:46:15 drochner Exp $ */
3:
4: /*
5: * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
6: *
7: * Redistribution and use in source and binary forms, with or without
8: * modification, are permitted provided that the following conditions
9: * are met:
10: * 1. Redistributions of source code must retain the above copyright
11: * notice, this list of conditions and the following disclaimer.
12: * 2. Redistributions in binary form must reproduce the above copyright
13: * notice, this list of conditions and the following disclaimer in the
14: * documentation and/or other materials provided with the distribution.
15: * 3. All advertising materials mentioning features or use of this software
16: * must display the following acknowledgement:
17: * This product includes software developed by Christopher G. Demetriou
18: * for the NetBSD Project.
19: * 4. The name of the author may not be used to endorse or promote products
20: * derived from this software without specific prior written permission
21: *
22: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32: */
33:
34: struct device;
35: struct wsdisplay_emulops;
36:
37: enum wsemul_resetops {
38: WSEMUL_RESET,
39: WSEMUL_SYNCFONT,
40: WSEMUL_CLEARSCREEN
41: };
42:
43: struct wsemul_ops {
44: char name[WSEMUL_NAME_SIZE];
45:
46: void *(*cnattach)(const struct wsscreen_descr *, void *,
47: int, int, long);
48: void *(*attach)(int console, const struct wsscreen_descr *, void *,
49: int, int, void *, long);
50: void (*output)(void *cookie, const u_char *data, u_int count,
51: int);
52: int (*translate)(void *, keysym_t, char **);
53: void (*detach)(void *cookie, u_int *crow, u_int *ccol);
54: void (*reset)(void *, enum wsemul_resetops);
55: };
56:
57: extern const struct wsemul_ops wsemul_dumb_ops;
58: extern const struct wsemul_ops wsemul_sun_ops;
59: extern const struct wsemul_ops wsemul_vt100_ops;
60:
61: const struct wsemul_ops *wsemul_pick(const char *);
62:
63: /*
64: * Callbacks from the emulation code to the display interface driver.
65: */
66: void wsdisplay_emulbell(void *v);
67: void wsdisplay_emulinput(void *v, const u_char *, u_int);
CVSweb