~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/x11/xrandr.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
  $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $
 
3
 
 
4
  Copyright (C) 2000 Compaq Computer Corporation, Inc.
 
5
  Copyright (C) 2002 Hewlett-Packard Company, Inc.
 
6
 
 
7
  Permission to use, copy, modify, distribute, and sell this software and its
 
8
  documentation for any purpose is hereby granted without fee, provided that
 
9
  the above copyright notice appear in all copies and that both that
 
10
  copyright notice and this permission notice appear in supporting
 
11
  documentation, and that the name of Compaq not be used in advertising or
 
12
  publicity pertaining to distribution of the software without specific,
 
13
  written prior permission.  HP makes no representations about the
 
14
  suitability of this software for any purpose.  It is provided "as is"
 
15
  without express or implied warranty.
 
16
 
 
17
  HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 
18
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ
 
19
  BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
20
  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 
21
  OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
 
22
  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
23
 
 
24
  Author:  Jim Gettys, HP Labs, HP.
 
25
}
 
26
 
 
27
unit xrandr;
 
28
 
 
29
interface
 
30
 
 
31
{$PACKRECORDS c}
 
32
 
 
33
uses
 
34
  ctypes, x, xlib;
 
35
 
 
36
const
 
37
  libXrandr = 'Xrandr';
 
38
 
 
39
{$I randr.inc}
 
40
 
 
41
type
 
42
  PXRRScreenSize = ^TXRRScreenSize;
 
43
  TXRRScreenSize = record
 
44
    width, height : cint;
 
45
    mwidth, mheight : cint;
 
46
  end;
 
47
 
 
48
{
 
49
   Events.
 
50
}
 
51
 
 
52
  TXRRScreenChangeNotifyEvent = record
 
53
    _type : cint;                 { event base }
 
54
    serial : culong;              { # of last request processed by server }
 
55
    send_event : TBool;           { true if this came from a SendEvent request }
 
56
    display : PDisplay;           { Display the event was read from }
 
57
    window : TWindow;             { window which selected for this event }
 
58
    root : TWindow;               { Root window for changed screen }
 
59
    timestamp : TTime;            { when the screen change occurred }
 
60
    config_timestamp : TTime;     { when the last configuration change }
 
61
    size_index : TSizeID;
 
62
    subpixel_order : TSubpixelOrder;
 
63
    rotation : TRotation;
 
64
    width : cint;
 
65
    height : cint;
 
66
    mwidth : cint;
 
67
    mheight : cint;
 
68
  end;
 
69
 
 
70
 
 
71
{ internal representation is private to the library }
 
72
  PXRRScreenConfiguration = ^TXRRScreenConfiguration;
 
73
  TXRRScreenConfiguration = record end;
 
74
 
 
75
function XRRQueryExtension(
 
76
  dpy : PDisplay;
 
77
  event_basep,
 
78
  error_basep : Pcint) : TBool; cdecl; external libXrandr;
 
79
 
 
80
function XRRQueryVersion(
 
81
  dpy : PDisplay;
 
82
  major_versionp : Pcint;
 
83
  minor_versionp : Pcint) : TStatus; cdecl; external libXrandr;
 
84
 
 
85
function XRRGetScreenInfo(
 
86
  dpy : PDisplay;
 
87
  draw : TDrawable) : PXRRScreenConfiguration; cdecl; external libXrandr;
 
88
 
 
89
procedure XRRFreeScreenConfigInfo(
 
90
  config : PXRRScreenConfiguration); cdecl; external libXrandr;
 
91
 
 
92
{
 
93
  Note that screen configuration changes are only permitted if the client can
 
94
  prove it has up to date configuration information.  We are trying to
 
95
  insist that it become possible for screens to change dynamically, so
 
96
  we want to ensure the client knows what it is talking about when requesting
 
97
  changes.
 
98
}
 
99
function XRRSetScreenConfig(
 
100
  dpy : PDisplay;
 
101
  config : PXRRScreenConfiguration;
 
102
  draw : TDrawable;
 
103
  size_index : cint;
 
104
  rotation : TRotation;
 
105
  timestamp : TTime) : TStatus; cdecl; external libXrandr;
 
106
 
 
107
{ added in v1.1, sorry for the lame name }
 
108
function XRRSetScreenConfigAndRate(
 
109
  dpy : PDisplay;
 
110
  config : PXRRScreenConfiguration;
 
111
  draw : TDrawable;
 
112
  size_index : cint;
 
113
  rotation : TRotation;
 
114
  rate : cshort;
 
115
  timestamp : TTime) : TStatus; cdecl; external libXrandr;
 
116
 
 
117
 
 
118
function XRRConfigRotations(
 
119
  config : PXRRScreenConfiguration;
 
120
  current_rotation : PRotation) : TRotation; cdecl; external libXrandr;
 
121
 
 
122
function XRRConfigTimes(
 
123
  config : PXRRScreenConfiguration;
 
124
  config_timestamp : PTime) : TTime; cdecl; external libXrandr;
 
125
 
 
126
function XRRConfigSizes(
 
127
  config : PXRRScreenConfiguration;
 
128
  nsizes : Pcint) : PXRRScreenSize; cdecl; external libXrandr;
 
129
 
 
130
function XRRConfigRates(
 
131
  config : PXRRScreenConfiguration;
 
132
  sizeID : cint;
 
133
  nrates : Pcint) : Pcshort; cdecl; external libXrandr;
 
134
 
 
135
function XRRConfigCurrentConfiguration(
 
136
  config : PXRRScreenConfiguration;
 
137
  rotation : PRotation) : TSizeID; cdecl; external libXrandr;
 
138
 
 
139
function XRRConfigCurrentRate(
 
140
  config : PXRRScreenConfiguration) : cshort; cdecl; external libXrandr;
 
141
 
 
142
function XRRRootToScreen(
 
143
  dpy : PDisplay;
 
144
  root : TWindow) : cint; cdecl; external libXrandr;
 
145
 
 
146
{
 
147
  returns the screen configuration for the specified screen; does a lazy
 
148
  evalution to delay getting the information, and caches the result.
 
149
  These routines should be used in preference to XRRGetScreenInfo
 
150
  to avoid unneeded round trips to the X server.  These are new
 
151
  in protocol version 0.1.
 
152
}
 
153
 
 
154
 
 
155
function XRRScreenConfig(
 
156
  dpy : PDisplay;
 
157
  screen : cint) : PXRRScreenConfiguration; cdecl; external libXrandr;
 
158
function XRRConfig(
 
159
  screen : PScreen) : PXRRScreenConfiguration; cdecl; external libXrandr;
 
160
procedure XRRSelectInput(
 
161
  dpy : PDisplay;
 
162
  window : TWindow;
 
163
  mask : cint); cdecl; external libXrandr;
 
164
 
 
165
{
 
166
  the following are always safe to call, even if RandR is not implemented 
 
167
  on a screen 
 
168
}
 
169
 
 
170
 
 
171
function XRRRotations(
 
172
  dpy : PDisplay;
 
173
  screen : cint;
 
174
  current_rotation : PRotation) : TRotation; cdecl; external libXrandr;
 
175
function XRRSizes(
 
176
  dpy : PDisplay;
 
177
  screen : cint;
 
178
  nsizes : Pcint) : PXRRScreenSize; cdecl; external libXrandr;
 
179
function XRRRates(
 
180
  dpy : PDisplay;
 
181
  screen : cint;
 
182
  sizeID : cint;
 
183
  nrates : Pcint) : Pcshort; cdecl; external libXrandr;
 
184
function XRRTimes(
 
185
  dpy : PDisplay;
 
186
  screen : cint;
 
187
  config_timestamp : PTime) : TTime; cdecl; external libXrandr;
 
188
 
 
189
 
 
190
{
 
191
  intended to take RRScreenChangeNotify,  or 
 
192
  ConfigureNotify (on the root window)
 
193
  returns 1 if it is an event type it understands, 0 if not
 
194
}
 
195
function XRRUpdateConfiguration(
 
196
  event : PXEvent) : cint; cdecl; external libXrandr;
 
197
 
 
198
implementation
 
199
 
 
200
end.