Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / .unmaintained / m68k-pp-native / Drivers / touchscreen.hidd / touchscreen.h
blob31c3a3660949590232b1ead098bb502e6af7029b
1 #ifndef _TOUCHSCREEN_H
2 #define _TOUCHSCREEN_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Include for the touchscreen HIDD.
9 Lang: English.
12 #ifndef EXEC_LIBRARIES_H
13 # include <exec/libraries.h>
14 #endif
16 #ifndef OOP_OOP_H
17 # include <oop/oop.h>
18 #endif
20 #ifndef EXEC_SEMAPHORES_H
21 # include <exec/semaphores.h>
22 #endif
24 #ifndef EXEC_INTERRUPTS_H
25 # include <exec/interrupts.h>
26 #endif
28 #include <exec/types.h>
29 #include <aros/libcall.h>
30 #include <aros/asmcall.h>
32 #include <hidd/irq.h>
33 #include <hidd/mouse.h>
35 /***** Touchscreen HIDD *******************/
37 /* IDs */
38 #define IID_Hidd_DBmouse "hidd.touchscreen.db"
39 #define CLID_Hidd_DBmouse "hidd.touchscreen.db"
41 /* Methods */
42 enum
44 moHidd_Mouse_HandleEvent
47 struct pHidd_Mouse_HandleEvent
49 OOP_MethodID mID;
50 ULONG event;
53 VOID Hidd_Mouse_HandleEvent(OOP_Object *o, ULONG event);
55 /* misc */
57 struct mouse_staticdata
59 struct SignalSemaphore sema; /* Protexting this whole struct */
61 struct Library *oopbase;
62 struct Library *utilitybase;
63 struct ExecBase *sysbase;
65 OOP_AttrBase hiddMouseAB;
67 OOP_Class *mouseclass;
69 OOP_Object *mousehidd;
72 /* Object data */
74 struct mouse_data
76 VOID (*mouse_callback)(APTR, struct pHidd_Mouse_Event *);
77 APTR callbackdata;
79 UWORD buttonstate;
81 char *mouse_name;
82 OOP_Object *irqhidd;
83 HIDDT_IRQ_Handler *irq;
84 struct pHidd_Mouse_Event me;
85 UBYTE state; //see below
86 UBYTE idlectr;
87 UBYTE lastx;
88 UBYTE lasty;
89 struct Interrupt VBlank;
93 enum {
94 STATE_IDLE = 0,
95 STATE_PEN_DOWN
98 /****************************************************************************************/
101 OOP_Class *_init_mouseclass ( struct mouse_staticdata * );
102 VOID _free_mouseclass ( struct mouse_staticdata * );
104 #define TSD(cl) ((struct mouse_staticdata *)cl->UserData)
106 #define OOPBase ((struct Library *)TSD(cl)->oopbase)
107 #define UtilityBase ((struct Library *)TSD(cl)->utilitybase)
108 #define SysBase (TSD(cl)->sysbase)
111 void touchscreen_int(HIDDT_IRQ_Handler * irq, HIDDT_IRQ_HwInfo *hw);
113 AROS_UFP4(ULONG, tsVBlank,
114 AROS_UFPA(ULONG, dummy, A0),
115 AROS_UFPA(void *, _data, A1),
116 AROS_UFPA(ULONG, dummy2, A5),
117 AROS_UFPA(struct ExecBase *, SysBase, A6));
119 #endif /* _TOUCHSCREEN_H */