[c-host] initial stubs for pointer support

This commit is contained in:
Geoffrey McRae
2019-03-04 17:45:19 +11:00
parent 40a1b860bf
commit 496fd79714
4 changed files with 39 additions and 17 deletions

View File

@@ -33,10 +33,17 @@ CaptureResult;
typedef enum CaptureFormat
{
CAPTURE_FMT_BGRA,
CAPTURE_FMT_RGBA,
// frame formats
CAPTURE_FMT_BGRA ,
CAPTURE_FMT_RGBA ,
CAPTURE_FMT_RGBA10,
CAPTURE_FMT_YUV420,
// pointer formats
CAPTURE_FMT_COLOR ,
CAPTURE_FMT_MONO ,
CAPTURE_FMT_MASKED,
CAPTURE_FMT_MAX
}
CaptureFormat;
@@ -52,6 +59,16 @@ typedef struct CaptureFrame
}
CaptureFrame;
typedef struct CapturePointer
{
int x, y;
CaptureFormat format;
unsigned int width, height;
unsigned int pitch;
void * data;
}
CapturePointer;
typedef struct CaptureInterface
{
const char * (*getName )();
@@ -61,10 +78,9 @@ typedef struct CaptureInterface
void (*free )();
unsigned int (*getMaxFrameSize)();
CaptureResult (*capture)(
bool * hasFrameUpdate,
bool * hasPointerUpdate);
CaptureResult (*capture)();
bool (*getFrame)(CaptureFrame * frame);
bool (*getFrame )(CaptureFrame * frame );
bool (*getPointer)(CapturePointer * pointer);
}
CaptureInterface;