VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.1/randrstr.h@ 33983

Last change on this file since 33983 was 27528, checked in by vboxsync, 15 years ago

Additions/x11/x11include: additional headers for supporting dynamic resizing in older X.Org Additions

File size: 3.8 KB
Line 
1/*
2 * $XFree86: xc/programs/Xserver/randr/randrstr.h,v 1.5 2002/09/29 23:39:45 keithp Exp $
3 *
4 * Copyright © 2000 Compaq Computer Corporation
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Compaq not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. Compaq makes no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
16 * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL COMPAQ BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
23 */
24
25#ifdef HAVE_DIX_CONFIG_H
26#include <dix-config.h>
27#endif
28
29#ifndef _RANDRSTR_H_
30#define _RANDRSTR_H_
31
32#include <X11/extensions/randr.h>
33
34typedef struct _rrScreenRate {
35 int rate;
36 Bool referenced;
37 Bool oldReferenced;
38} RRScreenRate, *RRScreenRatePtr;
39
40typedef struct _rrScreenSize {
41 int id;
42 short width, height;
43 short mmWidth, mmHeight;
44 RRScreenRatePtr pRates;
45 int nRates;
46 int nRatesInUse;
47 Bool referenced;
48 Bool oldReferenced;
49} RRScreenSize, *RRScreenSizePtr;
50
51typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
52 Rotation rotation,
53 int rate,
54 RRScreenSizePtr pSize);
55
56typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation *rotations);
57typedef Bool (*RRCloseScreenProcPtr) ( int i, ScreenPtr pscreen);
58
59typedef struct _rrScrPriv {
60 RRSetConfigProcPtr rrSetConfig;
61 RRGetInfoProcPtr rrGetInfo;
62
63 TimeStamp lastSetTime; /* last changed by client */
64 TimeStamp lastConfigTime; /* possible configs changed */
65 RRCloseScreenProcPtr CloseScreen;
66
67 /*
68 * Configuration information
69 */
70 Rotation rotations;
71
72 int nSizes;
73 int nSizesInUse;
74 RRScreenSizePtr pSizes;
75
76 /*
77 * Current state
78 */
79 Rotation rotation;
80 int size;
81 int rate;
82} rrScrPrivRec, *rrScrPrivPtr;
83
84extern int rrPrivIndex;
85
86#define rrGetScrPriv(pScr) ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr)
87#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
88#define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (pointer) (p))
89
90/* Initialize the extension */
91void
92RRExtensionInit (void);
93
94/*
95 * Then, register the specific size with the screen
96 */
97
98RRScreenSizePtr
99RRRegisterSize (ScreenPtr pScreen,
100 short width,
101 short height,
102 short mmWidth,
103 short mmHeight);
104
105Bool RRRegisterRate (ScreenPtr pScreen,
106 RRScreenSizePtr pSize,
107 int rate);
108
109/*
110 * Finally, set the current configuration of the screen
111 */
112
113void
114RRSetCurrentConfig (ScreenPtr pScreen,
115 Rotation rotation,
116 int rate,
117 RRScreenSizePtr pSize);
118
119Bool RRScreenInit(ScreenPtr pScreen);
120
121Rotation
122RRGetRotation (ScreenPtr pScreen);
123
124int
125RRSetScreenConfig (ScreenPtr pScreen,
126 Rotation rotation,
127 int rate,
128 RRScreenSizePtr pSize);
129
130Bool
131miRandRInit (ScreenPtr pScreen);
132
133Bool
134miRRGetInfo (ScreenPtr pScreen, Rotation *rotations);
135
136Bool
137miRRSetConfig (ScreenPtr pScreen,
138 Rotation rotation,
139 int rate,
140 RRScreenSizePtr size);
141
142Bool
143miRRGetScreenInfo (ScreenPtr pScreen);
144
145#endif /* _RANDRSTR_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette