randrstr.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. /*
  2. * Copyright © 2000 Compaq Computer Corporation
  3. * Copyright © 2002 Hewlett-Packard Company
  4. * Copyright © 2006 Intel 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 copyright
  9. * notice and this permission notice appear in supporting documentation, and
  10. * that the name of the copyright holders not be used in advertising or
  11. * publicity pertaining to distribution of the software without specific,
  12. * written prior permission. The copyright holders make no representations
  13. * about the suitability of this software for any purpose. It is provided "as
  14. * is" without express or implied warranty.
  15. *
  16. * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  17. * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  18. * EVENT SHALL THE COPYRIGHT HOLDERS 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 PERFORMANCE
  22. * OF THIS SOFTWARE.
  23. *
  24. * Author: Jim Gettys, Hewlett-Packard Company, Inc.
  25. * Keith Packard, Intel Corporation
  26. */
  27. #ifdef HAVE_DIX_CONFIG_H
  28. #include <dix-config.h>
  29. #endif
  30. #ifndef _RANDRSTR_H_
  31. #define _RANDRSTR_H_
  32. #include <X11/X.h>
  33. #include <X11/Xproto.h>
  34. #include "misc.h"
  35. #include "os.h"
  36. #include "dixstruct.h"
  37. #include "resource.h"
  38. #include "scrnintstr.h"
  39. #include "windowstr.h"
  40. #include "pixmapstr.h"
  41. #include "extnsionst.h"
  42. #include "servermd.h"
  43. #include <X11/extensions/randr.h>
  44. #include <X11/extensions/randrproto.h>
  45. #include <X11/extensions/render.h> /* we share subpixel order information */
  46. #include "picturestr.h"
  47. #include <X11/Xfuncproto.h>
  48. /* required for ABI compatibility for now */
  49. #define RANDR_10_INTERFACE 1
  50. #define RANDR_12_INTERFACE 1
  51. typedef XID RRMode;
  52. typedef XID RROutput;
  53. typedef XID RRCrtc;
  54. extern int RREventBase, RRErrorBase;
  55. extern int (*ProcRandrVector[RRNumberRequests]) (ClientPtr);
  56. extern int (*SProcRandrVector[RRNumberRequests]) (ClientPtr);
  57. /*
  58. * Modeline for a monitor. Name follows directly after this struct
  59. */
  60. #define RRModeName(pMode) ((char *) (pMode + 1))
  61. typedef struct _rrMode RRModeRec, *RRModePtr;
  62. typedef struct _rrPropertyValue RRPropertyValueRec, *RRPropertyValuePtr;
  63. typedef struct _rrProperty RRPropertyRec, *RRPropertyPtr;
  64. typedef struct _rrCrtc RRCrtcRec, *RRCrtcPtr;
  65. typedef struct _rrOutput RROutputRec, *RROutputPtr;
  66. struct _rrMode {
  67. int refcnt;
  68. xRRModeInfo mode;
  69. char *name;
  70. void *devPrivate;
  71. Bool userDefined;
  72. };
  73. struct _rrPropertyValue {
  74. Atom type; /* ignored by server */
  75. short format; /* format of data for swapping - 8,16,32 */
  76. long size; /* size of data in (format/8) bytes */
  77. pointer data; /* private to client */
  78. };
  79. struct _rrProperty {
  80. RRPropertyPtr next;
  81. ATOM propertyName;
  82. Bool is_pending;
  83. Bool range;
  84. Bool immutable;
  85. int num_valid;
  86. INT32 *valid_values;
  87. RRPropertyValueRec current, pending;
  88. };
  89. struct _rrCrtc {
  90. RRCrtc id;
  91. ScreenPtr pScreen;
  92. RRModePtr mode;
  93. int x, y;
  94. Rotation rotation;
  95. Rotation rotations;
  96. Bool changed;
  97. int numOutputs;
  98. RROutputPtr *outputs;
  99. int gammaSize;
  100. CARD16 *gammaRed;
  101. CARD16 *gammaBlue;
  102. CARD16 *gammaGreen;
  103. void *devPrivate;
  104. };
  105. struct _rrOutput {
  106. RROutput id;
  107. ScreenPtr pScreen;
  108. char *name;
  109. int nameLength;
  110. CARD8 connection;
  111. CARD8 subpixelOrder;
  112. int mmWidth;
  113. int mmHeight;
  114. RRCrtcPtr crtc;
  115. int numCrtcs;
  116. RRCrtcPtr *crtcs;
  117. int numClones;
  118. RROutputPtr *clones;
  119. int numModes;
  120. int numPreferred;
  121. RRModePtr *modes;
  122. Bool changed;
  123. RRPropertyPtr properties;
  124. void *devPrivate;
  125. };
  126. #if RANDR_12_INTERFACE
  127. typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen,
  128. CARD16 width,
  129. CARD16 height,
  130. CARD32 mmWidth, CARD32 mmHeight);
  131. typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
  132. RRCrtcPtr crtc,
  133. RRModePtr mode,
  134. int x,
  135. int y,
  136. Rotation rotation,
  137. int numOutputs, RROutputPtr * outputs);
  138. typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
  139. typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen,
  140. RROutputPtr output,
  141. Atom property,
  142. RRPropertyValuePtr value);
  143. #endif
  144. typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation * rotations);
  145. typedef Bool (*RRCloseScreenProcPtr) (int i, ScreenPtr pscreen);
  146. /* These are for 1.0 compatibility */
  147. typedef struct _rrRefresh {
  148. CARD16 rate;
  149. RRModePtr mode;
  150. } RRScreenRate, *RRScreenRatePtr;
  151. typedef struct _rrScreenSize {
  152. int id;
  153. short width, height;
  154. short mmWidth, mmHeight;
  155. int nRates;
  156. RRScreenRatePtr pRates;
  157. } RRScreenSize, *RRScreenSizePtr;
  158. #ifdef RANDR_10_INTERFACE
  159. typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
  160. Rotation rotation,
  161. int rate, RRScreenSizePtr pSize);
  162. #endif
  163. typedef struct _rrScrPriv {
  164. /*
  165. * 'public' part of the structure; DDXen fill this in
  166. * as they initialize
  167. */
  168. #if RANDR_10_INTERFACE
  169. RRSetConfigProcPtr rrSetConfig;
  170. #endif
  171. RRGetInfoProcPtr rrGetInfo;
  172. #if RANDR_12_INTERFACE
  173. RRScreenSetSizeProcPtr rrScreenSetSize;
  174. RRCrtcSetProcPtr rrCrtcSet;
  175. RRCrtcSetGammaProcPtr rrCrtcSetGamma;
  176. RROutputSetPropertyProcPtr rrOutputSetProperty;
  177. #endif
  178. /*
  179. * Private part of the structure; not considered part of the ABI
  180. */
  181. TimeStamp lastSetTime; /* last changed by client */
  182. TimeStamp lastConfigTime; /* possible configs changed */
  183. RRCloseScreenProcPtr CloseScreen;
  184. Bool changed; /* some config changed */
  185. Bool configChanged; /* configuration changed */
  186. Bool layoutChanged; /* screen layout changed */
  187. CARD16 minWidth, minHeight;
  188. CARD16 maxWidth, maxHeight;
  189. CARD16 width, height; /* last known screen size */
  190. CARD16 mmWidth, mmHeight; /* last known screen size */
  191. int numOutputs;
  192. RROutputPtr *outputs;
  193. int numCrtcs;
  194. RRCrtcPtr *crtcs;
  195. /* Last known pointer position */
  196. RRCrtcPtr pointerCrtc;
  197. #ifdef RANDR_10_INTERFACE
  198. /*
  199. * Configuration information
  200. */
  201. Rotation rotations;
  202. CARD16 reqWidth, reqHeight;
  203. int nSizes;
  204. RRScreenSizePtr pSizes;
  205. Rotation rotation;
  206. int rate;
  207. int size;
  208. #endif
  209. } rrScrPrivRec, *rrScrPrivPtr;
  210. extern int rrPrivIndex;
  211. #define rrGetScrPriv(pScr) ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr)
  212. #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
  213. #define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (pointer) (p))
  214. /*
  215. * each window has a list of clients requesting
  216. * RRNotify events. Each client has a resource
  217. * for each window it selects RRNotify input for,
  218. * this resource is used to delete the RRNotifyRec
  219. * entry from the per-window queue.
  220. */
  221. typedef struct _RREvent *RREventPtr;
  222. typedef struct _RREvent {
  223. RREventPtr next;
  224. ClientPtr client;
  225. WindowPtr window;
  226. XID clientResource;
  227. int mask;
  228. } RREventRec;
  229. typedef struct _RRTimes {
  230. TimeStamp setTime;
  231. TimeStamp configTime;
  232. } RRTimesRec, *RRTimesPtr;
  233. typedef struct _RRClient {
  234. int major_version;
  235. int minor_version;
  236. /* RRTimesRec times[0]; */
  237. } RRClientRec, *RRClientPtr;
  238. extern RESTYPE RRClientType, RREventType; /* resource types for event masks */
  239. extern int RRClientPrivateIndex;
  240. extern RESTYPE RRCrtcType, RRModeType, RROutputType;
  241. #define LookupOutput(client,id,a) ((RROutputPtr) \
  242. (SecurityLookupIDByType (client, id, \
  243. RROutputType, a)))
  244. #define LookupCrtc(client,id,a) ((RRCrtcPtr) \
  245. (SecurityLookupIDByType (client, id, \
  246. RRCrtcType, a)))
  247. #define LookupMode(client,id,a) ((RRModePtr) \
  248. (SecurityLookupIDByType (client, id, \
  249. RRModeType, a)))
  250. #define GetRRClient(pClient) ((RRClientPtr) (pClient)->devPrivates[RRClientPrivateIndex].ptr)
  251. #define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
  252. /* Initialize the extension */
  253. void
  254. RRExtensionInit(void);
  255. #ifdef RANDR_12_INTERFACE
  256. /*
  257. * Set the range of sizes for the screen
  258. */
  259. void
  260. RRScreenSetSizeRange(ScreenPtr pScreen,
  261. CARD16 minWidth,
  262. CARD16 minHeight, CARD16 maxWidth, CARD16 maxHeight);
  263. #endif
  264. /* rrscreen.c */
  265. /*
  266. * Notify the extension that the screen size has been changed.
  267. * The driver is responsible for calling this whenever it has changed
  268. * the size of the screen
  269. */
  270. void
  271. RRScreenSizeNotify(ScreenPtr pScreen);
  272. /*
  273. * Request that the screen be resized
  274. */
  275. Bool
  276. RRScreenSizeSet(ScreenPtr pScreen,
  277. CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight);
  278. /*
  279. * Send ConfigureNotify event to root window when 'something' happens
  280. */
  281. void
  282. RRSendConfigNotify(ScreenPtr pScreen);
  283. /*
  284. * screen dispatch
  285. */
  286. int
  287. ProcRRGetScreenSizeRange(ClientPtr client);
  288. int
  289. ProcRRSetScreenSize(ClientPtr client);
  290. int
  291. ProcRRGetScreenResources(ClientPtr client);
  292. int
  293. ProcRRSetScreenConfig(ClientPtr client);
  294. int
  295. ProcRRGetScreenInfo(ClientPtr client);
  296. /*
  297. * Deliver a ScreenNotify event
  298. */
  299. void
  300. RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
  301. /* mirandr.c */
  302. Bool
  303. miRandRInit(ScreenPtr pScreen);
  304. Bool
  305. miRRGetInfo(ScreenPtr pScreen, Rotation * rotations);
  306. Bool
  307. miRRGetScreenInfo(ScreenPtr pScreen);
  308. Bool
  309. miRRCrtcSet(ScreenPtr pScreen,
  310. RRCrtcPtr crtc,
  311. RRModePtr mode,
  312. int x,
  313. int y, Rotation rotation, int numOutput, RROutputPtr * outputs);
  314. Bool
  315. miRROutputSetProperty(ScreenPtr pScreen,
  316. RROutputPtr output,
  317. Atom property, RRPropertyValuePtr value);
  318. /* randr.c */
  319. /*
  320. * Send all pending events
  321. */
  322. void
  323. RRTellChanged(ScreenPtr pScreen);
  324. /*
  325. * Poll the driver for changed information
  326. */
  327. Bool
  328. RRGetInfo(ScreenPtr pScreen);
  329. Bool RRInit(void);
  330. Bool RRScreenInit(ScreenPtr pScreen);
  331. RROutputPtr RRFirstOutput(ScreenPtr pScreen);
  332. Rotation RRGetRotation(ScreenPtr pScreen);
  333. CARD16
  334. RRVerticalRefresh(xRRModeInfo * mode);
  335. #ifdef RANDR_10_INTERFACE
  336. /*
  337. * This is the old interface, deprecated but left
  338. * around for compatibility
  339. */
  340. /*
  341. * Then, register the specific size with the screen
  342. */
  343. RRScreenSizePtr
  344. RRRegisterSize(ScreenPtr pScreen,
  345. short width, short height, short mmWidth, short mmHeight);
  346. Bool RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate);
  347. /*
  348. * Finally, set the current configuration of the screen
  349. */
  350. void
  351. RRSetCurrentConfig(ScreenPtr pScreen,
  352. Rotation rotation, int rate, RRScreenSizePtr pSize);
  353. Bool RRScreenInit(ScreenPtr pScreen);
  354. Rotation RRGetRotation(ScreenPtr pScreen);
  355. int
  356. RRSetScreenConfig(ScreenPtr pScreen,
  357. Rotation rotation, int rate, RRScreenSizePtr pSize);
  358. #endif
  359. /* rrcrtc.c */
  360. /*
  361. * Notify the CRTC of some change; layoutChanged indicates that
  362. * some position or size element changed
  363. */
  364. void
  365. RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged);
  366. /*
  367. * Create a CRTC
  368. */
  369. RRCrtcPtr RRCrtcCreate(void *devPrivate);
  370. /*
  371. * Set the allowed rotations on a CRTC
  372. */
  373. void
  374. RRCrtcSetRotations(RRCrtcPtr crtc, Rotation rotations);
  375. /*
  376. * Attach a CRTC to a screen. Once done, this cannot be
  377. * undone without destroying the CRTC; it is separate from Create
  378. * only to allow an xf86-based driver to create objects in preinit
  379. */
  380. Bool
  381. RRCrtcAttachScreen(RRCrtcPtr crtc, ScreenPtr pScreen);
  382. /*
  383. * Notify the extension that the Crtc has been reconfigured,
  384. * the driver calls this whenever it has updated the mode
  385. */
  386. Bool
  387. RRCrtcNotify(RRCrtcPtr crtc,
  388. RRModePtr mode,
  389. int x,
  390. int y, Rotation rotation, int numOutputs, RROutputPtr * outputs);
  391. void
  392. RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
  393. /*
  394. * Request that the Crtc be reconfigured
  395. */
  396. Bool
  397. RRCrtcSet(RRCrtcPtr crtc,
  398. RRModePtr mode,
  399. int x,
  400. int y, Rotation rotation, int numOutput, RROutputPtr * outputs);
  401. /*
  402. * Request that the Crtc gamma be changed
  403. */
  404. Bool
  405. RRCrtcGammaSet(RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue);
  406. /*
  407. * Notify the extension that the Crtc gamma has been changed
  408. * The driver calls this whenever it has changed the gamma values
  409. * in the RRCrtcRec
  410. */
  411. Bool
  412. RRCrtcGammaNotify(RRCrtcPtr crtc);
  413. /*
  414. * Set the size of the gamma table at server startup time
  415. */
  416. Bool
  417. RRCrtcGammaSetSize(RRCrtcPtr crtc, int size);
  418. void
  419. RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
  420. /*
  421. * Destroy a Crtc at shutdown
  422. */
  423. void
  424. RRCrtcDestroy(RRCrtcPtr crtc);
  425. /*
  426. * Initialize crtc type
  427. */
  428. Bool
  429. RRCrtcInit(void);
  430. /*
  431. * Crtc dispatch
  432. */
  433. int
  434. ProcRRGetCrtcInfo(ClientPtr client);
  435. int
  436. ProcRRSetCrtcConfig(ClientPtr client);
  437. int
  438. ProcRRGetCrtcGammaSize(ClientPtr client);
  439. int
  440. ProcRRGetCrtcGamma(ClientPtr client);
  441. int
  442. ProcRRSetCrtcGamma(ClientPtr client);
  443. /* rrdispatch.c */
  444. Bool
  445. RRClientKnowsRates(ClientPtr pClient);
  446. /* rrmode.c */
  447. /*
  448. * Find, and if necessary, create a mode
  449. */
  450. RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name);
  451. void
  452. RRModePruneUnused(ScreenPtr pScreen);
  453. /*
  454. * Destroy a mode.
  455. */
  456. void
  457. RRModeDestroy(RRModePtr mode);
  458. /*
  459. * Return a list of modes that are valid for some output in pScreen
  460. */
  461. RRModePtr *RRModesForScreen(ScreenPtr pScreen, int *num_ret);
  462. /*
  463. * Initialize mode type
  464. */
  465. Bool
  466. RRModeInit(void);
  467. int
  468. ProcRRCreateMode(ClientPtr client);
  469. int
  470. ProcRRDestroyMode(ClientPtr client);
  471. int
  472. ProcRRAddOutputMode(ClientPtr client);
  473. int
  474. ProcRRDeleteOutputMode(ClientPtr client);
  475. /* rroutput.c */
  476. /*
  477. * Notify the output of some change. configChanged indicates whether
  478. * any external configuration (mode list, clones, connected status)
  479. * has changed, or whether the change was strictly internal
  480. * (which crtc is in use)
  481. */
  482. void
  483. RROutputChanged(RROutputPtr output, Bool configChanged);
  484. /*
  485. * Create an output
  486. */
  487. RROutputPtr RROutputCreate(const char *name, int nameLength, void *devPrivate);
  488. /*
  489. * Attach an output to a screen, again split from creation so
  490. * xf86 DDXen can create randr resources before the ScreenRec
  491. * exists
  492. */
  493. Bool
  494. RROutputAttachScreen(RROutputPtr output, ScreenPtr pScreen);
  495. /*
  496. * Notify extension that output parameters have been changed
  497. */
  498. Bool
  499. RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones);
  500. Bool
  501. RROutputSetModes(RROutputPtr output,
  502. RRModePtr * modes, int numModes, int numPreferred);
  503. Bool
  504. RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs);
  505. void
  506. RROutputSetCrtc(RROutputPtr output, RRCrtcPtr crtc);
  507. Bool
  508. RROutputSetConnection(RROutputPtr output, CARD8 connection);
  509. Bool
  510. RROutputSetSubpixelOrder(RROutputPtr output, int subpixelOrder);
  511. Bool
  512. RROutputSetPhysicalSize(RROutputPtr output, int mmWidth, int mmHeight);
  513. void
  514. RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
  515. void
  516. RROutputDestroy(RROutputPtr output);
  517. int
  518. ProcRRGetOutputInfo(ClientPtr client);
  519. /*
  520. * Initialize output type
  521. */
  522. Bool
  523. RROutputInit(void);
  524. /* rrpointer.c */
  525. void
  526. RRPointerMoved(ScreenPtr pScreen, int x, int y);
  527. void
  528. RRPointerScreenConfigured(ScreenPtr pScreen);
  529. /* rrproperty.c */
  530. void
  531. RRDeleteAllOutputProperties(RROutputPtr output);
  532. RRPropertyValuePtr
  533. RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending);
  534. RRPropertyPtr RRQueryOutputProperty(RROutputPtr output, Atom property);
  535. void
  536. RRDeleteOutputProperty(RROutputPtr output, Atom property);
  537. int
  538. RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
  539. int format, int mode, unsigned long len,
  540. pointer value, Bool sendevent);
  541. int
  542. RRConfigureOutputProperty(RROutputPtr output, Atom property,
  543. Bool pending, Bool range, Bool immutable,
  544. int num_values, INT32 *values);
  545. int
  546. ProcRRChangeOutputProperty(ClientPtr client);
  547. int
  548. ProcRRGetOutputProperty(ClientPtr client);
  549. int
  550. ProcRRListOutputProperties(ClientPtr client);
  551. int
  552. ProcRRQueryOutputProperty(ClientPtr client);
  553. int
  554. ProcRRConfigureOutputProperty(ClientPtr client);
  555. int
  556. ProcRRDeleteOutputProperty(ClientPtr client);
  557. /* rrxinerama.c */
  558. void
  559. RRXineramaExtensionInit(void);
  560. #endif /* _RANDRSTR_H_ */
  561. /*
  562. randr extension implementation structure
  563. Query state:
  564. ProcRRGetScreenInfo/ProcRRGetScreenResources
  565. RRGetInfo
  566. • Request configuration from driver, either 1.0 or 1.2 style
  567. • These functions only record state changes, all
  568. other actions are pended until RRTellChanged is called
  569. ->rrGetInfo
  570. 1.0:
  571. RRRegisterSize
  572. RRRegisterRate
  573. RRSetCurrentConfig
  574. 1.2:
  575. RRScreenSetSizeRange
  576. RROutputSetCrtcs
  577. RROutputSetCrtc
  578. RRModeGet
  579. RROutputSetModes
  580. RROutputSetConnection
  581. RROutputSetSubpixelOrder
  582. RROutputSetClones
  583. RRCrtcNotify
  584. • Must delay scanning configuration until after ->rrGetInfo returns
  585. because some drivers will call SetCurrentConfig in the middle
  586. of the ->rrGetInfo operation.
  587. 1.0:
  588. • Scan old configuration, mirror to new structures
  589. RRScanOldConfig
  590. RRCrtcCreate
  591. RROutputCreate
  592. RROutputSetCrtcs
  593. RROutputSetCrtc
  594. RROutputSetConnection
  595. RROutputSetSubpixelOrder
  596. RROldModeAdd • This adds modes one-at-a-time
  597. RRModeGet
  598. RRCrtcNotify
  599. • send events, reset pointer if necessary
  600. RRTellChanged
  601. WalkTree (sending events)
  602. • when layout has changed:
  603. RRPointerScreenConfigured
  604. RRSendConfigNotify
  605. Asynchronous state setting (1.2 only)
  606. When setting state asynchronously, the driver invokes the
  607. ->rrGetInfo function and then calls RRTellChanged to flush
  608. the changes to the clients and reset pointer if necessary
  609. Set state
  610. ProcRRSetScreenConfig
  611. RRCrtcSet
  612. 1.2:
  613. ->rrCrtcSet
  614. RRCrtcNotify
  615. 1.0:
  616. ->rrSetConfig
  617. RRCrtcNotify
  618. RRTellChanged
  619. */