29.04.2014 - Version 0.4.0_prealpha. PICodeParser, namespace PICodeInfo, new tool "pip_cmg" in dir "code_model_generator". New feature in PIIODevice - "createFromFullPath", all parameters of all I/O devices now works with PIObjects`s properties.

This commit is contained in:
peri4
2014-04-29 11:50:13 +04:00
parent 77abb0bbea
commit 2e5e75c4c4
98 changed files with 2545 additions and 768 deletions

View File

@@ -1,7 +1,7 @@
/*
PIP - Platform Independent Primitives
Keyboard grabber for console
Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com
Copyright (C) 2014 Ivan Pelipenko peri4ko@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
* \brief Keyboard console input listener
* \details This class provide listening of console keyboard input.
* There is two ways to receive pressed key:
* * external static functionwith format "void func(char key, void * data)"
* * external static functionwith format "void func(char key, void * data_)"
* * event \a keyPressed()
*
* Also there is static variable \a exiting which by default is set to
@@ -38,7 +38,7 @@
bool PIKbdListener::exiting;
PIKbdListener::PIKbdListener(KBFunc slot, void * data_): PIThread() {
PIKbdListener::PIKbdListener(KBFunc slot, void * _data): PIThread() {
#ifdef WINDOWS
hIn = GetStdHandle(STD_INPUT_HANDLE);
GetConsoleMode(hIn, &smode);
@@ -49,7 +49,7 @@ PIKbdListener::PIKbdListener(KBFunc slot, void * data_): PIThread() {
#endif
is_active = true;
ret_func = slot;
data = data_;
data_ = _data;
PIKbdListener::exiting = exit_enabled = false;
start();
}
@@ -134,8 +134,8 @@ void PIKbdListener::run() {
return;
}
if (ret > 0) {
keyPressed(lc, data);
if (ret_func != 0) ret_func(lc, data);
keyPressed(lc, data_);
if (ret_func != 0) ret_func(lc, data_);
}
}