/usr/share/doc/xviewg/examples/misc/screen.c is in xview-examples 3.2p1.4-28.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /*
* screen.c -- get some simple info about the current screen:
* width, height, depth.
*/
#include <xview/xview.h>
#include <xview/screen.h>
main(argc, argv)
int argc;
char *argv[];
{
Frame frame;
Xv_Screen screen;
Display *dpy;
int screen_no;
xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL);
frame = (Frame)xv_create(XV_NULL, FRAME, NULL);
dpy = (Display *)xv_get(frame, XV_DISPLAY);
/* lumpi@dobag.in-berlin.de */
printf("Server display = '%s'\n", ServerVendor(dpy));
/* printf("Server display = '%s'\n", dpy->vendor); */
screen = (Xv_Screen)xv_get(frame, XV_SCREEN);
screen_no = (int)xv_get(screen, SCREEN_NUMBER);
printf("Screen #%d: width: %d, height: %d, depth: %d\n",
screen_no,
DisplayWidth(dpy, screen_no),
DisplayHeight(dpy, screen_no),
DefaultDepth(dpy, screen_no));
}
|