/usr/share/doc/xviewg/examples/extensions/image.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 34 35 36 37 38 39 40 41 | /* logo.c -- demonstrate the use of the image package. */
#include <xview/xview.h>
#include "image.h"
main(argc, argv)
int argc;
char *argv[];
{
Frame frame;
Image image1, image2;
Pixmap pixmap;
xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL);
if (argc < 2)
puts("specify filename"), exit(1);
/* frame = (Frame)xv_create(NULL, FRAME, NULL); */
if (!(image1 = xv_create(NULL, IMAGE,
XV_WIDTH, 100,
XV_HEIGHT, 100,
SERVER_IMAGE_BITMAP_FILE, argv[1],
NULL)))
puts("unsuccessfully created image1"), exit(1);
if (!(image2 = xv_find(NULL, IMAGE,
SERVER_IMAGE_BITMAP_FILE, argv[1],
NULL)))
puts("unsuccessfully created image2"), exit(1);
printf("image1 %s image2\n",
(image2 != image1)? "matched" : "didn't match");
pixmap = (Pixmap)xv_get(image1, SERVER_IMAGE_PIXMAP);
if (!(image2 = xv_find(NULL, IMAGE,
SERVER_IMAGE_PIXMAP, pixmap,
NULL)))
puts("unsuccessfully created image2"), exit(1);
printf("image1 %s image2\n",
(image2 != image1)? "matched" : "didn't match");
/* window_fit(frame); */
/* xv_main_loop(frame); */
}
|