NVCtrlLib.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  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. #ifndef __NVCTRLLIB_H
  24. #define __NVCTRLLIB_H
  25. #include "NVCtrl.h"
  26. #if defined __cplusplus
  27. extern "C" {
  28. #endif
  29. /*
  30. * XNVCTRLQueryExtension -
  31. *
  32. * Returns True if the extension exists, returns False otherwise.
  33. * event_basep and error_basep are the extension event and error
  34. * bases. Currently, no extension specific errors or events are
  35. * defined.
  36. */
  37. Bool XNVCTRLQueryExtension (
  38. Display *dpy,
  39. int *event_basep,
  40. int *error_basep
  41. );
  42. /*
  43. * XNVCTRLQueryVersion -
  44. *
  45. * Returns True if the extension exists, returns False otherwise.
  46. * major and minor are the extension's major and minor version
  47. * numbers.
  48. */
  49. Bool XNVCTRLQueryVersion (
  50. Display *dpy,
  51. int *major,
  52. int *minor
  53. );
  54. /*
  55. * XNVCTRLIsNvScreen
  56. *
  57. * Returns True is the specified screen is controlled by the NVIDIA
  58. * driver. Returns False otherwise.
  59. */
  60. Bool XNVCTRLIsNvScreen (
  61. Display *dpy,
  62. int screen
  63. );
  64. /*
  65. * XNVCTRLQueryTargetCount -
  66. *
  67. * Returns True if the target type exists. Returns False otherwise.
  68. * If XNVCTRLQueryTargetCount returns True, value will contain the
  69. * count of existing targets on the server of the specified target
  70. * type.
  71. *
  72. * Please see "Attribute Targets" in NVCtrl.h for the list of valid
  73. * target types.
  74. *
  75. * Possible errors:
  76. * BadValue - The target doesn't exist.
  77. */
  78. Bool XNVCTRLQueryTargetCount (
  79. Display *dpy,
  80. int target_type,
  81. int *value
  82. );
  83. /*
  84. * XNVCTRLSetAttribute -
  85. *
  86. * Sets the attribute to the given value. The attributes and their
  87. * possible values are listed in NVCtrl.h.
  88. *
  89. * Not all attributes require the display_mask parameter; see
  90. * NVCtrl.h for details.
  91. *
  92. * Calling this function is equivalent to calling XNVCTRLSetTargetAttribute()
  93. * with the target_type set to NV_CTRL_TARGET_TYPE_X_SCREEN and
  94. * target_id set to 'screen'.
  95. *
  96. * Possible errors:
  97. * BadValue - The screen or attribute doesn't exist.
  98. * BadMatch - The NVIDIA driver is not present on that screen.
  99. */
  100. void XNVCTRLSetAttribute (
  101. Display *dpy,
  102. int screen,
  103. unsigned int display_mask,
  104. unsigned int attribute,
  105. int value
  106. );
  107. /*
  108. * XNVCTRLSetTargetAttribute -
  109. *
  110. * Sets the attribute to the given value. The attributes and their
  111. * possible values are listed in NVCtrl.h.
  112. *
  113. * Not all attributes require the display_mask parameter; see
  114. * NVCtrl.h for details.
  115. *
  116. * Possible errors:
  117. * BadValue - The target or attribute doesn't exist.
  118. * BadMatch - The NVIDIA driver is not present on that target.
  119. */
  120. void XNVCTRLSetTargetAttribute (
  121. Display *dpy,
  122. int target_type,
  123. int target_id,
  124. unsigned int display_mask,
  125. unsigned int attribute,
  126. int value
  127. );
  128. /*
  129. * XNVCTRLSetAttributeAndGetStatus -
  130. *
  131. * Same as XNVCTRLSetAttribute().
  132. * In addition, XNVCTRLSetAttributeAndGetStatus() returns
  133. * True if the operation succeeds, False otherwise.
  134. *
  135. */
  136. Bool XNVCTRLSetAttributeAndGetStatus (
  137. Display *dpy,
  138. int screen,
  139. unsigned int display_mask,
  140. unsigned int attribute,
  141. int value
  142. );
  143. /*
  144. * XNVCTRLSetTargetAttributeAndGetStatus -
  145. *
  146. * Same as XNVCTRLSetTargetAttribute().
  147. * In addition, XNVCTRLSetTargetAttributeAndGetStatus() returns
  148. * True if the operation succeeds, False otherwise.
  149. *
  150. */
  151. Bool XNVCTRLSetTargetAttributeAndGetStatus (
  152. Display *dpy,
  153. int target_type,
  154. int target_id,
  155. unsigned int display_mask,
  156. unsigned int attribute,
  157. int value
  158. );
  159. /*
  160. * XNVCTRLQueryAttribute -
  161. *
  162. * Returns True if the attribute exists. Returns False otherwise.
  163. * If XNVCTRLQueryAttribute returns True, value will contain the
  164. * value of the specified attribute.
  165. *
  166. * Not all attributes require the display_mask parameter; see
  167. * NVCtrl.h for details.
  168. *
  169. * Calling this function is equivalent to calling
  170. * XNVCTRLQueryTargetAttribute() with the target_type set to
  171. * NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.
  172. *
  173. * Possible errors:
  174. * BadValue - The screen doesn't exist.
  175. * BadMatch - The NVIDIA driver is not present on that screen.
  176. */
  177. Bool XNVCTRLQueryAttribute (
  178. Display *dpy,
  179. int screen,
  180. unsigned int display_mask,
  181. unsigned int attribute,
  182. int *value
  183. );
  184. /*
  185. * XNVCTRLQueryTargetAttribute -
  186. *
  187. * Returns True if the attribute exists. Returns False otherwise.
  188. * If XNVCTRLQueryTargetAttribute returns True, value will contain the
  189. * value of the specified attribute.
  190. *
  191. * Not all attributes require the display_mask parameter; see
  192. * NVCtrl.h for details.
  193. *
  194. * Possible errors:
  195. * BadValue - The target doesn't exist.
  196. * BadMatch - The NVIDIA driver does not control the target.
  197. */
  198. Bool XNVCTRLQueryTargetAttribute (
  199. Display *dpy,
  200. int target_Type,
  201. int target_id,
  202. unsigned int display_mask,
  203. unsigned int attribute,
  204. int *value
  205. );
  206. /*
  207. * XNVCTRLQueryTargetAttribute64 -
  208. *
  209. * Returns True if the attribute exists. Returns False otherwise.
  210. * If XNVCTRLQueryTargetAttribute returns True, value will contain the
  211. * value of the specified attribute.
  212. *
  213. * Not all attributes require the display_mask parameter; see
  214. * NVCtrl.h for details.
  215. *
  216. * Note: this function behaves like XNVCTRLQueryTargetAttribute(),
  217. * but supports 64-bit integer attributes.
  218. *
  219. * Possible errors:
  220. * BadValue - The target doesn't exist.
  221. * BadMatch - The NVIDIA driver does not control the target.
  222. */
  223. Bool XNVCTRLQueryTargetAttribute64 (
  224. Display *dpy,
  225. int target_Type,
  226. int target_id,
  227. unsigned int display_mask,
  228. unsigned int attribute,
  229. int64_t *value
  230. );
  231. /*
  232. * XNVCTRLQueryStringAttribute -
  233. *
  234. * Returns True if the attribute exists. Returns False otherwise.
  235. * If XNVCTRLQueryStringAttribute returns True, *ptr will point to an
  236. * allocated string containing the string attribute requested. It is
  237. * the caller's responsibility to free the string when done.
  238. *
  239. * Calling this function is equivalent to calling
  240. * XNVCTRLQueryTargetStringAttribute() with the target_type set to
  241. * NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.
  242. *
  243. * Possible errors:
  244. * BadValue - The screen doesn't exist.
  245. * BadMatch - The NVIDIA driver is not present on that screen.
  246. * BadAlloc - Insufficient resources to fulfill the request.
  247. */
  248. Bool XNVCTRLQueryStringAttribute (
  249. Display *dpy,
  250. int screen,
  251. unsigned int display_mask,
  252. unsigned int attribute,
  253. char **ptr
  254. );
  255. /*
  256. * XNVCTRLQueryTargetStringAttribute -
  257. *
  258. * Returns True if the attribute exists. Returns False otherwise.
  259. * If XNVCTRLQueryTargetStringAttribute returns True, *ptr will point
  260. * to an allocated string containing the string attribute requested.
  261. * It is the caller's responsibility to free the string when done.
  262. *
  263. * Possible errors:
  264. * BadValue - The target doesn't exist.
  265. * BadMatch - The NVIDIA driver does not control the target.
  266. * BadAlloc - Insufficient resources to fulfill the request.
  267. */
  268. Bool XNVCTRLQueryTargetStringAttribute (
  269. Display *dpy,
  270. int target_type,
  271. int target_id,
  272. unsigned int display_mask,
  273. unsigned int attribute,
  274. char **ptr
  275. );
  276. /*
  277. * XNVCTRLSetStringAttribute -
  278. *
  279. * Returns True if the operation succeded. Returns False otherwise.
  280. *
  281. * Possible X errors:
  282. * BadValue - The screen doesn't exist.
  283. * BadMatch - The NVIDIA driver is not present on that screen.
  284. * BadAlloc - Insufficient resources to fulfill the request.
  285. */
  286. Bool XNVCTRLSetStringAttribute (
  287. Display *dpy,
  288. int screen,
  289. unsigned int display_mask,
  290. unsigned int attribute,
  291. char *ptr
  292. );
  293. /*
  294. * XNVCTRLSetTargetStringAttribute -
  295. *
  296. * Returns True if the operation succeded. Returns False otherwise.
  297. *
  298. * Possible X errors:
  299. * BadValue - The screen doesn't exist.
  300. * BadMatch - The NVIDIA driver is not present on that screen.
  301. * BadAlloc - Insufficient resources to fulfill the request.
  302. */
  303. Bool XNVCTRLSetTargetStringAttribute (
  304. Display *dpy,
  305. int target_type,
  306. int target_id,
  307. unsigned int display_mask,
  308. unsigned int attribute,
  309. char *ptr
  310. );
  311. /*
  312. * XNVCTRLQueryValidAttributeValues -
  313. *
  314. * Returns True if the attribute exists. Returns False otherwise. If
  315. * XNVCTRLQueryValidAttributeValues returns True, values will indicate
  316. * the valid values for the specified attribute; see the description
  317. * of NVCTRLAttributeValidValues in NVCtrl.h.
  318. *
  319. * Calling this function is equivalent to calling
  320. * XNVCTRLQueryValidTargetAttributeValues() with the target_type set to
  321. * NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.
  322. */
  323. Bool XNVCTRLQueryValidAttributeValues (
  324. Display *dpy,
  325. int screen,
  326. unsigned int display_mask,
  327. unsigned int attribute,
  328. NVCTRLAttributeValidValuesRec *values
  329. );
  330. /*
  331. * XNVCTRLQueryValidTargetAttributeValues -
  332. *
  333. * Returns True if the attribute exists. Returns False otherwise. If
  334. * XNVCTRLQueryValidTargetAttributeValues returns True, values will indicate
  335. * the valid values for the specified attribute.
  336. */
  337. Bool XNVCTRLQueryValidTargetAttributeValues (
  338. Display *dpy,
  339. int target_type,
  340. int target_id,
  341. unsigned int display_mask,
  342. unsigned int attribute,
  343. NVCTRLAttributeValidValuesRec *values
  344. );
  345. /*
  346. * XNVCTRLQueryValidTargetStringAttributeValues -
  347. *
  348. * Returns True if the attribute exists. Returns False otherwise. If
  349. * XNVCTRLQueryValidTargetStringAttributeValues returns True, values will
  350. * indicate the valid values for the specified attribute.
  351. */
  352. Bool XNVCTRLQueryValidTargetStringAttributeValues (
  353. Display *dpy,
  354. int target_type,
  355. int target_id,
  356. unsigned int display_mask,
  357. unsigned int attribute,
  358. NVCTRLAttributeValidValuesRec *values
  359. );
  360. /*
  361. * XNVCTRLQueryAttributePermissions -
  362. *
  363. * Returns True if the attribute exists. Returns False otherwise. If
  364. * XNVCTRLQueryAttributePermissions returns True, permissions will
  365. * indicate the permission flags for the attribute.
  366. */
  367. Bool XNVCTRLQueryAttributePermissions (
  368. Display *dpy,
  369. unsigned int attribute,
  370. NVCTRLAttributePermissionsRec *permissions
  371. );
  372. /*
  373. * XNVCTRLQueryStringAttributePermissions -
  374. *
  375. * Returns True if the attribute exists. Returns False otherwise. If
  376. * XNVCTRLQueryStringAttributePermissions returns True, permissions will
  377. * indicate the permission flags for the attribute.
  378. */
  379. Bool XNVCTRLQueryStringAttributePermissions (
  380. Display *dpy,
  381. unsigned int attribute,
  382. NVCTRLAttributePermissionsRec *permissions
  383. );
  384. /*
  385. * XNVCTRLQueryBinaryDataAttributePermissions -
  386. *
  387. * Returns True if the attribute exists. Returns False otherwise. If
  388. * XNVCTRLQueryBinaryDataAttributePermissions returns True, permissions
  389. * will indicate the permission flags for the attribute.
  390. */
  391. Bool XNVCTRLQueryBinaryDataAttributePermissions (
  392. Display *dpy,
  393. unsigned int attribute,
  394. NVCTRLAttributePermissionsRec *permissions
  395. );
  396. /*
  397. * XNVCTRLQueryStringOperationAttributePermissions -
  398. *
  399. * Returns True if the attribute exists. Returns False otherwise. If
  400. * XNVCTRLQueryStringOperationAttributePermissions returns True,
  401. * permissions will indicate the permission flags for the attribute.
  402. */
  403. Bool XNVCTRLQueryStringOperationAttributePermissions (
  404. Display *dpy,
  405. unsigned int attribute,
  406. NVCTRLAttributePermissionsRec *permissions
  407. );
  408. /*
  409. * XNVCTRLSetGvoColorConversion -
  410. *
  411. * Sets the color conversion matrix, offset, and scale that should be
  412. * used for GVO (Graphic to Video Out).
  413. *
  414. * The Color Space Conversion data is ordered like this:
  415. *
  416. * colorMatrix[0][0] // r.Y
  417. * colorMatrix[0][1] // g.Y
  418. * colorMatrix[0][2] // b.Y
  419. *
  420. * colorMatrix[1][0] // r.Cr
  421. * colorMatrix[1][1] // g.Cr
  422. * colorMatrix[1][2] // b.Cr
  423. *
  424. * colorMatrix[2][0] // r.Cb
  425. * colorMatrix[2][1] // g.Cb
  426. * colorMatrix[2][2] // b.Cb
  427. *
  428. * colorOffset[0] // Y
  429. * colorOffset[1] // Cr
  430. * colorOffset[2] // Cb
  431. *
  432. * colorScale[0] // Y
  433. * colorScale[1] // Cr
  434. * colorScale[2] // Cb
  435. *
  436. * where the data is used according to the following formulae:
  437. *
  438. * Y = colorOffset[0] + colorScale[0] *
  439. * (R * colorMatrix[0][0] +
  440. * G * colorMatrix[0][1] +
  441. * B * colorMatrix[0][2]);
  442. *
  443. * Cr = colorOffset[1] + colorScale[1] *
  444. * (R * colorMatrix[1][0] +
  445. * G * colorMatrix[1][1] +
  446. * B * colorMatrix[1][2]);
  447. *
  448. * Cb = colorOffset[2] + colorScale[2] *
  449. * (R * colorMatrix[2][0] +
  450. * G * colorMatrix[2][1] +
  451. * B * colorMatrix[2][2]);
  452. *
  453. * Possible errors:
  454. * BadMatch - The NVIDIA driver is not present on that screen.
  455. * BadImplementation - GVO is not available on that screen.
  456. */
  457. void XNVCTRLSetGvoColorConversion (
  458. Display *dpy,
  459. int screen,
  460. float colorMatrix[3][3],
  461. float colorOffset[3],
  462. float colorScale[3]
  463. );
  464. /*
  465. * XNVCTRLQueryGvoColorConversion -
  466. *
  467. * Retrieves the color conversion matrix and color offset
  468. * that are currently being used for GVO (Graphic to Video Out).
  469. *
  470. * The values are ordered within the arrays according to the comments
  471. * for XNVCTRLSetGvoColorConversion().
  472. *
  473. * Possible errors:
  474. * BadMatch - The NVIDIA driver is not present on that screen.
  475. * BadImplementation - GVO is not available on that screen.
  476. */
  477. Bool XNVCTRLQueryGvoColorConversion (
  478. Display *dpy,
  479. int screen,
  480. float colorMatrix[3][3],
  481. float colorOffset[3],
  482. float colorScale[3]
  483. );
  484. /*
  485. * XNVCTRLQueryBinaryData -
  486. *
  487. * Returns True if the attribute exists. Returns False otherwise.
  488. * If XNVCTRLQueryBinaryData returns True, *ptr will point to an
  489. * allocated block of memory containing the binary data attribute
  490. * requested. It is the caller's responsibility to free the data
  491. * when done. len will list the length of the binary data.
  492. *
  493. * Calling this function is equivalent to calling
  494. * XNVCTRLQueryTargetBinaryData() with the target_type set to
  495. * NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.
  496. *
  497. * Possible errors:
  498. * BadValue - The screen doesn't exist.
  499. * BadMatch - The NVIDIA driver is not present on that screen.
  500. * BadAlloc - Insufficient resources to fulfill the request.
  501. */
  502. Bool XNVCTRLQueryBinaryData (
  503. Display *dpy,
  504. int screen,
  505. unsigned int display_mask,
  506. unsigned int attribute,
  507. unsigned char **ptr,
  508. int *len
  509. );
  510. /*
  511. * XNVCTRLQueryTargetBinaryData -
  512. *
  513. * Returns True if the attribute exists. Returns False otherwise.
  514. * If XNVCTRLQueryTargetBinaryData returns True, *ptr will point to an
  515. * allocated block of memory containing the binary data attribute
  516. * requested. It is the caller's responsibility to free the data
  517. * when done. len will list the length of the binary data.
  518. *
  519. * Possible errors:
  520. * BadValue - The target doesn't exist.
  521. * BadMatch - The NVIDIA driver does not control the target.
  522. * BadAlloc - Insufficient resources to fulfill the request.
  523. */
  524. Bool XNVCTRLQueryTargetBinaryData (
  525. Display *dpy,
  526. int target_type,
  527. int target_id,
  528. unsigned int display_mask,
  529. unsigned int attribute,
  530. unsigned char **ptr,
  531. int *len
  532. );
  533. /*
  534. * XNVCTRLStringOperation -
  535. *
  536. * Takes a string as input and returns a Xmalloc'ed string as output.
  537. * Returns True on success and False on failure.
  538. */
  539. Bool XNVCTRLStringOperation (
  540. Display *dpy,
  541. int target_type,
  542. int target_id,
  543. unsigned int display_mask,
  544. unsigned int attribute,
  545. char *pIn,
  546. char **ppOut
  547. );
  548. /*
  549. * XNVCtrlSelectNotify -
  550. *
  551. * This enables/disables receiving of NV-CONTROL events. The type
  552. * specifies the type of event to enable (currently, the only
  553. * type that can be requested per-screen with XNVCtrlSelectNotify()
  554. * is ATTRIBUTE_CHANGED_EVENT); onoff controls whether receiving this
  555. * type of event should be enabled (True) or disabled (False).
  556. *
  557. * Returns True if successful, or False if the screen is not
  558. * controlled by the NVIDIA driver.
  559. */
  560. Bool XNVCtrlSelectNotify (
  561. Display *dpy,
  562. int screen,
  563. int type,
  564. Bool onoff
  565. );
  566. /*
  567. * XNVCtrlSelectTargetNotify -
  568. *
  569. * This enables/disables receiving of NV-CONTROL events that happen on
  570. * the specified target. The notify_type specifies the type of event to
  571. * enable (currently, the only type that can be requested per-target with
  572. * XNVCtrlSelectTargetNotify() is TARGET_ATTRIBUTE_CHANGED_EVENT); onoff
  573. * controls whether receiving this type of event should be enabled (True)
  574. * or disabled (False).
  575. *
  576. * Returns True if successful, or False if the target is not
  577. * controlled by the NVIDIA driver.
  578. */
  579. Bool XNVCtrlSelectTargetNotify (
  580. Display *dpy,
  581. int target_type,
  582. int target_id,
  583. int notify_type,
  584. Bool onoff
  585. );
  586. /*
  587. * XNVCtrlEvent structure
  588. */
  589. typedef struct {
  590. int type;
  591. unsigned long serial;
  592. Bool send_event; /* always FALSE, we don't allow send_events */
  593. Display *display;
  594. Time time;
  595. int screen;
  596. unsigned int display_mask;
  597. unsigned int attribute;
  598. int value;
  599. } XNVCtrlAttributeChangedEvent;
  600. typedef union {
  601. int type;
  602. XNVCtrlAttributeChangedEvent attribute_changed;
  603. long pad[24];
  604. } XNVCtrlEvent;
  605. /*
  606. * XNVCtrlEventTarget structure
  607. */
  608. typedef struct {
  609. int type;
  610. unsigned long serial;
  611. Bool send_event; /* always FALSE, we don't allow send_events */
  612. Display *display;
  613. Time time;
  614. int target_type;
  615. int target_id;
  616. unsigned int display_mask;
  617. unsigned int attribute;
  618. int value;
  619. } XNVCtrlAttributeChangedEventTarget;
  620. typedef union {
  621. int type;
  622. XNVCtrlAttributeChangedEventTarget attribute_changed;
  623. long pad[24];
  624. } XNVCtrlEventTarget;
  625. /*
  626. * XNVCtrlEventTargetAvailability structure
  627. */
  628. typedef struct {
  629. int type;
  630. unsigned long serial;
  631. Bool send_event; /* always FALSE, we don't allow send_events */
  632. Display *display;
  633. Time time;
  634. int target_type;
  635. int target_id;
  636. unsigned int display_mask;
  637. unsigned int attribute;
  638. int value;
  639. Bool availability;
  640. } XNVCtrlAttributeChangedEventTargetAvailability;
  641. typedef union {
  642. int type;
  643. XNVCtrlAttributeChangedEventTargetAvailability attribute_changed;
  644. long pad[24];
  645. } XNVCtrlEventTargetAvailability;
  646. /*
  647. * XNVCtrlStringEventTarget structure
  648. */
  649. typedef struct {
  650. int type;
  651. unsigned long serial;
  652. Bool send_event; /* always FALSE, we don't allow send_events */
  653. Display *display;
  654. Time time;
  655. int target_type;
  656. int target_id;
  657. unsigned int display_mask;
  658. unsigned int attribute;
  659. } XNVCtrlStringAttributeChangedEventTarget;
  660. typedef union {
  661. int type;
  662. XNVCtrlStringAttributeChangedEventTarget attribute_changed;
  663. long pad[24];
  664. } XNVCtrlStringEventTarget;
  665. /*
  666. * XNVCtrlBinaryEventTarget structure
  667. */
  668. typedef struct {
  669. int type;
  670. unsigned long serial;
  671. Bool send_event; /* always FALSE, we don't allow send_events */
  672. Display *display;
  673. Time time;
  674. int target_type;
  675. int target_id;
  676. unsigned int display_mask;
  677. unsigned int attribute;
  678. } XNVCtrlBinaryAttributeChangedEventTarget;
  679. typedef union {
  680. int type;
  681. XNVCtrlBinaryAttributeChangedEventTarget attribute_changed;
  682. long pad[24];
  683. } XNVCtrlBinaryEventTarget;
  684. #if defined __cplusplus
  685. } /* extern "C" */
  686. #endif
  687. #endif /* __NVCTRLLIB_H */