OSDN Git Service

[General] Merge from upstream version, 2015-01-28.
[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         int* stat;
27         bool select;
28         
29 public:
30         MOUSE(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
31         ~MOUSE() {}
32         
33         // common functions
34         void initialize();
35         void write_signal(int id, uint32 data, uint32 mask);
36         void save_state(FILEIO* state_fio);
37         bool load_state(FILEIO* state_fio);
38         
39         // unique function
40         void set_context_sio(DEVICE* device)
41         {
42                 d_sio = device;
43         }
44 };
45
46 #endif
47