[DEV] correct display virtual keyboard on Android

This commit is contained in:
Edouard DUPIN 2016-10-13 22:15:55 +02:00
parent 0d6277a651
commit 0d16542a68
4 changed files with 6 additions and 50 deletions

View File

@ -70,7 +70,7 @@ void gale::Application::onKillDemand(gale::Context& _context) {
}
void gale::Application::exit(int32_t _value) {
GALE_VERBOSE("Exit Requested");
GALE_VERBOSE("Exit Requested " << _value);
gale::getContext().stop();
}
@ -86,11 +86,11 @@ void gale::Application::onKeyboard(const gale::key::Special& _special,
}
void gale::Application::keyboardShow() {
gale::getContext().keyboardShow();
}
void gale::Application::keyboardHide() {
gale::getContext().keyboardHide();
}
void gale::Application::onResize(const ivec2& _size) {

View File

@ -330,6 +330,7 @@ class AndroidContext : public gale::Context {
void sendJavaKeyboardUpdate(jboolean _showIt) {
int status;
if(!java_attach_current_thread(&status)) {
GALE_ERROR("Can not attach thread ...");
return;
}
//Call java ...
@ -339,9 +340,11 @@ class AndroidContext : public gale::Context {
java_detach_current_thread(status);
}
void keyboardShow() {
GALE_VERBOSE("Call Keyboard SHOW");
sendJavaKeyboardUpdate(JNI_TRUE);
};
void keyboardHide() {
GALE_VERBOSE("Call Keyboard HIDE");
sendJavaKeyboardUpdate(JNI_FALSE);
};

View File

@ -127,22 +127,6 @@ void gale::Context::unLockContext() {
mutexInterface().unlock();
}
#if 0
void gale::Context::inputEventTransfertWidget(ememory::SharedPtr<gale::Widget> _source,
ememory::SharedPtr<gale::Widget> _destination) {
m_input.transfertEvent(_source, _destination);
}
void gale::Context::inputEventGrabPointer(ememory::SharedPtr<gale::Widget> _widget) {
m_input.grabPointer(_widget);
}
void gale::Context::inputEventUnGrabPointer() {
m_input.unGrabPointer();
}
#endif
void gale::Context::processEvents() {
int32_t nbEvent = 0;
//GALE_DEBUG(" ******** Event");

View File

@ -193,26 +193,6 @@ namespace gale {
* @brief Redraw all the windows
*/
void forceRedrawAll();
// TODO : Later ...
#if 0
/**
* @brief This is to transfert the event from one widget to another one
* @param source the widget where the event came from
* @param destination the widget where the event mitgh be generated now
*/
void inputEventTransfertWidget(ememory::SharedPtr<gale::Widget> _source, ememory::SharedPtr<gale::Widget> _destination);
/**
* @brief This fonction lock the pointer properties to move in relative instead of absolute
* @param[in] widget The widget that lock the pointer events
*/
void inputEventGrabPointer(ememory::SharedPtr<gale::Widget> _widget);
/**
* @brief This fonction un-lock the pointer properties to move in relative instead of absolute
*/
void inputEventUnGrabPointer();
#endif
/**
* @brief display the virtal keyboard (for touch system only)
*/
@ -308,17 +288,6 @@ namespace gale {
* @param[in] _fileName Name of the image to load
*/
void setInitImage(const std::string& _fileName);
protected:
#if 0
TODO : Rework this ==> but how ...
/**
* @brief HARDWARE keyboard event from the system
* @param[in] _key event type
* @param[in] _status Up or down status
* @return Keep the event or not
*/
virtual bool systemKeyboradEvent(enum gale::key::keyboard _key, bool _down);
#endif
};
/**
* @brief From everyware in the program, we can get the context inteface.