417
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 #ifndef INCLUDED_KEY_STATUS
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 #define INCLUDED_KEY_STATUS
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 enum {
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 NONE,
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 HOLD,
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 PUSH,
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 };
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9
|
421
|
10 // 可変長の構造体にする。
|
|
11 // int で1つ送り bit field でやると
|
417
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 typedef struct key_stat {
|
421
|
13 int length;
|
417
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 int right;
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 int left;
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 int up;
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 int down;
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 int circle;
|
421
|
19 unsigned char data[0];
|
417
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 };
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21
|
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 #endif
|