mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibCore: Move post_event() back to EventLoopImplementation
This shouldn't have been moved to EventLoopManager, as the manager is global and one-per-process, and the implementation is one-per-loop. This makes cross-thread event posting work again, and unbreaks SoundPlayer (and probably other things as well.)
This commit is contained in:
parent
7035a19645
commit
b61a87c03c
7 changed files with 22 additions and 35 deletions
|
@ -29,11 +29,8 @@ public:
|
|||
virtual void register_notifier(Notifier&) = 0;
|
||||
virtual void unregister_notifier(Notifier&) = 0;
|
||||
|
||||
void post_event(Object& receiver, NonnullOwnPtr<Event>&&);
|
||||
virtual void did_post_event() = 0;
|
||||
|
||||
virtual void deferred_invoke(Function<void()>) = 0;
|
||||
|
||||
// FIXME: These APIs only exist for obscure use-cases inside SerenityOS. Try to get rid of them.
|
||||
virtual int register_signal(int signal_number, Function<void(int)> handler) = 0;
|
||||
virtual void unregister_signal(int handler_id) = 0;
|
||||
|
@ -42,7 +39,6 @@ public:
|
|||
|
||||
protected:
|
||||
EventLoopManager();
|
||||
ThreadEventQueue& m_thread_event_queue;
|
||||
};
|
||||
|
||||
class EventLoopImplementation {
|
||||
|
@ -59,6 +55,8 @@ public:
|
|||
virtual void quit(int) = 0;
|
||||
virtual void wake() = 0;
|
||||
|
||||
virtual void post_event(Object& receiver, NonnullOwnPtr<Event>&&) = 0;
|
||||
|
||||
// FIXME: These APIs only exist for obscure use-cases inside SerenityOS. Try to get rid of them.
|
||||
virtual void unquit() = 0;
|
||||
virtual bool was_exit_requested() const = 0;
|
||||
|
@ -66,6 +64,7 @@ public:
|
|||
|
||||
protected:
|
||||
EventLoopImplementation();
|
||||
ThreadEventQueue& m_thread_event_queue;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue