2019-02-14 08:37:02 -08:00
|
|
|
class @beta Efl.Loop_Message_Handler extends Efl.Object
|
2017-11-08 22:59:04 -08:00
|
|
|
{
|
2017-12-15 18:55:43 -08:00
|
|
|
[[Message handlers represent a single message type on the Efl.Loop
|
|
|
|
parent object. These message handlers can be used to listen for
|
|
|
|
that message type by listening to the message event for the generic
|
|
|
|
case or a class specific event type to get specific message object
|
|
|
|
typing correct.]]
|
2017-11-08 22:59:04 -08:00
|
|
|
methods {
|
|
|
|
message_add {
|
2017-12-15 18:55:43 -08:00
|
|
|
[[Creates a new message object of the correct type for this
|
|
|
|
message type.]]
|
2018-04-12 04:56:02 -07:00
|
|
|
return: Efl.Loop_Message; [[The new message payload object.]]
|
2017-11-08 22:59:04 -08:00
|
|
|
}
|
|
|
|
message_send {
|
2017-12-15 18:55:43 -08:00
|
|
|
[[Place the message on the queue to be called later when
|
|
|
|
message_process() is called on the loop object.]]
|
2017-11-08 22:59:04 -08:00
|
|
|
params {
|
2018-04-12 04:56:02 -07:00
|
|
|
@in message: Efl.Loop_Message; [[The message to place on the queue.]]
|
2017-11-08 22:59:04 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
message_call {
|
2017-12-15 18:55:43 -08:00
|
|
|
[[Overide me (implement) then call super after calling the
|
|
|
|
right callback type if you specialize the message type.]]
|
2017-11-08 22:59:04 -08:00
|
|
|
params {
|
2018-04-12 04:56:02 -07:00
|
|
|
@in message: Efl.Loop_Message; [[ Generic message event type ]]
|
2017-11-08 22:59:04 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
message_clear {
|
2017-12-15 18:55:43 -08:00
|
|
|
[[Delete all queued messages belonging to this message handler
|
|
|
|
that are pending on the queue so they are not processed
|
|
|
|
later.]]
|
|
|
|
return: bool; [[True if any messages of this type were cleared.]]
|
2017-11-08 22:59:04 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
events {
|
2018-04-12 04:56:02 -07:00
|
|
|
message: Efl.Loop_Message; [[The message payload data]]
|
2017-11-08 22:59:04 -08:00
|
|
|
}
|
|
|
|
implements {
|
|
|
|
Efl.Object.constructor;
|
|
|
|
Efl.Object.destructor;
|
|
|
|
}
|
|
|
|
}
|