From 7fe60435bce6595a9c58a9bfd8244d74b5320e96 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 15 Jan 2013 08:46:13 +0100 Subject: Import DirectFB141_2k11R3_beta5 --- Source/DirectFB/systems/vnc/vncinput.c | 128 +++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100755 Source/DirectFB/systems/vnc/vncinput.c (limited to 'Source/DirectFB/systems/vnc/vncinput.c') diff --git a/Source/DirectFB/systems/vnc/vncinput.c b/Source/DirectFB/systems/vnc/vncinput.c new file mode 100755 index 0000000..e693bba --- /dev/null +++ b/Source/DirectFB/systems/vnc/vncinput.c @@ -0,0 +1,128 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include + +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +DFB_INPUT_DRIVER( vncinput ) + + +CoreInputDevice *vncInputDevice = NULL; + +/* exported symbols */ + +/* + * Return the number of available devices. + * Called once during initialization of DirectFB. + */ +static int +driver_get_available( void ) +{ + if (dfb_system_type() == CORE_VNC) + return 1; + + return 0; +} + +/* + * Fill out general information about this driver. + * Called once during initialization of DirectFB. + */ +static void +driver_get_info( InputDriverInfo *info ) +{ + /* fill driver info structure */ + snprintf ( info->name, + DFB_INPUT_DRIVER_INFO_NAME_LENGTH, "VNC Input Driver" ); + snprintf ( info->vendor, + DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH, "Leonard Schneider" ); + + info->version.major = 0; + info->version.minor = 1; +} + +/* + * Open the device, fill out information about it, + * allocate and fill private data, start input thread. + * Called during initialization, resuming or taking over mastership. + */ +static DFBResult +driver_open_device( CoreInputDevice *device, + unsigned int number, + InputDeviceInfo *info, + void **driver_data ) +{ + vncInputDevice = device; + + /* set device name */ + snprintf( info->desc.name, + DFB_INPUT_DEVICE_DESC_NAME_LENGTH, "VNC Input" ); + + /* set device vendor */ + snprintf( info->desc.vendor, + DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH, "VNC" ); + + /* set one of the primary input device IDs */ + info->prefered_id = DIDID_KEYBOARD; + + /* set type flags */ + info->desc.type = /*DIDTF_JOYSTICK |*/ DIDTF_KEYBOARD| DIDTF_MOUSE; + + /* set capabilities */ + info->desc.caps = DICAPS_ALL; + + /* set private data pointer */ + /* *driver_data = device;*/ + + return DFB_OK; +} + +/* + * Fetch one entry from the device's keymap if supported. + */ +static DFBResult +driver_get_keymap_entry( CoreInputDevice *device, + void *driver_data, + DFBInputDeviceKeymapEntry *entry ) +{ + return DFB_UNSUPPORTED; +} + +/* + * End thread, close device and free private data. + */ +static void +driver_close_device( void *driver_data ) +{ +} + -- cgit