#include "ui/events/platform/wayland/wayland_event_watcher_glib.h"
#include <glib.h>
#include "base/memory/raw_ptr.h"
namespace ui {
namespace {
constexpr int kPriorityFdWatch = …;
struct GLibWaylandSource : public GSource { … };
gboolean WatchSourcePrepare(GSource* source, gint* timeout_ms) { … }
gboolean WatchSourceCheck(GSource* source) { … }
gboolean WatchSourceDispatch(GSource* source,
GSourceFunc unused_func,
gpointer data) { … }
void WatchSourceFinalize(GSource* source) { … }
GSourceFuncs WatchSourceFuncs = …;
}
WaylandEventWatcherGlib::WaylandEventWatcherGlib(wl_display* display,
wl_event_queue* event_queue,
bool use_threaded_polling)
: … { … }
WaylandEventWatcherGlib::~WaylandEventWatcherGlib() { … }
bool WaylandEventWatcherGlib::StartWatchingFD(int fd) { … }
void WaylandEventWatcherGlib::StopWatchingFD() { … }
bool WaylandEventWatcherGlib::HandlePrepare() { … }
void WaylandEventWatcherGlib::HandleCheck(bool is_io_in) { … }
void WaylandEventWatcherGlib::HandleDispatch() { … }
std::unique_ptr<WaylandEventWatcher>
WaylandEventWatcher::CreateWaylandEventWatcher(wl_display* display,
wl_event_queue* event_queue,
bool use_threaded_polling) { … }
}