1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

LibCore+Ladybird: Don't force timer ids to be integer just to remap them

If we don't force event loop to fit timer id into integer, we can
eliminate awkward IDAllocator inside EventLoopImplementations.
This commit is contained in:
Dan Klishch 2024-02-18 00:11:38 -05:00 committed by Andrew Kaster
parent bed4af6fef
commit b77996884e
10 changed files with 36 additions and 46 deletions

View file

@ -23,8 +23,8 @@ public:
virtual NonnullOwnPtr<EventLoopImplementation> make_implementation() = 0;
virtual int register_timer(EventReceiver&, int milliseconds, bool should_reload, TimerShouldFireWhenNotVisible) = 0;
virtual void unregister_timer(int timer_id) = 0;
virtual intptr_t register_timer(EventReceiver&, int milliseconds, bool should_reload, TimerShouldFireWhenNotVisible) = 0;
virtual void unregister_timer(intptr_t timer_id) = 0;
virtual void register_notifier(Notifier&) = 0;
virtual void unregister_notifier(Notifier&) = 0;