Create a device of specified type to be associated with a context
Synopsis:
#include <screen/screen.h>
int screen_create_device_type(screen_device_t *pdev,
screen_context_t ctx,
int type)
Arguments:
- pdev
- A pointer to a screen_device_t where a handle for the new input device can be stored.
- ctx
- The handle of the context in which the input device is to be created. This context must have been created with the context type of SCREEN_INPUT_PROVIDER_CONTEXT using screen_create_context().
- type
- The type of input device to be created.
Library:
libscreen
Description:
Function Type: Immediate Execution
This function creates an input device object to be associated with a context. Note that you need to be within a privileged context to call this function. Applications must use
screen_destroy_device() when a device is no longer used. The following are valid input devices that can be created:
Returns:
0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).