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

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

Serving Software Downloads in 956 Categories, Downloaded 50.319.964 Times

Linux::Joystick 0.0.1

  Date Added: January 03, 2010  |  Visits: 1.445

Linux::Joystick

Report Broken Link
Printer Friendly Version


Product Homepage
Download (140 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...
 
Board Games  -  A(X)I(O) 2.0
A(X)I(O) is a computer version of the very popular game Tic-Tac-Toe, it's name comes from the combination of the words "AI" and "XO". AXIO is equiped with a simple, yet extremely powerful, AI which will enable you to play at 8 different levels.
21 KB  
Programming  -  PHP Mulitplexed I/O 0.1
The PHP Multiplexed I/O library is an object oriented PHP5 library for managing multiplexed (or non-blocking) I/O. It is loosely based on the selectable channels nonblocking IO implementation from Java's NIO package.
7.77 KB  
Programming  -  File I/O Amanuensis 6.0
File I/O Amanuensis is a teaching tool that generates sample Java source code to read or write the console, a sequential file, a random access file, a String, an array of characters, an array of bytes, URL, HTTP CGI GET/POST, Socket or Pipe.
1.04 MB  
Desktop Toys  -  Disk I/O Space Screenlet 0.8
DiskIOSpace is a screenlet that shows the load of HDD and I/O of device/partition. WARNING! Screenlet depends on iostat utility that's located in the sysstat package! You needed to install systat on your system! Led Bar Gauge...
10.24 KB  
File Utilities  -  I/O Grind 0.0.3
I/O Grind software is an I/O simulator & rendering tool. To get an instant idea of what iogrind can show you type: $ ./autogen.sh $ make demo However, in order to use it in anger, you need several things:
4.08 MB  
Book Collection Managers  -  EaseFilter File I/O Monitor 5.1.1.1
Audit file access and change in Windows in Real-Time.Monitor the file activities on file system level, capture file open, create, overwrite, read, write, query file information, set file information, query security information, set security...
4.01 MB  
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 4.0.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...
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