GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Functions
gp_linux_input.h File Reference

Linux input drivers. More...

#include <backends/gp_backend.h>
#include <backends/gp_backend_input.h>

Go to the source code of this file.

Functions

int gp_linux_input_hotplug_new (gp_backend *backend)
 Registers a hotplug handler for the Linux input devices.
 
int gp_linux_input_new (const char *dev_path, gp_backend *backend)
 Creates a new linux input driver and attaches it to the backend.
 

Detailed Description

Linux input drivers.

Definition in file gp_linux_input.h.

Function Documentation

◆ gp_linux_input_hotplug_new()

int gp_linux_input_hotplug_new ( gp_backend backend)

Registers a hotplug handler for the Linux input devices.

Hotplug handler for the /dev/input/device* devices is registered first, then all currently existing devices are walked and passed to the gp_linux_input_new() function.

This is called by backend drivers that use linux input, e.g. linux drm backend and there is no need to call this function from the application.

Parameters
backendA backend to registred the handler for
Returns
Returns zero on success non-zero otherwise.

◆ gp_linux_input_new()

int gp_linux_input_new ( const char *  dev_path,
gp_backend backend 
)

Creates a new linux input driver and attaches it to the backend.

This functions is usually called by the hotplug input driver attached to the backend by the gp_linux_input_hotplug_new() call.

Parameters
dev_pathA path to a linux input device, e.g. /dev/input/event10
backendA backend to attach the input driver to.
Returns
Returns zero on success non-zero otherwise.