VirtualBox

source: vbox/trunk/include/VBox/xrandr.h@ 104338

Last change on this file since 104338 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/** @file
2 * Module to dynamically load libXrandr and load all symbols which are needed by
3 * VirtualBox.
4 */
5
6/*
7 * Copyright (C) 2008-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37#ifndef VBOX_INCLUDED_xrandr_h
38#define VBOX_INCLUDED_xrandr_h
39#ifndef RT_WITHOUT_PRAGMA_ONCE
40# pragma once
41#endif
42
43#include <iprt/types.h>
44#include <iprt/stdarg.h>
45
46#ifndef __cplusplus
47# error "This header requires C++ to avoid name clashes."
48#endif
49
50/* Define missing X11/XRandr structures, types and macros. */
51
52#define Bool int
53#define RRScreenChangeNotifyMask (1L << 0)
54#define RRScreenChangeNotify 0
55
56struct _XDisplay;
57typedef struct _XDisplay Display;
58
59typedef unsigned long Atom;
60typedef unsigned long XID;
61typedef XID RROutput;
62typedef XID Window;
63typedef XID RROutput;
64typedef XID RRCrtc;
65typedef XID RRMode;
66typedef unsigned long XRRModeFlags;
67typedef unsigned long int Time;
68
69struct XRRMonitorInfo
70{
71 Atom name;
72 Bool primary;
73 Bool automatic;
74 int noutput;
75 int x;
76 int y;
77 int width;
78 int height;
79 int mwidth;
80 int mheight;
81 RROutput *outputs;
82};
83typedef struct XRRMonitorInfo XRRMonitorInfo;
84
85struct XRRModeInfo
86{
87 RRMode id;
88 unsigned int width;
89 unsigned int height;
90 unsigned long dotClock;
91 unsigned int hSyncStart;
92 unsigned int hSyncEnd;
93 unsigned int hTotal;
94 unsigned int hSkew;
95 unsigned int vSyncStart;
96 unsigned int vSyncEnd;
97 unsigned int vTotal;
98 char *name;
99 unsigned int nameLength;
100 XRRModeFlags modeFlags;
101};
102typedef struct XRRModeInfo XRRModeInfo;
103
104struct XRRScreenResources
105{
106 Time timestamp;
107 Time configTimestamp;
108 int ncrtc;
109 RRCrtc *crtcs;
110 int noutput;
111 RROutput *outputs;
112 int nmode;
113 XRRModeInfo *modes;
114};
115typedef struct XRRScreenResources XRRScreenResources;
116
117/* Declarations of the functions that we need from libXrandr. */
118#define VBOX_XRANDR_GENERATE_HEADER
119
120#include <VBox/xrandr-calls.h>
121
122#undef VBOX_XRANDR_GENERATE_HEADER
123
124#endif /* !VBOX_INCLUDED_xrandr_h */
125
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