Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1029 | serge | 1 | /* |
2 | * Copyright 2007 Luc Verhaegen |
||
3 | * Copyright 2007 Matthias Hopf |
||
4 | * Copyright 2007 Egbert Eich |
||
5 | * Copyright 2007 Advanced Micro Devices, Inc. |
||
6 | * |
||
7 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
8 | * copy of this software and associated documentation files (the "Software"), |
||
9 | * to deal in the Software without restriction, including without limitation |
||
10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
11 | * and/or sell copies of the Software, and to permit persons to whom the |
||
12 | * Software is furnished to do so, subject to the following conditions: |
||
13 | * |
||
14 | * The above copyright notice and this permission notice shall be included in |
||
15 | * all copies or substantial portions of the Software. |
||
16 | * |
||
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
20 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
23 | * OTHER DEALINGS IN THE SOFTWARE. |
||
24 | */ |
||
25 | |||
26 | #ifndef _RHD_LUT_H |
||
27 | #define _RHD_LUT_H |
||
28 | |||
29 | struct rhdLUT { |
||
30 | int scrnIndex; |
||
31 | |||
32 | char *Name; |
||
33 | #define RHD_LUT_A 0 |
||
34 | #define RHD_LUT_B 1 |
||
35 | int Id; |
||
36 | |||
37 | void (*Save) (struct rhdLUT *LUT); |
||
38 | void (*Restore) (struct rhdLUT *LUT); |
||
39 | void (*Set) (struct rhdLUT *LUT, int numColors, int *indices, LOCO *colors); |
||
40 | |||
41 | /* because RandR does not specifically initialise a gamma ramp when |
||
42 | setting up a CRTC */ |
||
43 | Bool Initialised; |
||
44 | |||
45 | Bool Stored; |
||
46 | |||
47 | CARD32 StoreControl; |
||
48 | |||
49 | CARD32 StoreBlackRed; |
||
50 | CARD32 StoreBlackGreen; |
||
51 | CARD32 StoreBlackBlue; |
||
52 | |||
53 | CARD32 StoreWhiteRed; |
||
54 | CARD32 StoreWhiteGreen; |
||
55 | CARD32 StoreWhiteBlue; |
||
56 | |||
57 | CARD16 StoreEntry[0x300]; |
||
58 | }; |
||
59 | |||
60 | void RHDLUTsInit(RHDPtr rhdPtr); |
||
61 | void RHDLUTsSave(RHDPtr rhdPtr); |
||
62 | void RHDLUTsRestore(RHDPtr rhdPtr); |
||
63 | void RHDLUTsDestroy(RHDPtr rhdPtr); |
||
64 | |||
65 | /* For missing RandR functionality */ |
||
66 | void RHDLUTCopyForRR(struct rhdLUT *LUT); |
||
67 | |||
68 | #endif /* _RHD_LUT_H */ |