1: #include <X/mit-copyright.h>
   2: 
   3: /* $Header: DisplaySize.c,v 10.3 86/02/01 15:29:08 tony Rel $ */
   4: /* Copyright	Massachusetts Institute of Technology 1985 */
   5: 
   6: #include "XlibInternal.h"
   7: 
   8: int DisplayWidth()
   9: {
  10:     register Display *dpy = _XlibCurrentDisplay;
  11:     WindowInfo rootinfo;
  12:     if (dpy->width == 0 || dpy->height == 0) {
  13:         XQueryWindow(RootWindow, &rootinfo);
  14:         dpy->width = rootinfo.width;
  15:         dpy->height = rootinfo.height;
  16:     }
  17:     return (dpy->width);
  18: }
  19: 
  20: int DisplayHeight()
  21: {
  22:     register Display *dpy = _XlibCurrentDisplay;
  23:     WindowInfo rootinfo;
  24:     if (dpy->width == 0 || dpy->height == 0) {
  25:         XQueryWindow(RootWindow, &rootinfo);
  26:         dpy->width = rootinfo.width;
  27:         dpy->height = rootinfo.height;
  28:     }
  29:     return (dpy->height);
  30: }
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 520
Valid CSS Valid XHTML 1.0 Strict