summaryrefslogtreecommitdiff
path: root/xorg_grabber.h
diff options
context:
space:
mode:
authorFlorian Jung <florian.a.jung@web.de>2012-12-04 00:03:40 +0100
committerFlorian Jung <florian.a.jung@web.de>2012-12-04 00:03:40 +0100
commitdee7d241f8b20262aebe6344b752bb0905ede628 (patch)
tree212f7ead75f05f1755b7292f09aca27f24901b28 /xorg_grabber.h
parentb539476ec800eb1d7804fd8e9b73fa9bbb1f63bd (diff)
joystick und xorggrabber ausgelagert
Diffstat (limited to 'xorg_grabber.h')
-rw-r--r--xorg_grabber.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/xorg_grabber.h b/xorg_grabber.h
new file mode 100644
index 0000000..54bbb8f
--- /dev/null
+++ b/xorg_grabber.h
@@ -0,0 +1,25 @@
+#ifndef __XORG_GRABBER_H__
+#define __XORG_GRABBER_H__
+
+#include <xcb/xcb.h>
+#include <opencv2/opencv.hpp>
+
+using namespace cv;
+
+class XorgGrabber
+{
+ public:
+ XorgGrabber(const char* win_title);
+ ~XorgGrabber();
+ void read(Mat& mat);
+
+ private:
+ xcb_connection_t* conn;
+ xcb_window_t grabbed_win;
+ int grab_width, grab_height;
+ xcb_screen_t* grab_screen;
+ xcb_get_image_reply_t* img;
+
+};
+
+#endif