Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 537 → Rev 538

/shark/trunk/drivers/input/include/drivers/shark_joy26.h
0,0 → 1,46
/*
* Project: S.Ha.R.K.
*
* Coordinators:
* Giorgio Buttazzo <giorgio@sssup.it>
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Mauro Marinoni <mauro.marinoni@unipv.it>
*
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
*/
 
/*
* Copyright (C) 2000 Paolo Gai
*
* 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
*
*/
 
/* Game Header Linux Input Driver*/
 
#ifndef __SHARK_JOY26_H__
#define __SHARK_JOY26_H__
 
int JOY26_init(void);
int JOY26_close(void);
#endif
 
/shark/trunk/drivers/input/include/drivers/shark_mouse26.h
125,6 → 125,66
int mouse_setthreshold(int t);
void mouse_hook(MOUSE_HANDLER h);
 
 
/*
*
* mouse autocursor management
*
*/
 
/* commands for mouse_grxcursor() & mouse_txtcursor() */
#define DISABLE 0x00
#define ENABLE 0x01
 
/* flags for mouse_grxcursor() & mouse_txtcursor() (to use with '|') */
#define WITHOUTSEM 0x10
#define AUTOOFF 0x20
 
/* mask to extrac the status from autocursormode */
#define STATUSMASK 0x0f
 
/* flags for autocursormode (there are some other flags into mouse.h) */
#define GRXCURSOR 0x100
#define TXTCURSOR 0x200
 
/* dimensions of the grx shape */
#define MOUSESHAPEDX 16
#define MOUSESHAPEDY 16
 
/* hot-spot of the grx image (coordinates of the center's shape, zero-based) */
#define MOUSEHOTSPOTX 3
#define MOUSEHOTSPOTY 1
 
/* those macros can be used to set the correct mouse_limit() when
* the graphics autocursor is enable (to avoid wrong shape position because
* there is not graphics clip functions)
*/
#define XMINLIMIT(dimx,dimy) (MOUSEHOTSPOTX)
#define XMAXLIMIT(dimx,dimy) ((dimx)-MOUSESHAPEDX+MOUSEHOTSPOTX)
#define YMINLIMIT(dimx,dimy) (MOUSEHOTSPOTY)
#define YMAXLIMIT(dimx,dimy) ((dimy)-MOUSESHAPEDY+MOUSEHOTSPOTY)
 
#define mouse_grxlimit(dimx,dimy) mouse_limit(\
XMINLIMIT(dimx,dimy), \
YMINLIMIT(dimx,dimy), \
XMAXLIMIT(dimx,dimy), \
YMAXLIMIT(dimx,dimy) \
)
 
/* these are used to select the mouse shape */
int mouse_txtshape(DWORD img);
int mouse_grxshape(BYTE *shape, BYTE *mask, int bpp_in);
 
/* enable/disable mouse pointer */
/* (return <0 on error) */
/* (for the cmd parameter see above) */
int mouse_grxcursor(int cmd, int bpp);
int mouse_txtcursor(int cmd);
 
/* mouse on/off (or show/hide) */
void (*mouse_on)(void);
void (*mouse_off)(void);
 
#ifdef __cplusplus
};
#endif