OSDN Git Service

6f5b9a61902c81f6849e4a00dfe011dabe1685cf
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz2800 / mouse.h
1 /*
2         SHARP MZ-2800 Emulator 'EmuZ-2800'
3
4         Author : Takeda.Toshiya
5         Date   : 2007.08.14 -
6
7         [ mouse ]
8 */
9
10 #ifndef _MOUSE_H_
11 #define _MOUSE_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 #define SIG_MOUSE_SEL   0
18 #define SIG_MOUSE_DTR   1
19
20 class MOUSE : public DEVICE
21 {
22 private:
23         DEVICE* d_sio;
24         
25         // mouse
26         const int32_t* stat;
27         bool select;
28         
29 public:
30         MOUSE(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
31         {
32                 set_device_name(_T("Mouse I/F"));
33         }
34         ~MOUSE() {}
35         
36         // common functions
37         void initialize();
38         void write_signal(int id, uint32_t data, uint32_t mask);
39         bool process_state(FILEIO* state_fio, bool loading);
40         
41         // unique function
42         void set_context_sio(DEVICE* device)
43         {
44                 d_sio = device;
45         }
46 };
47
48 #endif
49