mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Update X11Grabber.h
Former-commit-id: 895bc985c0e732ec5d8e064068cb6f3e0920d09a
This commit is contained in:
parent
7d9de67449
commit
b9a9c3126f
@ -7,6 +7,11 @@
|
|||||||
// X11 includes
|
// X11 includes
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
|
#include <X11/extensions/Xrender.h>
|
||||||
|
#include <X11/extensions/XShm.h>
|
||||||
|
#include <sys/ipc.h>
|
||||||
|
#include <sys/shm.h>
|
||||||
|
|
||||||
class X11Grabber
|
class X11Grabber
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -17,6 +22,8 @@ public:
|
|||||||
|
|
||||||
int open();
|
int open();
|
||||||
|
|
||||||
|
bool Setup();
|
||||||
|
|
||||||
Image<ColorRgb> & grab();
|
Image<ColorRgb> & grab();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -27,18 +34,23 @@ private:
|
|||||||
int _cropTop;
|
int _cropTop;
|
||||||
int _cropBottom;
|
int _cropBottom;
|
||||||
|
|
||||||
Screen *Xscreen;
|
XImage* _xImage;
|
||||||
XImage *xImage;
|
XShmSegmentInfo _shminfo;
|
||||||
XShmSegmentInfo shminfo;
|
|
||||||
int screen;
|
|
||||||
|
|
||||||
/// Reference to the X11 display (nullptr if not opened)
|
/// Reference to the X11 display (nullptr if not opened)
|
||||||
Display * _x11Display;
|
Display* _x11Display;
|
||||||
|
Window _window;
|
||||||
|
XWindowAttributes _windowAttr;
|
||||||
|
|
||||||
unsigned _screenWidth;
|
unsigned _screenWidth;
|
||||||
unsigned _screenHeight;
|
unsigned _screenHeight;
|
||||||
|
unsigned _croppedWidth;
|
||||||
|
unsigned _croppedHeight;
|
||||||
|
|
||||||
Image<ColorRgb> _image;
|
Image<ColorRgb> _image;
|
||||||
|
|
||||||
|
void freeResources();
|
||||||
|
void setupResources();
|
||||||
|
|
||||||
int updateScreenDimensions();
|
int updateScreenDimensions();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user