1 /*	SCCS Id: @(#)jtp_mou.h	3.0	2000/11/12	*/
2 /* Copyright (c) Jaakko Peltonen, 2000				  */
3 /* NetHack may be freely redistributed.  See license for details. */
4 
5 #ifndef _jtp_mou_h_
6 #define _jtp_mou_h_
7 
8 #include "jtp_def.h"
9 
10 #define JTP_MBUTTON_NONE 0
11 #define JTP_MBUTTON_LEFT 1
12 #define JTP_MBUTTON_RIGHT 2
13 #define JTP_MAX_MCURSOR 20
14 
15 typedef struct {
16   unsigned char * graphic;
17   int xmod, ymod;
18 } jtp_mouse_cursor;
19 
20 typedef struct {
21   int x1, x2, y1, y2;
22   jtp_mouse_cursor * mcursor;
23   unsigned char * tooltip;
24   char accelerator;
25 } jtp_hotspot;
26 
27 extern short int jtp_mousex, jtp_mousey, jtp_mouseb;
28 extern short int jtp_oldmx, jtp_oldmy, jtp_oldmb;
29 extern jtp_mouse_cursor *jtp_mcursor[];
30 
31 void jtp_readmouse();
32 void jtp_setmouse(int tempx, int tempy);
33 char jtp_mouse_area(int xalku, int yalku, int xloppu, int yloppu);
34 char jtp_oldm_area(int xalku, int yalku, int xloppu, int yloppu);
35 void jtp_repeatmouse(jtp_mouse_cursor *m_cursor, int whenstop);
36 void jtp_keymouse(jtp_mouse_cursor *m_cursor, int whenstop);
37 void jtp_press_button(int xalku, int yalku, int xloppu, int yloppu, jtp_mouse_cursor *m_cursor);
38 jtp_mouse_cursor * jtp_get_mcursor(int x1, int y1, int x2, int y2);
39 
40 
41 #endif
42