home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Enlightenment / enl14.tgz / enl14.tar / enl14 / root.c < prev    next >
C/C++ Source or Header  |  1997-11-10  |  421b  |  21 lines

  1. #include "enl.h"
  2.  
  3. Root *SetupRoot()
  4. {
  5.    Root *r;
  6.    XWindowAttributes att;
  7.    
  8.    r=Emalloc(sizeof(Root));
  9.    if (!r) return NULL;
  10.    r->name=duplicate("ROOT");
  11.    r->display=disp;
  12.    r->displayname=duplicate(DisplayString(disp));
  13.    r->win=DefaultRootWindow(disp);
  14.    XGetWindowAttributes(disp,r->win,&att);
  15.    r->width=att.width;
  16.    r->height=att.height;
  17.    r->visual=att.visual;
  18.    r->depth=att.depth;
  19.    return r;
  20. }
  21.