#15 убрать PIP_CXX11_SUPPORT
This commit is contained in:
@@ -133,11 +133,7 @@ public:
|
||||
bool direction;
|
||||
};
|
||||
|
||||
#ifdef PIP_CXX11_SUPPORT
|
||||
typedef std::function<void(KeyEvent, void *)> KBFunc;
|
||||
#else
|
||||
typedef void (*KBFunc)(KeyEvent, void * );
|
||||
#endif
|
||||
|
||||
//! Constructs keyboard listener with external function "slot" and custom data "data"
|
||||
explicit PIKbdListener(KBFunc slot = 0, void * data = 0, bool startNow = true);
|
||||
@@ -154,10 +150,8 @@ public:
|
||||
//! Set external function to "slot"
|
||||
void setSlot(KBFunc slot) {ret_func = slot;}
|
||||
|
||||
#ifdef PIP_CXX11_SUPPORT
|
||||
//! Set external function to "slot"
|
||||
void setSlot(std::function<void(KeyEvent)> slot) {ret_func = [slot](KeyEvent e, void *){slot(e);};}
|
||||
#endif
|
||||
|
||||
//! Returns if exit key if awaiting
|
||||
bool exitCaptured() const {return exit_enabled;}
|
||||
|
||||
Reference in New Issue
Block a user