|
|
| version 1.2, 2004/08/12 14:03:14 | version 1.4, 2008/06/02 20:07:30 |
|---|---|
| Line 20 typedef struct _neventitem _NEVENTITEM; | Line 20 typedef struct _neventitem _NEVENTITEM; |
| typedef struct _neventitem *NEVENTITEM; | typedef struct _neventitem *NEVENTITEM; |
| typedef void (*NEVENTCB)(UINT id); | typedef void (*NEVENTCB)(UINT id); |
| #define NEVENTITEM_NONE ((NEVENTITEM)-1) | |
| #define NEVENTITEM_TERM ((NEVENTITEM)0) | |
| struct _neventitem { | struct _neventitem { |
| NEVENTITEM next; | |
| SINT32 clock; | SINT32 clock; |
| SINT32 baseclock; | SINT32 baseclock; |
| NEVENTCB proc; | NEVENTCB proc; |
| UINT32 param; | |
| }; | }; |
| typedef struct { | typedef struct { |
| UINT readyevents; | |
| UINT level[NEVENT_MAXEVENTS]; | |
| _NEVENTITEM item[NEVENT_MAXEVENTS]; | _NEVENTITEM item[NEVENT_MAXEVENTS]; |
| NEVENTITEM first; | |
| } _NEVENT, *NEVENT; | } _NEVENT, *NEVENT; |
| Line 40 extern "C" { | Line 43 extern "C" { |
| extern _NEVENT nevent; | extern _NEVENT nevent; |
| // 初期化 | /* 初期化 */ |
| void nevent_allreset(void); | void nevent_allreset(void); |
| // 最短イベントのセット | /* 最短イベントのセット */ |
| void nevent_get1stevent(void); | void nevent_get1stevent(void); |
| // 時間を進める | /* 時間を進める */ |
| void nevent_progress(void); | void nevent_progress(void); |
| // イベントの実行 | /* イベントの実行 */ |
| void nevent_execule(void); | void nevent_execule(void); |
| // イベントの追加 | /* イベントの追加 */ |
| void nevent_set(UINT id, SINT32 eventclock, NEVENTCB proc, BRESULT absolute); | void nevent_set(UINT id, SINT32 eventclock, NEVENTCB proc, BRESULT absolute); |
| void nevent_repeat(UINT id); | void nevent_repeat(UINT id); |
| void nevent_setbyms(UINT id, SINT32 ms, NEVENTCB proc, BRESULT absolute); | void nevent_setbyms(UINT id, SINT32 ms, NEVENTCB proc, BRESULT absolute); |
| // イベントの削除 | /* イベントの削除 */ |
| void nevent_reset(UINT id); | void nevent_reset(UINT id); |
| // イベントの動作状態取得 | /* イベントの動作状態取得 */ |
| BRESULT nevent_iswork(UINT id); | BRESULT nevent_iswork(UINT id); |
| // 実行したクロック数の取得 | /* 実行したクロック数の取得 */ |
| SINT32 nevent_getwork(UINT id); | SINT32 nevent_getwork(UINT id); |
| // イベント実行までのクロック数の取得 | /* イベント実行までのクロック数の取得 */ |
| SINT32 nevent_getremain(UINT id); | SINT32 nevent_getremain(UINT id); |
| // NEVENTの強制脱出 | /* NEVENTの強制脱出 */ |
| void nevent_forceexit(void); | void nevent_forceexit(void); |
| #ifdef __cplusplus | #ifdef __cplusplus |