core: forward declare all used ifaces

This commit is contained in:
Vaxry 2024-05-29 22:25:22 +02:00
parent 3afed43647
commit 24cf55c957

View file

@ -255,6 +255,22 @@ struct wl_resource;
for (auto& iface : XMLDATA.ifaces) { for (auto& iface : XMLDATA.ifaces) {
const auto IFACE_CLASS_NAME_CAMEL = camelize("C_" + iface.name); const auto IFACE_CLASS_NAME_CAMEL = camelize("C_" + iface.name);
HEADER += std::format("\nclass {};", IFACE_CLASS_NAME_CAMEL); HEADER += std::format("\nclass {};", IFACE_CLASS_NAME_CAMEL);
for (auto& rq : iface.requests) {
for (auto& arg : rq.args) {
if (!arg.interface.empty()) {
HEADER += std::format("\nclass {};", camelize("C_" + arg.interface));
}
}
}
for (auto& rq : iface.events) {
for (auto& arg : rq.args) {
if (!arg.interface.empty()) {
HEADER += std::format("\nclass {};", camelize("C_" + arg.interface));
}
}
}
} }
HEADER += "\n\n#ifndef HYPRWAYLAND_SCANNER_NO_INTERFACES\n"; HEADER += "\n\n#ifndef HYPRWAYLAND_SCANNER_NO_INTERFACES\n";