#include <math.h>
#include <time.h>
#include <X11/Xlib.h>
#include <usb.h>
#include "usbdrv.h"
Go to the source code of this file.
Functions | |
void | update () |
Determines the current cursor position and sets the servo angle. | |
int | main (int argc, char *argv[]) |
Main function. | |
Variables | |
Display * | dpy |
Window | root |
The display to use. | |
int | rootwidth |
The root-window of the display. | |
int | rootheight |
int | servoposx |
Measurements of the desktop. | |
int | servoposy |
usb_dev_handle * | handle = NULL |
Position of the mouse cursor. |
Definition in file xservopointer.c.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Main function.
Initializes the X-settings and the USB-device, starts the timer and calls the update-function.
argc | Number of arguments. | |
argv | Arguments. |
Definition at line 68 of file xservopointer.c.
References dpy, handle, root, rootheight, rootwidth, servoposx, servoposy, update(), USBDEV_SHARED_PRODUCT, USBDEV_SHARED_VENDOR, and usbOpenDevice().
void update | ( | ) |
Display* dpy |
usb_dev_handle* handle = NULL |
Position of the mouse cursor.
Definition at line 25 of file xservopointer.c.
Referenced by main(), update(), and usbOpenDevice().
Window root |
int rootheight |
int rootwidth |
The root-window of the display.
Definition at line 22 of file xservopointer.c.
Referenced by main().
int servoposx |
int servoposy |