]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
de355530 A |
6 | * The contents of this file constitute Original Code as defined in and |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
1c79356b | 11 | * |
de355530 A |
12 | * This Original Code and all software distributed under the License are |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
de355530 A |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | */ | |
25 | /* | |
26 | * Mach Operating System | |
27 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | |
28 | * All Rights Reserved. | |
29 | * | |
30 | * Permission to use, copy, modify and distribute this software and its | |
31 | * documentation is hereby granted, provided that both the copyright | |
32 | * notice and this permission notice appear in all copies of the | |
33 | * software, derivative works or modified versions, and any portions | |
34 | * thereof, and that both notices appear in supporting documentation. | |
35 | * | |
36 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
37 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
38 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
39 | * | |
40 | * Carnegie Mellon requests users of this software to return to | |
41 | * | |
42 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
43 | * School of Computer Science | |
44 | * Carnegie Mellon University | |
45 | * Pittsburgh PA 15213-3890 | |
46 | * | |
47 | * any improvements or extensions that they make and grant Carnegie Mellon | |
48 | * the rights to redistribute these changes. | |
49 | */ | |
50 | /* | |
51 | */ | |
52 | /* | |
53 | * File: screen_switch.h | |
54 | * Author: Alessandro Forin, Carnegie Mellon University | |
55 | * Date: 10/90 | |
56 | * | |
57 | * Definitions of things that must be tailored to | |
58 | * specific hardware boards for the Generic Screen Driver. | |
59 | */ | |
60 | ||
61 | #ifndef SCREEN_SWITCH_H | |
62 | #define SCREEN_SWITCH_H 1 | |
63 | ||
64 | #include <mach/boolean.h> | |
65 | ||
66 | /* | |
67 | * List of probe routines, scanned at cold-boot time | |
68 | * to see which, if any, graphic display is available. | |
69 | * This is done before autoconf, so that printing on | |
70 | * the console works early on. The alloc routine is | |
71 | * called only on the first device that answers. | |
72 | * Ditto for the setup routine, called later on. | |
73 | */ | |
74 | struct screen_probe_vector { | |
75 | int (*probe)(void); | |
76 | unsigned int (*alloc)(void); | |
77 | int (*setup)(int, user_info_t); | |
78 | }; | |
79 | ||
80 | /* | |
81 | * Low-level operations on the graphic device, used | |
82 | * by the otherwise device-independent interface code | |
83 | */ | |
84 | ||
85 | /* Forward declaration of screen_softc_t */ | |
86 | typedef struct screen_softc *screen_softc_t; | |
87 | ||
88 | struct screen_switch { | |
89 | int (*graphic_open)(void); /* when X11 opens */ | |
90 | int (*graphic_close)(screen_softc_t); /* .. or closes */ | |
91 | int (*set_status)(screen_softc_t, | |
92 | dev_flavor_t, | |
93 | dev_status_t, | |
94 | natural_t); /* dev-specific ops */ | |
95 | int (*get_status)(screen_softc_t, | |
96 | dev_flavor_t, | |
97 | dev_status_t, | |
98 | natural_t*); /* dev-specific ops */ | |
99 | int (*char_paint)(screen_softc_t, | |
100 | int, | |
101 | int, | |
102 | int); /* blitc */ | |
103 | int (*pos_cursor)(void*, | |
104 | int, | |
105 | int); /* cursor positioning*/ | |
106 | int (*insert_line)(screen_softc_t, | |
107 | short); /* ..and scroll down */ | |
108 | int (*remove_line)(screen_softc_t, | |
109 | short); /* ..and scroll up */ | |
110 | int (*clear_bitmap)(screen_softc_t); /* blank screen */ | |
111 | int (*video_on)(void*, | |
112 | user_info_t*); /* screen saver */ | |
113 | int (*video_off)(void*, | |
114 | user_info_t*); | |
115 | int (*intr_enable)(void*, | |
116 | boolean_t); | |
117 | int (*map_page)(screen_softc_t, | |
118 | vm_offset_t, | |
119 | int); /* user-space mapping*/ | |
120 | }; | |
121 | ||
122 | /* | |
123 | * Each graphic device needs page-aligned memory | |
124 | * to be mapped in user space later (for events | |
125 | * and such). Size and content of this memory | |
126 | * is unfortunately device-dependent, even if | |
127 | * it did not need to (puns). | |
128 | */ | |
129 | extern char *screen_data; | |
130 | ||
131 | extern struct screen_probe_vector screen_probe_vector[]; | |
132 | ||
133 | extern int screen_noop(void), screen_find(void); | |
134 | ||
135 | #endif /* SCREEN_SWITCH_H */ |