home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 2 / chip_20018102_hu.iso / linux / X-4.1.0 / doc / dpmslib.txt < prev    next >
Text File  |  2001-06-27  |  10KB  |  529 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.    X Display Power Management Signaling (DPMS) Extension
  17.  
  18.            Library Specification
  19.  
  20.  
  21.  
  22.             Version 1.0
  23.           X Project Team Standard
  24.          X Version 11, Release 6.4
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.             Rob Lembree
  32.             lembree@zk3.dec.com
  33.            Digital Equipment Corporation
  34.                24 April 1996
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. Copyright (C) Digital Equipment Corporation, 1996
  74.  
  75. Permission to use, copy, modify, distribute, and sell this
  76. documentation for any purpose is hereby granted without fee,
  77. provided that the above copyright notice and this permission
  78. notice appear in all copies.  Digital Equipment Corporation
  79. makes no representations about the suitability for any pur-
  80. pose of the information in this document.  This documenta-
  81. tion is provided ``as is'' without express or implied war-
  82. ranty.
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. 1.  Overview
  140.  
  141. This extension provides X Protocol control over the VESA
  142. Display Power Management Signaling (DPMS) characteristics of
  143. video boards under control of the X Window System.
  144.  
  145. Traditionally, the X Window System has provided for both
  146. blanking and non-blanking screen savers.  Timeouts associ-
  147. ated with these built-in screen saver mechanisms are limited
  148. to idle (dwell) time, and a change timeout that specifies
  149. the change interval for non-blanking screen savers.
  150.  
  151. The United States' Environmental Protection Agency (EPA)
  152. Energy Star program requires that monitors power down after
  153. some idle time by default.  While it is possible to simply
  154. overload the existing screen saver timeouts, this solution
  155. leaves the non-privileged user little to no control over the
  156. DPMS characteristics of his or her system.  For example,
  157. disabling DPMS would require some unintended side effect in
  158. the core screen saver, such as disabling the changing of a
  159. non-blanking screen saver.  Providing clients with this con-
  160. trol requires an extension to the core X Window System Pro-
  161. tocol, and this extension seeks to fill this gap.
  162.  
  163. There are four power levels specified by the Video Electron-
  164. ics Standards Association (VESA) Display Power Management
  165. Signaling (DPMS) standard.  These are mapped onto the X DPMS
  166. Extension like this:
  167.  
  168.  
  169. DPMS Extension Power Levels
  170.   0           DPMSModeOn       In use
  171.   1           DPMSModeStandby       Blanked, low power
  172.   2           DPMSModeSuspend       Blanked, lower power
  173.   3           DPMSModeOff       Shut off, awaiting activity
  174.  
  175.  
  176.  
  177. 2.  DPMS Functions
  178.  
  179. DPMSQueryExtension
  180.  
  181.  
  182. Bool DPMSQueryExtension (display, event_base, error_base)
  183.  
  184.      Display *display;
  185.      int *event_base, *error_base;
  186.  
  187. display   Specifies the connection to the X server.
  188. event_base     Specifies the return location for the
  189. assigned base event
  190. -----------
  191. 1. X Window System is a trademark of X Consortium,
  192. Inc.
  193.  
  194.  
  195.  
  196.                   1
  197.  
  198.  
  199.  
  200.  
  201.  
  202. Display Power Management Signaling (DPMS) Extension
  203.  
  204.  
  205. error_base     Specifies the return location for the
  206. assigned base error
  207.  
  208.  
  209. The DPMSQueryExtension function queries the X server to
  210. determine the availability of the DPMS Extension.  If the
  211. extension is available, the return value is TRUE, and
  212. event_base and error_base are set to the base event number
  213. and base error number for the extension, respectively.    Oth-
  214. erwise, the return value is FALSE, and the values of
  215. event_base and error_base are undefined.
  216.  
  217.  
  218. DPMSGetVersion
  219.  
  220.  
  221. Status DPMSGetVersion(display, major_version, minor_version)
  222.  
  223.      Display *display;
  224.      int     *major_version, *minor_version;
  225.  
  226. display        Specifies the connection to the X server.
  227. major_version  Specifies the return location for the exten-
  228. sion major version.
  229. minor_version  Specifies the return location for the exten-
  230. sion minor version.
  231.  
  232.  
  233. The DPMSGetVersion function returns the version of the DPMS
  234. extension implemented by the X server.    The version is
  235. returned in major_version and minor_version.  The major ver-
  236. sion and minor version for this specification are '1' and
  237. '1', respectively.  The major version will be incremented
  238. for protocol incompatible changes, and the minor version
  239. will be incremented for small, upwardly compatible changes.
  240.  
  241.  
  242. DPMSCapable
  243.  
  244.  
  245. Bool DPMSCapable(display)
  246.  
  247.      Display *display;
  248.  
  249. display   Specifies the connection to the X server.
  250.  
  251.  
  252. The DPMSCapable function returns the DPMS capability of the
  253. X server, either TRUE (capable of DPMS) or FALSE (incapable
  254. of DPMS).  The capability of an X server is implementation
  255. defined.  For example, if a multi-headed  X server is capa-
  256. ble of DPMS on one head, and incapable on another, the truth
  257. value of this function is defined by the X server implemen-
  258. tation.
  259.  
  260.  
  261.  
  262.                   2
  263.  
  264.  
  265.  
  266.  
  267.  
  268. Display Power Management Signaling (DPMS) Extension
  269.  
  270.  
  271. DPMSSetTimeouts
  272.  
  273.  
  274.  
  275. Status DPMSSetTimeouts(display, standby, suspend, off)
  276.  
  277.      Display *display;
  278.      CARD16 standby, suspend, off;
  279.  
  280. display   Specifies the connection to the X server.
  281. standby   Specifies the new standby timeout in seconds.
  282. suspend   Specifies the new suspend timeout in seconds.
  283. off      Specifies the new off timeout in seconds.
  284.  
  285.  
  286. The DPMSSetTimeouts function permits applications to set the
  287. timeout values used by the X server for DPMS timings.
  288.  
  289. The value standby is the amount of time of inactivity in
  290. seconds before standby mode is invoked. The actual effects
  291. of this mode are implementation defined, but in the case of
  292. DPMS compliant hardware, it is implemented by shutting off
  293. the horizontal sync signal, and pulsing the vertical sync
  294. signal.  Standby mode provides the quickest monitor recovery
  295. time.  Note also that many monitors implement this mode
  296. identically to suspend mode.  A value of zero disables this
  297. mode.
  298.  
  299. The value suspend is the amount of time of inactivity in
  300. seconds before the second level of power savings is invoked.
  301. Suspend mode's physical and electrical characteristics are
  302. implementation defined, but in DPMS compliant hardware,
  303. results in the pulsing of the horizontal sync signal, and
  304. shutting off of the vertical sync signal.  Suspend mode
  305. recovery is considered to be slower than standby mode, but
  306. faster than off mode, however this is monitor dependent.  As
  307. noted above, many monitors implement this mode identically
  308. to standby mode.  A value of zero disables this mode.
  309.  
  310. The value off is the amount of time of inactivity in seconds
  311. before the third and final level of power savings is
  312. invoked. Off mode's physical and electrical characteristics
  313. are implementation defined, but in DPMS compliant hardware,
  314. is implemented by shutting off both horizontal and vertical
  315. sync signals, resulting in the power-down of the monitor.
  316. Recovery time is implementation dependant, but frequently is
  317. similar to the power-up time of the monitor.  A value of
  318. zero disables this mode.
  319.  
  320. Chronologically, standby mode occurs before or simultane-
  321. ously with suspend mode, and suspend mode must occur before
  322. or simultaneously with off mode.  Therefore, non-zero mode
  323. timeout values must be greater than or equal to the timeout
  324. values of earlier modes.  If inconsistent values are
  325.  
  326.  
  327.  
  328.                   3
  329.  
  330.  
  331.  
  332.  
  333.  
  334. Display Power Management Signaling (DPMS) Extension
  335.  
  336.  
  337. supplied, a BadValue error will result.
  338.  
  339.  
  340. DPMSGetTimeouts
  341.  
  342.  
  343.  
  344. Bool DPMSGetTimeouts(display, standby, suspend, off)
  345.  
  346.      Display *display;
  347.      CARD16 *standby, *suspend, *off;
  348.  
  349. display   Specifies the connection to the X server.
  350. standby   Specifies the current standby timeout in seconds.
  351. suspend   Specifies the current suspend timeout in seconds.
  352. off      Specifies the current off timeout in seconds.
  353.  
  354.  
  355. The DPMSGetTimeouts function retrieves the timeout values
  356. used by the X server for DPMS timings.
  357.  
  358. The value standby is the amount of time of inactivity in
  359. seconds before standby mode is invoked. A value of zero
  360. indicates that this mode has been disabled.
  361.  
  362. The value suspend is the amount of time of inactivity in
  363. seconds before the second level of power savings is invoked.
  364. A value of zero indicates that this mode has been disabled.
  365.  
  366. The value off is the amount of time of inactivity in seconds
  367. before the third and final level of power savings is
  368. invoked. A value of zero indicates that this mode has been
  369. disabled.
  370.  
  371.  
  372. DPMSEnable
  373.  
  374.  
  375.  
  376. Status DPMSEnable(display)
  377.  
  378.      Display *display;
  379.  
  380. display   Specifies the connection to the X server.
  381.  
  382.  
  383. The DPMSEnable function enables DPMS on the specified dis-
  384. play.  When enabled, DPMS will use the currently saved time-
  385. out values, and will invoke the DPMS power mode appropriate
  386. for the amount of time that the workstation input devices
  387. have been idle.  If DPMSEnable is invoked on a display with
  388. DPMS already enabled, no change is made, and no error is
  389. returned.  If DPMSEnable is invoked on a display without
  390. support for DPMS, no change is made and no error is
  391.  
  392.  
  393.  
  394.                   4
  395.  
  396.  
  397.  
  398.  
  399.  
  400. Display Power Management Signaling (DPMS) Extension
  401.  
  402.  
  403. returned.
  404.  
  405.  
  406. DPMSDisable
  407.  
  408.  
  409.  
  410. Status DPMSDisable(display)
  411.  
  412.      Display *display;
  413.  
  414. display   Specifies the connection to the X server.
  415.  
  416.  
  417. The DPMSDisable function disables DPMS on the specified dis-
  418. play.  When disabled, DPMS returns the display to DPMSMod-
  419. eOn.  If DPMSDisable is invoked on a display with DPMS
  420. already disabled, no change is made, and no error is
  421. returned.  If DPMSDisable is invoked on a display without
  422. support for DPMS, no change is made and no error is
  423. returned.
  424.  
  425.  
  426. DPMSForceLevel
  427.  
  428.  
  429.  
  430. Status DPMSForceLevel(display, level)
  431.  
  432.      Display *display;
  433.      CARD16 level;
  434.  
  435. display   Specifies the connection to the X server.
  436. level      Specifies the level to force power to.
  437.  
  438.  
  439. The DPMSForceLevel function forces a DPMS capable display
  440. into the specified power level.  The level must be one of
  441. DPMSModeOn, DPMSModeStandby, DPMSModeSuspend, or DPMSMode-
  442. Off.  Values other than these will result in a BadValue
  443. error.    If DPMS is disabled on the display, a BadMatch pro-
  444. tocol error will result.
  445.  
  446.  
  447. DPMSInfo
  448.  
  449.  
  450.  
  451. Status DPMSInfo(display, power_level, state)
  452.  
  453.      Display *display;
  454.      CARD16 *power_level;
  455.      BOOL *state;
  456.  
  457.  
  458.  
  459.  
  460.                   5
  461.  
  462.  
  463.  
  464.  
  465.  
  466. Display Power Management Signaling (DPMS) Extension
  467.  
  468.  
  469. display        Specifies the connection to the X server.
  470. power_level        Specifies the current power level.
  471. state            Specifies the current DPMS state
  472.  
  473.  
  474. The DPMSInfo function returns information about the current
  475. DPMS state.  The state return parameter indicates whether or
  476. not DPMS is enabled (TRUE) or disabled (FALSE).  The
  477. power_level return parameter indicates the current power
  478. level (one of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend,
  479. or DPMSModeOff.)
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                   6
  527.  
  528.  
  529.