mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 01:42:54 +00:00
CObject: Add custom_event() virtual.
This way you can just override custom_event() to catch CCustomEvent instead of having to filter the entire event stream with event(). :^)
This commit is contained in:
parent
1ecb7462b7
commit
a634fab3c4
Notes:
sideshowbarker
2024-07-19 13:16:46 +09:00
Author: https://github.com/awesomekling
Commit: a634fab3c4
2 changed files with 8 additions and 0 deletions
|
@ -37,6 +37,8 @@ void CObject::event(CEvent& event)
|
|||
case CEvent::Invalid:
|
||||
ASSERT_NOT_REACHED();
|
||||
break;
|
||||
case CEvent::Custom:
|
||||
return custom_event(static_cast<CCustomEvent&>(event));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -70,6 +72,10 @@ void CObject::child_event(CChildEvent&)
|
|||
{
|
||||
}
|
||||
|
||||
void CObject::custom_event(CCustomEvent&)
|
||||
{
|
||||
}
|
||||
|
||||
void CObject::start_timer(int ms)
|
||||
{
|
||||
if (m_timer_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue