change properties of the sending message between objects
This commit is contained in:
parent
efc628af0f
commit
8fcd8369cd
@ -148,9 +148,9 @@ public class __PROJECT_NAME__ extends Activity {
|
||||
super.onResume();
|
||||
mGLView.onResume();
|
||||
mAudioThread = new Thread(mStreams);
|
||||
//if (mAudioThread != NULL) {
|
||||
if (mAudioThread ~= NULL) {
|
||||
mAudioThread.start();
|
||||
//}
|
||||
}
|
||||
// call C
|
||||
interfaceJNI.ActivityOnResume();
|
||||
}
|
||||
@ -159,12 +159,12 @@ public class __PROJECT_NAME__ extends Activity {
|
||||
{
|
||||
super.onPause();
|
||||
mGLView.onPause();
|
||||
//if (mAudioThread != NULL) {
|
||||
if (mAudioThread ~= NULL) {
|
||||
// request audio stop
|
||||
//mAudioThread.Stop();
|
||||
mAudioThread.AutoStop();
|
||||
// wait the thread ended ...
|
||||
//mAudioThread.join();
|
||||
//}
|
||||
mAudioThread.join();
|
||||
}
|
||||
// call C
|
||||
interfaceJNI.ActivityOnPause();
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public class interfaceAudio implements Runnable
|
||||
|
||||
m_musicTrack.play();
|
||||
}
|
||||
public void Stop()
|
||||
public void AutoStop()
|
||||
{
|
||||
if(m_musicTrack == null) {
|
||||
return;
|
||||
|
@ -210,9 +210,10 @@ void ewol::EObject::AddEventId(const char * generateEventId)
|
||||
/**
|
||||
* @brief Generate event on all registered EObject
|
||||
* @param[in] generateEventId event Id that is curetly generated
|
||||
* @param[in] data data associated with the event
|
||||
* @return ---
|
||||
*/
|
||||
void ewol::EObject::GenerateEventId(const char * generateEventId)
|
||||
void ewol::EObject::GenerateEventId(const char * generateEventId, const etk::UString data)
|
||||
{
|
||||
// for every element registered ...
|
||||
for (int32_t iii=0; iii<m_externEvent.Size(); iii++) {
|
||||
@ -220,7 +221,7 @@ void ewol::EObject::GenerateEventId(const char * generateEventId)
|
||||
// if we find the event ...
|
||||
if (m_externEvent[iii]->localEventId == generateEventId) {
|
||||
if (NULL != m_externEvent[iii]->destEObject) {
|
||||
m_externEvent[iii]->destEObject->OnReceiveMessage(this, m_externEvent[iii]->destEventId, m_externEvent[iii]->destData);
|
||||
m_externEvent[iii]->destEObject->OnReceiveMessage(this, m_externEvent[iii]->destEventId, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -253,10 +254,9 @@ void ewol::EObject::RegisterMultiCast(const char* const messageId)
|
||||
* @param[in] destinationObject pointer on the object that might be call when an event is generated
|
||||
* @param[in] eventId Event generate inside the object
|
||||
* @param[in] eventIdgenerated event generated when call the distant EObject.OnReceiveMessage(...)
|
||||
* @param[in] data data associated with the event
|
||||
* @return true if register corectly done
|
||||
*/
|
||||
void ewol::EObject::RegisterOnEvent(ewol::EObject * destinationObject, const char * eventId, const char * eventIdgenerated, etk::UString data)
|
||||
void ewol::EObject::RegisterOnEvent(ewol::EObject * destinationObject, const char * eventId, const char * eventIdgenerated)
|
||||
{
|
||||
if (NULL == destinationObject) {
|
||||
EWOL_ERROR("Input ERROR NULL pointer EObject ...");
|
||||
@ -300,7 +300,6 @@ void ewol::EObject::RegisterOnEvent(ewol::EObject * destinationObject, const cha
|
||||
} else {
|
||||
tmpEvent->destEventId = eventId;
|
||||
}
|
||||
tmpEvent->destData = data;
|
||||
m_externEvent.PushBack(tmpEvent);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,6 @@ namespace ewol {
|
||||
const char* localEventId; //!< local event Id generation
|
||||
ewol::EObject* destEObject; //!< destination widget that might be call
|
||||
const char* destEventId; //!< Generated event ID on the distant widget
|
||||
etk::UString destData; //!< destination data
|
||||
};
|
||||
|
||||
/**
|
||||
@ -102,9 +101,10 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Generate event on all registered EObject
|
||||
* @param[in] generateEventId event Id that is curetly generated
|
||||
* @param[in] data data associated with the event
|
||||
* @return ---
|
||||
*/
|
||||
void GenerateEventId(const char * generateEventId);
|
||||
void GenerateEventId(const char * generateEventId, const etk::UString data = "");
|
||||
|
||||
/**
|
||||
* @brief Generate Multicast event on all EObject requested the event
|
||||
@ -112,7 +112,6 @@ namespace ewol {
|
||||
* @param[in] data String that is send at all the destinations
|
||||
* @return ---
|
||||
*/
|
||||
//void SendMultiCast(const char* const messageId, etk::UString& data);
|
||||
void SendMultiCast(const char* const messageId, etk::UString data = "");
|
||||
|
||||
/**
|
||||
@ -127,10 +126,9 @@ namespace ewol {
|
||||
* @param[in] destinationObject pointer on the object that might be call when an event is generated
|
||||
* @param[in] eventId Event generate inside the object
|
||||
* @param[in] eventIdgenerated event generated when call the distant EObject.OnReceiveMessage(...)
|
||||
* @param[in] data data associated with the event
|
||||
* @return ---
|
||||
*/
|
||||
void RegisterOnEvent(ewol::EObject * destinationObject, const char * eventId, const char * eventIdgenerated = NULL, etk::UString data = "");
|
||||
void RegisterOnEvent(ewol::EObject * destinationObject, const char * eventId, const char * eventIdgenerated = NULL);
|
||||
|
||||
/**
|
||||
* @brief Inform object that an other object is removed ...
|
||||
|
@ -196,10 +196,11 @@ bool ewol::CheckBox::OnEventInput(ewol::inputType_te type, int32_t IdInput, even
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
if(true == m_value) {
|
||||
m_value = false;
|
||||
GenerateEventId(ewolEventCheckBoxClicked, "false");
|
||||
} else {
|
||||
m_value = true;
|
||||
GenerateEventId(ewolEventCheckBoxClicked, "true");
|
||||
}
|
||||
GenerateEventId(ewolEventCheckBoxClicked);
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
MarkToReedraw();
|
||||
return true;
|
||||
@ -218,11 +219,12 @@ bool ewol::CheckBox::OnEventKb(eventKbType_te typeEvent, uniChar_t unicodeData)
|
||||
) {
|
||||
if(true == m_value) {
|
||||
m_value = false;
|
||||
GenerateEventId(ewolEventCheckBoxClicked, "false");
|
||||
} else {
|
||||
m_value = true;
|
||||
GenerateEventId(ewolEventCheckBoxClicked, "true");
|
||||
}
|
||||
MarkToReedraw();
|
||||
GenerateEventId(ewolEventCheckBoxClicked);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -261,7 +261,7 @@ bool ewol::Entry::OnEventKb(eventKbType_te typeEvent, uniChar_t unicodeData)
|
||||
m_data.Add(m_displayCursorPos, unicodeData);
|
||||
m_displayCursorPos++;
|
||||
}
|
||||
GenerateEventId(ewolEventEntryModify);
|
||||
GenerateEventId(ewolEventEntryModify, m_data);
|
||||
MarkToReedraw();
|
||||
return true;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
extern const char * const ewolEventEntryClick;
|
||||
extern const char * const ewolEventEntryEnter;
|
||||
extern const char * const ewolEventEntryModify;
|
||||
extern const char * const ewolEventEntryModify; // return in the data the new string inside it ...
|
||||
|
||||
namespace ewol {
|
||||
class Entry :public ewol::Drawable
|
||||
@ -86,7 +86,7 @@ namespace ewol {
|
||||
* @return true the event is used
|
||||
* @return false the event is not used
|
||||
*/
|
||||
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, eventInputType_te typeEvent, Vector2D<float> pos);
|
||||
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, eventInputType_te typeEvent, Vector2D<float> pos);
|
||||
/**
|
||||
* @brief Event on the keybord (if no shortcut has been detected before).
|
||||
* @param[in] type of the event (ewol::EVENT_KB_TYPE_DOWN or ewol::EVENT_KB_TYPE_UP)
|
||||
|
@ -237,7 +237,7 @@ void ewol::Menu::OnReceiveMessage(ewol::EObject * CallerObject, const char * eve
|
||||
} else {
|
||||
// set the image if one is present ...
|
||||
myButton->SetImage(m_listElement[jjj]->m_image);
|
||||
myButton->RegisterOnEvent(this, ewolEventButtonPressed, ewolEventButtonPressed, "");
|
||||
myButton->RegisterOnEvent(this, ewolEventButtonPressed, ewolEventButtonPressed);
|
||||
myButton->SetExpendX(true);
|
||||
myButton->SetFillX(true);
|
||||
myButton->SetAlignement(ewol::TEXT_ALIGN_LEFT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user