Update X11Grabber.h

Former-commit-id: 895bc985c0e732ec5d8e064068cb6f3e0920d09a
This commit is contained in:
Paulchen-Panther 2016-01-21 16:39:52 +01:00
parent 7d9de67449
commit b9a9c3126f
1 changed files with 18 additions and 6 deletions

View File

@ -7,6 +7,11 @@
// X11 includes
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/XShm.h>
#include <sys/ipc.h>
#include <sys/shm.h>
class X11Grabber
{
public:
@ -16,6 +21,8 @@ public:
virtual ~X11Grabber();
int open();
bool Setup();
Image<ColorRgb> & grab();
@ -27,18 +34,23 @@ private:
int _cropTop;
int _cropBottom;
Screen *Xscreen;
XImage *xImage;
XShmSegmentInfo shminfo;
int screen;
XImage* _xImage;
XShmSegmentInfo _shminfo;
/// Reference to the X11 display (nullptr if not opened)
Display * _x11Display;
Display* _x11Display;
Window _window;
XWindowAttributes _windowAttr;
unsigned _screenWidth;
unsigned _screenHeight;
unsigned _croppedWidth;
unsigned _croppedHeight;
Image<ColorRgb> _image;
void freeResources();
void setupResources();
int updateScreenDimensions();
};