/*
- * webcam.c - fetch data from webcam
+ * webcam.c - fetch data from webcam and display
*
* author: hackbard
*
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
#include "minirgb.h"
-#include "ivac-logo.xpm"
+// #include "images/ivac-logo.xpm"
+// #include "images/ivac-logo.h"
+#include "images/example_1.xbm"
/* defines */
#define XBM_WIDTH 256
#define XBM_REAL_WIDTH 512
#define XBM_HEIGHT 256
+// #define ivac_logo pixel_data
+#define ivac_logo example_1_bits
/* global variables */
Display *display;
my_wm_hints.window_group=ivac_win;
my_wm_hints.flags =
StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
- XSetWMHints(display,ivac_win,&my_wm_hints);
-
+ // XSetWMHints(display,ivac_win,&my_wm_hints);
+
/* finaly ... map that stuff ;) */
XMapWindow(display,ivac_win);
exit(1);
}
- open_window(argv[0],ivac_logo);
-
+ open_window(argv[0],(char *)ivac_logo);
+ minirgb_new(&rgb1,XBM_WIDTH,XBM_HEIGHT);
+ minirgb_new(&rgb2,XBM_WIDTH,XBM_HEIGHT);
+ minirgb_copy(&rgb2,&rgb1,0,0,XBM_WIDTH,XBM_HEIGHT,0,0);
/* to be continued ... here is a test! */
XFlush(display);
- sleep(5);
+ sleep(10);
printf("blaaaa, schmaeee\n");
+ XCloseDisplay(display);
+ return 0;
}