home *** CD-ROM | disk | FTP | other *** search
- /*
- * gbe - gameboy emulator
- * Copyright (C) 1999 Chuck Mason, Steven Fuller
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- *
- * Chuck Mason <chuckjr@sinclair.net>
- * Steven Fuller <relnev@atdot.org>
- */
- #ifndef __JLIB_H
- #define __JLIB_H
-
- #define JOYSTICK_LEFT 0x00000001
- #define JOYSTICK_RIGHT 0x00000002
- #define JOYSTICK_UP 0x00000004
- #define JOYSTICK_DOWN 0x00000008
- #define JOYSTICK_BUTTON(x) (0x00000010 << x)
-
- /* Returns: >=0 on success <0 on failure */
- int jlib_open(int);
-
- /* Returns: ==1 on success ==0 on failure */
- int jlib_close(int);
-
- /* Returns: >= 0 on success <0 on failure */
- int jlib_update(int);
-
- /* Returns: ==1 true ==0 false ==-1 failure */
- int jlib_check(int, unsigned long);
-
- /* Returns: maxbuttons ==0 failure */
- int jlib_getmaxbuttons(int);
-
- /* Returns: maxaxes ==0 failure */
- int jlib_getmaxaxes(int);
-
- typedef struct __joystick {
- int joystick_fd;
- int num_buttons;
- int num_axes;
- int total_events;
- unsigned long joystick_data;
- } jlib_joystick;
-
- #endif
-