msgqueue.h
来自「一个任天堂掌上游戏机NDS的源代码」· C头文件 代码 · 共 42 行
H
42 行
/*************************************************************************** DSemu - The Next Generation ** User interface: Event queue entry definition [msgqueue.h] ** Copyright Imran Nazar, 2005; released under the BSD public licence. ***************************************************************************/#ifndef __MSGQUEUE_H_#define __MSGQUEUE_H_#include <queue>#include "datadefs.h"#include "events.h"// Essentially, this is just a wrapper on a timestamp/callback struct,// to make it all shiny and pretty.class EventMsg { private: uint64_t timestamp; // Event timestamp int type; vfptr func; // Callback for this event void *userdata; int debug; // Do we update all the statuses off it? public: EventMsg() { timestamp=INT_MAX; type=EVENT_NULL; func=NULL; userdata=NULL; debug=0; } EventMsg(uint64_t t, int typ, vfptr f, void *dat, int dbg) { timestamp=t; type=typ; func=f; userdata=dat; debug=dbg; } uint64_t getTime() const { return timestamp; } int getType() { return type; } vfptr getFunc() { return func; } void *getData() { return userdata; } int getDebug() { return debug; } void setTime(uint64_t t) { timestamp=t; } void callFunc() { func(userdata); }};#endif//__MSGQUEUE_H_/*** EOF: msgqueue.h *****************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?