+ /* getting basic xserver information */
+ // our screen id
+ screen_id=DefaultScreen(display);
+ // dimensions of screen
+ screen_width=DisplayWidth(display,screen_id);
+ screen_height=DisplayHeight(display,screen_id);
+ // how to draw white/black pixels */
+ white_pixel=WhitePixel(display,screen_id);
+ black_pixel=BlackPixel(display,screen_id);
+ // the screen's root window id
+ root_window=RootWindow(display,screen_id);
+
+ /* print basic xserver settings */
+ printf("screen ID: %d\n",screen_id);
+ printf("dimensions: %d x %d\n",screen_width,screen_height);
+ printf("white color -> %d\n",white_pixel);
+ printf("black color -> %d\n",black_pixel);