home *** CD-ROM | disk | FTP | other *** search
/ Enter 1999 April - Disc 1 / enter_04_1999_1.iso / OS2 / XFREE86 / XDOC.ZIP / XFree86 / lib / X11 / doc / DPMSLib.TXT < prev    next >
Encoding:
Text File  |  1999-01-09  |  10.6 KB  |  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 0.5    (DRAFT)
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.             Rob Lembree
  30.             lembree@zk3.dec.com
  31.  
  32.            Digital Equipment Corporation
  33.                24 April    1996
  34.  
  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, Inc.
  192.  
  193.  
  194.  
  195.  
  196.                  1
  197.  
  198.  
  199.  
  200.  
  201.  
  202. Display    Power Management Signaling (DPMS) Extension    DRAFT
  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    DRAFT
  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    zero
  318. 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    DRAFT
  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
  353. seconds.
  354.  
  355.  
  356. The DPMSGetTimeouts function retrieves the timeout values
  357. used by    the X server for DPMS timings.
  358.  
  359. The value standby is the amount    of time    of inactivity in
  360. seconds    before standby mode is invoked.    A value    of zero
  361. indicates that this mode has been disabled.
  362.  
  363. The value suspend is the amount    of time    of inactivity in
  364. seconds    before the second level    of power savings is invoked.
  365. A value    of zero    indicates that this mode has been disabled.
  366.  
  367. The value off is the amount of time of inactivity in seconds
  368. before the third and final level of power savings is
  369. invoked. A value of zero indicates that    this mode has been
  370. disabled.
  371.  
  372.  
  373. DPMSEnable
  374.  
  375.  
  376.  
  377. Status DPMSEnable(display)
  378.  
  379.      Display *display;
  380.  
  381. display    Specifies the connection to the    X server.
  382.  
  383.  
  384. The DPMSEnable function    enables    DPMS on    the specified
  385. display.  When enabled,    DPMS will use the currently saved
  386. timeout    values,    and will invoke    the DPMS power mode
  387. appropriate for    the amount of time that    the workstation
  388. input devices have been    idle.  If DPMSEnable is    invoked    on a
  389. display    with DPMS already enabled, no change is    made, and no
  390. error is returned.  If DPMSEnable is invoked on    a display
  391.  
  392.  
  393.  
  394.                  4
  395.  
  396.  
  397.  
  398.  
  399.  
  400. Display    Power Management Signaling (DPMS) Extension    DRAFT
  401.  
  402.  
  403. without    support    for DPMS, no change is made and    no error is
  404. returned.
  405.  
  406.  
  407. DPMSDisable
  408.  
  409.  
  410.  
  411. Status DPMSDisable(display)
  412.  
  413.      Display *display;
  414.  
  415. display    Specifies the connection to the    X server.
  416.  
  417.  
  418. The DPMSDisable    function disables DPMS on the specified
  419. display.  When disabled, DPMS returns the display to DPMSMo-
  420. deOn.  If DPMSDisable is invoked on a display with DPMS
  421. already    disabled, no change is made, and no error is
  422. returned.  If DPMSDisable is invoked on    a display without
  423. support    for DPMS, no change is made and    no error is
  424. returned.
  425.  
  426.  
  427. DPMSForceLevel
  428.  
  429.  
  430.  
  431. Status DPMSForceLevel(display, level)
  432.  
  433.      Display *display;
  434.      CARD16    level;
  435.  
  436. display    Specifies the connection to the    X server.
  437. level    Specifies the level to force power to.
  438.  
  439.  
  440. The DPMSForceLevel function forces a DPMS capable display
  441. into the specified power level.     The level must    be one of
  442. DPMSModeOn, DPMSModeStandby, DPMSModeSuspend, or DPMSMode-
  443. Off.  Values other than    these will result in a BadValue
  444. error.    If DPMS    is disabled on the display, a BadMatch pro-
  445. tocol error will result.
  446.  
  447.  
  448. DPMSInfo
  449.  
  450.  
  451.  
  452. Status DPMSInfo(display, power_level, state)
  453.  
  454.      Display *display;
  455.      CARD16    *power_level;
  456.      BOOL *state;
  457.  
  458.  
  459.  
  460.                  5
  461.  
  462.  
  463.  
  464.  
  465.  
  466. Display    Power Management Signaling (DPMS) Extension    DRAFT
  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.