Skip to content

Commit

Permalink
core: forward declare all used ifaces
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed May 29, 2024
1 parent 3afed43 commit 24cf55c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,22 @@ struct wl_resource;
for (auto& iface : XMLDATA.ifaces) {
const auto IFACE_CLASS_NAME_CAMEL = camelize("C_" + iface.name);
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";
Expand Down

0 comments on commit 24cf55c

Please sign in to comment.