Sync usage with man page.
[netbsd-mini2440.git] / sys / compat / darwin / darwin_ioframebuffer.h
blob1af5c42d40cf5ea9cb177b4c1e77783897937e86
1 /* $NetBSD: darwin_ioframebuffer.h,v 1.12 2005/12/11 12:19:56 christos Exp $ */
3 /*-
4 * Copyright (c) 2003 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Emmanuel Dreyfus
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _DARWIN_IOFRAMEBUFFER_H_
33 #define _DARWIN_IOFRAMEBUFFER_H_
35 extern struct mach_iokit_devclass darwin_ioframebuffer_devclass;
37 #define DARWIN_IOFRAMEBUFFER_CURSOR_MEMORY 100
38 #define DARWIN_IOFRAMEBUFFER_VRAM_MEMORY 110
39 #define DARWIN_IOFRAMEBUFFER_SYSTEM_APERTURE 0
41 struct darwin_ioframebuffer_shmem {
42 darwin_ev_lock_data_t dis_sem;
43 char dis_cursshow;
44 char dis_sursobscured;
45 char dis_shieldflag;
46 char dis_dhielded;
47 darwin_iogbounds dis_saverect;
48 darwin_iogbounds dis_shieldrect;
49 darwin_iogpoint dis_location;
50 darwin_iogbounds dis_cursrect;
51 darwin_iogbounds dis_oldcursrect;
52 darwin_iogbounds dis_screen;
53 int version;
54 darwin_absolutetime dis_vbltime;
55 darwin_absolutetime dis_vbldelta;
56 unsigned int dis_reserved1[30];
57 unsigned char dis_hwcurscapable;
58 unsigned char dis_hwcursactive;
59 unsigned char dis_hwcursshields;
60 unsigned char dis_reserved2;
61 darwin_iogsize dis_cursorsize[4];
62 darwin_iogpoint dis_hotspot[4];
63 unsigned char dis_curs[0];
66 /* I/O selectors for io_connect_method_{scalar|struct}i_{scalar|struct}o */
67 #define DARWIN_IOFBCREATESHAREDCURSOR 0
68 #define DARWIN_IOFBGETPIXELINFORMATION 1
69 #define DARWIN_IOFBGETCURRENTDISPLAYMODE 2
70 #define DARWIN_IOFBSETSTARTUPDISPLAYMODE 3
71 #define DARWIN_IOFBSETDISPLAYMODE 4
72 #define DARWIN_IOFBGETINFORMATIONFORDISPLAYMODE 5
73 #define DARWIN_IOFBGETDISPLAYMODECOUNT 6
74 #define DARWIN_IOFBGETDISPLAYCOUNT 7
75 #define DARWIN_IOFBGETVRAMMAPOFFSET 8
76 #define DARWIN_IOFBSETBOUNDS 9
77 #define DARWIN_IOFBSETNEWCURSOR 10
78 #define DARWIN_IOFBSETGAMMATABLE 11
79 #define DARWIN_IOFBSETCURSORVISIBLE 12
80 #define DARWIN_IOFBSETCURSORPOSITION 13
81 #define DARWIN_IOFBACKNOWLEDGENOTIFICATION 14
82 #define DARWIN_IOFBSETCOLORCONVERTTABLE 15
83 #define DARWIN_IOFBSETCLUTWITHENTRIES 16
84 #define DARWIN_IOFBVALIDATEDETAILEDTIMING 17
85 #define DARWIN_IOFBGETATTRIBUTE 18
87 /* For DARWIN_IOFBSETCLUTWITHENTRIES */
88 typedef uint16_t darwin_iocolorcomponent;
89 struct darwin_iocolorentry {
90 uint16_t index;
91 darwin_iocolorcomponent red;
92 darwin_iocolorcomponent green;
93 darwin_iocolorcomponent blue;
96 /* For DARWIN_IOFBCREATESHAREDCURSOR */
97 #define DARWIN_IOMAXPIXELBITS 64
99 typedef int32_t darwin_ioindex;
100 typedef int32_t darwin_iodisplaymodeid;
101 typedef uint32_t darwin_iobytecount;
102 typedef darwin_ioindex darwin_iopixelaperture;
103 typedef char darwin_iopixelencoding[DARWIN_IOMAXPIXELBITS];
105 /* pixeltype */
106 #define DARWIN_IOFB_CLUTPIXELS 0;
107 #define DARWIN_IOFB_FIXEDCLUTPIXELS 1;
108 #define DARWIN_IOFB_RGBDIRECTPIXELS 2;
109 #define DARWIN_IOFB_MONODIRECTPIXELS 3;
110 #define DARWIN_IOFB_MONOINVERSEDIRECTPIXELS 4;
112 typedef struct {
113 darwin_iobytecount bytesperrow;
114 darwin_iobytecount bytesperplane;
115 uint32_t bitsperpixel;
116 uint32_t pixeltype;
117 uint32_t componentcount;
118 uint32_t bitspercomponent;
119 uint32_t componentmasks[16];
120 darwin_iopixelencoding pixelformat;
121 uint32_t flags;
122 uint32_t activewidth;
123 uint32_t activeheight;
124 uint32_t reserved[2];
125 } darwin_iopixelinformation;
128 darwin_ioframebuffer_connect_method_scalari_scalaro(struct mach_trap_args *);
130 darwin_ioframebuffer_connect_method_scalari_structo(struct mach_trap_args *);
132 darwin_ioframebuffer_connect_method_structi_structo(struct mach_trap_args *);
134 darwin_ioframebuffer_connect_method_scalari_structi(struct mach_trap_args *);
135 int darwin_ioframebuffer_connect_map_memory(struct mach_trap_args *);
137 #endif /* _DARWIN_IOFRAMEBUFFER_H_ */