vboxmouse_15.c revision 52975a397ed68b39ebf46a06ac6cc2cd96dd052d
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VirtualBox X11 Guest Additions, mouse driver for X.Org server 1.5
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright (C) 2006-2007 Oracle Corporation
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * available from http://www.virtualbox.org. This file is free software;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * you can redistribute it and/or modify it under the terms of the GNU
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * General Public License (GPL) as published by the Free Software
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * --------------------------------------------------------------------
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * This code is based on evdev.c from X.Org with the following copyright
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * and permission notice:
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Copyright © 2004-2008 Red Hat, Inc.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Permission to use, copy, modify, distribute, and sell this software
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * and its documentation for any purpose is hereby granted without
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * fee, provided that the above copyright notice appear in all copies
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * and that both that copyright notice and this permission notice
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * appear in supporting documentation, and that the name of Red Hat
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * not be used in advertising or publicity pertaining to distribution
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * of the software without specific, written prior permission. Red
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * Hat makes no representations about the suitability of this software
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * for any purpose. It is provided "as is" without express or implied
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * warranty.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xf86.h>
#include <xf86Xinput.h>
#include <mipointer.h>
#include <xf86Module.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include "product-generated.h"
return !Success;
axis_labels[0],
, Absolute
, Absolute
return Success;
switch (what)
case DEVICE_INIT:
VbglR3Term();
return xrc;
case DEVICE_ON:
return !Success;
case DEVICE_OFF:
case DEVICE_CLOSE:
VbglR3Term();
return Success;
return BadMatch;
return Success;
static Bool
if (first == 0) {
return TRUE;
return FALSE;
const char *device;
int rc;
return BadMatch;
return rc;
return Success;
static InputInfoPtr
const char *device;
return NULL;
return NULL;
return pInfo;
NULL,
NULL,
NULL,
static pointer
int *errmaj,
int *errmin)
(void *)&VBOXMOUSE);
return module;