aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-07 23:54:06 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-07 23:54:06 +0800
commit1d64816653b5d1835dd60762c2bc64f000d88fa5 (patch)
tree62817d39f4713d0f41ff275a21e25a31017c2a1e /include
parent49e67bc8566e8c5017b931837792a648cb0048c2 (diff)
downloadSMELT-1d64816653b5d1835dd60762c2bc64f000d88fa5.tar.xz
Add a new way to hook into smelt.
Diffstat (limited to 'include')
-rw-r--r--include/smelt.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/smelt.hpp b/include/smelt.hpp
index 5435d15..4651814 100644
--- a/include/smelt.hpp
+++ b/include/smelt.hpp
@@ -71,6 +71,10 @@ typedef size_t SMCHN;//Audio channel Handle
//callback function pointer
typedef bool (*smHook)();
+class smHandler
+{
+ public: virtual bool handlerFunc()=0;
+};
//Special FPS modes
//Unlimited FPS
@@ -167,6 +171,7 @@ public:
* It returns true when you want to terminate the main loop.
*/
virtual void smUpdateFunc(smHook func)=0;
+ virtual void smUpdateFunc(smHandler* h)=0;
/**
* Sets the focus lost function.
* Focus lost function is called when the application window loses