hyperion.ng
OsxFrameGrabber.h
1 #pragma once
2 
3 // OSX includes
4 #ifdef __APPLE__
5 #include <CoreGraphics/CoreGraphics.h>
6 #else
7 #include <grabber/OsxFrameGrabberMock.h>
8 #endif
9 
10 // Utils includes
11 #include <utils/ColorRgb.h>
12 #include <hyperion/Grabber.h>
13 
17 class OsxFrameGrabber : public Grabber
18 {
19 public:
27  OsxFrameGrabber(const unsigned display, const unsigned width, const unsigned height);
28  ~OsxFrameGrabber();
29 
38  int grabFrame(Image<ColorRgb> & image);
39 
43  virtual void setDisplayIndex(int index);
44 
45 private:
47  unsigned _screenIndex;
48 
50  CGDirectDisplayID _display;
51 };
OsxFrameGrabber(const unsigned display, const unsigned width, const unsigned height)
Construct a OsxFrameGrabber that will capture snapshots with specified dimensions.
Definition: OsxFrameGrabber.cpp:8
virtual void setDisplayIndex(int index)
Overwrite Grabber.h implementation.
Definition: OsxFrameGrabber.cpp:62
int grabFrame(Image< ColorRgb > &image)
Captures a single snapshot of the display and writes the data to the given image. ...
Definition: OsxFrameGrabber.cpp:20
The Grabber class is responsible to apply image resizes (with or without ImageResampler) Overwrite th...
Definition: Grabber.h:17
The OsxFrameGrabber is used for creating snapshots of the display (screenshots)
Definition: OsxFrameGrabber.h:17