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();
|
super.onResume();
|
||||||
mGLView.onResume();
|
mGLView.onResume();
|
||||||
mAudioThread = new Thread(mStreams);
|
mAudioThread = new Thread(mStreams);
|
||||||
//if (mAudioThread != NULL) {
|
if (mAudioThread ~= NULL) {
|
||||||
mAudioThread.start();
|
mAudioThread.start();
|
||||||
//}
|
}
|
||||||
// call C
|
// call C
|
||||||
interfaceJNI.ActivityOnResume();
|
interfaceJNI.ActivityOnResume();
|
||||||
}
|
}
|
||||||
@ -159,12 +159,12 @@ public class __PROJECT_NAME__ extends Activity {
|
|||||||
{
|
{
|
||||||
super.onPause();
|
super.onPause();
|
||||||
mGLView.onPause();
|
mGLView.onPause();
|
||||||
//if (mAudioThread != NULL) {
|
if (mAudioThread ~= NULL) {
|
||||||
// request audio stop
|
// request audio stop
|
||||||
//mAudioThread.Stop();
|
mAudioThread.AutoStop();
|
||||||
// wait the thread ended ...
|
// wait the thread ended ...
|
||||||
//mAudioThread.join();
|
mAudioThread.join();
|
||||||
//}
|
}
|
||||||
// call C
|
// call C
|
||||||
interfaceJNI.ActivityOnPause();
|
interfaceJNI.ActivityOnPause();
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ public class interfaceAudio implements Runnable
|
|||||||
|
|
||||||
m_musicTrack.play();
|
m_musicTrack.play();
|
||||||
}
|
}
|
||||||
public void Stop()
|
public void AutoStop()
|
||||||
{
|
{
|
||||||
if(m_musicTrack == null) {
|
if(m_musicTrack == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -210,9 +210,10 @@ void ewol::EObject::AddEventId(const char * generateEventId)
|
|||||||
/**
|
/**
|
||||||
* @brief Generate event on all registered EObject
|
* @brief Generate event on all registered EObject
|
||||||
* @param[in] generateEventId event Id that is curetly generated
|
* @param[in] generateEventId event Id that is curetly generated
|
||||||
|
* @param[in] data data associated with the event
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
void ewol::EObject::GenerateEventId(const char * generateEventId)
|
void ewol::EObject::GenerateEventId(const char * generateEventId, const etk::UString data)
|
||||||
{
|
{
|
||||||
// for every element registered ...
|
// for every element registered ...
|
||||||
for (int32_t iii=0; iii<m_externEvent.Size(); iii++) {
|
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 we find the event ...
|
||||||
if (m_externEvent[iii]->localEventId == generateEventId) {
|
if (m_externEvent[iii]->localEventId == generateEventId) {
|
||||||
if (NULL != m_externEvent[iii]->destEObject) {
|
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] destinationObject pointer on the object that might be call when an event is generated
|
||||||
* @param[in] eventId Event generate inside the object
|
* @param[in] eventId Event generate inside the object
|
||||||
* @param[in] eventIdgenerated event generated when call the distant EObject.OnReceiveMessage(...)
|
* @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
|
* @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) {
|
if (NULL == destinationObject) {
|
||||||
EWOL_ERROR("Input ERROR NULL pointer EObject ...");
|
EWOL_ERROR("Input ERROR NULL pointer EObject ...");
|
||||||
@ -300,7 +300,6 @@ void ewol::EObject::RegisterOnEvent(ewol::EObject * destinationObject, const cha
|
|||||||
} else {
|
} else {
|
||||||
tmpEvent->destEventId = eventId;
|
tmpEvent->destEventId = eventId;
|
||||||
}
|
}
|
||||||
tmpEvent->destData = data;
|
|
||||||
m_externEvent.PushBack(tmpEvent);
|
m_externEvent.PushBack(tmpEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ namespace ewol {
|
|||||||
const char* localEventId; //!< local event Id generation
|
const char* localEventId; //!< local event Id generation
|
||||||
ewol::EObject* destEObject; //!< destination widget that might be call
|
ewol::EObject* destEObject; //!< destination widget that might be call
|
||||||
const char* destEventId; //!< Generated event ID on the distant widget
|
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
|
* @brief Generate event on all registered EObject
|
||||||
* @param[in] generateEventId event Id that is curetly generated
|
* @param[in] generateEventId event Id that is curetly generated
|
||||||
|
* @param[in] data data associated with the event
|
||||||
* @return ---
|
* @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
|
* @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
|
* @param[in] data String that is send at all the destinations
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
//void SendMultiCast(const char* const messageId, etk::UString& data);
|
|
||||||
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] destinationObject pointer on the object that might be call when an event is generated
|
||||||
* @param[in] eventId Event generate inside the object
|
* @param[in] eventId Event generate inside the object
|
||||||
* @param[in] eventIdgenerated event generated when call the distant EObject.OnReceiveMessage(...)
|
* @param[in] eventIdgenerated event generated when call the distant EObject.OnReceiveMessage(...)
|
||||||
* @param[in] data data associated with the event
|
|
||||||
* @return ---
|
* @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 ...
|
* @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 (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||||
if(true == m_value) {
|
if(true == m_value) {
|
||||||
m_value = false;
|
m_value = false;
|
||||||
|
GenerateEventId(ewolEventCheckBoxClicked, "false");
|
||||||
} else {
|
} else {
|
||||||
m_value = true;
|
m_value = true;
|
||||||
|
GenerateEventId(ewolEventCheckBoxClicked, "true");
|
||||||
}
|
}
|
||||||
GenerateEventId(ewolEventCheckBoxClicked);
|
|
||||||
ewol::widgetManager::FocusKeep(this);
|
ewol::widgetManager::FocusKeep(this);
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
return true;
|
return true;
|
||||||
@ -218,11 +219,12 @@ bool ewol::CheckBox::OnEventKb(eventKbType_te typeEvent, uniChar_t unicodeData)
|
|||||||
) {
|
) {
|
||||||
if(true == m_value) {
|
if(true == m_value) {
|
||||||
m_value = false;
|
m_value = false;
|
||||||
|
GenerateEventId(ewolEventCheckBoxClicked, "false");
|
||||||
} else {
|
} else {
|
||||||
m_value = true;
|
m_value = true;
|
||||||
|
GenerateEventId(ewolEventCheckBoxClicked, "true");
|
||||||
}
|
}
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
GenerateEventId(ewolEventCheckBoxClicked);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -261,7 +261,7 @@ bool ewol::Entry::OnEventKb(eventKbType_te typeEvent, uniChar_t unicodeData)
|
|||||||
m_data.Add(m_displayCursorPos, unicodeData);
|
m_data.Add(m_displayCursorPos, unicodeData);
|
||||||
m_displayCursorPos++;
|
m_displayCursorPos++;
|
||||||
}
|
}
|
||||||
GenerateEventId(ewolEventEntryModify);
|
GenerateEventId(ewolEventEntryModify, m_data);
|
||||||
MarkToReedraw();
|
MarkToReedraw();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
extern const char * const ewolEventEntryClick;
|
extern const char * const ewolEventEntryClick;
|
||||||
extern const char * const ewolEventEntryEnter;
|
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 {
|
namespace ewol {
|
||||||
class Entry :public ewol::Drawable
|
class Entry :public ewol::Drawable
|
||||||
@ -86,7 +86,7 @@ namespace ewol {
|
|||||||
* @return true the event is used
|
* @return true the event is used
|
||||||
* @return false the event is not 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).
|
* @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)
|
* @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 {
|
} else {
|
||||||
// set the image if one is present ...
|
// set the image if one is present ...
|
||||||
myButton->SetImage(m_listElement[jjj]->m_image);
|
myButton->SetImage(m_listElement[jjj]->m_image);
|
||||||
myButton->RegisterOnEvent(this, ewolEventButtonPressed, ewolEventButtonPressed, "");
|
myButton->RegisterOnEvent(this, ewolEventButtonPressed, ewolEventButtonPressed);
|
||||||
myButton->SetExpendX(true);
|
myButton->SetExpendX(true);
|
||||||
myButton->SetFillX(true);
|
myButton->SetFillX(true);
|
||||||
myButton->SetAlignement(ewol::TEXT_ALIGN_LEFT);
|
myButton->SetAlignement(ewol::TEXT_ALIGN_LEFT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user