MCPcopy Create free account
hub / github.com/GNOME/gjs / handle_toggle

Method handle_toggle

gi/toggle.cpp:120–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool ToggleQueue::handle_toggle(Handler handler) {
121 g_assert(owns_lock() && "Unsafe access to queue");
122
123 if (q.empty())
124 return false;
125
126 const Item& item = q.front();
127 if (item.direction == UP)
128 debug("handle UP", item.object);
129 else
130 debug("handle DOWN", item.object);
131
132 handler(item.object, item.direction);
133 q.pop_front();
134
135 return true;
136}
137
138void ToggleQueue::shutdown() {
139 debug("shutdown", nullptr);

Callers

nothing calls this directly

Calls 3

handlerFunction · 0.85
emptyMethod · 0.80
debugFunction · 0.70

Tested by

no test coverage detected