Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 32.290.362 Times

Linux::Joystick 0.0.1

  Date Added: January 03, 2010  |  Visits: 1.106

Linux::Joystick

Report Broken Link
Printer Friendly Version


Product Homepage
Download (115 downloads)

Linux::Joystick is an object-oriented, pure Perl API for accessing joystick devices under Linux-based operating systems. Linux::Joystick module is capable of using either blocking or non-blocking I/O, and represents each axis change or button press as a Linux::Joystick::Event object. USAGE If you want your application to be driven by joystick events, use blocking I/O and an event loop: use Linux::Joystick; my $js = new Linux::Joystick; my $event; print "Joystick has " . $js->buttonCount() . " buttons ". "and " . $js->axisCount() . " axes.n"; # blocking reads: while( $event = $js->nextEvent ) { print "Event type: " . $event->type . ", "; if($event->isButton) { print "Button " . $event->button; if($event->buttonDown) { print " pressed"; } else { print " released"; } } elsif($event->isAxis) { print "Axis " . $event->axis . ", value " . $event->axisValue . ", "; print "UP" if $event->stickUp; print "DOWN" if $event->stickDown; print "LEFT" if $event->stickLeft; print "RIGHT" if $event->stickRight; } else { # should never happen print "Unknown event " . $event->hexDump; } print "n"; } # if the while loop terminates, we got a false (undefined) event: die "Error reading joystick: " . $js->errorString; You can also use non-blocking I/O, in which case nextEvent() returning undef just means there was no event to read: my $js = Linux::Joystick->new(nonblocking => 1); # use this to open 2nd joystick in nonblocking mode instead: # my $js = Linux::Joystick->new(device => 1, nonblocking => 1); while(1) { my $event = $js->nextEvent; if($event) { print "Got a joystick eventn"; # process the event here } # Do other processing here (graphics, sound, I/O, calculation) } It is possible to switch between blocking and non-blocking I/O without reopening the device (see the setNonblocking() method, below)..

Requirements: No special requirements
Platforms: Linux
Keyword: Api Event I O Joystick Libraries Linuxjoystick Operating Perl Perl Api Print Programming
Users rating: 0/10

License: Freeware Size: 22.53 KB
LINUX::JOYSTICK RELATED
Libraries  -  Useful Terminal I/O Library 1.2
The Useful Terminal I/O library is a an alternative to ncurses for working with terminfo-defined terminals. Included are raw terminfo string access and output, an efficient buffered output system, and a keyboard driver. Whats New in This...
55.3 KB  
Libraries  -  Transparent Parallel I/O Environment 20050912
Transparent Parallel I/O Environment is a software environment (written in C++) that facilitates the implementation of external memory algorithms. The goal of theoretical work in the area of external memory algorithms (also called I/O algorithms...
1.1 MB  
Utilities  -  benchmark i/o workload generation 1.0
benchmark i/o workload generation is a handy and accessible tool that lets you quickly perform i/o benchmarks against your servers. It also allows VM's to quickly diagnose suspect storage (SAN, NAS) and other performance related issues across...
 
Development Editors  -  Simulator Debugger Customizing Kit PDxxSIM I/O DLL Kit 1.20
Simulator Debugger Customizing Kit PDxxSIM I/O DLL Kit supports the creation of I/O DLLs. The I/O DLL refers to a DLL that operates in cooperation with the simulator engine of the M3T-PDxxSIM. Once the necessary settings are made, the M3T-PDxxSIM...
 
Libraries  -  CrissCross 0.6.5
CrissCross is a small cross-platform C++ library for threading, console and file I/O, CPU identification (CPUID), and sockets (TCP and UDP). The main goal is to provide the ability to write a program using identical calls on the major platforms...
225.28 KB  
Libraries  -  Sys::PortIO 0.1
Sys::PortIO is a Perl module to perform direct port I/O from Perl. SYNOPSIS use Sys::PortIO; port_open($portnum); write_byte($portnum, $value); $value = read_byte($portnum); port_close($portnum); This module provides a Perl interface to...
737.28 KB  
Libraries  -  gnome-socket 0.1.0
gnome-socket provides a simple library for high-level network asynchronous I/O in GNOME applications. gnome-socket is a library that provides simple high-level network access to GNOME applications. Its main features are asynchronous DNS lookup...
184.32 KB  
Libraries  -  PDL::IO::Pic 2.3.2
PDL::IO::Pic is a image I/O for PDL. Image I/O for PDL based on the netpbm package. This package implements I/O for a number of popular image formats by exploiting the xxxtopnm and pnmtoxxx converters from the netpbm package (which is based on...
1.1 MB  
Libraries  -  IO-stringy 2.110
IO-stringy is a I/O on in-core objects like strings and arrays. SYNOPSIS IO:: ::AtomicFile adpO Write a file which is updated atomically ERYQ ::Lines bdpO I/O handle to read/write to array of lines ERYQ ::Scalar RdpO I/O handle to...
40.96 KB  
Libraries  -  CAD::Drawing::IO::Tk 0.04
CAD::Drawing::IO::Tk is a Perl module with GUI I/O methods for CAD::Drawing. This module is considered extremely pre-ALPHA and its use is probably deprecated by the time you read this. Methods There is no constructor for this class, its...
8.19 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 3.15.3
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB