screen_create_device_type()

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

The screen_create_device_type() function creates a input device object to be associated with a context. Note that you need to be within a privileged context to call this function. The following are valid input devices which can be created:

Returns:

0 if the input device was created, or -1 if an error occurred (errno is set; refer to /usr/include/errno.h for more details).