* Find any window by its class. Useful when searching for a window that uses * the window number as a #WindowClass, like #WC_SEND_NETWORK_MSG. * @param cls Window class * @return Pointer to the found window, or \c nullptr if not available */
| 1166 | * @return Pointer to the found window, or \c nullptr if not available |
| 1167 | */ |
| 1168 | Window *FindWindowByClass(WindowClass cls) |
| 1169 | { |
| 1170 | for (Window *w : Window::Iterate()) { |
| 1171 | if (w->window_class == cls) return w; |
| 1172 | } |
| 1173 | |
| 1174 | return nullptr; |
| 1175 | } |
| 1176 | |
| 1177 | /** |
| 1178 | * Get the main window, i.e. FindWindowById(WC_MAIN_WINDOW, 0). |
no outgoing calls
no test coverage detected