Libmacro  0.2
Libmacro is an extensible macro and hotkey library.
p_grabber.h File Reference

Grabber - Take exclusive access to a /dev/input event. More...

#include "mcr/standard/standard.h"
#include "mcr/standard/linux/p_standard.h"

Go to the source code of this file.

Classes

struct  mcr_Grabber
 

Macros

#define MCR_EVENTINDEX(keyCode)   ((keyCode) / 8)
 
#define MCR_EVENTBIT(keyCode)   (1 << ((keyCode) % 8))
 

Functions

MCR_API void mcr_Grabber_init (struct mcr_Grabber *grabPt, struct mcr_context *ctx)
 
MCR_API void mcr_Grabber_ctor (struct mcr_Grabber *grabPt, struct mcr_context *ctx, bool blocking, const char *path)
 
MCR_API int mcr_Grabber_deinit (struct mcr_Grabber *grabPt)
 
MCR_API bool mcr_Grabber_blocking (struct mcr_Grabber *grabPt)
 
MCR_API int mcr_Grabber_set_blocking (struct mcr_Grabber *grabPt, bool enable)
 
MCR_API const char * mcr_Grabber_path (struct mcr_Grabber *grabPt)
 
MCR_API int mcr_Grabber_set_path (struct mcr_Grabber *grabPt, const char *path)
 
MCR_API bool mcr_Grabber_enabled (struct mcr_Grabber *grabPt)
 
MCR_API int mcr_Grabber_set_enabled (struct mcr_Grabber *grabPt, bool enable)
 

Detailed Description

Grabber - Take exclusive access to a /dev/input event.

Definition in file p_grabber.h.

Function Documentation

§ mcr_Grabber_blocking()

MCR_API bool mcr_Grabber_blocking ( struct mcr_Grabber grabPt)

§ mcr_Grabber_enabled()

MCR_API bool mcr_Grabber_enabled ( struct mcr_Grabber grabPt)

Get enabled state, and set the grabber enabled state to the same.

§ mcr_Grabber_init()

MCR_API void mcr_Grabber_init ( struct mcr_Grabber grabPt,
struct mcr_context ctx 
)

§ mcr_Grabber_path()

MCR_API const char* mcr_Grabber_path ( struct mcr_Grabber grabPt)

§ mcr_Grabber_set_blocking()

MCR_API int mcr_Grabber_set_blocking ( struct mcr_Grabber grabPt,
bool  enable 
)

mcr_Grabber::blocking, and will also set EVIOCGRAB if currently enabled.

§ mcr_Grabber_set_enabled()

MCR_API int mcr_Grabber_set_enabled ( struct mcr_Grabber grabPt,
bool  enable 
)

Allow or disallow this object to function.

Returns
reterr

§ mcr_Grabber_set_path()

MCR_API int mcr_Grabber_set_path ( struct mcr_Grabber grabPt,
const char *  path 
)