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 29.858.052 Times

Linux::Joystick 0.0.1

  Date Added: January 03, 2010  |  Visits: 1.064

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
USER REVIEWS
More Reviews or Write Review


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  -  OSSP sio 0.9.3
OSSP sio is an I/O abstraction library for layered stream communication. It was built to deal efficiently with complex I/O protocols and includes capabilities to filter and multiplex data streams. Its modular structure is fully supported by...
972.8 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  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
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...
2.73 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