nv_control.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. /*
  2. * Copyright (c) 2008 NVIDIA, Corporation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5. * of this software and associated documentation files (the "Software"), to deal
  6. * in the Software without restriction, including without limitation the rights
  7. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. * copies of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice (including the next
  12. * paragraph) shall be included in all copies or substantial portions of the
  13. * Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21. * SOFTWARE.
  22. *
  23. *
  24. * NV-CONTROL Protocol Version History
  25. *
  26. * 1.0 - 1.5 NVIDIA Internal development versions
  27. * 1.6 Initial public version
  28. * 1.7 Added QueryBinaryData request
  29. * 1.8 Added TargetTypes
  30. * 1.9 Added QueryTargetCount request
  31. * 1.10 Fixed target type/id byte ordering for compatibility with
  32. * pre-1.8 NV-CONTROL clients
  33. * 1.11 NVIDIA Internal development version
  34. * 1.12 Added StringOperation request
  35. * 1.13 NVIDIA Internal development version
  36. * 1.14 Fixed an NV_CTRL_BINARY_DATA_MODELINES double scan modeline
  37. * reporting bug (vsyncstart, vsyncend, and vtotal were incorrectly
  38. * doubled)
  39. * 1.15 Added AVAILABILITY_TARGET_ATTRIBUTE_CHANGED_EVENT
  40. * 1.16 Added TARGET_STRING_ATTRIBUTE_CHANGED_EVENT
  41. * 1.17 Added TARGET_BINARY_ATTRIBUTE_CHANGED_EVENT
  42. * 1.18 Updated QueryTargetCount to return a count of 0, rather than
  43. * BadMatch, if an unknown TargetType is specified
  44. * 1.19 Added TargetType support for SetAttributeAndGetStatus and
  45. * SetStringAttribute requests
  46. * 1.20 Added COOLER TargetType
  47. * 1.21 Added initial 64-bit integer attribute support (read-only)
  48. * 1.22 Added X_nvCtrlQueryValidStringAttributeValues to check
  49. * string attribute permissions.
  50. * 1.23 Added SENSOR TargetType
  51. * 1.24 Fixed a bug where SLI_MOSAIC_MODE_AVAILABLE attribute would
  52. * report false positives via the GPU and X screen target types
  53. * 1.25 Added 3D_VISION_PRO_TRANSCEIVER TargetType
  54. * 1.26 Added XNVCTRLQueryXXXAttributePermissions.
  55. * 1.27 Added DISPLAY TargetType
  56. * 1.28 Added NV_CTRL_CURRENT_METAMODE_ID: clients should use this
  57. * attribute to switch MetaModes, rather than pass the MetaMode ID
  58. * through the RRSetScreenConfig protocol request.
  59. */
  60. #ifndef __NVCONTROL_H
  61. #define __NVCONTROL_H
  62. #define NV_CONTROL_ERRORS 0
  63. #define NV_CONTROL_EVENTS 5
  64. #define NV_CONTROL_NAME "NV-CONTROL"
  65. #define NV_CONTROL_MAJOR 1
  66. #define NV_CONTROL_MINOR 28
  67. #define X_nvCtrlQueryExtension 0
  68. #define X_nvCtrlIsNv 1
  69. #define X_nvCtrlQueryAttribute 2
  70. #define X_nvCtrlSetAttribute 3
  71. #define X_nvCtrlQueryStringAttribute 4
  72. #define X_nvCtrlQueryValidAttributeValues 5
  73. #define X_nvCtrlSelectNotify 6
  74. #define X_nvCtrlSetGvoColorConversionDeprecated 7
  75. #define X_nvCtrlQueryGvoColorConversionDeprecated 8
  76. #define X_nvCtrlSetStringAttribute 9
  77. /* STUB X_nvCtrlQueryDDCCILutSize 10 */
  78. /* STUB X_nvCtrlQueryDDCCISinglePointLutOperation 11 */
  79. /* STUB X_nvCtrlSetDDCCISinglePointLutOperation 12 */
  80. /* STUB X_nvCtrlQueryDDCCIBlockLutOperation 13 */
  81. /* STUB X_nvCtrlSetDDCCIBlockLutOperation 14 */
  82. /* STUB X_nvCtrlSetDDCCIRemoteProcedureCall 15 */
  83. /* STUB X_nvCtrlQueryDDCCIDisplayControllerType 16 */
  84. /* STUB X_nvCtrlQueryDDCCICapabilities 17 */
  85. /* STUB X_nvCtrlQueryDDCCITimingReport 18 */
  86. #define X_nvCtrlSetAttributeAndGetStatus 19
  87. #define X_nvCtrlQueryBinaryData 20
  88. #define X_nvCtrlSetGvoColorConversion 21
  89. #define X_nvCtrlQueryGvoColorConversion 22
  90. #define X_nvCtrlSelectTargetNotify 23
  91. #define X_nvCtrlQueryTargetCount 24
  92. #define X_nvCtrlStringOperation 25
  93. #define X_nvCtrlQueryValidAttributeValues64 26
  94. #define X_nvCtrlQueryAttribute64 27
  95. #define X_nvCtrlQueryValidStringAttributeValues 28
  96. #define X_nvCtrlQueryAttributePermissions 29
  97. #define X_nvCtrlQueryStringAttributePermissions 30
  98. #define X_nvCtrlQueryBinaryDataAttributePermissions 31
  99. #define X_nvCtrlQueryStringOperationAttributePermissions 32
  100. #define X_nvCtrlLastRequest (X_nvCtrlQueryStringOperationAttributePermissions + 1)
  101. /* Define 32 bit floats */
  102. typedef float FLOAT32;
  103. #ifndef F32
  104. #define F32
  105. #endif
  106. typedef struct {
  107. CARD8 reqType;
  108. CARD8 nvReqType;
  109. CARD16 length B16;
  110. } xnvCtrlQueryExtensionReq;
  111. #define sz_xnvCtrlQueryExtensionReq 4
  112. typedef struct {
  113. BYTE type; /* X_Reply */
  114. CARD8 padb1;
  115. CARD16 sequenceNumber B16;
  116. CARD32 length B32;
  117. CARD16 major B16;
  118. CARD16 minor B16;
  119. CARD32 padl4 B32;
  120. CARD32 padl5 B32;
  121. CARD32 padl6 B32;
  122. CARD32 padl7 B32;
  123. CARD32 padl8 B32;
  124. } xnvCtrlQueryExtensionReply;
  125. #define sz_xnvCtrlQueryExtensionReply 32
  126. typedef struct {
  127. CARD8 reqType;
  128. CARD8 nvReqType;
  129. CARD16 length B16;
  130. CARD32 screen B32;
  131. } xnvCtrlIsNvReq;
  132. #define sz_xnvCtrlIsNvReq 8
  133. typedef struct {
  134. BYTE type; /* X_Reply */
  135. CARD8 padb1;
  136. CARD16 sequenceNumber B16;
  137. CARD32 length B32;
  138. CARD32 isnv B32;
  139. CARD32 padl4 B32;
  140. CARD32 padl5 B32;
  141. CARD32 padl6 B32;
  142. CARD32 padl7 B32;
  143. CARD32 padl8 B32;
  144. } xnvCtrlIsNvReply;
  145. #define sz_xnvCtrlIsNvReply 32
  146. typedef struct {
  147. CARD8 reqType;
  148. CARD8 nvReqType;
  149. CARD16 length B16;
  150. CARD32 target_type B32;
  151. } xnvCtrlQueryTargetCountReq;
  152. #define sz_xnvCtrlQueryTargetCountReq 8
  153. typedef struct {
  154. BYTE type; /* X_Reply */
  155. CARD8 padb1;
  156. CARD16 sequenceNumber B16;
  157. CARD32 length B32;
  158. CARD32 count B32;
  159. CARD32 padl4 B32;
  160. CARD32 padl5 B32;
  161. CARD32 padl6 B32;
  162. CARD32 padl7 B32;
  163. CARD32 padl8 B32;
  164. } xnvCtrlQueryTargetCountReply;
  165. #define sz_xnvCtrlQueryTargetCountReply 32
  166. typedef struct {
  167. CARD8 reqType;
  168. CARD8 nvReqType;
  169. CARD16 length B16;
  170. CARD16 target_id B16; /* X screen number or GPU number */
  171. CARD16 target_type B16; /* X screen or GPU */
  172. CARD32 display_mask B32;
  173. CARD32 attribute B32;
  174. } xnvCtrlQueryAttributeReq;
  175. #define sz_xnvCtrlQueryAttributeReq 16
  176. typedef struct {
  177. BYTE type;
  178. BYTE pad0;
  179. CARD16 sequenceNumber B16;
  180. CARD32 length B32;
  181. CARD32 flags B32;
  182. INT32 value B32;
  183. CARD32 pad4 B32;
  184. CARD32 pad5 B32;
  185. CARD32 pad6 B32;
  186. CARD32 pad7 B32;
  187. } xnvCtrlQueryAttributeReply;
  188. #define sz_xnvCtrlQueryAttributeReply 32
  189. typedef struct {
  190. BYTE type;
  191. BYTE pad0;
  192. CARD16 sequenceNumber B16;
  193. CARD32 length B32;
  194. CARD32 flags B32;
  195. CARD32 pad3 B32;
  196. int64_t value_64;
  197. CARD32 pad6 B32;
  198. CARD32 pad7 B32;
  199. } xnvCtrlQueryAttribute64Reply;
  200. #define sz_xnvCtrlQueryAttribute64Reply 32
  201. typedef struct {
  202. CARD8 reqType;
  203. CARD8 nvReqType;
  204. CARD16 length B16;
  205. CARD16 target_id B16;
  206. CARD16 target_type B16;
  207. CARD32 display_mask B32;
  208. CARD32 attribute B32;
  209. INT32 value B32;
  210. } xnvCtrlSetAttributeReq;
  211. #define sz_xnvCtrlSetAttributeReq 20
  212. typedef struct {
  213. CARD8 reqType;
  214. CARD8 nvReqType;
  215. CARD16 length B16;
  216. CARD16 target_id B16;
  217. CARD16 target_type B16;
  218. CARD32 display_mask B32;
  219. CARD32 attribute B32;
  220. INT32 value B32;
  221. } xnvCtrlSetAttributeAndGetStatusReq;
  222. #define sz_xnvCtrlSetAttributeAndGetStatusReq 20
  223. typedef struct {
  224. BYTE type;
  225. BYTE pad0;
  226. CARD16 sequenceNumber B16;
  227. CARD32 length B32;
  228. CARD32 flags B32;
  229. CARD32 pad3 B32;
  230. CARD32 pad4 B32;
  231. CARD32 pad5 B32;
  232. CARD32 pad6 B32;
  233. CARD32 pad7 B32;
  234. } xnvCtrlSetAttributeAndGetStatusReply;
  235. #define sz_xnvCtrlSetAttributeAndGetStatusReply 32
  236. typedef struct {
  237. CARD8 reqType;
  238. CARD8 nvReqType;
  239. CARD16 length B16;
  240. CARD16 target_id B16; /* X screen number or GPU number */
  241. CARD16 target_type B16; /* X screen or GPU */
  242. CARD32 display_mask B32;
  243. CARD32 attribute B32;
  244. } xnvCtrlQueryStringAttributeReq;
  245. #define sz_xnvCtrlQueryStringAttributeReq 16
  246. typedef struct {
  247. BYTE type;
  248. BYTE pad0;
  249. CARD16 sequenceNumber B16;
  250. CARD32 length B32;
  251. CARD32 flags B32;
  252. CARD32 n B32; /* Length of string */
  253. CARD32 pad4 B32;
  254. CARD32 pad5 B32;
  255. CARD32 pad6 B32;
  256. CARD32 pad7 B32;
  257. } xnvCtrlQueryStringAttributeReply;
  258. #define sz_xnvCtrlQueryStringAttributeReply 32
  259. typedef struct {
  260. CARD8 reqType;
  261. CARD8 nvReqType;
  262. CARD16 length B16;
  263. CARD16 target_id B16;
  264. CARD16 target_type B16;
  265. CARD32 display_mask B32;
  266. CARD32 attribute B32;
  267. CARD32 num_bytes B32;
  268. } xnvCtrlSetStringAttributeReq;
  269. #define sz_xnvCtrlSetStringAttributeReq 20
  270. typedef struct {
  271. BYTE type;
  272. BYTE pad0;
  273. CARD16 sequenceNumber B16;
  274. CARD32 length B32;
  275. CARD32 flags B32;
  276. CARD32 pad3 B32;
  277. CARD32 pad4 B32;
  278. CARD32 pad5 B32;
  279. CARD32 pad6 B32;
  280. CARD32 pad7 B32;
  281. } xnvCtrlSetStringAttributeReply;
  282. #define sz_xnvCtrlSetStringAttributeReply 32
  283. typedef struct {
  284. CARD8 reqType;
  285. CARD8 nvReqType;
  286. CARD16 length B16;
  287. CARD16 target_id B16; /* X screen number or GPU number */
  288. CARD16 target_type B16; /* X screen or GPU */
  289. CARD32 display_mask B32;
  290. CARD32 attribute B32;
  291. } xnvCtrlQueryValidAttributeValuesReq;
  292. #define sz_xnvCtrlQueryValidAttributeValuesReq 16
  293. typedef struct {
  294. BYTE type;
  295. BYTE pad0;
  296. CARD16 sequenceNumber B16;
  297. CARD32 length B32;
  298. CARD32 flags B32;
  299. INT32 attr_type B32;
  300. INT32 min B32;
  301. INT32 max B32;
  302. CARD32 bits B32;
  303. CARD32 perms B32;
  304. } xnvCtrlQueryValidAttributeValuesReply;
  305. #define sz_xnvCtrlQueryValidAttributeValuesReply 32
  306. typedef struct {
  307. BYTE type;
  308. BYTE pad0;
  309. CARD16 sequenceNumber B16;
  310. CARD32 length B32;
  311. CARD32 flags B32;
  312. INT32 attr_type B32;
  313. int64_t min_64;
  314. int64_t max_64;
  315. CARD64 bits_64;
  316. CARD32 perms B32;
  317. CARD32 pad1 B32;
  318. } xnvCtrlQueryValidAttributeValues64Reply;
  319. #define sz_xnvCtrlQueryValidAttributeValues64Reply 48
  320. #define sz_xnvCtrlQueryValidAttributeValues64Reply_extra ((48 - 32) >> 2)
  321. typedef struct {
  322. CARD8 reqType;
  323. CARD8 nvReqType;
  324. CARD16 length B16;
  325. CARD32 attribute B32;
  326. } xnvCtrlQueryAttributePermissionsReq;
  327. #define sz_xnvCtrlQueryAttributePermissionsReq 8
  328. typedef struct {
  329. BYTE type;
  330. BYTE pad0;
  331. CARD16 sequenceNumber B16;
  332. CARD32 length B32;
  333. CARD32 flags B32;
  334. INT32 attr_type B32;
  335. CARD32 perms B32;
  336. CARD32 pad5 B32;
  337. CARD32 pad6 B32;
  338. CARD32 pad7 B32;
  339. CARD32 pad8 B32;
  340. } xnvCtrlQueryAttributePermissionsReply;
  341. #define sz_xnvCtrlQueryAttributePermissionsReply 32
  342. /* Set GVO Color Conversion request (deprecated) */
  343. typedef struct {
  344. CARD8 reqType;
  345. CARD8 nvReqType;
  346. CARD16 length B16;
  347. CARD32 screen B32;
  348. FLOAT32 row1_col1 F32;
  349. FLOAT32 row1_col2 F32;
  350. FLOAT32 row1_col3 F32;
  351. FLOAT32 row1_col4 F32;
  352. FLOAT32 row2_col1 F32;
  353. FLOAT32 row2_col2 F32;
  354. FLOAT32 row2_col3 F32;
  355. FLOAT32 row2_col4 F32;
  356. FLOAT32 row3_col1 F32;
  357. FLOAT32 row3_col2 F32;
  358. FLOAT32 row3_col3 F32;
  359. FLOAT32 row3_col4 F32;
  360. } xnvCtrlSetGvoColorConversionDeprecatedReq;
  361. #define sz_xnvCtrlSetGvoColorConversionDeprecatedReq 56
  362. /* Query GVO Color Conversion request (deprecated) */
  363. typedef struct {
  364. CARD8 reqType;
  365. CARD8 nvReqType;
  366. CARD16 length B16;
  367. CARD32 screen B32;
  368. } xnvCtrlQueryGvoColorConversionDeprecatedReq;
  369. #define sz_xnvCtrlQueryGvoColorConversionDeprecatedReq 8
  370. /* Query GVO Color Conversion reply (deprecated) */
  371. typedef struct {
  372. BYTE type; /* X_Reply */
  373. BYTE pad0;
  374. CARD16 sequenceNumber B16;
  375. CARD32 length B32;
  376. CARD32 pad3 B32;
  377. CARD32 pad4 B32;
  378. CARD32 pad5 B32;
  379. CARD32 pad6 B32;
  380. CARD32 pad7 B32;
  381. CARD32 pad8 B32;
  382. } xnvCtrlQueryGvoColorConversionDeprecatedReply;
  383. #define sz_xnvCtrlQueryGvoColorConversionDeprecatedReply 32
  384. /* Set GVO Color Conversion request */
  385. typedef struct {
  386. CARD8 reqType;
  387. CARD8 nvReqType;
  388. CARD16 length B16;
  389. CARD32 screen B32;
  390. FLOAT32 cscMatrix_y_r F32;
  391. FLOAT32 cscMatrix_y_g F32;
  392. FLOAT32 cscMatrix_y_b F32;
  393. FLOAT32 cscMatrix_cr_r F32;
  394. FLOAT32 cscMatrix_cr_g F32;
  395. FLOAT32 cscMatrix_cr_b F32;
  396. FLOAT32 cscMatrix_cb_r F32;
  397. FLOAT32 cscMatrix_cb_g F32;
  398. FLOAT32 cscMatrix_cb_b F32;
  399. FLOAT32 cscOffset_y F32;
  400. FLOAT32 cscOffset_cr F32;
  401. FLOAT32 cscOffset_cb F32;
  402. FLOAT32 cscScale_y F32;
  403. FLOAT32 cscScale_cr F32;
  404. FLOAT32 cscScale_cb F32;
  405. } xnvCtrlSetGvoColorConversionReq;
  406. #define sz_xnvCtrlSetGvoColorConversionReq 68
  407. /* Query GVO Color Conversion request */
  408. typedef struct {
  409. CARD8 reqType;
  410. CARD8 nvReqType;
  411. CARD16 length B16;
  412. CARD32 screen B32;
  413. } xnvCtrlQueryGvoColorConversionReq;
  414. #define sz_xnvCtrlQueryGvoColorConversionReq 8
  415. /* Query GVO Color Conversion reply */
  416. typedef struct {
  417. BYTE type; /* X_Reply */
  418. BYTE pad0;
  419. CARD16 sequenceNumber B16;
  420. CARD32 length B32;
  421. CARD32 pad3 B32;
  422. CARD32 pad4 B32;
  423. CARD32 pad5 B32;
  424. CARD32 pad6 B32;
  425. CARD32 pad7 B32;
  426. CARD32 pad8 B32;
  427. } xnvCtrlQueryGvoColorConversionReply;
  428. #define sz_xnvCtrlQueryGvoColorConversionReply 32
  429. typedef struct {
  430. CARD8 reqType;
  431. CARD8 nvReqType;
  432. CARD16 length B16;
  433. CARD16 target_id B16; /* X screen number or GPU number */
  434. CARD16 target_type B16; /* X screen or GPU */
  435. CARD32 display_mask B32;
  436. CARD32 attribute B32;
  437. } xnvCtrlQueryBinaryDataReq;
  438. #define sz_xnvCtrlQueryBinaryDataReq 16
  439. typedef struct {
  440. BYTE type;
  441. BYTE pad0;
  442. CARD16 sequenceNumber B16;
  443. CARD32 length B32;
  444. CARD32 flags B32;
  445. CARD32 n B32;
  446. CARD32 pad4 B32;
  447. CARD32 pad5 B32;
  448. CARD32 pad6 B32;
  449. CARD32 pad7 B32;
  450. } xnvCtrlQueryBinaryDataReply;
  451. #define sz_xnvCtrlQueryBinaryDataReply 32
  452. typedef struct {
  453. CARD8 reqType;
  454. CARD8 nvReqType;
  455. CARD16 length B16;
  456. CARD32 screen B32;
  457. CARD16 notifyType B16;
  458. CARD16 onoff B16;
  459. } xnvCtrlSelectNotifyReq;
  460. #define sz_xnvCtrlSelectNotifyReq 12
  461. typedef struct {
  462. CARD8 reqType;
  463. CARD8 nvReqType;
  464. CARD16 length B16;
  465. CARD16 target_id B16; /* X screen number or GPU number */
  466. CARD16 target_type B16; /* X screen or GPU */
  467. CARD32 display_mask B32;
  468. CARD32 attribute B32;
  469. CARD32 num_bytes B32; /* Length of string */
  470. } xnvCtrlStringOperationReq;
  471. #define sz_xnvCtrlStringOperationReq 20
  472. typedef struct {
  473. BYTE type; /* X_Reply */
  474. CARD8 padb1;
  475. CARD16 sequenceNumber B16;
  476. CARD32 length B32;
  477. CARD32 ret B32;
  478. CARD32 num_bytes B32; /* Length of string */
  479. CARD32 padl4 B32;
  480. CARD32 padl5 B32;
  481. CARD32 padl6 B32;
  482. CARD32 padl7 B32;
  483. } xnvCtrlStringOperationReply;
  484. #define sz_xnvCtrlStringOperationReply 32
  485. typedef struct {
  486. union {
  487. struct {
  488. BYTE type;
  489. BYTE detail;
  490. CARD16 sequenceNumber B16;
  491. } u;
  492. struct {
  493. BYTE type;
  494. BYTE detail;
  495. CARD16 sequenceNumber B16;
  496. CARD32 time B32;
  497. CARD32 screen B32;
  498. CARD32 display_mask B32;
  499. CARD32 attribute B32;
  500. CARD32 value B32;
  501. CARD32 pad0 B32;
  502. CARD32 pad1 B32;
  503. } attribute_changed;
  504. } u;
  505. } xnvctrlEvent;
  506. /*
  507. * Leave target_type before target_id for the
  508. * xnvCtrlSelectTargetNotifyReq and xnvctrlEventTarget
  509. * structures, even though other request protocol structures
  510. * store target_id in the bottom 16-bits of the second DWORD of the
  511. * structures. The event-related structures were added in version
  512. * 1.8, and so there is no prior version with which to maintain
  513. * compatibility.
  514. */
  515. typedef struct {
  516. CARD8 reqType;
  517. CARD8 nvReqType;
  518. CARD16 length B16;
  519. CARD16 target_type B16; /* Don't swap these */
  520. CARD16 target_id B16;
  521. CARD16 notifyType B16;
  522. CARD16 onoff B16;
  523. } xnvCtrlSelectTargetNotifyReq;
  524. #define sz_xnvCtrlSelectTargetNotifyReq 12
  525. typedef struct {
  526. union {
  527. struct {
  528. BYTE type;
  529. BYTE detail;
  530. CARD16 sequenceNumber B16;
  531. } u;
  532. struct {
  533. BYTE type;
  534. BYTE detail;
  535. CARD16 sequenceNumber B16;
  536. CARD32 time B32;
  537. CARD16 target_type B16; /* Don't swap these */
  538. CARD16 target_id B16;
  539. CARD32 display_mask B32;
  540. CARD32 attribute B32;
  541. CARD32 value B32;
  542. CARD32 pad0 B32;
  543. CARD32 pad1 B32;
  544. } attribute_changed;
  545. struct {
  546. BYTE type;
  547. BYTE detail;
  548. CARD16 sequenceNumber B16;
  549. CARD32 time B32;
  550. CARD16 target_type B16; /* Don't swap these */
  551. CARD16 target_id B16;
  552. CARD32 display_mask B32;
  553. CARD32 attribute B32;
  554. CARD32 value B32;
  555. CARD8 availability;
  556. CARD8 pad0;
  557. CARD16 pad1 B16;
  558. CARD32 pad2 B32;
  559. } availability_changed;
  560. } u;
  561. } xnvctrlEventTarget;
  562. #endif /* __NVCONTROL_H */